/* ─── Variables ───────────────────────────────────────────────────────────── */

:root {
  --green-950: #0e1f0f;
  --green-900: #1a3a1c;
  --green-700: #2d5e30;
  --green-500: #4a8c4e;
  --green-300: #87c08a;
  --green-100: #d7ecda;
  --green-50:  #f0f7f0;

  --gold:      #c9a84c;
  --gold-light:#e0c878;
  --gold-pale: #f5edcc;

  --cream:     #f8f6f1;
  --white:     #ffffff;
  --stone:     #e8e4dc;

  --text:      #1a241a;
  --text-mid:  #3a4a3a;
  --text-muted:#627062;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h:     64px;
  --max-prose: 720px;
  --max-wide:  1100px;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.22s;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-color: var(--green-300);
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--green-500); }

/* ─── Typography ──────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--green-900);
}

h2 { font-size: clamp(1.55rem, 3.5vw, 2rem); margin: 2rem 0 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin: 1.75rem 0 0.6rem; color: var(--green-700); }

p { margin-bottom: 1rem; color: var(--text-mid); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--text); }

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; color: var(--text-mid); }

hr { border: none; border-top: 1px solid var(--green-100); margin: 2rem 0; }

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.site-header.scrolled {
  background: var(--green-900);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0 1.25rem;
  max-width: var(--max-wide);
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  margin-right: auto; /* push nav + actions to the right on all screen sizes */
  transition: opacity var(--duration) var(--ease);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.site-logo-img {
  height: 2.8rem;
  width: auto;
}
.site-logo:hover { color: var(--white); opacity: 0.85; }

.site-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.65rem;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  position: relative;
}
.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.nav-item.active {
  color: var(--white);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-icon { display: flex; align-items: center; opacity: 0.8; }
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Header actions: lang + hamburger */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--duration) var(--ease);
}
.lang-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}
.lang-btn img { width: 20px; height: 20px; border-radius: 50%; }

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease);
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
  transform-origin: center;
}
.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; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 190;
  background: var(--green-950);
  overflow-y: auto;
  padding: 1.5rem 1.25rem 2rem;
}
.nav-drawer.open { display: block; }

.nav-drawer .nav-item {
  flex-direction: row;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-drawer .nav-item:last-child { border-bottom: none; }
.nav-drawer .nav-item:hover,
.nav-drawer .nav-item.active {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.nav-drawer .nav-item::after { display: none; }

.nav-drawer .nav-label {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.drawer-lang {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.drawer-lang .lang-btn {
  display: inline-flex;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ─── Hero (home page) ────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--green-900);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  will-change: transform, opacity;
}
.hero-slide.active {
  opacity: 1;
  animation: panSlide 28s ease-in-out infinite;
}
/* Gradient fallback (no image set) */
.hero-slide:not([style]) {
  background: linear-gradient(135deg, var(--green-950) 0%, var(--green-700) 60%, var(--green-500) 100%);
}

@keyframes panSlide {
  0%   { transform: scale(1.06) translateX(-2.5%); }
  50%  { transform: scale(1.06) translateX(2.5%); }
  100% { transform: scale(1.06) translateX(-2.5%); }
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(15,40,16,0.55) 50%,
    rgba(0,0,0,0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem;
  max-width: 680px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.hero-title-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 1.9em;
  width: auto;
  opacity: 0.5;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.88);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.hero-ctas {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: var(--green-950);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--green-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
}

/* ─── Section Cards (home page) ───────────────────────────────────────────── */

.main { background: var(--cream); }

.section-intro {
  text-align: center;
  padding: 3.5rem 1.5rem 1rem;
  max-width: 560px;
  margin: 0 auto;
}
.section-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}
.section-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--stone);
  padding: 0;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 2rem 1.5rem;
  background: var(--white);
  text-decoration: none;
  transition: background var(--duration) var(--ease);
  position: relative;
}
.section-card:hover { background: var(--green-50); }
.section-card::after {
  content: '→';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--green-300);
  transition: transform var(--duration) var(--ease), color var(--duration) var(--ease);
}
.section-card:hover::after {
  transform: translateY(-50%) translateX(4px);
  color: var(--green-700);
}

