/* Alzheimer Hellas — modern local theme */
:root {
  --navy: #1e3876;
  --navy-2: #162a5a;
  --sky: #4faae7;
  --sky-soft: #e8f4fc;
  --rose: #f6a2b1;
  --ink: #1f2638;
  --muted: #5f6a80;
  --line: #e3e7ee;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 35, 80, .06), 0 8px 24px rgba(20, 35, 80, .08);
  --shadow-lg: 0 12px 40px rgba(20, 35, 80, .16);
  --font: "Inter", "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: rgba(30, 56, 118, .3); text-underline-offset: 3px; }
a:hover { color: var(--sky); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.headbar .wrap { display: flex; align-items: center; gap: 18px; padding-block: 12px; transition: padding .25s; }
.logo img { height: 64px; width: auto; transition: height .25s; }
.scrolled .headbar .wrap { padding-block: 6px; }
.scrolled .logo img { height: 44px; }
.org-name { font-size: 14px; line-height: 1.35; color: var(--muted); font-weight: 500; border-left: 2px solid var(--line); padding-left: 16px; }
.headbar .social { margin-left: auto; }
.social { display: flex; gap: 6px; }
.social a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); transition: background .2s, color .2s; }
.social a:hover { background: var(--sky-soft); color: var(--sky); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--bg-alt); color: var(--navy); display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--sky-soft); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.burger { display: none; gap: 4px; align-content: center; }
.burger span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- main menu (desktop) ---------- */
.main-nav { background: var(--navy); }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; }
.menu > li { position: relative; }
.menu > li > .nav-link { display: block; padding: 14px 14px; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; letter-spacing: .01em; cursor: pointer; position: relative; white-space: nowrap; }
.menu > li > .nav-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px; background: var(--sky); transform: scaleX(0); transition: transform .25s; transform-origin: left; }
.menu > li:hover > .nav-link::after, .menu > li.is-active > .nav-link::after, .menu > li.open > .nav-link::after { transform: scaleX(1); }
.menu > li.has-sub > .nav-link { padding-right: 28px; }
.menu > li.has-sub > .nav-link::before { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); opacity: .8; }
.sub-toggle { display: none; }

.sub { position: absolute; min-width: 260px; max-width: 360px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s; }
.sub.lvl1 { top: 100%; left: 0; }
.menu > li:last-child > .sub, .menu > li:nth-last-child(2) > .sub { left: auto; right: 0; }
.sub li { position: relative; }
.sub .nav-link { display: block; padding: 9px 14px; border-radius: 9px; color: var(--ink); font-size: 15px; line-height: 1.4; text-decoration: none; cursor: pointer; }
.sub .nav-link:hover, .sub li.is-active > .nav-link { background: var(--sky-soft); color: var(--navy); }
.sub li.has-sub > .nav-link { padding-right: 30px; }
.sub li.has-sub > .nav-link::after { content: "›"; position: absolute; right: 14px; font-size: 18px; line-height: 1; top: 11px; color: var(--muted); }
.sub .sub { top: -8px; left: 100%; margin-left: 4px; }
.menu > li:nth-last-child(-n+3) .sub .sub { left: auto; right: 100%; margin: 0 4px 0 0; }
.menu li:hover > .sub, .menu li:focus-within > .sub, .menu li.open > .sub { opacity: 1; visibility: visible; transform: none; }

