/* Frecuencia Consultores — shared brand tokens */
:root{
  --navy:#0f1d2f;
  --navy2:#14263a;
  --teal:#0b7280;
  --cyan:#55c9d3;
  --ivory:#fbf8f3;
  --ivory2:#f4eee7;
  --white:#ffffff;
  --ink:#182433;
  --muted:#667480;
  --line:rgba(11,114,128,.20);
  --softline:rgba(15,29,47,.09);
  --soft:#f3efe9;
  --max:1180px;
}

/* Shared responsive foundation */
html,body{max-width:100%;overflow-x:clip}
img{max-width:100%;height:auto}

/* Mobile/tablet navigation — single source of truth */
.mobile-menu-toggle{
  display:none;
  width:44px;height:44px;border:0;background:transparent;color:var(--navy);
  align-items:center;justify-content:center;cursor:pointer;padding:0;flex:0 0 auto;
}
.mobile-menu-toggle svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

/* Release legacy 1500px export canvas on every normal screen below the design canvas. */
@media screen and (max-width:1499px){
  body{width:auto!important;max-width:100%!important}
  .page{width:100%!important;max-width:100%!important;min-height:0!important}
  .wrap{width:min(var(--max),calc(100% - 48px))!important;margin-left:auto!important;margin-right:auto!important}
}

/* Home / Nosotros: comfortable single-column transition before tablet widths. */
@media screen and (max-width:1100px){
  body.page-home .hero{grid-template-columns:1fr!important;min-height:0!important}
  body.page-home .herocopy{padding:64px 48px 46px!important}
  body.page-home .heroimg img{height:420px!important}
  body.page-home .prob{grid-template-columns:64px 290px 1fr!important}
  body.page-home .steps{grid-template-columns:repeat(2,1fr)!important}
  body.page-home .step:nth-child(2){border-right:0!important}
  body.page-home .team{grid-template-columns:1fr!important}
  body.page-home .contact{grid-template-columns:1fr!important;gap:42px!important}

  body.page-nosotros .profiles{grid-template-columns:1fr!important;gap:52px!important}
  body.page-nosotros .convictions{grid-template-columns:1fr!important;gap:30px!important}
  body.page-nosotros .values{grid-template-columns:repeat(2,1fr)!important}
  body.page-nosotros .val:nth-child(2){border-right:0!important}
}

