:root {
  --terra: #C1440E;
  --terra-dark: #9A3609;
  --terra-light: #E2703A;
  --baobab: #2F4A3C;
  --baobab-dark: #1F332A;
  --bg: #FBF3EC;
  --bg-rgb: 251, 243, 236;
  --text: #2A2118;
  --text-rgb: 42, 33, 24;
  --card: #FFFFFF;
  --muted: #E4DAD0;
  --shadow: 0 4px 20px rgba(193, 68, 14, 0.12);
  --radius: 12px;

  /* Semantic accents (extracted from one-off hex values) */
  --whatsapp: #197641;
  --whatsapp-dark: #156537;
  --gold: #B8860B;
  --danger: #B3261E;
  --success-bg: #d4edda;
  --success-text: #155724;
  --success-border: #c3e6cb;
  --error-bg: #f8d7da;
  --error-text: #721c24;
  --error-border: #f5c6cb;

  /* Semantic z-index scale (dropdown < sticky < fixed < modal-backdrop < modal < toast) */
  --z-sticky: 100;
  --z-fixed: 150;
  --z-modal-backdrop: 500;
  --z-modal: 510;
  --z-toast: 600;
}

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

/* ========== FOCUS VISIBILITY (consistent brand-colored ring on all interactive elements) ========== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--terra-light);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: 'Karla', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ========== NAVBAR FIXED ========== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(193, 68, 14, 0.1);
  z-index: var(--z-sticky);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 25px rgba(193, 68, 14, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Bitter', Georgia, serif;
  font-size: 1.5em;
  font-weight: 800;
  color: var(--terra);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: var(--terra-dark);
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terra);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--terra);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  min-width: 44px;
  min-height: 44px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--terra);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--terra);
  color: var(--terra);
  font-weight: 700;
  font-size: 0.85em;
  padding: 6px 14px;
  min-height: 44px;
  border-radius: 20px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background: var(--terra);
  color: white;
}

/* ========== HEADER ========== */
header {
  background: linear-gradient(rgba(var(--text-rgb),0.35), rgba(var(--text-rgb),0.55)),
    url('https://images.unsplash.com/photo-1570742544137-3a469196c32b?w=1920&q=85') center/cover no-repeat;
  color: white;
  padding: 120px 20px 140px;
  text-align: center;
  margin-top: 70px;
  margin-bottom: 40px;
  border-bottom: 6px solid var(--terra);
  position: relative;
  overflow: hidden;
}

header h1 {
  font-family: 'Bitter', Georgia, serif;
  font-size: 2.8em;
  margin: 0 0 0.3em;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-wrap: balance;
  animation: fadeInDown 1s ease-out;
  position: relative;
  z-index: 2;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header p {
  font-size: 1.15em;
  margin: 0 auto 1.5em;
  max-width: 600px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  font-style: italic;
  animation: fadeInUp 1s ease-out 0.3s backwards;
  position: relative;
  z-index: 2;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== ICON SYSTEM (replaces emoji pictographs) ========== */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-facebook,
.icon-instagram-dot,
.icon-filled {
  fill: currentColor;
  stroke: none;
}

/* ========== HEADER BADGES ========== */
.header-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 25px 0 40px;
  animation: fadeInUp 1s ease-out 0.9s backwards;
  position: relative;
  z-index: 2;
}

.badge {
  background: rgba(var(--text-rgb), 0.45);
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 0.95em;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.badge:hover {
  background: rgba(var(--text-rgb), 0.6);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--terra);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(193, 68, 14, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.6s backwards;
  z-index: 2;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: var(--terra-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(193, 68, 14, 0.5);
}

.btn:active {
  transform: translateY(-1px) scale(1);
}

.btn-large {
  font-size: 1.2em;
  padding: 16px 40px;
  background: white;
  color: var(--terra);
}

.btn-large:hover {
  background: rgba(255,255,255,0.9);
  color: var(--terra-dark);
}

/* ========== WHATSAPP CTA (primary conversion action) ========== */
/* Darkened from the WhatsApp brand green (#25D366, 1.98:1 with white text —
   fails WCAG even at the 3:1 large-text floor) to #197641 (5.66:1), same
   hue/saturation, just deepened enough for white text to read reliably. */
.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
  box-shadow: 0 4px 16px rgba(25, 118, 65, 0.35);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  color: white;
  box-shadow: 0 8px 25px rgba(25, 118, 65, 0.5);
}

.cta-secondary-link {
  display: inline-block;
  margin-left: 18px;
  color: var(--terra);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.cta-secondary-link:hover {
  color: var(--terra-dark);
}

.cta-secondary-link-light {
  color: rgba(255, 255, 255, 0.9);
}

.cta-secondary-link-light:hover {
  color: white;
}

.contact-whatsapp-cta {
  text-align: center;
  margin-bottom: 24px;
}

.contact-whatsapp-note {
  margin-top: 12px;
  font-size: 0.95em;
  color: var(--text);
  opacity: 0.75;
}

.contact-form-divider {
  text-align: center;
  color: var(--text);
  opacity: 0.7;
  font-size: 0.95em;
  margin: 32px 0 12px;
}

/* ========== SCROLL INDICATOR (dentro header) ========== */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 1s ease-out 1.2s backwards;
  z-index: 2;
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

.scroll-indicator:hover {
  transform: translateX(-50%) translateY(-5px);
}

.scroll-indicator span {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.scroll-arrow {
  width: 35px;
  height: 35px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  animation: bounce 2s ease-in-out infinite;
  background: rgba(var(--text-rgb), 0.35);
  box-shadow: 0 4px 15px rgba(193, 68, 14, 0.3);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ========== SECTIONS ========== */
section {
  padding: 60px 20px;
  max-width: 900px;
  margin: 0 auto 56px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(193, 68, 14, 0.12);
}

h2 {
  font-family: 'Bitter', Georgia, serif;
  color: var(--terra);
  font-size: 2em;
  text-align: center;
  margin-bottom: 1.2em;
  text-wrap: balance;
  position: relative;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--terra);
  margin: 12px auto 0;
  border-radius: 2px;
  animation: expandWidth 0.8s ease-out 0.3s backwards;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 60px; }
}

ul {
  list-style: none;
  padding: 0;
  line-height: 2;
  font-size: 1.1em;
}

ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--muted);
  transition: all 0.3s ease;
  animation: fadeInRight 0.6s ease-out backwards;
}

/* Small terra marker dot for the content feature lists (Services, Perche
   Nosy Be, tour "cosa vivrai") -- scoped to direct section children so it
   doesn't leak into the navbar, footer or related-tours lists, which set
   their own list-style. */
main section > ul > li {
  position: relative;
  padding-left: 20px;
}

main section > ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra);
}