/* ---------- mobile menu ---------- */
@media (max-width: 1180px) {
  .org-name, .headbar .social { display: none; }
  .search-open { margin-left: auto; }
  .burger { display: grid; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); background: #fff; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; box-shadow: var(--shadow-lg); padding-top: 92px; }
  .main-nav .wrap { padding: 0 12px 40px; }
  .nav-open .main-nav { transform: none; }
  .nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 25, 50, .4); z-index: 40; }
  .menu { display: block; }
  .menu li { position: relative; border-bottom: 1px solid var(--line); }
  .menu .sub li { border: 0; }
  .menu > li > .nav-link { color: var(--ink); padding: 14px 52px 14px 12px; white-space: normal; }
  .menu > li > .nav-link::after, .menu > li.has-sub > .nav-link::before, .sub li.has-sub > .nav-link::after { display: none; }
  .menu > li.is-active > .nav-link { color: var(--navy); }
  .sub-toggle { display: grid; place-items: center; position: absolute; right: 4px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg-alt); cursor: pointer; }
  .sub .sub-toggle { top: 1px; width: 36px; height: 36px; }
  .sub-toggle::before { content: ""; width: 7px; height: 7px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .open > .sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
  .sub, .sub .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; max-width: none; padding: 0 0 10px 12px; margin: 0; border-radius: 0; }
  .menu li.open > .sub { display: block; }
  .menu li:hover > .sub, .menu li:focus-within > .sub { display: none; }
  .menu li.open:hover > .sub, .menu li.open:focus-within > .sub { display: block; }
  .sub .nav-link { padding-right: 48px; }
}
@media (max-width: 1180px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .site-header .headbar { position: relative; z-index: 2; background: #fff; }
}

/* ---------- search ---------- */
.search-panel { position: fixed; inset: 0; z-index: 80; background: rgba(15, 25, 50, .55); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-box { width: min(720px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; max-height: 80vh; }
.search-box input { font: inherit; font-size: 19px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 16px; outline: none; }
.search-box input:focus { border-color: var(--sky); }
.search-results { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.search-results a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a:focus { background: var(--sky-soft); }
.search-results strong { display: block; color: var(--navy); }
.search-results small { color: var(--muted); display: block; line-height: 1.5; }
.search-results mark { background: #fff1b8; color: inherit; border-radius: 3px; }
.search-results .empty { padding: 12px 14px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; border: 2px solid var(--navy); color: var(--navy); background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.btn-primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line); }

/* ---------- home ---------- */
.home-hero { background: radial-gradient(1200px 500px at 85% -10%, var(--sky-soft), transparent 60%), linear-gradient(180deg, #fff, var(--bg-alt)); padding-block: clamp(32px, 6vw, 72px); }
.home-hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0 0 16px; }
.home-hero h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.15; color: var(--navy); margin: 0 0 16px; letter-spacing: -.01em; }
.home-hero .lead { color: var(--muted); font-size: 18px; margin: 0 0 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media img { border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; }
@media (max-width: 900px) { .home-hero .wrap { grid-template-columns: 1fr; } .hero-media { order: -1; } }

.section { padding-block: clamp(48px, 7vw, 88px); }
.section.alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 0; color: var(--navy); line-height: 1.2; position: relative; padding-bottom: 12px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--sky), var(--rose)); }

.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.poster { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; transition: transform .25s, box-shadow .25s; }
a.poster:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (max-width: 800px) { .posters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .posters { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 500 / 301; box-shadow: var(--shadow); isolation: isolate; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(18, 34, 75, .85)); z-index: 1; }
.tile span { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; color: #fff; font-weight: 700; font-size: 18px; line-height: 1.3; }
.tile span::after { content: " →"; opacity: 0; transition: opacity .25s; }
.tile:hover img { transform: scale(1.06); }
.tile:hover span::after { opacity: 1; }

.espa { text-align: center; max-width: 900px; }
.espa p { margin: 0 0 8px; color: var(--navy); }
.espa img { margin: 24px auto 0; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.logo-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; transition: transform .2s, box-shadow .2s, border-color .2s; }
.logo-card img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: grayscale(.25); transition: filter .2s; }
a.logo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--navy); }
.logo-card:hover img { filter: none; }

