/*
 * Cardenal S.A. · V1.3.1
 * Responsive refinements over the approved desktop design (main.css).
 * All extra motion is progressive enhancement and follows reduced-motion.
 */

/* Drawer controls do not affect the desktop header. */
.mobile-drawer-heading,.mobile-menu-backdrop,.mobile-nav-close,.trust-swipe-hint{display:none}
.menu-toggle{position:relative;z-index:2;border-radius:10px}
.menu-toggle:focus-visible,.mobile-nav-close:focus-visible,.cardenal-nav-list a:focus-visible,
.mobile-menu-backdrop:focus-visible,.brand-card:focus-within{outline:3px solid var(--red);outline-offset:3px}

/* Desktop + tablet: make the trust/clients surfaces intentional, not plain logos. */
.cardenal-home .trust-swipe-hint{display:none}
.cardenal-home .trust-value{min-width:0}
.cardenal-home .trust-value img{object-fit:contain}
.cardenal-home .team-heading{margin-bottom:clamp(27px,3vw,42px)}
.cardenal-home .team-heading .pill-outline{display:inline-flex;justify-content:center;align-items:center;min-height:46px}
.cardenal-home .team-slider{position:relative}
.cardenal-home .team-slider [data-viewport]{min-width:0}
.cardenal-home .brand-strip{background:linear-gradient(180deg,#fff 0%,var(--cream) 100%);padding:54px 0 65px}
.cardenal-home .brand-heading{margin:0 auto 30px;max-width:780px;text-align:center}
.cardenal-home .brand-heading .eyebrow{font-size:13px;color:var(--red);letter-spacing:.16em;margin-bottom:10px}
.cardenal-home .brand-heading h2{font-size:clamp(24px,2.5vw,34px);margin:0 0 10px;line-height:1.15}
.cardenal-home .brand-heading p{color:#5b6070;margin:0;font-size:16px;line-height:1.5}
.cardenal-home .brand-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.cardenal-home .brand-card{min-height:118px;min-width:0;display:flex;align-items:center;justify-content:center;padding:19px 12px;border:1px solid #e5e1e2;border-radius:17px;background:#fff;box-shadow:0 2px 12px #1b1f3309;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.cardenal-home .brand-card img{width:100%;max-width:160px;max-height:74px;object-fit:contain;filter:grayscale(1);opacity:.85;transition:filter .22s ease,opacity .22s ease}
@media(hover:hover){.cardenal-home .brand-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px #1b1f3315;border-color:#d5cacc}.cardenal-home .brand-card:hover img{filter:none;opacity:1}}

@media (max-width:1024px){
  /* Full off-canvas navigation with a usable, animated close action. */
  html.cardenal-menu-open,body.cardenal-menu-open{overflow:hidden;overscroll-behavior:none}
  .site-header{z-index:1000}
  .header-inner{position:relative;min-height:74px;flex-wrap:nowrap}
  .site-brand{flex:0 1 200px}
  .menu-toggle.navigation-ready{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;flex:none;width:46px;height:46px;margin-left:auto}
  .menu-toggle span{margin:3px 0;width:26px;transition:transform .3s ease,opacity .18s ease}
  .mobile-menu-backdrop{display:block;position:fixed;inset:0;z-index:3;border:0;padding:0;background:rgba(10,13,28,.6);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .35s ease,visibility .35s}
  .mobile-menu-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
  .site-navigation.navigation-ready,.site-navigation.navigation-ready.open{
    display:flex;flex-direction:column;position:fixed;inset:0 0 0 auto;top:0;left:auto;right:0;
    width:min(86vw,390px);height:100vh;height:100dvh;max-height:none;min-width:0;
    padding:0 26px 30px;background:#fff;border-radius:0;box-shadow:-18px 0 50px #070b1725;
    overflow-y:auto;overscroll-behavior:contain;z-index:4;
    transform:translate3d(105%,0,0);opacity:1;visibility:hidden;pointer-events:none;
    transition:transform .42s cubic-bezier(.22,.7,.2,1),visibility .42s;
    -webkit-overflow-scrolling:touch
  }
  .site-navigation.navigation-ready.open{transform:translate3d(0,0,0);visibility:visible;pointer-events:auto}
  .mobile-drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none;padding:28px 0 25px;border-bottom:1px solid #e7e9ee;margin-bottom:16px}
  .mobile-drawer-brand{display:block;width:min(205px,80%)}
  .mobile-drawer-brand img{display:block;width:100%;max-height:68px;object-fit:contain;object-position:left center;filter:url(#cardenal-brand-ink)}
  .mobile-nav-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;background:#f4f4f6;border:0;border-radius:50%;color:var(--navy)}
  .mobile-nav-close span{font-family:Arial,sans-serif;font-size:32px;font-weight:300;line-height:1}
  .site-navigation .cardenal-nav-list{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:0 0 28px;margin:0;flex:1}
  .site-navigation .cardenal-nav-list>li{width:100%;opacity:1;transform:none}
  .site-navigation .cardenal-nav-list>li>a{padding:13px 12px;min-height:50px;border-radius:10px;font-size:18px;color:var(--navy);font-weight:550;transition:background-color .2s ease,color .2s ease}
  .site-navigation .cardenal-nav-list>li>a:hover,.site-navigation .cardenal-nav-list>li>a:focus-visible{background:#f2f3f6}
  .site-navigation .cardenal-nav-list>li>a.is-active,.site-navigation .cardenal-nav-list>.current-menu-item>a{color:var(--red);font-weight:750}
  .site-navigation .cardenal-nav-list>li:last-child{margin-top:18px}
  .site-navigation .cardenal-nav-list>li:last-child>a,.site-navigation .cardenal-nav-list a.nav-contact{border-radius:28px;min-height:51px;display:flex;align-items:center;justify-content:center;background:var(--red);color:#fff;font-weight:700;box-shadow:0 8px 20px #bb1f2d20}
  .site-navigation .cardenal-nav-list>li:last-child>a:hover{background:#a81a28;color:#fff}
  .site-navigation .cardenal-nav-list .sub-menu{background:#f7f7f9;border-radius:12px;margin:0 0 8px}
  .site-navigation .cardenal-nav-list .sub-menu li:last-child>a{background:transparent;box-shadow:none;color:var(--navy);justify-content:flex-start}
  /* Responsive logo section: 3 carefully sized cards on tablet. */
  .cardenal-home .brand-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
}
@media (max-width:782px){.admin-bar .site-navigation.navigation-ready{top:46px;height:calc(100dvh - 46px)}}
@media (min-width:783px) and (max-width:1024px){.admin-bar .site-navigation.navigation-ready{top:32px;height:calc(100dvh - 32px)}}

@media (max-width:760px){
  .site-header{box-shadow:0 3px 12px #1b1f330a}
  .header-inner{min-height:70px}
  /* V1.3.1: mobile hero has two independent, natural-height zones.
     The white copy surface NEVER overlaps the landscape image.
     The existing full-width desktop hero remains unchanged. */
  .cardenal-home .hero{
    display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
    position:relative;isolation:auto;min-height:0;height:auto;padding:0;
    overflow:hidden;background:#fff;
  }
  /* Remove the former absolutely positioned background + gradient layers. */
  .cardenal-home .hero::before{content:none;display:none}
  /* Decorative mobile image, placed IN THE FLOW after all hero content. */
  .cardenal-home .hero::after{
    content:"";display:block;position:relative;inset:auto;z-index:auto;
    width:100%;height:clamp(190px,52vw,290px);flex:0 0 auto;
    background-image:url('../images/benner_inicio.webp');
    background-repeat:no-repeat;background-size:185% auto;
    background-position:right 56%;pointer-events:none;
  }
  .cardenal-home .hero .hero-inner{
    width:calc(100% - 36px);max-width:var(--max);margin-inline:auto;
    flex:0 0 auto;padding-top:clamp(30px,7vw,45px);
    padding-bottom:clamp(26px,6vw,38px);position:relative;
  }
  .cardenal-home .hero-copy{width:100%;max-width:570px}
  .cardenal-home .hero .eyebrow{margin-bottom:10px;font-size:14px}
  .cardenal-home .hero h1{font-size:clamp(34px,8vw,45px);line-height:1.08;letter-spacing:-.035em}
  .cardenal-home .hero-subtitle{font-size:clamp(25px,5.7vw,34px);line-height:1.16;margin:10px 0}
  .cardenal-home .hero-description{font-size:16px;line-height:1.5;margin-bottom:0;max-width:500px}
  .cardenal-home .hero-actions{margin-top:26px;display:flex;gap:11px;flex-wrap:wrap}
  .cardenal-home .hero-actions .btn{border-radius:999px;min-height:51px;font-size:16px;padding:13px 20px}
  /* Short, horizontal value cards: never shrink text into a three-column grid. */
  .cardenal-home .trust-band{padding:40px 0 28px;overflow:hidden}
  .cardenal-home .trust-grid{display:block}
  .cardenal-home .trust-main{margin-bottom:25px}
  .cardenal-home .trust-values{display:flex;gap:12px;width:auto;max-width:none;margin:0 -18px;padding:5px 18px 14px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:18px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .cardenal-home .trust-values::-webkit-scrollbar{display:none}
  .cardenal-home .trust-value{display:grid;grid-template-columns:76px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;align-items:center;column-gap:13px;row-gap:2px;text-align:left;flex:0 0 min(84vw,350px);min-height:128px;padding:17px;background:#fff;border:1px solid #e5e7ec;border-radius:18px;box-shadow:0 3px 12px #1b1f3310;scroll-snap-align:start}
  .cardenal-home .trust-value img{grid-row:1/3;width:76px;height:76px;object-fit:contain;align-self:center;margin:0}
  .cardenal-home .trust-value h3{font-size:20px;margin:0;line-height:1.15}
  .cardenal-home .trust-value p{font-size:14px;line-height:1.38;margin:0;color:#535968}
  .cardenal-home .trust-value::after{display:none!important}
  .cardenal-home .trust-swipe-hint{display:block;margin:3px 0 0;text-align:right;font-size:12px;letter-spacing:.015em;color:#666b78}
  .cardenal-home .trust-swipe-hint span{color:var(--red);padding-left:5px;font-size:17px}
  /* Give CTA and slider distinct rhythms instead of touching. */
  .cardenal-home .team{padding-top:48px}
  .cardenal-home .team-heading{gap:19px;margin-bottom:32px}
  .cardenal-home .team-heading p{margin:0;line-height:1.52}
  .cardenal-home .team-heading .pill-outline{align-self:flex-start;min-height:49px;padding:12px 20px}
  .cardenal-home .team-carousel{gap:7px}
  .cardenal-home .brand-strip{padding:48px 0 55px}
  .cardenal-home .brand-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .cardenal-home .brand-card{min-height:116px;padding:19px 16px}
  .cardenal-home .brand-card img{max-height:69px}
  .cardenal-home .brand-heading{text-align:left;margin-bottom:26px}
  .cardenal-home .brand-heading h2{font-size:clamp(25px,6vw,31px)}
  .cardenal-home .brand-heading p{font-size:15px}
  /* Differentiator: a white reading surface followed by a dedicated photo field. */
  .cardenal-home .difference{position:relative;isolation:isolate;display:block;min-height:0;padding:0 0 clamp(235px,64vw,330px);background:#fff;overflow:hidden}
  .cardenal-home .difference::before{content:"";position:absolute;inset:auto 0 0 0;height:clamp(235px,64vw,330px);background:url('../images/banner_intermedio_nuestro_diferencial.webp') right center / auto 100% no-repeat;z-index:-2}
  .cardenal-home .difference::after{content:"";position:absolute;inset:auto 0 0 0;height:clamp(235px,64vw,330px);background:linear-gradient(to bottom,#fff 0%,#fffffff0 8%,#ffffff00 42%);z-index:-1;pointer-events:none}
  .cardenal-home .difference-inner{padding-top:49px;padding-bottom:16px;position:relative}
  .cardenal-home .difference-inner h2{max-width:520px;font-size:clamp(26px,6vw,34px);line-height:1.15;margin-bottom:16px}
  .cardenal-home .difference-inner p{max-width:520px;font-size:16px;line-height:1.53;color:#4a4f59}
  .cardenal-home .difference-inner a{display:inline-flex;align-items:center;margin-top:7px;min-height:44px;font-size:16px}
  .cardenal-home .difference-inner a b{line-height:1}
}
@media (max-width:480px){
  .cardenal-home .hero-actions{align-items:stretch}
  .cardenal-home .hero-actions .btn{width:100%;min-width:0;flex:0 0 auto}
  .cardenal-home .trust-main{gap:12px}
  .cardenal-home .trust-value{flex-basis:min(85vw,338px)}
  .cardenal-home .trust-value img{width:68px;height:68px}
  .cardenal-home .trust-value{grid-template-columns:68px minmax(0,1fr)}
  .cardenal-home .team-heading{margin-bottom:32px}
  .cardenal-home .team-heading .pill-outline{width:auto;max-width:100%;text-align:center}
  .cardenal-home .team-slider [data-dots]{margin-top:14px;margin-bottom:35px}
}
@media (max-width:359px){
  .site-navigation.navigation-ready{width:92vw;padding-inline:18px}
  .cardenal-home .trust-values{margin-inline:-14px;padding-inline:14px}
  .cardenal-home .trust-value{flex-basis:88vw;grid-template-columns:60px minmax(0,1fr);padding:13px;gap:9px}
  .cardenal-home .trust-value img{width:60px;height:60px}
  .cardenal-home .trust-value h3{font-size:18px}
  .cardenal-home .trust-value p{font-size:13px}
  .cardenal-home .hero h1{font-size:32px}
}
@media (prefers-reduced-motion:reduce){
  .site-navigation.navigation-ready,.mobile-menu-backdrop,.mobile-nav-close,.cardenal-home .brand-card,.cardenal-home .brand-card img{transition:none!important;animation:none!important}
  .cardenal-home .trust-values{scroll-behavior:auto}
}

@media (max-width:1024px) and (prefers-reduced-motion:no-preference){
  .site-navigation.navigation-ready.open .cardenal-nav-list>li{animation:cardenal-drawer-items .38s ease both}
  .site-navigation.navigation-ready.open .cardenal-nav-list>li:nth-child(2){animation-delay:40ms}
  .site-navigation.navigation-ready.open .cardenal-nav-list>li:nth-child(3){animation-delay:80ms}
  .site-navigation.navigation-ready.open .cardenal-nav-list>li:nth-child(4){animation-delay:120ms}
  .site-navigation.navigation-ready.open .cardenal-nav-list>li:nth-child(5){animation-delay:160ms}
  .site-navigation.navigation-ready.open .cardenal-nav-list>li:nth-child(6){animation-delay:200ms}
}
@keyframes cardenal-drawer-items{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:translateX(0)}}
