/* ===== PALETA ACTIVA: ARRECIFE (turquesa + coral) ===== */
:root {
  --deep: #06323c;
  --deep-2: #0a4a54;
  --ocean: #12808a;
  --ocean-2: #1aa0a8;
  --aqua: #ff6f61;
  --aqua-2: #ff8a7a;
  --sand: #faf1e2;
  --ink: #12333a;
  --muted: #7a8a92;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(4, 30, 46, 0.45);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: color-mix(in srgb, var(--ocean) 11%, var(--sand));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }

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

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

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.nav.scrolled {
  background: rgba(4, 30, 46, 0.92);
  backdrop-filter: blur(12px);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.5);
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; }
.brand-logo { height: 48px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 1.15rem; letter-spacing: 0.14em; color: #fff; margin-right: -0.14em; }
/* "Argentina": letras repartidas para ocupar el mismo ancho que NAUTILUS */
.brand-sub {
  font-style: normal; font-size: 0.66rem; color: var(--aqua-2);
  display: flex; justify-content: space-between; margin-top: 2px;
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: #eaf6fb; font-size: 0.92rem; font-weight: 500; opacity: 0.9; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--aqua-2); }
.nav-cta {
  background: var(--aqua); color: var(--deep) !important;
  padding: 9px 20px; border-radius: 999px; font-weight: 600 !important; opacity: 1 !important;
}
.nav-cta:hover { background: var(--aqua-2); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
  padding-top: 72px;
  background: linear-gradient(160deg, var(--ocean) 0%, var(--deep) 60%, var(--deep-2) 100%);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 12%, color-mix(in srgb, var(--deep) 74%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--deep) 52%, transparent) 0%, color-mix(in srgb, var(--deep) 90%, transparent) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 820px; padding: 0 24px; animation: rise 1s ease both; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 1.15rem; font-weight: 600;
  color: var(--aqua-2); margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; text-shadow: 0 4px 30px rgba(0,0,0,0.35); }
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.25rem); margin: 24px auto 0; max-width: 560px; color: #dcecf3; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 26px; z-index: 2; font-size: 1.6rem; color: #fff; opacity: 0.7; animation: bob 1.8s ease-in-out infinite; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; cursor: pointer;
}
.btn-primary { background: var(--aqua); color: var(--deep); box-shadow: 0 12px 30px -12px rgba(4,30,46,0.4); }
.btn-primary:hover { background: var(--aqua-2); transform: translateY(-3px); }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); transform: translateY(-3px); }
.btn-block { display: block; text-align: center; width: 100%; }

/* ===== STATS ===== */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(30px, 8vw, 90px);
  background: var(--deep-2); color: #fff; padding: 42px 24px;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--aqua-2); }
