/* =========================================================================
   Spišský hrad — Kultúrne dedičstvo Slovenska
   Global stylesheet
   -------------------------------------------------------------------------
   Sections:
     1.  Design tokens (colours, type, spacing)
     2.  Base / reset
     3.  Layout helpers
     4.  Typography
     5.  Buttons & links
     6.  Header & navigation
     7.  Hero sections
     8.  Media / image frames (with graceful fallback)
     9.  Home page sections
     10. About page sections
     11. Appointment page sections
     12. Gallery page sections
     13. Slider
     14. Lightbox
     15. Footer
     16. Reveal animations
     17. Responsive breakpoints
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* Colour palette */
  --parchment: #F4EFE6;
  --cream: #FCFAF5;
  --charcoal: #252522;
  --stone: #837D72;
  --forest: #34483A;
  --deep-green: #26372D;
  --gold: #B79458;
  --border: #D9D1C3;

  /* Derived tones */
  --charcoal-soft: #4a4842;
  --gold-soft: #cbb182;
  --shadow-soft: 0 12px 30px rgba(37, 37, 34, 0.10);
  --shadow-hover: 0 18px 44px rgba(37, 37, 34, 0.16);

  /* Typography */
  --font-serif: "Cormorant Garamond", "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Fluid type scale */
  --fs-display: clamp(2.6rem, 6vw, 5rem);
  --fs-h1: clamp(2.1rem, 4.6vw, 3.6rem);
  --fs-h2: clamp(1.8rem, 3.6vw, 2.85rem);
  --fs-h3: clamp(1.3rem, 2.2vw, 1.7rem);
  --fs-lead: clamp(1.05rem, 1.6vw, 1.3rem);
  --fs-body: clamp(1rem, 1.1vw, 1.075rem);
  --fs-small: 0.86rem;

  /* Spacing / rhythm */
  --space-section: clamp(4rem, 9vw, 8rem);
  --container: 1240px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 78px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.5s;
}

/* -------------------------------------------------------------------------
   2. BASE / RESET
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll lock used when mobile menu or lightbox is open */
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   3. LAYOUT HELPERS
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.75rem);
}

.section { padding-block: var(--space-section); }

.section--parchment { background: var(--parchment); }
.section--cream { background: var(--cream); }
.section--stone-tint { background: linear-gradient(180deg, var(--parchment), var(--cream)); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1rem;
}
.label::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.label--center { justify-content: center; }
.label--light { color: var(--gold-soft); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 1200;
  background: var(--forest);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* -------------------------------------------------------------------------
   4. TYPOGRAPHY
   ------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--charcoal);
  margin: 0 0 0.6em;
  letter-spacing: 0.005em;
}

.display { font-size: var(--fs-display); line-height: 1.04; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: var(--fs-lead); color: var(--charcoal-soft); }
.muted { color: var(--stone); }

.note {
  font-size: var(--fs-small);
  color: var(--stone);
  font-style: italic;
}

/* Editorial quote */
.pullquote {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(1rem, 4vw, 2rem);
}
.pullquote__mark {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 14vw, 10rem);
  line-height: 0.6;
  color: var(--gold);
  opacity: 0.35;
  display: block;
  height: 0.5em;
}
.pullquote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.9rem);
  line-height: 1.25;
  color: var(--charcoal);
  margin: 0;
  font-weight: 500;
}