.card-icon {
  display: flex;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-50);
  justify-content: center;
  color: var(--green-700);
  transition: background var(--duration) var(--ease);
  flex-shrink: 0;
}
.section-card:hover .card-icon { background: var(--green-100); }

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-900);
  margin: 0;
  line-height: 1.3;
}

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 58ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  display: none; /* hidden – arrow handles it */
}

/* ─── Page Header (section pages) ────────────────────────────────────────── */

.page-header {
  position: relative;
  height: 42vh;
  min-height: 260px;
  max-height: 400px;
  overflow: hidden;
  background: var(--green-900);
}

.page-header-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  animation: panHeader 30s ease-in-out infinite;
}
/* Gradient fallback when no image available */
.page-header-img:not([style]) {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
}

@keyframes panHeader {
  0%   { transform: scale(1.06) translateX(-2.5%); }
  50%  { transform: scale(1.06) translateX(2.5%); }
  100% { transform: scale(1.06) translateX(-2.5%); }
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(15,40,16,0.6) 70%,
    rgba(0,0,0,0.55) 100%
  );
}

.page-header-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.5rem 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  line-height: 1.15;
}

/* ─── Content (section pages) ────────────────────────────────────────────── */

.content-wrap {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.content-wrap h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--green-100);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}
.content-wrap h2:first-child {
  margin-top: 0;
}

.content-wrap h3 {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--green-700);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.content-wrap p strong:first-child {
  display: inline-block;
}

/* Table scroll wrapper (injected by JS) */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}
.table-wrap table { margin: 0; }

/* Tables */
.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}


.content-wrap thead {
  background: var(--green-700);
  color: var(--white);
}
.content-wrap th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--white);
}
.content-wrap td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--green-100);
  color: var(--text-mid);
  vertical-align: top;
}
.content-wrap tbody tr:last-child td { border-bottom: none; }
.content-wrap tbody tr:nth-child(even) { background: var(--green-50); }
.content-wrap tbody tr:hover { background: var(--green-100); }

/* Lists */
.content-wrap ul {
  list-style: none;
  padding: 0;
}
.content-wrap ul li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
}
.content-wrap ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* Map */
.map-wrap {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--green-100);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: none;
}
.map-link {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--green-50);
  font-size: 0.85rem;
  text-align: center;
  color: var(--green-700);
  text-decoration: none;
  border-top: 1px solid var(--green-100);
}
.map-link:hover { background: var(--green-100); color: var(--green-900); }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--green-950);
  color: rgba(255,255,255,0.72);
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
  display: block;
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-contact a,
.footer-phones a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--duration) var(--ease);
}
.footer-contact a:hover,
.footer-phones a:hover { color: var(--white); }

.footer-phones {
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (min-width: 540px) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-card {
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }

  .header-actions { margin-left: 0; }

  .section-grid {
    gap: 1px;
  }

  .section-card {
    padding: 2.25rem 2rem;
  }

  .footer-inner {
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
  }

  .content-wrap { padding: 3.5rem 2rem 5rem; }

  .page-header-content { padding: 2rem 2rem 2.5rem; }
}

@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* Last two cards fill a row of 2 */
  .section-card:nth-child(4),
  .section-card:nth-child(5) {
    /* let them span naturally */
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .nav-label { font-size: 0.72rem; }
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */

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

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

/* Scroll-down indicator on hero */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2.2s ease-in-out infinite;
  text-decoration: none;
}
.hero-scroll svg { animation: inherit; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* Section page: floating book CTA */
.page-book-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0.7rem 1.5rem;
  background: var(--gold);
  color: var(--green-950);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.03em;
}
.page-book-cta:hover {
  background: var(--gold-light);
  color: var(--green-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