ul li:nth-child(1) { animation-delay: 0.1s; }
ul li:nth-child(2) { animation-delay: 0.2s; }
ul li:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

ul li:hover {
  padding-left: 15px;
  color: var(--terra);
}

/* ========== HOW IT WORKS ========== */
/* Deliberately not the white-card shell used elsewhere on the page — a real
   ordered sequence earns numbered steps; connecting them with a plain line
   instead of repeating another card grid keeps this section distinct. */
.how-it-works {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 20px 20px 60px;
  max-width: 1000px;
}

.how-it-works h2 {
  margin-bottom: 1.5em;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step {
  flex: 1 1 220px;
  max-width: 260px;
  text-align: center;
  padding: 0 12px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--terra);
  color: white;
  font-family: 'Bitter', Georgia, serif;
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-family: 'Bitter', Georgia, serif;
  color: var(--baobab);
  font-size: 1.15em;
  margin: 0 0 8px;
}

.step p {
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0;
  color: var(--text);
}

.step-connector {
  flex: 0 0 auto;
  width: 48px;
  height: 2px;
  background: var(--muted);
  margin-top: 28px;
}

@media (max-width: 600px) {
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .step-connector {
    width: 2px;
    height: 28px;
    margin: 0;
  }
}

/* ========== TESTIMONIANZE ========== */
/* Widened past the default section max-width (900px): 3 columns at
   minmax(280px,1fr) + 2×30px gaps need >=900px of content width alone, which
   never fit inside the 900px section (860px after padding) at ANY viewport,
   silently orphaning the third card. 1080px gives real breathing room. */
.testimonials {
  max-width: 1080px;
  background: linear-gradient(135deg, rgba(193,68,14,0.05), rgba(226,112,58,0.05));
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(193,68,14,0.1);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(193,68,14,0.2);
}

.stars {
  color: var(--gold);
  font-size: 1.3em;
  margin-bottom: 15px;
}

.testimonial-card p {
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 15px;
}

.testimonial-author {
  font-weight: 700;
  color: var(--terra);
  font-size: 0.95em;
}

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(135deg, var(--baobab), var(--baobab-dark));
  color: white;
  text-align: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
  border: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  color: white;
  font-size: 2.5em;
  margin-bottom: 20px;
}

.cta-section h2::after {
  background: white;
}

.cta-section p {
  font-size: 1.3em;
  margin-bottom: 30px;
  opacity: 0.95;
}

/* ========== AUTO-SLIDER ========== */
.photo-section {
  padding: 60px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto 40px;
  max-width: 100%;
  overflow: hidden;
}

