/* ======== Light, professional, high-contrast ======== */
:root {
  --bg: #f9fafb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
  --border: #e5e7eb;
  --brand: #0d6efd;
  --brand-hover: #0b5ed7;
  --accent: #fbbf24;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --shadow-hover: 0 3px 8px rgba(0,0,0,.1);

  /* Media / date badge */
  --badge-bg: rgba(15, 23, 42, 0.6);
  --badge-text: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

body {
  margin: 0;

  /* Image in back + white translucent overlay */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('../../img/miltos_keri2.jpg');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;

  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  font-size: clamp(15px, 1.6vw, 17px);
  -webkit-font-smoothing: antialiased;
}


main { max-width: 1200px; margin: auto; padding: 1rem clamp(1rem, 3vw, 2rem); }

h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  margin: .25rem 0 .75rem;
  color: var(--text);
}
h2 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: .25rem 0;
  color: var(--text);
}
.meta { font-size: .92rem; color: var(--muted); }

/* ===== Filters ===== */
.filters{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: .85rem 1rem;
  align-items:end;
  margin-bottom: 1.25rem;
}
.filters .field{ display:flex; flex-direction:column; gap:.35rem; }
.filters .actions{
  grid-column: 1 / -1;
  display:flex; gap:.6rem; flex-wrap:wrap;
}

