:root {
  --ocean: #0a4f6b;
  --ocean-light: #1a7fa0;
  --seafoam: #2cb8a0;
  --sand: #f0e8d5;
  --deep: #062033;
  --text: #1a2e3b;
  --muted: #5a7485;
  --white: #ffffff;
  --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: #f5f8fa;
  color: var(--text);
  line-height: 1.6;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6,32,51,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  border-bottom: 1px solid rgba(44,184,160,0.2);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 70px;
  width: auto;
}

.nav-brand {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 200px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--seafoam); }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background-image: url('../images/portada-frame0299-v1.3.webp');
  background-size: cover;
  background-position: center top;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6,32,51,0.3) 0%,
    rgba(6,32,51,0.1) 40%,
    rgba(6,32,51,0.75) 75%,
    rgba(6,32,51,0.95) 100%
  );
}

.hero-content {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #5fe0cb;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-shadow: 0 1px 3px rgba(6,32,51,0.7);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--seafoam);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  max-width: 740px;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: italic;
  color: var(--seafoam);
}

.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.82);
  max-width: 540px;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--seafoam);
  color: var(--deep);
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover {
  background: #38d4b8;
  transform: translateY(-2px);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.scroll-hint svg { opacity: 0.5; }

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

/* ===== CONTAINER ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== SECTION ===== */
.section {
  padding: 80px 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--seafoam);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--seafoam);
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--ocean);
  margin-bottom: 20px;
  line-height: 1.15;
}

.section-intro {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 48px;
  font-weight: 300;
  line-height: 1.75;
}

/* ===== CARDS GRID ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(10,79,107,0.07);
  border-left: 3px solid var(--seafoam);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(10,79,107,0.12);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--ocean);
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* ===== ALT SECTION BG ===== */
.section-alt {
  background: var(--deep);
  color: var(--white);
}

.section-alt h2 { color: var(--white); }
.section-alt .section-intro { color: rgba(255,255,255,0.7); }
.section-alt .section-label { color: var(--seafoam); }

.section-alt .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(44,184,160,0.5);
}

.section-alt .card h3 { color: var(--seafoam); }
.section-alt .card p { color: rgba(255,255,255,0.7); }

/* ===== PANORAMA IMAGE ===== */
.panorama-wrap {
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: 10px;
  margin: 48px 0;
}

.panorama-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===== IMPACT SPLIT ===== */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(10,79,107,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.impact-item {
  background: var(--white);
  padding: 40px 32px;
  text-align: center;
}

.impact-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ocean);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.impact-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ===== ACTIVITIES ===== */
.activities-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.activities-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(10,79,107,0.06);
  transition: transform 0.2s;
}

.activities-list li:hover { transform: translateX(4px); }

.act-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--ocean);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.act-text strong {
  display: block;
  font-size: 15px;
  color: var(--ocean);
  margin-bottom: 4px;
}

.act-text span {
  font-size: 13px;
  color: var(--muted);
}

/* ===== GALLERY ===== */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,32,51,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6,32,51,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  color: rgba(255,255,255,0.7);
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--white); }

/* ===== VISIT ===== */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.visit-card {
  background: var(--white);
  border-radius: 10px;
  padding: 36px;
  box-shadow: 0 4px 24px rgba(10,79,107,0.08);
}

.visit-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ocean);
  margin-bottom: 16px;
}

.visit-card p, .visit-card address {
  font-style: normal;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--seafoam);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin-top: 8px;
  transition: color 0.2s;
}

.contact-link:hover { color: var(--ocean-light); }

.map-wrap {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,79,107,0.12);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--deep);
  color: rgba(255,255,255,0.5);
  padding: 40px;
  text-align: center;
}

footer .footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

footer img {
  height: 48px;
  width: auto;
  opacity: 0.85;
}

footer .footer-brand {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}

footer p {
  font-size: 13px;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== DIVIDER ===== */
.wave-divider {
  height: 60px;
  background: linear-gradient(to bottom right, var(--deep) 49%, #f5f8fa 50%);
}

/* ===== IMPACT ICON ===== */
.impact-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

/* ===== SECTION BG OVERRIDES ===== */
.section--light {
  background: #eef4f7;
  padding-top: 60px;
  padding-bottom: 60px;
}

.section--visit {
  background: #eef4f7;
  padding-top: 60px;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  nav .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6,32,51,0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(44,184,160,0.2);
    padding: 8px 0;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  nav .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 32px;
    font-size: 14px;
  }
  .gallery-grid { columns: 2; }
  .visit-grid { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 60px; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
  .container { padding: 0 20px; }
  .hero-content { padding: 0 24px; }
  .hero-eyebrow {
    font-size: 12.5px;
    letter-spacing: 0.08em;
  }
  .hero-eyebrow::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
