/* =====================================================
   CIN Shared Layout Styles
   - Footer sitemap (corporativo elegante, ancho completo)
   - WhatsApp floating button (expandible con etiqueta + slide)
   - Sticky CTA "Solicitar asesoría" (debajo de WhatsApp)
   - Glow naranja para formulario de contacto (#cin-contact-form)
   ===================================================== */

:root{ --cin-banner-height: 0px; --cin-wa-collapsed: 56px; --cin-wa-expanded: 270px; }

/* Optional Top Banner */
.top-banner{
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #ffd400;
  color: #1a1a1a;
}

/* =========================
   Footer Sitemap (Full Width)
   ========================= */
#footer .footer-sitemap{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 1.5rem;
  margin-top: 0.75rem;
}

@media screen and (min-width: 980px){
  #footer .footer-sitemap{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#footer .footer-col-title{
  margin: 0 0 .55rem 0;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .95;
}

#footer .footer-links{
  list-style: none;
  margin: 0;
  padding: 0;
}

#footer .footer-links li{
  margin: 0 0 .35rem 0;
}

#footer .footer-links a{
  text-decoration: none;
  border: 0;
  opacity: .9;
  transition: opacity .2s ease;
}

#footer .footer-links a:hover{
  opacity: 1;
  text-decoration: underline;
}

#footer .footer-links .footer-sep{
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* =========================
   WhatsApp Floating Button (Premium Expand w/ Slide)
   ========================= */
.whatsapp-float.expanded{
  position: fixed;
  right: 18px;
  bottom: 18px;
  height: 56px;
  width: var(--cin-wa-collapsed, 56px);
  min-width: var(--cin-wa-collapsed, 56px);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #25D366;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  text-decoration: none;
  overflow: hidden;
  padding: 0 18px;
  z-index: 99999;
  transition:
    width .35s cubic-bezier(.4,0,.2,1),
    box-shadow .25s ease,
    background .25s ease;
}

.whatsapp-float.expanded svg{
  width: 28px;
  height: 28px;
  fill: #fff;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.whatsapp-float.expanded .whatsapp-text{
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-left: 14px;
  white-space: nowrap;
  transform: translateX(24px);
  opacity: 0;
  transition:
    transform .35s cubic-bezier(.4,0,.2,1),
    opacity .2s ease;
}

@media (hover:hover){
  .whatsapp-float.expanded:hover{
    width: var(--cin-wa-expanded, 270px);
    box-shadow: 0 14px 35px rgba(0,0,0,.30);
    background: #20b858;
  }
  .whatsapp-float.expanded:hover .whatsapp-text{
    transform: translateX(0);
    opacity: 1;
  }
  .whatsapp-float.expanded:hover svg{
    transform: translateX(2px);
  }
}

@media (max-width: 768px){
  .whatsapp-float.expanded{
    width: var(--cin-wa-collapsed, 56px) !important;
    padding: 0;
  }
  .whatsapp-float.expanded .whatsapp-text{
    display: none;
  }
}

/* Corporate Modern Entrance */
@keyframes cinCorporateIn{
  0%{ opacity:0; transform:scale(0.92); }
  40%{ opacity:1; transform:scale(1.04); }
  70%{ transform:scale(0.98); }
  100%{ transform:scale(1); }
}

body.is-preload .whatsapp-float{ animation:none !important; }
body:not(.is-preload) .whatsapp-float{
  animation: cinCorporateIn .45s cubic-bezier(.34,1.56,.64,1) both;
}

/* =========================
   Sticky CTA - "Solicitar asesoría"
   ========================= */
:root{
  --cin-cta-gap: 12px;
  --cin-cta-radius: 999px;
  --cin-cta-shadow: 0 10px 24px rgba(0,0,0,.18);
  --cin-cta-shadow-hover: 0 12px 28px rgba(0,0,0,.22);
}

#cin-cta-asesoria{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--cin-cta-radius);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: var(--cin-cta-shadow);
  transform: translateZ(0);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  opacity: 1;
  background: #f59a1b;
  color: #fff;
}

#cin-cta-asesoria .cin-cta-icon{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background-color: #f6e8d2;

  background-image: url("../../images/cin_logo_icon_nobg.png");
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: center;

  box-shadow:
    0 3px 8px rgba(0,0,0,0.18),
    0 0 6px rgba(255,140,0,0.35);

  transition: transform .18s ease;
}

#cin-cta-asesoria .cin-cta-text{
  white-space: nowrap;
  line-height: 1;
}

#cin-cta-asesoria:hover{
  transform: translateY(-1px);
  box-shadow: var(--cin-cta-shadow-hover);
}

body.is-preload #cin-cta-asesoria{ animation:none !important; }

@media (max-width: 480px){
  #cin-cta-asesoria{
    right: 14px;
    padding: 11px 14px;
    font-size: 0.95em;
  }
}

#cin-cta-asesoria:focus-visible{
  outline: 3px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}

#cin-cta-asesoria.is-hidden{
  opacity: 0;
  pointer-events: none;
}

/* =========================
   Glow naranja al formulario de Contacto
   ========================= */
@keyframes cinGlowOrange{
  0%{ box-shadow: 0 0 0 rgba(245,154,27,0); }
  40%{ box-shadow: 0 0 25px rgba(245,154,27,0.6); }
  70%{ box-shadow: 0 0 18px rgba(245,154,27,0.4); }
  100%{ box-shadow: 0 0 0 rgba(245,154,27,0); }
}

#cin-contact-form.cin-form-highlight{
  animation: cinGlowOrange 2.5s ease-out;
  border-radius: 12px;
}



#cin-cta-asesoria:hover .cin-cta-icon{
  transform: scale(1.08);
}



/* --- Responsive Fixes for CIN --- */

/* Logo scaling everywhere */
#logo img,
.logo img{
    max-width:100%;
    height:auto;
}

/* Hero logo */
#banner img{
    max-width:420px;
    width:60vw;
    height:auto;
}

/* Hero title scaling */
#banner h2{
    font-size:clamp(28px, 5vw, 50px);
    line-height:1.2;
}

/* Carousel mobile behavior */
@media screen and (max-width: 980px){
    .carousel{
        display:flex;
        overflow-x:auto;
        gap:20px;
        padding-bottom:10px;
        scroll-snap-type:x mandatory;
    }
    .carousel article{
        min-width:260px;
        scroll-snap-align:start;
    }
}

/* Mobile adjustments */
@media screen and (max-width: 736px){

    #banner{
        padding:3em 1em;
        text-align:center;
    }

    #banner img{
        width:70vw;
        max-width:320px;
    }

    #banner h2{
        font-size:clamp(24px,6vw,38px);
    }

    #header{
        padding:1em 0;
    }
}