/* ---------- inner pages ---------- */
.page-hero { background: linear-gradient(120deg, var(--navy), var(--navy-2) 60%, #23458f); color: #fff; padding-block: clamp(36px, 6vw, 64px); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 170, 231, .45), transparent 70%); }
.page-hero h1 { margin: 6px 0 0; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.2; max-width: 900px; position: relative; z-index: 1; }
.crumbs { font-size: 14px; color: rgba(255, 255, 255, .7); display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.content { padding-block: clamp(36px, 6vw, 72px); }

.prose { max-width: 1040px; overflow-wrap: anywhere; }
.prose > * > * > * > :first-child, .prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--navy); line-height: 1.25; margin: 1.6em 0 .6em; }
.prose h1 { font-size: clamp(24px, 2.6vw, 32px); }
.prose h2 { font-size: clamp(22px, 2.3vw, 28px); }
.prose h3 { font-size: 20px; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--sky); }
.prose img { border-radius: 12px; margin-inline: auto; }
.prose a[href$=".pdf"] { font-weight: 600; }
.prose blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--sky); background: var(--sky-soft); border-radius: 0 12px 12px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.prose th, .prose tr:first-child td { background: var(--bg-alt); }
.prose iframe, .prose video { max-width: 100%; border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* converted grid layouts */
.grid { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 24px; }
.grid > * { flex: 1 1 100%; min-width: 0; }
.grid.c2 > * { flex-basis: calc(50% - 24px); }
.grid.c3 > * { flex-basis: calc(33.333% - 24px); }
.grid.c4 > * { flex-basis: calc(25% - 24px); }
.grid.c5 > *, .grid.c6 > * { flex-basis: calc(20% - 24px); }
.grid > .w-1-3, .grid > .w-1-4 { flex: 1 1 calc(30% - 24px); }
.grid > .w-2-3, .grid > .w-3-4 { flex: 2 1 calc(60% - 24px); }
.grid > .w-1-2 { flex: 1 1 calc(50% - 24px); }
@media (max-width: 900px) { .grid.c4 > *, .grid.c5 > *, .grid.c6 > * { flex-basis: calc(33.333% - 24px); } }
@media (max-width: 700px) {
  .grid > *, .grid.c2 > *, .grid.c3 > * { flex-basis: 100%; }
  .grid.c4 > *, .grid.c5 > *, .grid.c6 > * { flex-basis: calc(50% - 24px); }
}
.prose .grid .card { height: 100%; }
.prose .grid.c3 .card, .prose .grid.c4 .card, .prose .grid.c5 .card, .prose .grid.c6 .card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; transition: box-shadow .2s, transform .2s; }
.prose .grid.c3 .card:hover, .prose .grid.c4 .card:hover, .prose .grid.c5 .card:hover, .prose .grid.c6 .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.prose .card h3 { font-size: 16px; margin: 10px 0 0; }
.prose .card a { text-decoration: none; }
.center { text-align: center; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.contact-form h2 { margin: 0 0 18px; color: var(--navy); }
.contact-form label { display: block; font-weight: 600; margin-bottom: 16px; font-size: 15px; }
.contact-form label b { color: #c0394b; font-weight: 600; }
.contact-form input, .contact-form textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--bg-alt); transition: border-color .2s, background .2s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--sky); background: #fff; }
.contact-form .err { display: none; color: #c0394b; font-weight: 500; margin-top: 4px; }
.contact-form .invalid .err { display: block; }
.contact-form .invalid input, .contact-form .invalid textarea { border-color: #e48a98; }
.form-actions { display: flex; gap: 12px; }
.form-note { font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.contact-locs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .contact-locs { grid-template-columns: 1fr; } }
.loc-card { background: var(--bg-alt); border-radius: 16px; padding: 18px; border-top: 4px solid var(--sky); }
.loc-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.loc-card p { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.loc-card a { font-weight: 600; font-size: 15px; text-decoration: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-2); color: rgba(255, 255, 255, .78); font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 2.4fr; gap: 40px; padding-block: 56px 40px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.footer-brand img { height: 64px; width: auto; background: #fff; border-radius: 12px; padding: 6px 10px; margin-bottom: 14px; }
.footer-brand p { margin: 0 0 8px; }
.footer-brand .social { margin-top: 14px; }
.site-footer .social a { background: rgba(255, 255, 255, .08); color: #fff; }
.site-footer .social a:hover { background: var(--sky); color: #fff; }
.locs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.loc h4 { color: #fff; margin: 0 0 8px; font-size: 16px; }
.loc p { margin: 0; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 18px; font-size: 14px; grid-template-columns: none; }
@media (max-width: 1000px) { .site-footer .wrap { grid-template-columns: 1fr; } .locs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .locs { grid-template-columns: 1fr; } }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* fixes */
.search-panel[hidden] { display: none; }
.main-nav > .wrap { max-width: 1440px; }
@media (min-width: 1181px) {
  .menu { flex-wrap: nowrap; }
  .menu > li > .nav-link { padding: 14px 11px; font-size: 14.5px; }
  .menu > li.has-sub > .nav-link { padding-right: 24px; }
  .menu > li.has-sub > .nav-link::before { right: 9px; }
  .menu > li > .nav-link::after { left: 11px; right: 11px; }
}
@media (min-width: 1181px) and (max-width: 1360px) {
  .menu > li > .nav-link { padding-inline: 8px; font-size: 13.5px; }
  .menu > li.has-sub > .nav-link { padding-right: 20px; }
  .menu > li.has-sub > .nav-link::before { right: 7px; }
}
@media (min-width: 1181px) and (max-width: 1300px) {
  .main-nav > .wrap { padding-inline: 8px; }
  .menu > li > .nav-link { padding-inline: 6px; font-size: 13px; }
  .menu > li.has-sub > .nav-link { padding-right: 17px; }
  .menu > li.has-sub > .nav-link::before { right: 5px; width: 5px; height: 5px; }
}

/* backend additions */
.admin-bar { position: fixed; bottom: 16px; left: 16px; z-index: 90; display: flex; gap: 8px; }
.admin-bar a { background: var(--ink); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); }
.admin-bar a:hover { background: var(--navy); color: #fff; }
.form-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.form-alert.ok { background: #e7f7ee; color: #17663a; }
.form-alert.err { background: #fdecef; color: #a3283b; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-intro { margin-bottom: 32px; }
.prose-wide { max-width: none; }
