/* =========================================================
   Mandala Rehabilitációs Stúdió — stylesheet
   ========================================================= */

:root {
  /* Brand palette */
  --navy-900: #141a36;
  --navy-800: #1c2242;
  --navy-700: #262d55;
  --navy-600: #333c72;
  --navy-500: #454f8e;
  --navy-100: #eef0f8;

  --accent-600: #d9701e;
  --accent-500: #ec8b3b;
  --accent-400: #f3a35f;

  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #232640;
  --text-muted: #5c5f78;
  --border: #e7e3db;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(20, 26, 54, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 26, 54, 0.1);
  --shadow-lg: 0 20px 50px rgba(20, 26, 54, 0.16);

  --container-w: 1180px;
  --header-h: 80px;

  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 0.5em; color: var(--navy-900); }
p { margin: 0 0 1em; color: var(--text-muted); }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.icon-fill { fill: currentColor; stroke: none; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

.btn-accent {
  background: var(--accent-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--accent-500); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--navy-800);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-outline:hover { background: var(--navy-800); color: #fff; }

.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.65);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.9); color: var(--navy-900); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 46px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 30px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--navy-800);
  position: relative;
  padding: 6px 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px; height: 2px;
  background: var(--navy-900);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(20,26,54,0.92) 0%, rgba(20,26,54,0.62) 45%, rgba(20,26,54,0.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 70px 60px;
  max-width: 780px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 0.4em;
}
.hero-lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-500);
  margin-bottom: 10px;
}
.hero .eyebrow { color: var(--accent-400); }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section-alt { background: var(--navy-100); }
.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-lead { font-size: 1.06rem; }

h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.split-reverse .split-media { order: -1; }

.rounded-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
  object-fit: cover;
}

.feature-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 600;
  color: var(--navy-800);
}
.feature-list svg {
  color: var(--accent-600);
  background: #fff2e6;
  border-radius: 50%;
  padding: 4px;
  width: 26px; height: 26px;
  flex-shrink: 0;
}

/* ---------- Cards / Grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.service-category {
  background: var(--surface);
  border-left: 3px solid var(--accent-500);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
}
.service-category h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.08rem;
  margin-bottom: 14px;
}
.service-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #fff2e6;
  color: var(--accent-600);
}
.service-category-icon svg { width: 19px; height: 19px; }
.service-category ul { display: flex; flex-wrap: wrap; gap: 8px; }
.service-category li {
  background: var(--bg);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 7px 11px;
}

@media (max-width: 640px) {
  .service-grid { grid-template-columns: 1fr; gap: 14px; }
}

.section-cta {
  margin-top: 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.section-cta p { max-width: 60ch; }
.text-link {
  color: var(--accent-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--navy-800); }

/* Talpbetét feature boxes */
.feature-grid { margin-bottom: 30px; }
.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.feature-box svg {
  color: var(--accent-600);
  width: 34px; height: 34px;
  margin-bottom: 12px;
}
.feature-box h3 { font-size: 1rem; margin: 0; }

.talpbetet-indications {
  text-align: center;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy-800);
  max-width: 70ch;
  margin-inline: auto;
  margin-bottom: 40px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.recommend-card {
  margin: 0;
  background: var(--navy-900);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.recommend-card img { width: 100%; height: auto; }
.recommend-card figcaption {
  padding: 18px 20px 22px;
  color: #fff;
}
.recommend-card figcaption strong { display: block; font-family: var(--font-heading); font-size: 1.05rem; }
.recommend-card figcaption span { color: rgba(255,255,255,0.72); font-size: 0.9rem; }

/* ---------- Staff grid ----------
   Every photo is pre-cropped to the same square headshot framing, then
   displayed as a uniform circle so the grid reads as one consistent set
   regardless of the source photos' original sizes/crops. */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px 24px;
}
.staff-card {
  text-align: center;
}
.staff-card img,
.staff-avatar-fallback {
  width: clamp(112px, 14vw, 152px);
  height: clamp(112px, 14vw, 152px);
  border-radius: 50%;
  margin: 0 auto 18px;
}
.staff-card img {
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--surface);
  outline: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease;
}
.staff-card:hover img { transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow-md); }
.staff-card h3 { font-size: 1.02rem; margin-bottom: 2px; }
.staff-card p { margin: 0; font-size: 0.88rem; color: var(--accent-600); font-weight: 600; }

.staff-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  border: 3px solid var(--surface);
  outline: 1px solid var(--border);
}

/* ---------- Contact ---------- */
.contact-list {
  display: grid;
  gap: 20px;
  margin: 30px 0;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-list svg { color: var(--accent-600); margin-top: 2px; }
.contact-list strong { color: var(--navy-900); }
.contact-list em { color: var(--text-muted); font-style: italic; font-size: 0.85rem; }
.contact-list a:hover { color: var(--accent-600); }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-800);
  transition: background-color .15s ease, color .15s ease;
}
.social-links a:hover { background: var(--navy-800); color: #fff; }
.social-links svg { width: 19px; height: 19px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.75);
  padding-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 16px; max-width: 32ch; }
.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.footer-nav ul { display: grid; gap: 10px; }
.footer-nav a:hover { color: var(--accent-400); }
.footer-contact p { color: rgba(255,255,255,0.72); margin-bottom: 8px; }
.footer-contact a:hover { color: var(--accent-400); }
.footer-contact em { color: rgba(255,255,255,0.4); font-size: 0.82rem; }

.footer-bottom {
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: 22px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Reveal-on-scroll ----------
   Default state is fully visible so content never depends on JS
   (progressive enhancement: only animate once js-enabled is confirmed). */
.reveal { opacity: 1; transform: none; }
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
}

@media (max-width: 900px) {
  /* backdrop-filter would make the header the containing block of the fixed nav */
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
  }
  .main-nav {
    position: fixed;
    z-index: 400;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    padding: 30px 24px;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a {
    display: block;
    padding: 14px 6px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
  }
  .main-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-accent span:not(.visually-hidden) { display: none; }
}

@media (min-width: 901px) {
  .main-nav ul { align-items: center; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .section { padding-block: 64px; }
  .hero-actions .btn { width: 100%; }
  .header-actions .btn-accent.btn { padding: 10px 16px; font-size: 0.85rem; }
}