/* -------------------------------------------------------------------------
   5. BUTTONS & LINKS
   ------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--forest);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary { --btn-bg: var(--forest); --btn-fg: #fff; }
.btn--primary:hover { background: var(--deep-green); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #2b220f; }
.btn--gold:hover { background: #a8834a; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--charcoal);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--parchment); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); }

.btn--block { width: 100%; justify-content: center; }

/* Text link with animated arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link-arrow .arrow { transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--gold); border-color: var(--gold); }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow--light { color: #fff; }
.link-arrow--light:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* -------------------------------------------------------------------------
   6. HEADER & NAVIGATION
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(37, 37, 34, 0.06);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Transparent state over a dark hero (home & about) */
.site-header.header--transparent {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.site-header.header--transparent .brand__name,
.site-header.header--transparent .nav__link { color: #fff; }
.site-header.header--transparent .brand__logo { color: #fff; }
.site-header.header--transparent .nav-toggle__bar { background: #fff; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  transition: color 0.35s var(--ease);
}
.brand__logo { color: var(--forest); display: inline-flex; transition: color 0.35s var(--ease); }
.brand__logo svg { width: 34px; height: 34px; display: block; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list { display: flex; align-items: center; gap: 1.85rem; }
.nav__link {
  position: relative;
  font-weight: 500;
  color: var(--charcoal);
  padding: 0.4rem 0;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--gold); }
.nav__link:hover::after,
.nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--gold); }
.site-header.header--transparent .nav__link.is-active { color: var(--gold-soft); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.25s var(--ease), background 0.35s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Right-hand header cluster: nav + language switcher + hamburger */
.header__actions { display: flex; align-items: center; gap: 1rem; }

/* Language switcher */
.langsw { position: relative; }
.langsw__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.5rem 0.7rem;
  min-height: 42px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.35s var(--ease);
}
.langsw__btn:hover { border-color: var(--gold); color: var(--gold); }
.langsw__globe { width: 18px; height: 18px; }
.langsw__chev { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.langsw.is-open .langsw__chev { transform: rotate(180deg); }

.site-header.header--transparent .langsw__btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.site-header.header--transparent .langsw__btn:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

.langsw__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 0.4rem;
  display: none;
  z-index: 1200;
}
.langsw.is-open .langsw__menu { display: block; }
.langsw__menu li { margin: 0; }
.langsw__opt {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.langsw__opt:hover { background: var(--parchment); }
.langsw__opt.is-active { color: var(--gold); font-weight: 700; }
.langsw__code {
  flex: none;
  width: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.langsw__opt.is-active .langsw__code { color: var(--gold); }

/* -------------------------------------------------------------------------
   7. HERO
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}
.hero--about { min-height: 82svh; align-items: center; }

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 26, 21, 0.35) 0%, rgba(20, 26, 21, 0.10) 35%, rgba(18, 24, 19, 0.82) 100%),
    linear-gradient(90deg, rgba(18, 24, 19, 0.62) 0%, rgba(18, 24, 19, 0.15) 55%, transparent 100%);
}
.hero__inner {
  padding-block: clamp(6rem, 14vh, 9rem) clamp(4rem, 10vh, 6rem);
  max-width: 720px;
}
.hero__inner--center { margin-inline: auto; text-align: center; max-width: 820px; }
.hero .label { color: var(--gold-soft); }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }
.hero .lead { color: rgba(255, 255, 255, 0.9); }
.hero .btn-row { margin-top: 2rem; }
.hero .btn-row--center { justify-content: center; }

/* Scroll indicator */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-cue__line {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  animation: cueDrop 2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(6px); opacity: 0; }
}

/* Simple sub-page header (gallery) */
.page-head {
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--parchment), var(--cream));
  border-bottom: 1px solid var(--border);
}
.page-head__inner { max-width: 760px; }

/* -------------------------------------------------------------------------
   8. MEDIA / IMAGE FRAMES  (graceful fallback if a photo is missing)
   ------------------------------------------------------------------------- */
/* A stone-coloured placeholder with a faint castle silhouette sits behind
   every photo. If the <img> loads it covers the frame; if it fails to load
   (main.js adds .is-missing), the tasteful fallback stays visible. */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--stone);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 140'%3E%3Cg fill='none' stroke='%23fcfaf5' stroke-opacity='0.32' stroke-width='2'%3E%3Cpath d='M30 110V70l10-8v-10h8v6h10v-6h8v10l10 8v40'/%3E%3Cpath d='M110 110V60l14-10 14 10v50'/%3E%3Cpath d='M150 110V78h20v32'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 42%;
  box-shadow: var(--shadow-soft);
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.img-frame.is-missing img { opacity: 0; }
.img-frame--zoom img:hover { transform: scale(1.05); }

/* Aspect helpers */
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-2 { aspect-ratio: 3 / 2; }

/* -------------------------------------------------------------------------
   9. HOME PAGE SECTIONS
   ------------------------------------------------------------------------- */
/* About intro */
.about-intro .link-arrow { margin-top: 0.5rem; }

/* Protection cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.card {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__media { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; }
.card__body { padding: clamp(1.4rem, 2.5vw, 1.9rem); position: relative; }
.card__num {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--charcoal-soft); font-size: 0.98rem; margin: 0; }

/* Help section (four actions) */
.help-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.help-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.help-item__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--parchment);
  color: var(--forest);
  border: 1px solid var(--border);
}
.help-item__icon svg { width: 24px; height: 24px; }
.help-item p { margin: 0; font-weight: 500; }