.stat-lbl { font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: #9fc0cf; }

/* ===== SECTIONS ===== */
.section { padding: clamp(64px, 9vw, 120px) clamp(20px, 6vw, 90px); max-width: 1240px; margin: 0 auto; }
.section-alt { background: color-mix(in srgb, var(--ocean) 14%, #fff); max-width: none; }
.section-alt > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.78rem; font-weight: 600; color: var(--ocean-2); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--deep); }
.section-lead { margin-top: 18px; color: var(--muted); font-size: 1.05rem; }

/* ===== HISTORIA DE LA ESCUELA ===== */
.about-story {
  max-width: 760px; margin: 0 auto clamp(44px, 6vw, 60px); text-align: center;
}
.about-story p { color: #3d5b6d; font-size: 1.06rem; margin-bottom: 18px; }
.about-story p:last-child { margin-bottom: 0; }
.about-story strong { color: var(--deep); font-weight: 600; }

/* Título arriba del mapa */
.map-heading {
  text-align: center; text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.82rem; font-weight: 600; color: var(--ocean-2);
  margin: clamp(44px, 6vw, 64px) 0 20px;
}

/* ===== CARDS (cursos) ===== */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 880px; margin: 0 auto;
}
.card {
  background: color-mix(in srgb, var(--ocean) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--ocean) 22%, transparent); border-radius: var(--radius);
  padding: 22px 20px; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  position: relative; text-align: center;
}
.section-alt .card { background: color-mix(in srgb, var(--ocean) 3%, #fff); }
.cursos-cta { text-align: center; margin-top: clamp(30px, 4vw, 44px); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--aqua); }
.card-feature { background: linear-gradient(165deg, var(--ocean-2), var(--deep) 130%); color: #fff; border: none; }
.card-feature p { color: #d5eaf1; }
.card-icon { color: var(--aqua); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; height: 30px; }
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.08rem; margin-bottom: 7px; }
.card p { color: #4a6577; font-size: 0.9rem; }
.card-feature h3, .card-feature .card-tag { color: #fff; }
.card-tag {
  display: inline-block; margin-top: 18px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--ocean-2); background: rgba(23,195,178,0.14); padding: 5px 12px; border-radius: 999px;
}
.card-feature .card-tag { background: rgba(255,255,255,0.18); }

/* ===== TRIPS ===== */
.trips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trip { border-radius: var(--radius); overflow: hidden; background: color-mix(in srgb, var(--ocean) 5%, #fff); box-shadow: var(--shadow); transition: transform 0.25s ease; }
.trip:hover { transform: translateY(-6px); }
.trip-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.trip-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(4,30,46,0.35)); }
.trip-img-1 { background-image: url(/viajes/buceos-nocturnos.jpg), linear-gradient(135deg, var(--aqua), var(--ocean)); }
.trip-img-2 { background-image: url(/viajes/amigos.jpg), linear-gradient(135deg, var(--ocean-2), var(--deep)); }
.trip-img-3 { background-image: url(/viajes/salidas.jpg), linear-gradient(135deg, var(--aqua-2), var(--deep-2)); }
.trip-img-4 { background-image: url(/viajes/certificacion.jpg), linear-gradient(135deg, var(--ocean), var(--deep-2)); }
.trip-img-5 { background-image: url(/viajes/equipo.jpg), linear-gradient(135deg, var(--aqua), var(--deep)); }
.trip-img-6 { background-image: url(/viajes/exploracion.jpg), linear-gradient(135deg, var(--ocean-2), var(--deep-2)); }
.trip-body { padding: 26px 26px 30px; }
.trip-body h3 { font-size: 1.35rem; color: var(--deep); margin-bottom: 10px; }
.trip-body p { color: #4a6577; font-size: 0.98rem; }
.trip-meta { display: flex; gap: 18px; margin-top: 18px; font-size: 0.86rem; color: var(--ocean-2); font-weight: 500; flex-wrap: wrap; }
.trips-cta { text-align: center; margin-top: 48px; }
.trips-cta p { font-size: 1.2rem; font-weight: 600; color: var(--deep); margin-bottom: 18px; }

/* ===== GALLERY ===== */
/* Masonry balanceado por JS: la galería es una fila de columnas */
.gallery { display: flex; align-items: flex-start; gap: 12px; }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery-item {
  border-radius: 14px; overflow: hidden; cursor: pointer;
  position: relative; box-shadow: 0 10px 30px -16px rgba(4,30,46,0.5); background: #dfeef4;
}
.gallery-item img, .gallery-item video { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.06); }
.gallery-item .play-badge {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(4,30,46,0.65); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; backdrop-filter: blur(4px);
}
.gallery-empty { text-align: center; color: var(--muted); font-size: 1.05rem; padding: 40px 0; }
.gallery-empty code { background: rgba(10,90,122,0.1); padding: 2px 8px; border-radius: 6px; color: var(--ocean); }

/* ===== CONTACT ===== */
#contacto { padding-top: clamp(48px, 6vw, 76px); padding-bottom: clamp(48px, 6vw, 76px); }
#contacto .section-head { margin-bottom: clamp(22px, 4vw, 34px); }
.wa-buttons {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  max-width: 760px; margin: 0 auto;
}

/* Formato común de los botones de contacto (mismo lenguaje que las tarjetas) */
.wa-btn, .ig-btn {
  display: inline-flex; align-items: center; gap: 12px; color: #fff;
  padding: 13px 22px; border-radius: var(--radius); text-align: left;
  box-shadow: 0 12px 30px -18px rgba(4,30,46,0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wa-btn:hover, .ig-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.wa-ico, .ig-ico { display: inline-flex; flex-shrink: 0; }
.wa-ico svg, .ig-ico svg { width: 24px; height: 24px; }
.chip-txt { display: flex; flex-direction: column; line-height: 1.15; }
.chip-txt strong { font-size: 0.95rem; font-weight: 600; }
.chip-txt small { font-size: 0.82rem; opacity: 0.85; }

/* Colores de marca */
.wa-btn { background: linear-gradient(160deg, #25d366, #128c7e); }

/* Línea que conecta con Instagram */
.contact-or {
  text-align: center; color: var(--muted); font-size: 1rem; margin-top: 30px;
  display: flex; align-items: center; gap: 16px; max-width: 460px; margin-left: auto; margin-right: auto;
}
.contact-or::before, .contact-or::after {
  content: ""; flex: 1; height: 1px; background: rgba(10,90,122,0.2);
}

/* Botón de Instagram */
.social-row { display: flex; justify-content: center; margin-top: 20px; }
.ig-btn { background: linear-gradient(60deg, #feda75, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5); }

/* Mini mapa */
.map-card {
  max-width: 760px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  background: #fff; border: 1px solid color-mix(in srgb, var(--ocean) 18%, transparent);
  box-shadow: 0 14px 40px -22px rgba(4,30,46,0.4);
}
.map-embed {
  position: relative; display: block; height: 210px;
  background: linear-gradient(160deg, var(--ocean), var(--deep));
}
.map-frame {
  width: 100%; height: 100%; border: 0; display: block; pointer-events: none;
  filter: grayscale(0.2) contrast(1.02);
}
/* Baño de color oceánico suave: combina sin verse artificial */
.map-tint {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, var(--aqua), var(--ocean) 70%, var(--deep-2));
  mix-blend-mode: color; opacity: 0.3;
}
.map-embed::after { /* leve viñeteado para dar profundidad */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 50px rgba(4,30,46,0.25);
}
.map-pin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%);
  font-size: 2rem; filter: drop-shadow(0 6px 10px rgba(4,30,46,0.5));
  animation: bob 1.8s ease-in-out infinite; z-index: 2;
}
.map-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 20px; background: color-mix(in srgb, var(--ocean) 6%, #fff);
  border-top: 1px solid color-mix(in srgb, var(--ocean) 14%, transparent);
}
.map-addr { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
.map-addr strong { font-size: 1.02rem; color: var(--deep); }
.map-addr span { color: var(--muted); font-size: 0.88rem; }
.map-btn { padding: 10px 20px; flex-shrink: 0; font-size: 0.92rem; }

.contact-extra {
  display: flex; justify-content: center; align-items: center; gap: 14px 32px; flex-wrap: wrap;
  margin-top: 28px; color: var(--muted); font-size: 0.98rem;
}
.contact-extra a { color: var(--ocean-2); font-weight: 500; }
.contact-extra a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.footer { background: var(--deep); color: #cfe6ee; text-align: center; padding: 34px 24px 26px; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 14px; }
.footer-logo { height: 46px; width: auto; }
.footer-copy { color: #5f8598; font-size: 0.82rem; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(4,20,30,0.94);
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
.lightbox-content { max-width: 88vw; max-height: 86vh; }
.lightbox-content img, .lightbox-content video { max-width: 88vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7); }
.lightbox-close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.8; }
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1);
  border: none; color: #fff; font-size: 2.4rem; width: 56px; height: 56px; border-radius: 50%;
  cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ===== ANIMATIONS ===== */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */

/* Tablet y menos: menú hamburguesa */
@media (max-width: 860px) {
  .nav { padding: 14px 20px; }
  /* Menú mobile: overlay a pantalla completa, ítems centrados y espaciados */
  .nav-links {
    position: fixed; inset: 0; width: 100%; height: 100vh; height: 100svh;
    flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    padding: 88px 24px 48px; margin: 0;
    background: rgba(4,30,46,0.985); backdrop-filter: blur(16px);
    transform: translateX(100%); transition: transform 0.35s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.3rem; font-weight: 500; opacity: 1; width: 100%; max-width: 320px;
    text-align: center; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.nav-cta {
    margin-top: 20px; padding: 14px 42px; width: auto; border-bottom: none;
    font-size: 1.12rem; border-radius: 999px;
  }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    z-index: 101; width: 44px; height: 44px; border-radius: 12px;
  }
  .nav.scrolled .nav-toggle, .nav-links.open ~ .nav-toggle { background: rgba(255,255,255,0.08); }

  .cards { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
  .trips { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stats { gap: 34px 48px; padding: 34px 20px; }
}

/* Teléfonos */
@media (max-width: 560px) {
  .section { padding: 56px 20px; }
  .section-alt > * { padding-left: 0; padding-right: 0; }
  .hero-title { font-size: clamp(2.1rem, 8.5vw, 3rem); }
  .hero-kicker { font-size: 0.82rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; width: 100%; gap: 12px; }
  .hero-actions .btn { width: 100%; }
  .btn { padding: 15px 28px; }               /* target táctil cómodo */

  /* Cursos y Viajes como carrusel horizontal (swipe), igual que la galería */
  .cards, .trips {
    display: flex;
    grid-template-columns: none;
    max-width: none;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 20px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar, .trips::-webkit-scrollbar { display: none; }
  .card, .trip { flex: 0 0 80%; scroll-snap-align: center; }
  .card.reveal, .trip.reveal { opacity: 1; transform: none; }  /* siempre visibles en el carrusel */
  .card { padding: 26px 22px; }
  .trip-img { height: 190px; }

  /* Galería como carrusel horizontal (swipe) en mobile */
  .gallery {
    columns: unset;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 20px;
    padding-bottom: 6px;
    scrollbar-width: none;             /* Firefox */
  }
  .gallery::-webkit-scrollbar { display: none; }  /* Safari/Chrome */
  .gallery-item {
    flex: 0 0 80%;
    margin-bottom: 0;
    height: 62vw;
    scroll-snap-align: center;
  }
  .gallery-item img, .gallery-item video { height: 100%; object-fit: cover; }
  .gallery-item.reveal { opacity: 1; transform: none; }   /* siempre visibles en el carrusel */

  /* Datos apilados en una columna, prolijos y con divisor */
  .stats { flex-direction: column; align-items: center; gap: 0; padding: 12px 20px; }
  .stat { flex: none; width: 100%; max-width: 340px; padding: 13px 0; }
  .stat + .stat { border-top: 1px solid rgba(255,255,255,0.12); }
  .stat-num { font-size: 1.3rem; margin-bottom: 1px; }
  .stat-lbl { font-size: 0.76rem; }

  /* Logo del header más chico en mobile */
  .brand-logo { height: 38px; }

  /* Footer: logo y nombre apilados y centrados */
  .footer-brand { flex-direction: column; gap: 8px; }

  .wa-buttons { flex-direction: column; align-items: center; max-width: 320px; }
  .wa-btn { width: 100%; justify-content: center; }

  .map-embed { height: 210px; }
  .map-bar { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .map-addr { text-align: center; }
  .map-btn { width: 100%; text-align: center; }

  /* Lightbox: flechas más chicas y pegadas al borde */
  .lightbox-nav { width: 46px; height: 46px; font-size: 2rem; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-content img, .lightbox-content video { max-width: 94vw; max-height: 80vh; }
  .lightbox-close { top: 14px; right: 16px; font-size: 1.8rem; }
}

/* Teléfonos muy chicos */
@media (max-width: 380px) {
  .brand-text strong { font-size: 1rem; }
  .hero-kicker { letter-spacing: 0.2em; font-size: 0.7rem; }
  .gallery-item { flex-basis: 84%; height: 66vw; }
}

/* Respeta "reducir movimiento" del sistema */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
