/* ==========================================================================
   ES TURISMO - PREMIUM AESTHETIC STYLES
   ========================================================================== */

:root {
  --bg-main: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #0a2530;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --brand-primary: #019ea8; /* Teal exacto muestreado del logo ES Turismo (texto) */
  --brand-primary-hover: #017680;
  --brand-accent: #af6827; /* Naranja terracota exacto muestreado del logo (edificios) */

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  
  --nav-height: 90px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body { overflow-x: hidden; }

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding { padding: 120px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.text-white { color: var(--text-white) !important; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 64px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-title { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 16px; color: var(--text-main); }
.section-title span { color: var(--brand-primary); }
.section-subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; }
.text-center .section-subtitle { margin: 0 auto; }
.lead-text { font-size: 1.25rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }
p { line-height: 1.7; color: var(--text-muted); margin-bottom: 16px; }

a { text-decoration: none; color: inherit; }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 500;
  font-size: 1rem;
  font-family: var(--font-display);
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(1, 158, 168, 0.3);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(1, 158, 168, 0.4);
}

.btn-outline-light {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
  border-color: #fff;
  background-color: #fff;
  color: var(--brand-primary);
}

/* ==========================================================================
   STICKY SOCIALS
   ========================================================================== */
.sticky-socials {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 900;
  transition: opacity .25s ease;
}
/* Con el menu movil abierto, el boton de WhatsApp no debe quedar encima
   del panel ni ser tocable "a traves" de el */
body.menu-open .sticky-socials { opacity: 0; pointer-events: none; }
/* Evita que el fondo se siga desplazando detras del panel (glitch tipico
   de position:fixed en Safari/iOS cuando el body sigue scrolleable) */
body.menu-open { overflow: hidden; }
.sticky-btn {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}
.sticky-btn:hover { transform: scale(1.1) translateY(-5px); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  z-index: 1010;
  transition: var(--transition);
  background: transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-sm);
}
.nav.scrolled .nav-links a { color: var(--text-main); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.logo-img { max-height: 72px; transition: var(--transition); filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.nav.scrolled .logo-img { filter: drop-shadow(0 1px 3px rgba(0,0,0,.12)); }
@media (max-width: 768px) { .logo-img { max-height: 58px; } }

.nav-links { display: flex; gap: 32px; }
.nav-close { display: none; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--brand-accent); }
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; }
.nav.scrolled .mobile-menu-btn { color: var(--text-main); }

/* ==========================================================================
   HERO & SLIDER
   ========================================================================== */
.parallax { background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; }
.hero { min-height: 100vh; display: flex; align-items: flex-end; padding: 0 0 100px 0; }

.slider-hero { position: relative; overflow: hidden; }
.slider-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 6s linear;
  z-index: 1;
  transform: scale(1.05);
}
.slider-bg.active { opacity: 1; transform: scale(1); }
.hero-content { max-width: 800px; text-align: left; }

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 1;
  color: #fff;
  margin-bottom: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.btn-ghost {
  display: inline-block;
  padding: 16px 32px;
  border: 1px solid rgba(255,255,255,0.55);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(10, 37, 48, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: var(--transition);
}
.btn-ghost:hover { border-color: #fff; background: rgba(10, 37, 48, 0.6); }

/* Slider Bottom UI */
.slider-bottom-ui {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 100%;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
}
.slider-dots { display: flex; gap: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); }
.dot.active { background: #fff; transform: scale(1.5); }
.slider-progress { width: 200px; height: 1px; background: rgba(255,255,255,0.2); position: relative; }
.progress-bar { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: #fff; transition: width 0.1s linear; }

/* ==========================================================================
   SPLIT GRID (QUIENES SOMOS)
   ========================================================================== */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.img-wrapper { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.img-wrapper img { width: 100%; height: auto; display: block; transition: var(--transition); }
.img-wrapper::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,37,48,0.22) 0%, rgba(10,37,48,0) 35%);
  pointer-events: none;
}
.img-wrapper:hover img { transform: scale(1.05); }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--text-main); }
.check-list i { color: var(--brand-primary); background: rgba(1, 158, 168, 0.1); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.8rem; }

/* ==========================================================================
   MISION: filas editoriales con numero grande (antes 4 tarjetas identicas
   con icono generico - lo mas "de plantilla" del sitio)
   ========================================================================== */
.mission-rows { display: flex; flex-direction: column; max-width: 920px; margin: 0 auto; }
.mission-row {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  align-items: baseline;
  padding: 36px 0 36px 24px;
  margin-left: -24px;
  border-top: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 12px;
  transition: background .35s ease, padding-left .35s ease;
}
.mission-rows .mission-row:last-child { border-bottom: 1px solid rgba(30, 41, 59, 0.1); }
.mission-row::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .35s ease;
}
.mission-row:hover {
  background: rgba(1, 158, 168, 0.05);
  padding-left: 32px;
}
.mission-row:hover::before { transform: scaleY(1); }
.mission-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--brand-primary);
  opacity: 0.25;
  line-height: 1;
  transition: opacity .35s ease, color .35s ease, transform .35s ease;
}
.mission-row:hover .mission-num { opacity: 1; color: var(--brand-accent); transform: scale(1.08); }
.mission-row h3 { font-size: 1.4rem; margin-bottom: 8px; color: var(--text-main); transition: color .35s ease; }
.mission-row:hover h3 { color: var(--brand-primary); }
.mission-row p { margin-bottom: 0; max-width: 560px; }
@media (max-width: 640px) {
  .mission-row { grid-template-columns: 56px 1fr; gap: 18px; padding-left: 18px; margin-left: -18px; }
  .mission-row:hover { padding-left: 24px; }
  .mission-num { font-size: 2rem; }
}