.statement {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.25rem);
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.statement::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 140'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'%3E%3Cpath d='M110 130V50l16-12 16 12v80'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right -10px bottom -10px;
  background-size: 220px;
  pointer-events: none;
}
.statement p {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.3;
  margin: 0;
  position: relative;
}

/* Contact / booking + hours (alternating splits) reuse .split */
.phone-line {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--forest);
  margin: 0.5rem 0 1.5rem;
}
.phone-line svg { width: 28px; height: 28px; color: var(--gold); }
.phone-line:hover { color: var(--deep-green); }

/* Opening hours table */
.hours {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
}
.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.hours__row:last-child { border-bottom: 0; }
.hours__row.is-weekend { background: var(--parchment); }
.hours__day { font-weight: 500; }
.hours__time { color: var(--charcoal-soft); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   10. ABOUT PAGE SECTIONS
   ------------------------------------------------------------------------- */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.reason {
  padding: 1.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.reason:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.reason__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--parchment);
  color: var(--forest);
  margin-bottom: 1.1rem;
  border: 1px solid var(--border);
}
.reason__icon svg { width: 26px; height: 26px; }
.reason h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.reason p { margin: 0; font-size: 0.96rem; color: var(--charcoal-soft); }

/* UNESCO / cultural context strip */
.context {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius-lg);
}
.context__badge {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold-soft);
  flex: none;
}
.context h3 { color: #fff; margin-bottom: 0.4rem; }
.context p { margin: 0; color: rgba(255, 255, 255, 0.82); }

/* Before / after comparison */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
}
.compare__item { text-align: center; }
.compare__media { aspect-ratio: 4 / 3; margin-bottom: 1rem; }
.compare__tag {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
.compare__tag--before { background: #efe1d6; color: #8a4b32; }
.compare__tag--after { background: #dce6dd; color: var(--deep-green); }

/* News blog cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card__media { aspect-ratio: 16 / 10; border-radius: 0; box-shadow: none; }
.news-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.news-card__meta {
  display: flex; gap: 0.75rem; align-items: center;
  font-size: var(--fs-small); color: var(--stone);
}
.news-card__cat {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-card h3 { font-size: 1.3rem; margin: 0; }
.news-card p { margin: 0; font-size: 0.96rem; color: var(--charcoal-soft); }
.news-card .link-arrow { margin-top: auto; }

/* Featured news (appointment page) */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
}
.featured__media { border-radius: 0; box-shadow: none; min-height: 320px; }
.featured__body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }

/* -------------------------------------------------------------------------
   11. APPOINTMENT PAGE SECTIONS
   ------------------------------------------------------------------------- */
.booking-intro { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)); }

/* Large circular castle image, becomes rounded rectangle on small screens */
.circle-frame {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  max-width: 520px;
  margin-inline: auto;
  border: 6px solid var(--cream);
  outline: 1px solid var(--border);
}
.circle-frame::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.4;
  pointer-events: none;
}

/* Booking form panel */
.panel {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-soft);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .req { color: var(--gold); }
.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--charcoal);
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(183, 148, 88, 0.2);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #b4472e; box-shadow: 0 0 0 3px rgba(180, 71, 46, 0.15); }
.field__error {
  font-size: 0.82rem;
  color: #b4472e;
  min-height: 1rem;
}
.form-note { margin-top: 1rem; }

/* Feedback message after submit */
.form-feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #e4ede5;
  border: 1px solid #b9cdbc;
  color: var(--deep-green);
  display: none;
}
.form-feedback.is-visible { display: block; }
.form-feedback a { color: var(--forest); font-weight: 600; text-decoration: underline; }