/* GPI/GEP: readable intermediate layout for iPad and small laptops. */
@media screen and (min-width:761px) and (max-width:1100px){
  body.page-service .wrap{width:min(100% - 48px,var(--max))!important}
  body.page-service .hero-copy{padding:64px 48px 58px!important;max-width:900px!important}
  body.page-service .hero h1{font-size:clamp(46px,6vw,60px)!important}
  body.page-service .section{padding:64px 0!important}
  body.page-service .section-title{font-size:clamp(38px,5vw,46px)!important}
  body.page-service .signals{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.page-service .what-grid{grid-template-columns:1fr!important;gap:34px!important}
  body.page-service .cycle-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  body.page-service .cycle-grid:before,body.page-service .cycle-flow{display:none!important}
  body.page-service .cycle-card{min-height:0!important}
  body.page-service .governance{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.page-service .economic-row{grid-template-columns:150px 1fr 1fr!important}
  body.page-service .management-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.page-service .management-grid .editorial-result:last-child{grid-column:1/-1!important}
}

/* Hamburger menu on phones and tablets. This replaces all per-page copies. */
@media screen and (max-width:1000px){
  .header .nav,header .nav{position:relative!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:14px!important}
  .mobile-menu-toggle{display:inline-flex!important;margin-left:auto!important}
  .nav > .links,.nav > .navlinks{
    display:none!important;
    position:absolute!important;
    top:calc(100% + 10px)!important;
    left:0!important;right:0!important;
    z-index:9999!important;
    background:var(--ivory)!important;
    border:1px solid rgba(15,29,47,.10)!important;
    box-shadow:0 12px 30px rgba(15,29,47,.12)!important;
    padding:10px!important;
    border-radius:12px!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    margin:0!important;
  }
  .nav > .links.is-open,.nav > .navlinks.is-open{display:flex!important}
  .nav > .links a,.nav > .navlinks a,
  .nav > .links a:not(.pill),.nav > .navlinks a:not(.nav-cta){
    display:flex!important;width:100%!important;min-height:46px!important;padding:12px 14px!important;
    align-items:center!important;justify-content:flex-start!important;font-size:16px!important;line-height:1.2!important;
    color:var(--ink)!important;background:transparent!important;border-radius:8px!important;white-space:normal!important;text-decoration:none!important;
  }
  .nav > .links a + a,.nav > .navlinks a + a{border-top:1px solid rgba(15,29,47,.07)!important}
  .nav > .links .pill,.nav > .navlinks .nav-cta{
    display:flex!important;margin-top:8px!important;background:var(--navy)!important;color:#fff!important;
    justify-content:center!important;border-top:0!important;
  }
}

/* Phone layout */
@media screen and (max-width:760px){
  html,body{width:100%!important;max-width:100%!important;background:var(--ivory)!important}
  .page{width:100%!important;min-height:0!important}
  .wrap{width:auto!important;margin-left:18px!important;margin-right:18px!important}

  body.page-home .header{height:72px!important;padding:0!important}
  body.page-home .header .nav{height:72px!important}
  body.page-home .logo{margin:0!important}.page-home .logo img{width:168px!important;max-width:54vw!important}
  body.page-home .hero{display:flex!important;flex-direction:column!important;min-height:0!important;background:var(--ivory)!important}
  body.page-home .herocopy{order:1!important;padding:46px 18px 32px!important}
  body.page-home .hero h1{font-size:clamp(39px,11vw,44px)!important;line-height:1.02!important;margin:0 0 20px!important}
  body.page-home .hero p{font-size:18px!important;line-height:1.55!important}
  body.page-home .heroactions{flex-direction:row!important;align-items:center!important;gap:16px!important;margin-top:26px!important;flex-wrap:wrap!important}
  body.page-home .heroimg{order:2!important}.page-home .heroimg img{height:255px!important;width:100%!important;object-fit:cover!important}
  body.page-home .section{padding:52px 0!important}.page-home .title{font-size:35px!important}.page-home .lead{font-size:17px!important}
  body.page-home .prob{grid-template-columns:42px 1fr!important;gap:8px 12px!important}.page-home .prob p{grid-column:2!important}
  body.page-home .steps{grid-template-columns:1fr!important}.page-home .step{border-right:0!important;border-bottom:1px solid var(--line)!important}
  body.page-home .team{grid-template-columns:1fr!important}.page-home .person{gap:18px!important;padding:18px 0!important}.page-home .person img{width:92px!important;height:92px!important}
  body.page-home .contact{grid-template-columns:1fr!important;gap:30px!important}.page-home .contact h2{font-size:38px!important}.page-home .formrow{grid-template-columns:1fr!important}.page-home .submit-row .btn{width:100%!important}
  body.page-home .signoff{padding:52px 0!important}.page-home .signoff .big{font-size:40px!important}.page-home .footerline{display:block!important;text-align:center!important}.page-home .footerline span{display:block!important;margin:5px 0!important}

  body.page-nosotros .header{height:72px!important;padding:0!important}.page-nosotros .header .nav{height:72px!important}.page-nosotros .logo{margin:0!important}.page-nosotros .logo img{width:168px!important;max-width:54vw!important}
  body.page-nosotros .intro{padding:48px 0 34px!important}.page-nosotros .intro h1{font-size:42px!important}.page-nosotros .intro .highlight{font-size:25px!important}.page-nosotros .intro p{font-size:18px!important}
  body.page-nosotros .section{padding:48px 0!important}.page-nosotros .profile{grid-template-columns:1fr!important;justify-items:center!important}.page-nosotros .profile img{width:205px!important;height:205px!important}.page-nosotros .profile-copy{width:100%!important}
  body.page-nosotros .convictions{grid-template-columns:1fr!important}.page-nosotros .conv p{font-size:24px!important}.page-nosotros .values{grid-template-columns:1fr!important}.page-nosotros .val{border-right:0!important;border-bottom:1px solid var(--line)!important}
  body.page-nosotros .signoff{padding:52px 0!important}.page-nosotros .signoff .big{font-size:40px!important}.page-nosotros .footerline{display:block!important;text-align:center!important}.page-nosotros .footerline span{display:block!important;margin:5px 0!important}

  body.page-service .wrap{width:auto!important;margin-left:18px!important;margin-right:18px!important}
  body.page-service header,body.page-service .nav{height:72px!important}.page-service .logo{width:168px!important;max-width:54vw!important}
  body.page-service .hero-copy{padding:48px 18px 38px!important;max-width:none!important}.page-service .hero h1{font-size:clamp(39px,11vw,43px)!important;line-height:1.02!important}.page-service .hero p{font-size:16px!important}
  body.page-service .section{padding:52px 0!important}.page-service .section-title{font-size:34px!important;line-height:1.06!important}.page-service .lead{font-size:16px!important}
  body.page-service .signals{grid-template-columns:1fr!important;gap:9px!important}.page-service .signal{min-height:0!important;padding:18px!important}
  body.page-service .what-grid{grid-template-columns:1fr!important;gap:28px!important}.page-service .cycle-grid{grid-template-columns:1fr!important}.page-service .governance{grid-template-columns:1fr!important;padding:26px 22px!important}
  body.page-service .economic-row,body.page-service .management-grid{grid-template-columns:1fr!important}.page-service .editorial-result{border-left:0!important;border-top:1px solid var(--line)!important;padding:20px 0!important}.page-service .management-grid .editorial-result:last-child{grid-column:auto!important}
  body.page-service .cta-grid{display:block!important}.page-service .cta h2{font-size:34px!important}.page-service .cta .btn{margin-top:20px!important}
  body.page-service .signoff{padding:52px 0!important}.page-service .signoff-line{font-size:40px!important}.page-service .footer-row{flex-direction:column!important;gap:5px!important}
}

/* Final specificity correction for Nosotros phone grid */
@media screen and (max-width:760px){
  body.page-nosotros .values{grid-template-columns:1fr!important}
  body.page-nosotros .val{min-width:0!important;border-right:0!important;border-bottom:1px solid var(--line)!important}
}


/* Global content height: never inherit fixed design-canvas heights */
.page{min-height:0!important;}

/* Contact/footer links keep the editorial styling while remaining actionable */
.meta a,.footerline a,.footer-row a{color:inherit;text-decoration:none;text-underline-offset:3px;}
.meta a:hover,.footerline a:hover,.footer-row a:hover{text-decoration:underline;}

/* Current navigation state */
.links a[aria-current="page"],.navlinks a[aria-current="page"]{color:var(--teal);font-weight:700;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px;}
@media screen and (max-width:1000px){
  .nav > .links a[aria-current="page"],.nav > .navlinks a[aria-current="page"]{color:var(--teal)!important;background:rgba(11,114,128,.06)!important;text-decoration:none!important;}
}

/* Long service pages: keep navigation available while scrolling. */
body.page-service header{position:sticky;top:0;z-index:1000}