/* ==========================================================================
   CARDS GRID (UNIDADES): bento asimetrico - una tarjeta grande + dos chicas,
   en vez de 3 cajas identicas (lo otro que se veia mas "de plantilla")
   ========================================================================== */
.cards-grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: repeat(2, 1fr); gap: 28px; }
.service-card {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 280px;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card--feature { grid-row: span 2; min-height: 100%; }
.card-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: var(--transition); }
.service-card:hover .card-img { transform: scale(1.06); }
.card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,37,48,.88) 0%, rgba(10,37,48,.15) 55%, transparent 100%); }
.card-content { position: relative; z-index: 2; padding: 32px; color: #fff; }
.card-content h3 { font-size: 1.5rem; margin-bottom: 8px; color: #fff; }
.card-content p { color: rgba(255,255,255,0.82); margin-bottom: 0; }
@media (max-width: 860px) {
  .cards-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .service-card--feature { grid-row: auto; }
  .service-card { min-height: 320px; }
}

/* ==========================================================================
   MASONRY (GALERIA)
   ========================================================================== */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  grid-auto-rows: 250px;
}
.masonry-item { position: relative; border-radius: 16px; overflow: hidden; }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.masonry-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,37,48,0.38) 0%, rgba(10,37,48,0.05) 40%, rgba(10,37,48,0) 65%);
  transition: var(--transition);
  pointer-events: none;
}
.masonry-item:hover::after { background: linear-gradient(to top, rgba(10,37,48,0.2) 0%, rgba(10,37,48,0) 55%); }
.masonry-item:hover img { transform: scale(1.05); }
.masonry-item:nth-child(2), .masonry-item:nth-child(5) { grid-row: span 2; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--bg-dark); color: #fff; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 64px; margin-bottom: 64px; }
.footer-logo { max-width: 260px; margin-bottom: 24px; }
.footer p { color: rgba(255,255,255,0.7); }
.footer-contact h3 { font-size: 1.5rem; margin-bottom: 16px; color: #fff; }
.footer-contact ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.footer-contact li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.8); }
.footer-contact i { color: var(--brand-accent); font-size: 1.2rem; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff; font-family: var(--font-body);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand-accent); background: rgba(255,255,255,0.1); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 0.9rem; }

/* ==========================================================================
   MENU MOVIL: antes el boton de hamburguesa no abria nada (sin JS ni
   panel), el sitio era imposible de navegar en movil
   ========================================================================== */
.nav-backdrop { position: fixed; inset: 0; background: rgba(10,37,48,.5); opacity: 0; pointer-events: none; transition: var(--transition); z-index: 1001; }
.nav-backdrop.active { opacity: 1; pointer-events: auto; }
.nav-cta-mobile { display: none; }

@media (max-width: 768px) {
  .nav-cta { display: none; }
  .mobile-menu-btn { display: block; z-index: 1; position: relative; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(300px, 80vw);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 100px 36px 60px;
    transform: translateX(100%);
    transition: var(--transition);
    box-shadow: -10px 0 40px rgba(0,0,0,.18);
    z-index: 1002;
  }
  .nav-links.mobile-open { transform: translateX(0); }
  .nav-links a { color: var(--text-main); font-size: 1.15rem; }
  .nav-close {
    position: absolute;
    top: 24px; right: 24px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .nav-close:hover { background: var(--brand-primary); color: #fff; }
  .nav-links a:hover { color: var(--brand-primary); }
  .nav-cta-mobile { display: inline-flex; margin-top: 10px; }

  .split-grid, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-brand { text-align: center; }
  .footer-logo { display: block; margin-left: auto; margin-right: auto; }
  .masonry-grid { grid-template-columns: 1fr; }
  .masonry-item:nth-child(2), .masonry-item:nth-child(5) { grid-row: span 1; }
  .hero-actions { flex-direction: column; }
  .parallax { background-attachment: scroll; }
  .slider-progress { display: none; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 18px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 16px; right: 16px; font-size: 26px; }
}

/* ==========================================================================
   LIGHTBOX DE LA GALERIA: ampliar foto + descripcion + flechas prev/siguiente
   ========================================================================== */
.masonry-item { cursor: pointer; }
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 25, 47, 0.95);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox-media { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 90vw; }
.lightbox-media img { max-width: 90vw; max-height: 78vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-caption { color: #fff; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; text-align: center; }
.lightbox-caption:empty { display: none; }
.lightbox-close {
  position: absolute; top: 28px; right: 32px;
  color: #fff; font-size: 32px; line-height: 1;
  background: none; border: 0; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 20px;
  width: 52px; height: 52px; border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}
.lightbox-nav:hover { background: var(--brand-primary); border-color: var(--brand-primary); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
