/* ==========================================================================
   Subsidios Chile - style.css
   Versión: actualizada (header, hero, work cards, responsive, AOS tweaks)
   ========================================================================== */

/* -------------------------
   Variables y tipografías
   ------------------------- */
:root{
  --tulsy-yellow: #ffbf00;
  --accent: #0d6efd;
  --muted: #6c757d;
  --bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(13,110,253,0.06);
  --card-radius: 12px;
  --max-width-content: 1200px;
  --transition-fast: 200ms ease;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Roboto:wght@300;400;500;700&display=swap');

html,body{ margin:0; padding:0; background:var(--bg); font-family:'Roboto',sans-serif; color:#222; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body { overflow-x: hidden; }

/* Utility */
.container{ max-width:var(--max-width-content); margin:0 auto; padding:0 1rem; }
.text-muted{ color:var(--muted) !important; }

/* -------------------------
   Header y navegación
   ------------------------- */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  background:#fff;
  z-index:9999;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  transition: padding var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  padding:1rem 0;
}

.site-header .container{ display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.brand img{ height:44px; display:block; }
.main-nav .nav{ display:flex; gap:0.25rem; align-items:center; margin:0; padding:0; list-style:none; }
.main-nav .nav-link{
  color:#222; font-weight:600; text-transform:uppercase; letter-spacing:0.6px; padding:.5rem .8rem; text-decoration:none;
}
.main-nav .nav-link:hover{ color:var(--accent); text-decoration:none; }
.site-header .btn-primary{ background:var(--tulsy-yellow); border-color:var(--tulsy-yellow); color:#111; font-weight:700; padding:.45rem .8rem; border-radius:8px; }

/* Shrink header on scroll */
.site-header.header-shrink{ padding:.5rem 0; box-shadow:0 8px 26px rgba(0,0,0,0.08); }

/* Mobile menu */
#mobileMenuBtn{ border:1px solid rgba(0,0,0,0.08); background:#fff; padding:.35rem .6rem; border-radius:6px; }
.mobile-menu{ display:none; }
body.mobile-menu-open { overflow: hidden; }
body.mobile-menu-open .mobile-menu{
  display:block;
  position:fixed;
  inset:70px 0 0 0;
  background:#fff;
  z-index:9998;
  padding:1rem;
  overflow:auto;
}

/* -------------------------
   Hero (full-bleed) 
   ------------------------- */
.hero-hero{
  position:relative;
  min-height: calc(100vh - 80px);
  display:flex;
  align-items:center;
  background-size:cover;
  background-position:center right;
  background-repeat:no-repeat;
  padding:6rem 0;
  color:#fff;
  overflow:hidden;
  font-family:'Poppins','Roboto',sans-serif;
}

/* overlay para contraste */
.hero-hero .hero-overlay{
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(3,37,65,0.65) 0%, rgba(3,37,65,0.35) 60%, rgba(255,255,255,0) 100%);
  mix-blend-mode:multiply;
  pointer-events:none;
}

/* contenido del hero */
.hero-inner{ position:relative; z-index:2; width:100%; }
.hero-title{
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  line-height:1.02;
  font-weight:700;
  margin-bottom:.8rem;
  color:#fff;
  letter-spacing:-0.5px;
}
.hero-sub{
  font-size:1.05rem;
  color: rgba(255,255,255,0.95);
  margin-bottom:1.4rem;
  max-width:48rem;
}

/* botones hero */
.btn-cta-primary{
  background:var(--tulsy-yellow);
  color:#111;
  padding:.85rem 1.25rem;
  border-radius:8px;
  font-weight:700;
  box-shadow:0 8px 30px rgba(255,191,0,0.12);
  border:none;
  text-decoration:none;
  display:inline-block;
  margin-right:.6rem;
}
.btn-cta-outline{
  background:transparent;
  color:#fff;
  border:2px solid rgba(255,255,255,0.18);
  padding:.75rem 1.1rem;
  border-radius:8px;
  text-decoration:none;
}

/* -------------------------
   Secciones generales y cards
   ------------------------- */
section{ padding-top:4.5rem; padding-bottom:4.5rem; }
h1,h2,h3,h4,h5{ font-family:'Poppins',sans-serif; margin-top:0; margin-bottom:.75rem; }
.lead{ font-size:1.05rem; color:var(--muted); }

/* Service cards */
.service-card{ border-radius:var(--card-radius); background:#fff; padding:1.6rem; box-shadow:var(--card-shadow); height:100%; display:flex; flex-direction:column; align-items:center; text-align:center; }
.service-card i{ color:var(--accent); margin-bottom:.6rem; }

/* Team card */
.team-card{ border-radius:var(--card-radius); background:#fff; padding:1.6rem; box-shadow:0 6px 18px rgba(0,0,0,0.04); }

/* Generic card tweaks */
.card{ border-radius:var(--card-radius); overflow:hidden; box-shadow:var(--card-shadow); }

/* -------------------------
   Work cards y media (alineación corregida)
   ------------------------- */
/* Forzar que las columnas estiren y las cards tengan la misma altura */
.row.align-items-stretch{ align-items:stretch; }

/* Work card container */
.work-card{ display:flex; flex-direction:column; height:100%; }

/* Contenedor de la imagen con ratio fijo */
.work-media{
  width:100%;
  aspect-ratio:16/9; /* navegadores modernos */
  overflow:hidden;
  background:#f3f4f6;
}

/* Imagen: cubrir y centrar sin deformar */
.work-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

/* Card body ocupa el espacio restante para alinear footers */
.work-card .card-body{ flex:1 1 auto; display:flex; flex-direction:column; }
.work-card .card-body .mt-auto{ margin-top:auto; }

/* Ajuste para pantallas pequeñas */
@media (max-width:767.98px){
  .work-media{ aspect-ratio:4/3; }
}

/* -------------------------
   Normativas list / cards
   ------------------------- */
.normativa-card img{ width:100%; height:200px; object-fit:cover; border-bottom-left-radius:0; border-bottom-right-radius:0; }

/* -------------------------
   Footer
   ------------------------- */
.site-footer{ background:#0b1220; color:#fff; padding:3rem 0; }
.site-footer a{ color:rgba(255,255,255,0.9); text-decoration:none; }
.site-footer .social a{ font-size:18px; margin-left:.5rem; }

/* -------------------------
   AOS tweaks y micro-interactions
   ------------------------- */
[data-aos]{ will-change:transform,opacity; }
a.btn, button{ transition: transform 160ms ease, box-shadow 160ms ease; }
a.btn:hover, button:hover{ transform: translateY(-3px); }

/* -------------------------
   Responsive: ajustes generales
   ------------------------- */
@media (max-width:991.98px){
  .main-nav{ display:none; }
  .site-header{ padding:.6rem 0; }
  .hero-hero{ padding:4rem 0; min-height:70vh; background-position:center; }
  .hero-sub{ max-width:100%; }
}

/* -------------------------
   Accessibility & small utilities
   ------------------------- */
.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; }
.text-center{ text-align:center; }

/* -------------------------
   Debug helpers (desactivar en producción si no se necesitan)
   ------------------------- */
/* .debug { outline: 1px dashed rgba(0,0,0,0.08); } */

/* Hero estilo Tulsy (sin background-image) */
.hero-hero{
  position:relative;
  min-height: calc(100vh - 80px);
  display:flex;
  align-items:center;
  /* background-image se inyecta desde index.php */
  background-size:cover;
  background-position:center right;
  background-repeat:no-repeat;
  padding:6rem 0;
  color:#fff;
  overflow:hidden;
  font-family:'Poppins','Roboto',sans-serif;
}

/* overlay para contraste */
.hero-hero .hero-overlay{
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(3,37,65,0.65) 0%, rgba(3,37,65,0.35) 60%, rgba(255,255,255,0) 100%);
  mix-blend-mode:multiply;
  pointer-events:none;
}

/* contenido del hero */
.hero-inner{ position:relative; z-index:2; width:100%; }
.hero-title{
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  line-height:1.02;
  font-weight:700;
  margin-bottom:.8rem;
  color:#fff;
  letter-spacing:-0.5px;
}
.hero-sub{
  font-size:1.05rem;
  color: rgba(255,255,255,0.95);
  margin-bottom:1.4rem;
  max-width:48rem;
}

/* botones hero */
.btn-cta-primary{
  background:var(--tulsy-yellow);
  color:#111;
  padding:.85rem 1.25rem;
  border-radius:8px;
  font-weight:700;
  box-shadow:0 8px 30px rgba(255,191,0,0.12);
  border:none;
  text-decoration:none;
  display:inline-block;
  margin-right:.6rem;
}
.btn-cta-outline{
  background:transparent;
  color:#fff;
  border:2px solid rgba(255,255,255,0.18);
  padding:.75rem 1.1rem;
  border-radius:8px;
  text-decoration:none;
}
/* Flags in language dropdown */
.dropdown .flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
}

/* Slight vertical alignment tweak */
.dropdown .dropdown-item .flag { transform: translateY(-1px); }

/* Make dropdown items comfortable to click */
.dropdown-menu .dropdown-item { padding: .45rem .9rem; }

/* Mobile buttons with flags */
.mobile-menu .btn .flag { width:18px; height:13px; margin-right:.5rem; }

/* High contrast focus for accessibility */
.dropdown .dropdown-item:focus, .dropdown .dropdown-item:hover {
  background-color: rgba(13,110,253,0.06);
  color: #111;
  outline: none;
}

/* Hover effect for team member social icons */
.team-social-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.team-img-wrapper:hover .team-social-overlay {
    opacity: 1;
}

.carousel-fade .carousel-item {
  transition: opacity 0.8s ease-in-out !important;
}  
 /* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 32px;
  box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  background-color: #1ebe57;
  color: #fff;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0px 8px 25px rgba(37, 211, 102, 0.6);
}
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 26px;
  }
}