.auto-slider {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 24px 0;
  background: linear-gradient(
    90deg,
    var(--bg) 0%,
    rgba(var(--bg-rgb), 0) 5%,
    rgba(var(--bg-rgb), 0) 95%,
    var(--bg) 100%
  );
}

.auto-slider-track {
  display: flex;
  gap: 22px;
  animation: scroll-left 25s linear infinite;
  will-change: transform;
}

/* Manual mode: JS takes over positioning (pause/prev/next), CSS animation is off */
.auto-slider-track.is-manual {
  animation: none;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Each photo + its caption overlay; the img itself just fills the frame */
.gallery-item {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 16px 14px;
  background: linear-gradient(to top, rgba(var(--text-rgb), 0.88), rgba(var(--text-rgb), 0));
  color: white;
  font-family: 'Bitter', Georgia, serif;
  font-weight: 700;
  font-size: 1em;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  opacity: 0.88;
  transform: translateY(3px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(193, 68, 14, 0.35);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.auto-slider:hover .auto-slider-track {
  animation-play-state: paused;
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--terra);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.slider-btn .icon {
  width: 26px;
  height: 26px;
}

.slider-btn:hover {
  color: var(--terra-dark);
  transform: translateY(-2px);
}

.slider-btn:active {
  transform: translateY(0);
}

.slider-btn:focus-visible {
  outline: 3px solid var(--terra-light);
  outline-offset: 2px;
  border-radius: 50%;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  z-index: var(--z-modal-backdrop);
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.92);
  justify-content: center;
  align-items: center;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
  cursor: default;
  animation: zoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  object-fit: contain;
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: white;
  font-size: 3em;
  font-weight: bold;
  cursor: pointer;
  z-index: var(--z-modal);
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  font-family: inherit;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 5px;
}

.lightbox .close:hover {
  background: var(--terra);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== FORMS ========== */
form label {
  display: block;
  margin-top: 20px;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 0.92em;
  letter-spacing: 0.2px;
  color: var(--baobab);
  transition: color 0.3s ease;
}

form input, form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-top: 0;
  background: var(--bg);
  border: 1.5px solid var(--muted);
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

form input:focus, form textarea:focus {
  background: var(--card);
  border-color: var(--terra);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 68, 14, 0.12);
  transform: scale(1.01);
}

form input.field-invalid, form textarea.field-invalid {
  border-color: var(--danger);
}

form input.field-invalid:focus, form textarea.field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85em;
  font-weight: 600;
  margin-top: 6px;
}

form button {
  margin-top: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(193, 68, 14, 0.3); }
  50% { box-shadow: 0 6px 25px rgba(193, 68, 14, 0.5); }
}

/* ========== FOOTER ========== */
footer {
  background: var(--baobab);
  color: white;
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: 40px;
  border: 3px solid var(--baobab-dark);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 30px;
  text-align: left;
}

.footer-section h3 {
  margin-bottom: 15px;
  font-size: 1.2em;
  color: white;
}

.footer-section p {
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

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

.footer-section ul li {
  margin-bottom: 10px;
  border: none;
  padding: 0;
  animation: none;
}

.footer-section ul li:hover {
  padding-left: 0;
  border: none;
  color: inherit;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.social-icons {
  display: flex;
  gap: 15px;
  font-size: 1.8em;
}

.social-icons a {
  transition: transform 0.3s ease;
  display: inline-block;
}

.social-icons a:hover {
  transform: scale(1.2);
}

.footer-credit {
  margin-top: 8px;
  font-size: 0.85em;
  opacity: 0.8;
}

.footer-credit a {
  color: white;
  text-decoration: underline;
}

/* ========== SCROLL TO TOP ========== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--terra);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(193, 68, 14, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--terra-dark);
  transform: translateY(-5px);
}

/* ========== NOTIFICATION (form status) ========== */
.notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  z-index: var(--z-toast);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: notifSlideDown 0.4s ease;
  max-width: 500px;
  width: 90%;
  text-align: center;
  font-size: 0.95em;
}

.notification.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.notification.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== SCROLL REVEAL ========== */
[data-sr] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(.25,.8,.25,1), transform 0.8s cubic-bezier(.25,.8,.25,1);
}

