/* ========== VARIABLES ========== */
:root{
  --white:#ffffff;
  --text-dark:#333;
  --aqua-dark:#4b7f92;
  --tan:#bb9873;
  --font-main:'Inter',sans-serif;
  --bg-light:#f8f4ee;
  --shadow:0 2px 12px rgba(0,0,0,0.06);
}

/* ========== RESET ========== */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-main);
  color:var(--text-dark);
  background:var(--bg-light);
  line-height:1.6;
  padding-top:78px; /* navbar fija */
}
img{max-width:100%;height:auto;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 24px}

/* ========== NAVBAR ========== */
.navbar{
  background:#fff;border-bottom:1px solid #eee;
  box-shadow:0 2px 12px rgba(0,0,0,.04);
  position:fixed;top:0;left:0;right:0;z-index:1000;padding:0;
}
.navbar-content{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0}
.brand{display:flex;align-items:center;gap:.6rem}
.logo{height:42px;max-width:160px;object-fit:contain}
.brand-name{font-size:1.2rem;font-weight:800;color:var(--aqua-dark)}
.main-nav ul{list-style:none;display:flex;gap:28px}
.main-nav a{text-decoration:none;color:#5c6b71;font-weight:600;transition:color .2s}
.main-nav a:hover,.main-nav a.active{color:var(--aqua-dark)}
.language-icon{font-size:1.2rem;color:var(--aqua-dark);background:none;border:0;cursor:pointer}
.nav-right-cluster{display:flex;align-items:center;gap:12px}

/* Toggle base (desktop oculto) */
.nav-toggle{
  display:none;
  background:none;border:none;color:var(--aqua-dark);
  font-size:22px;cursor:pointer;padding:5px;line-height:1;
  z-index:3000;
}
.nav-toggle .fa-times{display:none}

/* ========== FONDO DECORATIVO ========== */
.parallax-bg{position:fixed;inset:0;z-index:-2;background:linear-gradient(180deg,#f3fbff 0%,#f9f3ea 100%)}
.parallax-bg .bg-diag{
  position:absolute;left:-12%;bottom:-8%;
  width:108%;height:40%;
  background:linear-gradient(10deg,rgba(161,196,206,.20),rgba(161,196,206,0));
  clip-path:polygon(0 35%,65% 0,100% 10%,100% 100%,0 100%);
}
.parallax-bg .bg-palm{position:absolute;pointer-events:none;background:url("/img/palms.svg") no-repeat center/contain;opacity:.85;filter:blur(.1px);z-index:-1}
.parallax-bg .bg-palm-right{right:-6%;top:-2%;width:760px;height:760px;transform:rotate(-8deg)}
.parallax-bg .bg-palm-left{left:-10%;bottom:-12%;width:600px;height:600px;transform:scaleX(-1) rotate(6deg)}
@media (max-width:1024px){
  .parallax-bg .bg-palm-right{width:560px;height:560px;right:-14%}
  .parallax-bg .bg-palm-left{display:none}
}
@media (max-width:768px){
  .parallax-bg .bg-diag{display:none}    /* <- elimina huecos */
  .parallax-bg .bg-palm-right{width:420px;height:420px;right:-18%;top:-8%}
}

/* ========== HERO ========== */
.hero{
  position:relative;height:min(76vh,760px);
  display:flex;align-items:center;justify-content:flex-start;color:#fff;overflow:hidden;
}
.hero::before{
  content:"";position:absolute;inset:0;
  background-image:url('../img/playa.png');background-size:cover;background-position:center;
  animation:kenburns 28s ease-in-out infinite;z-index:0;transform-origin:center;
}
.hero-overlay{position:absolute;inset:0;background:rgba(0,0,0,.52);z-index:1}
.hero-text{position:relative;z-index:2;max-width:720px;margin-left:clamp(1rem,4vw,3rem);text-align:left}
.hero-text h1{font-size:clamp(2rem,5.4vw,3rem);font-weight:800;margin-bottom:.9rem;text-shadow:0 2px 6px rgba(0,0,0,.6)}
.hero-text p{font-size:clamp(1rem,2.6vw,1.15rem);margin-bottom:1.6rem;color:#e9eef2;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.cta{padding:.9rem 1.6rem;background:var(--aqua-dark);color:#fff;font-weight:800;text-decoration:none;border-radius:8px;display:inline-block}
.cta:hover{background:var(--tan)}
@media (max-width:768px){
  .hero{height:68vh}
  .hero-text{margin-left:1rem}
}

/* ========== SECCIONES (Mobile-first) ========== */
.section{padding:2rem 1rem}
.section-title{font-size:clamp(2rem,4vw,2.6rem);text-align:center;font-weight:800;color:#222c34;margin-bottom:1rem}
@media (min-width:768px){
  .section{padding:3.5rem 2rem}
}
@media (min-width:1024px){
  .section{padding:4.2rem 2rem}
}

/* ========== SERVICES ========== */
.services-section{padding-top:2.2rem}
.services-carousel{display:flex;align-items:center;justify-content:center;position:relative;min-height:340px}
.services-cards{position:relative;width:min(820px,92vw);height:clamp(260px,40vw,360px);perspective:1400px;display:flex;align-items:center;justify-content:center}
.service-card{position:absolute;top:0;left:50%;width:clamp(240px,26vw,320px);height:100%;transform:translateX(-50%) scale(.86);border-radius:16px;overflow:hidden;opacity:0;pointer-events:none;z-index:1;box-shadow:0 12px 36px rgba(0,0,0,.12);background-image:var(--bg);background-size:cover;background-position:center}

/* CONTRASTE MEJORADO EN LAS TARJETAS */
.service-card::after{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(120% 70% at 50% 30%,
      rgba(0,0,0,0) 55%,
      rgba(0,0,0,.25) 80%,
      rgba(0,0,0,.38) 100%),
    linear-gradient(to top,
      rgba(0,0,0,.74) 0%,
      rgba(0,0,0,.55) 55%,
      rgba(0,0,0,.22) 82%,
      rgba(0,0,0,0) 100%);
}

/* caption con almohadilla y sombras */
.service-caption{
  position:absolute;left:18px;right:18px;bottom:18px;
  text-align:center;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.55);z-index:2;
}
.service-caption::before{
  content:"";position:absolute;inset:-10px -12px;
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(2px);
  border-radius:14px;z-index:-1;
}
.service-caption h3{
  font-size:1.25rem;font-weight:900;margin:0 0 .3rem;color:#fff;
  letter-spacing:.2px;
  text-shadow:0 2px 14px rgba(0,0,0,.6),0 0 1px rgba(0,0,0,.6);
  -webkit-text-stroke:.25px rgba(0,0,0,.35);
}
.service-caption p{
  font-size:.92rem;margin:0;color:#f7f9fb;
  text-shadow:0 1px 8px rgba(0,0,0,.6);
}

.service-card.active{opacity:1;transform:translateX(-50%) scale(1.03);z-index:4;pointer-events:auto}
.service-card.left{opacity:.9;transform:translateX(-150%) rotateY(18deg) scale(.92);z-index:3}
.service-card.right{opacity:.9;transform:translateX(50%) rotateY(-18deg) scale(.92);z-index:3}
.service-card.left2{opacity:.45;transform:translateX(-250%) rotateY(28deg) scale(.82);z-index:2;filter:brightness(.8)}
.service-card.right2{opacity:.45;transform:translateX(150%) rotateY(-28deg) scale(.82);z-index:2;filter:brightness(.8)}
.services-arrow{background:#fff;border:0;border-radius:50%;width:42px;height:42px;font-size:1.6rem;cursor:pointer;margin:0 1rem;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.services-controls{margin-top:14px;display:flex;justify-content:center;gap:12px}
.services-ctl{width:40px;height:40px;border-radius:50%;border:0;background:#fff;font-size:22px;line-height:40px;box-shadow:0 8px 24px rgba(0,0,0,.12);cursor:pointer}

@media (max-width:768px){
  .services-arrow{display:none} /* en móvil solo botones inferiores */
}
/* refuerzo extra en pantallas muy pequeñas */
@media (max-width:480px){
  .service-card::after{
    background:
      radial-gradient(120% 70% at 50% 30%,
        rgba(0,0,0,0) 50%,
        rgba(0,0,0,.28) 78%,
        rgba(0,0,0,.42) 100%),
      linear-gradient(to top,
        rgba(0,0,0,.78) 0%,
        rgba(0,0,0,.58) 55%,
        rgba(0,0,0,.26) 82%,
        rgba(0,0,0,0) 100%);
  }
  .service-caption::before{ background: rgba(0,0,0,.42); }
}

/* ========== HOW WE WORK / PROPOSAL ========== */
.how-we-container,.proposal-container{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
  max-width:1200px;margin:0 auto;gap:clamp(1rem,3.5vw,2.5rem)
}
.how-we-image{position:relative;flex:1 1 480px;display:flex;align-items:center;justify-content:center;max-width:640px}
.grid-background{position:absolute;inset:0;background-image:linear-gradient(#cfdbe0 1px,transparent 1px),linear-gradient(90deg,#cfdbe0 1px,transparent 1px);background-size:30px 30px;opacity:.18;border-radius:16px}
.styled-photo,.proposal-photo{width:100%;max-width:520px;border-radius:16px;box-shadow:0 18px 40px rgba(0,0,0,.14)}
.how-we-text,.proposal-text{flex:1 1 480px;padding:0 1rem}
.how-we-title,.proposal-title{font-size:clamp(1.8rem,3.2vw,2.4rem);color:#2a5562;margin-bottom:.6rem}
.how-we-description,.proposal-description{font-size:1.05rem;color:#44555b}
.proposal-image{position:relative}
.proposal-grid-bg{position:absolute;inset:auto auto 10% -12px;width:110px;height:110px;background-image:linear-gradient(to right,#e0f7fa 1px,transparent 1px),linear-gradient(to bottom,#e0f7fa 1px,transparent 1px);background-size:20px 20px;opacity:.5;z-index:-1}
@media (max-width:768px){
  .grid-background,.proposal-grid-bg{display:none} /* elimina fondos que alargan */
  .how-we-text,.proposal-text{padding:0}
  .styled-photo,.proposal-photo{margin:0 0 .8rem}
}

/* ========== WHY CHOOSE ========== */
.hubspot-section .container{max-width:960px}
.hubspot-section h1{font-size:clamp(2rem,4.2vw,2.6rem);font-weight:800;margin-bottom:1.4rem;color:#2a5562}
.help-item{border-top:1px solid rgba(0,0,0,.08);padding:1.4rem 0}
.help-item:first-of-type{border-top:none}
.title{font-size:clamp(1.4rem,3.2vw,1.9rem);font-weight:800;margin-bottom:.5rem;color:var(--aqua-dark)}
.hubspot-section p{font-size:1rem;color:#33434a}

/* ========== FOOTER ========== */
.footer-small{
  background:#fff;
  border-top:1px solid #eee;
  text-align:center;
  padding:12px 0 20px;      /* espacio base */
}
.footer-container{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
}
.footer-social{
  display:flex;
  align-items:center;
  gap:14px;
}
.footer-social a{display:inline-flex}
.footer-social a img{
  height:24px;
  opacity:.9;
  transition:opacity .2s;
}
.footer-social a img:hover{opacity:1}
.footer-copy{
  font-size:.8rem;
  color:#999;
  margin:8px 0 0;
  text-align:center;
}
@media (max-width:600px){
  .footer-small{padding-right:84px;padding-bottom:28px}
  .footer-container{gap:12px}
  .footer-social a img{height:26px}
}
.footer-social img{display:block}

/* ========== MOBILE NAV OVERLAY ========== */
@media (max-width:768px){
  .navbar-content{flex-direction:row !important}
  .nav-toggle{display:block}

  .main-nav{
    position:fixed;
    inset:0;
    width:auto;height:auto;
    box-sizing:border-box;
    background:rgba(255,255,255,.88);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:calc(env(safe-area-inset-top,0px) + 16px) 24px 24px;
    overflow:auto;-webkit-overflow-scrolling:touch;
    opacity:0;visibility:hidden;transform:translateY(-4%);
    transition:opacity .3s ease, transform .3s ease, visibility .3s;
    z-index:2200;
  }
  @supports (backdrop-filter:blur(10px)){.main-nav{backdrop-filter:blur(10px)}}
  .main-nav ul{
    flex-direction:column;gap:28px;margin:0;
    min-height:min(70vh,520px);width:100%;text-align:center
  }
  .main-nav a{font-size:22px;font-weight:800;color:#4b7f92}
  .navbar.nav-open .main-nav{opacity:1;visibility:visible;transform:translateY(0)}
  .navbar.nav-open .nav-toggle{display:none}
  body.nav-open{overflow:hidden;overscroll-behavior:none;max-width:100%}
  html, body{max-width:100%}
}

/* Botón “X” fijo */
.menu-close{
  position:fixed;
  top:max(10px, env(safe-area-inset-top, 10px));
  right:max(10px, env(safe-area-inset-right, 10px));
  width:40px;height:40px;
  display:none;place-items:center;
  background:var(--tan);color:#fff;border:0;border-radius:12px;
  font-size:22px;font-weight:800;line-height:1;
  box-shadow:0 6px 18px rgba(0,0,0,.15);
  z-index:3000;
}
.navbar.nav-open .menu-close{display:grid}
.menu-close:active{transform:scale(.98)}

/* ========== Animaciones ========== */
@keyframes kenburns{
  0%{transform:scale(1) translate(0,0)}
  50%{transform:scale(1.08) translate(-2%,-2%)}
  100%{transform:scale(1) translate(0,0)}
}

/* === FIX NAV BAR COMPACTO === */
html, body { overflow-x: hidden; }
@media (max-width: 480px){
  .container.navbar-content{padding:10px 12px;gap:10px}
  .brand{gap:.45rem}
  .logo{height:34px;max-width:130px}
  .brand-name{font-size:clamp(1rem,4vw,1.1rem);line-height:1;white-space:nowrap}
  .nav-right-cluster{gap:8px;margin-left:auto;align-items:center}
  .language-icon{font-size:1.05rem;padding:6px}
  .nav-toggle{font-size:20px;padding:6px}
}
@media (max-width: 360px){
  .logo{height:30px}
  .brand-name{display:none}
  .container.navbar-content{padding:8px 10px}
}
.navbar-content{flex-wrap:nowrap}
.main-nav{flex:0 0 auto}
.nav-right-cluster{flex:0 0 auto}