/* Info / contact / billing cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.info-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.info-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.info-card dl { margin: 0; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
}
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--stone); font-size: 0.92rem; }
.info-row dd { margin: 0; font-weight: 500; text-align: right; }
.placeholder-val { color: var(--gold); font-style: italic; }

/* Google map */
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* -------------------------------------------------------------------------
   12. GALLERY PAGE
   ------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.is-active { background: var(--forest); color: #fff; border-color: var(--forest); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 10px;   /* masonry via row spans set in JS */
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}
.gallery-item {
  grid-row-end: span 24;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.gallery-item .img-frame { width: 100%; height: 100%; border-radius: var(--radius); }
.gallery-item.is-hidden { display: none; }
.gallery-item__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1rem 0.8rem;
  background: linear-gradient(transparent, rgba(20, 24, 20, 0.72));
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery-item:hover .gallery-item__cap,
.gallery-item:focus-visible .gallery-item__cap { opacity: 1; transform: translateY(0); }
.gallery-item__badge {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(252, 250, 245, 0.9);
  color: var(--forest);
}

.load-more-wrap { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }
.load-more-wrap.is-done .btn { display: none; }

/* -------------------------------------------------------------------------
   13. HOME SLIDER
   ------------------------------------------------------------------------- */
.slider { position: relative; }
.slider__viewport { overflow: hidden; }
.slider__track {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}
.slider__slide {
  flex: 0 0 calc(100% / var(--visible, 3));
  padding-inline: clamp(0.4rem, 1vw, 0.75rem);
  box-sizing: border-box;
}
.slider__figure { margin: 0; cursor: zoom-in; }
.slider__media { aspect-ratio: 4 / 3; }
.slider__caption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--stone); text-align: center; }

.slider__nav {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.75rem;
}
.slider__btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--charcoal);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.slider__btn:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.slider__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.slider__btn svg { width: 22px; height: 22px; }

.slider-foot { display: flex; justify-content: center; margin-top: 1.75rem; }

/* -------------------------------------------------------------------------
   14. LIGHTBOX
   ------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 20, 16, 0.92);
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  background: var(--stone);
  transform: scale(0.97);
  transition: transform 0.3s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__caption { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; text-align: center; }

.lightbox__btn {
  position: absolute;
  background: rgba(252, 250, 245, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.lightbox__btn:hover { background: rgba(252, 250, 245, 0.28); }
.lightbox__btn svg { width: 26px; height: 26px; }
.lightbox__btn--close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox__btn--prev { left: clamp(0.5rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: clamp(0.5rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__btn--prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__btn--next:hover { transform: translateY(-50%) scale(1.06); }

/* -------------------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--deep-green);
  color: rgba(255, 255, 255, 0.82);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; }
.footer-brand svg { width: 34px; height: 34px; color: var(--gold-soft); }
.footer__msg { max-width: 34ch; color: rgba(255, 255, 255, 0.7); }
.footer h4 { color: #fff; font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a { color: rgba(255, 255, 255, 0.78); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--gold-soft); }
.footer-phone { font-family: var(--font-serif); font-size: 1.5rem; color: #fff; display: inline-block; margin-bottom: 0.5rem; }
.footer-phone:hover { color: var(--gold-soft); }

.socials { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.social-btn:hover { background: var(--gold); color: #2b220f; border-color: var(--gold); }
.social-btn svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.6); }
.footer-bottom a:hover { color: var(--gold-soft); }
.footer-tagline { color: var(--gold-soft); font-family: var(--font-serif); font-size: 1.05rem; }

/* -------------------------------------------------------------------------
   16. REVEAL ANIMATIONS
   ------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* -------------------------------------------------------------------------
   17. RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cards, .reasons, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }

  /* Off-canvas mobile navigation */
  .nav-toggle { display: flex; z-index: 1101; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(360px, 82vw);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    padding: 5rem 2rem 2rem;
    background: var(--cream);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
    transform: translateX(105%);
    transition: transform 0.4s var(--ease);
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .nav__link {
    font-size: 1.15rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--charcoal);
  }
  .nav__link::after { display: none; }
  .site-header.header--transparent .nav__link { color: var(--charcoal); }
  .nav__cta { justify-content: center; margin-top: 0.5rem; }

  .split { grid-template-columns: 1fr; }
  /* On mobile, always show media first then text for a natural reading order */
  .split .split__media { order: -1; }

  .compare { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .context { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .cards, .reasons, .news-grid, .help-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .circle-frame { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
  .circle-frame::after { border-radius: var(--radius-lg); }
  .hours__row { padding-inline: 1rem; }
  .btn-row .btn { width: 100%; justify-content: center; }

  /* Tighten the header so brand + language switcher + hamburger fit */
  .brand { font-size: 1.2rem; gap: 0.5rem; }
  .brand__logo svg { width: 28px; height: 28px; }
  .header__actions { gap: 0.5rem; }
  .langsw__btn { padding: 0.45rem 0.55rem; min-height: 40px; }
  .langsw__globe { display: none; }
}

/* -------------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .scroll-cue__line { animation: none; }
}