[data-sr].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html, body {
    scroll-behavior: auto !important;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  header {
    padding: 80px 15px 120px;
    margin-top: 60px;
  }

  header h1 {
    font-size: 2em;
  }

  header p {
    font-size: 1em;
  }

  section {
    padding: 30px 15px;
    margin-bottom: 36px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 8px 20px rgba(193, 68, 14, 0.1);
  }

  .nav-menu.active {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-link {
    padding: 15px 30px;
    border-bottom: 1px solid var(--muted);
    display: block;
  }

  .nav-link::after {
    display: none;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .lang-toggle {
    margin: 15px 30px;
  }

  .header-badges {
    gap: 8px;
    margin: 20px 15px 35px;
  }

  .badge {
    font-size: 0.8em;
    padding: 8px 14px;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  .scroll-indicator span {
    font-size: 0.75em;
    letter-spacing: 1px;
  }

  .scroll-arrow {
    width: 30px;
    height: 30px;
    font-size: 1.3em;
  }

  .gallery-item {
    width: 220px;
    height: 220px;
  }

  .gallery-caption {
    font-size: 0.9em;
    padding: 28px 12px 10px;
  }

  .auto-slider-track {
    gap: 12px;
    animation-duration: 18s;
  }

  .cta-section h2 {
    font-size: 1.8em;
  }

  .cta-section p {
    font-size: 1.1em;
  }

  .btn-large {
    font-size: 1em;
    padding: 14px 30px;
  }

  .footer-content {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3em;
  }

  .lightbox .close {
    top: 15px;
    right: 15px;
    font-size: 2em;
    width: 45px;
    height: 45px;
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 80vh;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .gallery-item {
    width: 250px;
    height: 250px;
  }
}

/* ========== SUBPAGE CONTENT SUBHEADINGS ========== */
main section h3 {
  font-family: 'Bitter', Georgia, serif;
  color: var(--terra);
  font-size: 1.3em;
  margin: 30px 0 14px;
  text-align: center;
}

main section h3:first-child {
  margin-top: 0;
}

/* ========== SUBPAGES: BREADCRUMB ========== */
.breadcrumb {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 18px;
  font-size: 0.9em;
  color: var(--text);
}

.breadcrumb a {
  color: var(--terra);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .breadcrumb-sep {
  margin: 0 8px;
  color: var(--muted);
}

.breadcrumb [aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ========== TOUR DETAILS BOX ========== */
.tour-details {
  background: rgba(193, 68, 14, 0.05);
  border-radius: var(--radius);
  padding: 25px 30px;
  margin: 30px 0;
}

.tour-details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 20px;
  margin: 0;
  font-size: 1.05em;
}

.tour-details dt {
  font-weight: 700;
  color: var(--terra);
}

.tour-details dd {
  margin: 0;
}

.tour-details .tour-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--muted);
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.75;
}

@media (max-width: 600px) {
  .tour-details dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .tour-details dt {
    margin-top: 10px;
  }

  .tour-details dt:first-child {
    margin-top: 0;
  }
}

/* ========== TOUR GRID (hub page) ========== */
/* Fixed 2 columns (not auto-fit) so exactly 4 cards form a tidy 2x2 grid
   instead of wrapping into an unbalanced 3-then-1 row. */
.tour-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 40px;
}

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

.tour-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(193, 68, 14, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(193, 68, 14, 0.2);
}

.tour-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tour-card:hover img {
  transform: scale(1.06);
}

.tour-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tour-card-body h3 {
  font-family: 'Bitter', Georgia, serif;
  color: var(--terra);
  margin: 0 0 8px;
  font-size: 1.25em;
}

.tour-card-body p {
  margin: 0 0 16px;
  line-height: 1.6;
  flex-grow: 1;
}

.tour-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--baobab);
}

.tour-card-meta span {
  background: var(--muted);
  padding: 4px 12px;
  border-radius: 20px;
}

.tour-card-body .btn {
  align-self: flex-start;
  animation: none;
  padding: 10px 24px;
  text-transform: none;
  letter-spacing: normal;
}

/* ========== FAQ ACCORDION ========== */
.faq-list {
  max-width: 700px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--card);
  border: 1px solid rgba(193, 68, 14, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 15px rgba(193, 68, 14, 0.1);
  border-color: rgba(193, 68, 14, 0.28);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 24px;
  font-weight: 700;
  color: var(--baobab);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.3s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--terra);
}

.faq-item summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--terra);
  border-bottom: 2px solid var(--terra);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--muted);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-item p {
  padding: 18px 24px;
  margin: 0;
  line-height: 1.7;
}

/* ========== CROSS-LINKS (tour detail pages) ========== */
.related-tours {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--muted);
}

.related-tours h3 {
  font-family: 'Bitter', Georgia, serif;
  color: var(--terra);
  font-size: 1.1em;
  margin: 0 0 12px;
}

.related-tours ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  line-height: 1.6;
}

.related-tours li {
  border: none;
  padding: 0;
  animation: none;
}

.related-tours a {
  color: var(--terra);
  font-weight: 600;
  text-decoration: none;
}

.related-tours a:hover {
  text-decoration: underline;
}