@media (max-width:1024px){ .filters{ grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width:780px){ .filters{ grid-template-columns: 1fr 1fr; } }
@media (max-width:520px){ .filters{ grid-template-columns: 1fr; } .filters .actions{ justify-content:flex-start; } }

label { font-weight: 600; color: var(--text); }

input[type="search"], input[type="text"], select{
  padding:.65rem .75rem;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  min-height: 46px;
  width:100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder{ color:#9ca3af; }
input:focus, select:focus{
  outline:none; border-color:var(--brand);
  box-shadow: 0 0 0 2px rgba(13,110,253,.14);
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.4rem; padding:.65rem .95rem; min-height:46px; border-radius: var(--radius);
  font-weight:600; text-decoration:none; cursor:pointer; transition: all .15s ease;
}
.btn-primary{
  border:1px solid var(--brand); background: var(--brand); color:#fff;
}
.btn-primary:hover{ background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost{
  border:1px solid var(--border); background:#fff; color:var(--text);
}
.btn-ghost:hover{ border-color: var(--brand); color: var(--brand); }

/* ===== Events grid & cards ===== */
.events{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap:1.2rem;
}
@media (max-width:360px){ .events{ grid-template-columns: 1fr; } }

.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
  overflow: hidden; /* keep overlay corners rounded */
  display:flex; flex-direction:column; gap:.75rem;
}
.card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-title{ padding: 1rem 1rem 0; }

/* ===== Media (logo area) with date badge ===== */
.media{
  position: relative;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  /* Maintain a comfortable banner area regardless of logo shape */
  aspect-ratio: 16 / 9;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.media {
  position: relative;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  overflow: hidden;
}

.media-img {
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
}

.date-badge{
  position:absolute;
  left: 10px;
  bottom: 10px; /* bottom looks more balanced over logos */
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: .35rem .6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
@media (max-width:520px){
  .date-badge{ left: 8px; bottom: 8px; font-size: .9rem; }
}

/* ===== Additional info ===== */
.info{ padding: 0 1rem 1rem; }
.tags{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.35rem 0; }
.tag{
  display:inline-block; padding:.25rem .55rem;
  border:1px solid var(--border); border-radius:999px;
  background: #f1f5f9; font-size:.85rem; color: var(--muted);
  white-space: nowrap;
}
.cta-row{
  margin-top:.5rem;
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
}
.price{ font-weight: 700; font-size: .98rem; color: var(--text); }

/* ===== Empty & footer ===== */
.empty{
  border:1px dashed var(--border);
  padding:1.2rem; border-radius: var(--radius);
  background:#f8fafc; text-align:center; color:var(--muted);
}
footer{ margin-top:2rem; text-align:center; font-size:.88rem; color:var(--muted); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
/* ===== Filters toggle animation ===== */
#toggle-filters {
  margin-bottom: 0.8rem;
}

.filters-wrapper {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.filters-wrapper[hidden] {
  display: block; /* keeps transition area but invisible */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.filters-wrapper:not([hidden]) {
  max-height: 500px; /* enough for content height */
  opacity: 1;
  pointer-events: auto;
}

/* ===== Existing basic hero styles ===== */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border-bottom: 1px solid #e5e5e5;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero-logo {
  width: 120px;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
}

.hero-subtext {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.divider {
  width: 60px;
  height: 3px;
  background: #0070f3;
  border: none;
  margin: 0.5rem auto 2rem;
  border-radius: 2px;
}

/* =====================================================================
   Header Enhancements (override-only; affects header without touching rest)
   ===================================================================== */

/* Visual theme variables for the hero enhancements (non-breaking) */
:root {
  --hero-gradient-start: rgba(13,110,253,0.05);
  --hero-gradient-end: rgba(13,110,253,0);
  --hero-overlay: rgba(15, 23, 42, 0.06);
  --hero-divider: var(--brand);
  --hero-maxw: 720px;
}

/* Enhanced hero container (overrides the basic hero above) */
.hero {
  position: relative;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  background:
    linear-gradient(180deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%),
    linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Optional background-image mode */
.hero[data-bg="image"] { background: #0b1220; }
.hero[data-bg="image"]::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}
.hero[data-bg="image"]::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--hero-bg, none); /* set inline: style="--hero-bg:url('/img.jpg')" */
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: saturate(105%) contrast(102%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--hero-maxw);
  margin: 0 auto;
  animation: fadeUp 0.6s ease-out both;
}

.hero-logo {
  width: 120px;
  margin-bottom: 1rem;
  display: inline-block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.05));
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1px;
}

.hero-subtext {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

/* Divider upgraded to use brand variable and subtle shadow */
.divider {
  width: 60px;
  height: 3px;
  background: var(--hero-divider);
  border: none;
  margin: 0.5rem auto 2rem;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(13,110,253,.15);
}

/* Title underline for the H1 that follows the hero */
.hero + h1 {
  display: inline-block;
  border-bottom: 3px solid var(--brand);
  padding-bottom: .2rem;
  margin-top: .25rem;
}

/* Entrance motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Filters toggle: add chevron & accessible focus */
#toggle-filters {
  position: relative;
  padding-right: 2.25rem; /* space for chevron */
}

#toggle-filters::after {
  content: "";
  position: absolute;
  right: .85rem;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transition: transform .2s ease;
  opacity: 0.85;
}

#toggle-filters[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(-135deg);
}

#toggle-filters:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13,110,253,.18);
  border-color: var(--brand);
}

/* Responsive refinements for the header only */
@media (max-width: 780px) {
  .hero { padding: 2rem 1rem 1.25rem; }
}

@media (max-width: 520px) {
  .hero { padding: 1.5rem 1rem 1rem; }
  .hero-subtext { display: none; }
  .hero-logo { width: 96px; margin-bottom: .75rem; }
  .hero-tagline { font-size: 1.25rem; }
  .divider { margin: 0.35rem auto 1.25rem; }
  .hero + h1 { border-bottom-width: 2px; }
}

/* High-contrast accessibility tweaks */
@media (prefers-contrast: more) {
  .hero { border-bottom-color: #d1d5db; }
  .divider { box-shadow: none; }
  #toggle-filters:focus-visible { box-shadow: 0 0 0 3px rgba(13,110,253,.28); }
}
/* ===== Header (brand + quick actions) ===== */
.site-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: visible;
  position: relative;   /* NEW */
  z-index: 10;          /* NEW: above hero */
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
}

/* Brand block */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo { height: 80px; width: auto; display: block; }
.brand-name { font-weight: 800; letter-spacing: .2px; font-size: 1.05rem; }

/* Right side (favicon + language) */
.site-header-right {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: block;
}

/* Language button */
.lang-switch { position: relative; }
.lang-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: .5rem .7rem;
  border-radius: 999px;
  font-weight: 600;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: default; /* menu is future */
}
.lang-btn .caret {
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .75;
}

/* Optional future dropdown */
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;          /* ensure it floats above hero */
  list-style: none;
  margin: 0;
  padding: .35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 160px;
  display: block;
}

.lang-btn {
  cursor: pointer;
}

.lang-menu li a {
  display: block;
  padding: .65rem .75rem;   /* more vertical spacing */
  font-weight: 700;         /* bold */
  text-align: center;       /* centered */
  text-decoration: none;    /* remove underline */
  color: var(--text);       /* normal text, no blue */
  border-radius: 8px;
}

.lang-menu li a:hover {
  background: #f3f4f6;
  color: var(--text);        /* prevent hover turning blue */
}


/* Responsive header stacking */
@media (max-width: 640px) {
  .site-header-inner {
    flex-wrap: wrap;
    row-gap: .5rem;
  }
  .brand-name { display: none; } /* keep it compact on small screens */
}
/* Honor [hidden] for everything (including the popup) */
[hidden] { display: none !important; }

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;                 /* only applies when not [hidden] */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: #fff;
  width: 90%;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.popup-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.popup-content { margin-top: 10px; }
