/* The original site's theme styles are mirrored in assets/css. */

/* Keep the mobile header full-width when pages show a classic scrollbar. */
@media (max-width: 768px) {
  html {
    scrollbar-width: none;
  }
  html::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

.home-clone-status { min-height: 1.5em; margin-top: 1em; }
.home-clone-files { display: block; margin-top: .5em; }
#home-clone-contact-form .checkbox-wrap { display: inline-flex; align-items: center; gap: .55em; margin: 0 .9em .55em 0; cursor: pointer; }
#home-clone-contact-form .checkbox-wrap input { width: auto; }
#home-clone-contact-form .nf-field-container.file_upload-container input { max-width: 100%; }

/* ===== Section 5: Products clean layout (sin recortes ni desbordes) ===== */
.section-projectscroll {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.section-projectscroll .project-scroll-intro {
  margin-bottom: 2.5rem;
}
@media (min-width: 769px) and (max-width: 1199px) {
  .section-projectscroll .project-scroll-intro {
    margin-bottom: 2.5rem;
  }
}
@media (min-width: 1200px) {
  .section-projectscroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
  }
  .section-projectscroll .project-scroll-intro {
    width: calc(34% - 1em);
    position: sticky;
    top: 6rem;
  }
  .section-projectscroll .project-cards {
    width: calc(66% - 1em);
    height: auto;
    max-height: none;
    overflow: visible;
    border-left: 1px solid var(--color-grey);
    padding-left: 2rem;
  }
}
.section-projectscroll .project-cards {
  height: auto;
  max-height: none;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}
.section-projectscroll .project-cards.loading {
  opacity: 1;
}
.section-projectscroll .project-scroll-cards-swiper.is-ready {
  opacity: 1;
}
.section-projectscroll .project-scroll-cards-swiper:not(.is-ready) {
  opacity: 1;
}
.section-projectscroll .project-scroll-cards-swiper {
  overflow: visible;
  width: 100%;
  height: auto;
  max-height: none;
  box-sizing: border-box;
}
.section-projectscroll .project-scroll-cards-swiper .swiper-wrapper,
.section-projectscroll .project-scroll-cards-swiper .product-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  transform: none;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}
.section-projectscroll .project-scroll-cards-swiper .swiper-slide,
.section-projectscroll .project-scroll-cards-swiper .product-grid > div {
  width: calc(50% - 0.75rem);
  flex: 0 0 calc(50% - 0.75rem);
  height: auto;
  max-height: none;
  margin: 0;
  box-sizing: border-box;
}
.section-projectscroll .project-scroll-cards-swiper .product-grid {
  width: 100%;
  margin: 0;
}
@media (max-width: 768px) {
  .section-projectscroll .project-scroll-cards-swiper .swiper-slide,
  .section-projectscroll .project-scroll-cards-swiper .product-grid > div {
    width: 100%;
    flex-basis: 100%;
  }
}
.section-projectscroll .project-scroll-cards-swiper .product-grid > div {
  margin-right: 0;
}
@media (max-width: 768px) {
  .section-projectscroll .project-scroll-cards-swiper .swiper-slide,
  .section-projectscroll .project-scroll-cards-swiper .product-grid > div {
    width: 100%;
    flex-basis: 100%;
  }
}
@media (min-width: 1200px) {
  .section-projectscroll .project-scroll-cards-swiper .swiper-wrapper,
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    transform: none;
  }
  .section-projectscroll .project-scroll-cards-swiper .swiper-slide,
  .section-projectscroll .project-scroll-cards-swiper .product-grid > div {
    width: calc(50% - 0.75rem);
    flex-basis: calc(50% - 0.75rem);
  }
}
@media (max-width: 768px) {
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    width: 100%;
  }
}
.section-projectscroll .project-card {
  background: #ffffff;
  border: 1px solid rgba(10,20,40,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  max-height: none;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.section-projectscroll .project-card .heading {
  width: 100%;
}
.section-projectscroll .project-card .media-wrap {
  width: 100%;
}
.section-projectscroll .project-card:hover {
  background-color: #ffffff;
  color: #1E293B;
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(10,20,40,0.08);
}
.section-projectscroll .project-card .heading {
  font-family: 'Mada', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.8rem 0;
  padding-bottom: 0;
  color: #1E293B;
  width: 100%;
  white-space: normal;
  word-break: break-word;
}
.section-projectscroll .project-card .media-wrap {
  width: 100%;
  height: 220px;
  padding-bottom: 0;
  position: relative;
  background: #F4F6F9;
  border: 1px solid #E2E8F0;
  overflow: hidden;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.section-projectscroll .project-card .product-art {
  position: relative;
  display: flex;
  width: min(78%, 14rem);
  height: 82%;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  overflow: hidden;
  color: #fff;
  background: #32302b;
  box-shadow: 0 14px 28px rgba(10,20,40,.16);
  box-sizing: border-box;
}
.section-projectscroll .product-art__category,
.section-projectscroll .product-art__mark {
  position: relative;
  z-index: 1;
  font-family: "PT Sans Caption", monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.section-projectscroll .product-art__mark {
  align-self: flex-end;
  font-family: "PT Sans Caption", sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: .8;
  letter-spacing: -.08em;
}
.section-projectscroll .product-art__shape {
  position: absolute;
  right: -18%;
  bottom: -44%;
  width: 115%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  box-shadow: 0 0 0 1rem rgba(255,255,255,.08), 0 0 0 2rem rgba(255,255,255,.06), 0 0 0 3rem rgba(255,255,255,.04);
}
.section-projectscroll .product-art--liquid { background: linear-gradient(145deg, #263c3e, #73928a); }
.section-projectscroll .product-art--vitamin { background: linear-gradient(145deg, #254368, #bf6a85); }
.section-projectscroll .product-art--ready { background: linear-gradient(145deg, #e07a25, #f0c44d); }
.section-projectscroll .product-art--melt { background: linear-gradient(145deg, #493e73, #bd78a7); }
.section-projectscroll .product-art--powder { background: linear-gradient(145deg, #303b55, #8a92a1); }
.section-projectscroll .product-art--nutrifath { background: linear-gradient(145deg, #435440, #a4a36e); }
.section-projectscroll .product-art--fiber { background: linear-gradient(145deg, #546947, #b5b983); }
.section-projectscroll .project-card .media-wrap .media {
  position: static;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-projectscroll .project-card .media-wrap img {
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
}
.section-projectscroll .project-card .product-desc {
  font-family: 'PT Sans Caption', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #526077;
  margin: 0 0 1.4rem 0;
  flex-grow: 1;
  word-break: break-word;
  overflow-wrap: break-word;
}
.section-projectscroll .project-card .product-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0A1428;
  color: #fff;
  text-decoration: none;
  font-family: 'PT Sans Caption', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  box-sizing: border-box;
  border: 1px solid #0A1428;
  transition: background 0.2s ease, color 0.2s ease;
}
.section-projectscroll .project-card .product-action:hover {
  background: var(--color-gold);
  color: #1E293B;
  border-color: var(--color-gold);
}
.section-projectscroll .product-action span {
  overflow-wrap: anywhere;
}
.section-projectscroll .product-action i {
  flex: 0 0 auto;
}
.section-projectscroll .project-card .media-wrap .btn-with-arrow {
  display: none;
}
.section-projectscroll .project-scroll-cards-swiper .swiper-wrapper,
.section-projectscroll .project-scroll-cards-swiper .product-grid {
  gap: 1rem;
}
.section-projectscroll .project-scroll-cards-swiper .swiper-slide,
.section-projectscroll .project-scroll-cards-swiper .product-grid > div {
  flex: 0 0 calc(50% - .5rem);
  width: calc(50% - .5rem);
  min-width: 0;
}
.section-projectscroll .project-card,
.section-projectscroll .project-card > * {
  min-width: 0;
  max-width: 100%;
}
/* The seven approved products use a CSS grid, not the source clone's tall Swiper. */
@media (min-width: 1200px) {
  .section-projectscroll {
    align-items: stretch;
  }
  .section-projectscroll .project-scroll-intro {
    position: static;
    top: auto;
    width: 100%;
    margin-bottom: 2rem;
  }
  .section-projectscroll .project-cards {
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
  .section-projectscroll .project-scroll-intro > *,
  .section-projectscroll .project-scroll__heading {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .section-projectscroll .project-cards {
    width: calc(66% - 1rem);
    min-width: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-left: 2rem;
    border-left: 1px solid var(--color-grey);
  }
}
@media (max-width: 1199px) {
  .section-projectscroll .project-scroll-intro,
  .section-projectscroll .project-cards {
    width: 100%;
    min-width: 0;
  }
}

/* ===== Section 6: Feature project / Blog styling (holgado, sin desbordes) ===== */
.section-featureproject {
  position: relative;
  min-height: 44rem;
  display: flex;
  align-items: center;
  padding: 5rem 1.6rem;
  box-sizing: border-box;
}
.section-featureproject .media-link__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 54rem;
  position: relative;
  top: auto;
  transform: none;
  z-index: 3;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  padding: 3rem 3rem;
  border-left: 4px solid var(--color-gold);
  box-sizing: border-box;
}
.section-featureproject .media-link__heading {
  max-width: 100%;
  margin: 0.5rem 0 1rem;
  font-size: 2.1rem;
  line-height: 1.2;
  color: #fff;
}
.section-featureproject .media-link__body {
  max-width: 100%;
  margin: 0 0 1.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #526077;
}

/* ===== Section 7: CTA block heading y tarjeta de mapa ===== */
.section-cta {
  padding-bottom: 5rem;
}
.section-cta .content {
  margin: 4em 0;
}
.section-cta .block-heading {
  font-size: 2.8rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.section-cta .block-heading > span {
  display: inline-block;
  background: #00B48A;
  color: #0A1428;
  padding: 0.25em 0.55em;
  margin: 0.1em 0.1em 0.1em 0;
  border-radius: 2px;
}
.section-cta .block-heading .block-heading__arrow {
  display: none;
}
.section-cta .cta-post__form {
  box-sizing: border-box;
}


.brand-mark{
  display:inline-flex;align-items:center;gap:.18rem;
  font-family:"PT Sans Caption",system-ui,sans-serif;
  font-weight:700;font-size:1.35rem;line-height:1;letter-spacing:-.06em;
}
.brand-mark::after{
  content:"";width:.28rem;height:.28rem;border-radius:50%;
  background:var(--color-primary);display:inline-block;
}

.section-faq{padding:6em 1.6rem 7em;background:var(--color-white);}
.faq-wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2em;}
.faq-head{width:100%;}
.faq-head .spread__heading{margin-top:0;}
.faq-head .lead{margin-top:1.5em;max-width:22em;}
.faq-list{width:100%;}
.faq-list details{border-top: 1px solid rgba(10,20,40,.18);padding:0;}
.faq-list details:last-child{border-bottom: 1px solid rgba(10,20,40,.18);}
.faq-list summary{
  list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:2em;
  padding:1.15em 0;font-size:1.25em;line-height:1.25;font-weight:700;letter-spacing:-.02em;
}
.faq-list summary::-webkit-details-marker{display:none;}
.faq-list summary span{font-family:"PT Sans Caption",monospace;font-size:1.1em;color: #0F62FE;flex:none;}
.faq-list summary span::before{content:"+";}
.faq-list details[open] summary span::before{content:"\2013";}
.faq-list p{font-family:"PT Sans Caption",monospace;font-size:.95em;line-height:1.6;color: #526077;max-width:44em;padding:0 2.5em 1.4em 0;}
@media (min-width:769px){
  .faq-head{width:calc(36% - 1em);align-self:flex-start;position:sticky;top:6em;}
  .faq-list{width:calc(64% - 1em);}
}

.footer-name{
  display:block;font-family:"PT Sans Caption",system-ui,sans-serif;
  font-weight:700;font-size:11.2em;line-height:.82;letter-spacing:-.055em;
}
@media (max-width:768px){.footer-name{font-size:17vw;}}
@media (max-width:479px){
  .main-footer{overflow:hidden;}
  .main-footer .logo,.main-footer .footer-name{max-width:100%;}
  .main-footer .footer-name{font-size:clamp(3.2rem,16vw,4.6rem);letter-spacing:-.065em;overflow-wrap:anywhere;}
}

/* reveal fallback for static captures only (class added by the capture script) */
html.capture-mode .fadeinandslideup,
html.capture-mode .check-in-viewport,
html.capture-mode .animated-intro .content,
html.capture-mode .homepage-intro__intro,
html.capture-mode .top-banner-home__heading-wrap,
html.capture-mode .latest-work{
  opacity:1;transform:none;
}
html.capture-mode .homepage-intro__intro,
html.capture-mode .homepage-intro__intro *,
html.capture-mode .animated-intro .content,
html.capture-mode .animated-intro .content *{color: #1E293B;}

/* ===== Fixes for the doctor's content on the clone ===== */
/* Section 2: static statement, no 200vh scroll gap */
.section-intro .animated-intro{height:auto;}
.section-intro .animated-intro .content{position:relative;top:auto;margin-top:0;}
.section-intro .spread{margin-top:3em;}
.section-intro .animated-intro .content .word{opacity:1;}
html.capture-mode .animated-intro .word{opacity:1;}

/* Section 3: light scrim so the copy is readable over the photo */
.section-3.layout-background-media{overflow:hidden;padding-right:1rem;padding-left:1rem;}
@media (min-width:480px){.section-3.layout-background-media{padding-right:2.5rem;padding-left:2.5rem;}}
@media (min-width:769px){.section-3.layout-background-media{padding-right:5.9rem;padding-left:5.9rem;}}
.section-3.layout-background-media .column_1,
.section-3.layout-background-media .column_2{min-width:0;max-width:100%;}
.section-3.layout-background-media .spread__heading{max-width:100%;font-size:clamp(2.2rem,10vw,4rem);overflow-wrap:anywhere;}
.section-3.layout-background-media .fadeinandslideup{opacity:1;transform:none;}
.section-3.layout-background-media .media:before{background:none;}
.section-3.layout-background-media .media:after{
  content:"";position:absolute;inset:0;z-index:2;background:rgba(244,242,237,.45);
}
.section-3.layout-background-media .column_1,
.section-3.layout-background-media .column_2{position:relative;z-index:3;}
.section-3.layout-background-media .spread__heading,
.section-3.layout-background-media .spread__body,
.section-3.layout-background-media .spread__body p{color: #1E293B;}

/* Section 5: compact cards for three cases */
.section-projectscroll .project-card .heading{padding-bottom:0;}
.section-projectscroll .project-card .media-wrap{padding-bottom:0;}

/* Hero: white monogram + readability scrim */
.top-nav .logo{color:#fff;}
.homepage_top_swiper .media:after{
  background: linear-gradient(90deg,rgba(10,20,40,.86) 0%,rgba(10,20,40,.45) 38%,rgba(10,20,40,0) 72%);
}

/* monogram on dark hero */
.top-nav .logo .brand-mark{color:#fff;}

/* background media: almost solid, just a texture */
.section-3.layout-background-media .media:after{background:rgba(244,242,237,.9);}

/* case grid */
.section-cases{padding:6em 1.6rem 7em;background:var(--color-background-grey);}
.cases-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:2em;margin-bottom:2.5em;}
.cases-head .spread__heading{margin:0;max-width:10em;}
.cases-head .lead{max-width:30em;margin:1em 0 0;}
.cases-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2em;}
.case-card{background:#fff;display:flex;flex-direction:column;}
.case-card__media{aspect-ratio:4/3;overflow:hidden;background: #F4F6F9;}
.case-card__media img{width:100%;height:100%;object-fit:cover;object-position:50% 8%;}
.case-card__body{padding:1.5em 1.5em 1.7em;display:flex;flex-direction:column;}
.case-card__name{font-family:"PT Sans Caption",monospace;font-size:.78em;letter-spacing:.1em;text-transform:uppercase;}
.case-card__delta{font-size:3.2em;font-weight:700;line-height:1;letter-spacing:-.045em;color: #0F62FE;margin:.35em 0 .15em;}
.case-card__now{font-family:"PT Sans Caption",monospace;font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color: #526077;}
.case-card__body p{font-family:"PT Sans Caption",monospace;font-size:.82em;line-height:1.55;color: #1E293B;margin:.9em 0 0;}
.cases-legal{font-size:.7em;color: #526077;margin-top:2em;}
@media (max-width:900px){.cases-grid{grid-template-columns:1fr;}.cases-head{display:block;}.cases-head .btn-with-arrow{margin-top:1.5em;}}

/* balanced CTA */
.section-cta .content{width:100%;min-width:0;box-sizing:border-box;}
.section-cta .cta-intro,.section-cta .cta-post__form{min-width:0;max-width:100%;box-sizing:border-box;}
.section-cta h2,.section-cta h3,.section-cta p,.section-cta strong,.section-cta span{overflow-wrap:anywhere;}
.section-cta .cta-post__form > div:last-child{gap:.5rem;flex-wrap:wrap;}
.section-cta .fadeinandslideup{opacity:1;transform:none;}
@media (max-width:768px){
  .section-cta .content{display:flex;flex-direction:column;align-items:stretch;gap:2rem;margin:2.5rem 0;}
  .section-cta .cta-intro,.section-cta .cta-post__form{width:100%;margin:0;}
  .section-cta .cta-post__form{padding:1.25rem;}
  .section-cta .block-heading{font-size:clamp(2rem,10vw,2.8rem);}
}
.section-cta .content{align-items:center;margin:7em 0;}
.section-cta .cta-intro{margin-top:0;width:calc(58% - 1em);}
.section-cta .cta-post__form{width:calc(42% - 1em);}
.section-cta .cta-post__form .lead{margin-bottom:2em;}
@media (max-width:768px){.section-cta .cta-intro,.section-cta .cta-post__form{width:100%;margin-top:2em;}}

/* footer wordmark */
.footer-name{font-size:10em;}
.main-footer{padding-bottom:1.5em;}

/* monogram: avoid the theme's inline-flex collapse */
.top-nav .brand-mark{display:block;font-size:1.45rem;line-height:1;letter-spacing:-.06em;color: #1E293B;}
.top-nav .brand-mark::after{display:none;}

/* Intro: restore the sticky, scroll-driven word reveal from the reference. */
.section-intro .animated-intro {
  height: 190vh;
  min-height: 1050px;
  position: relative;
}
.section-intro .animated-intro .content {
  position: -webkit-sticky;
  position: sticky;
  top: 18vh;
  margin: 0;
  padding: 1.5rem 0 3rem;
  z-index: 2;
}
.section-intro .animated-intro .homepage-intro__intro {
  max-width: 100%;
  padding: 1rem 0;
  font-size: clamp(2rem, 4.1vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.section-intro .animated-intro .content .word {
  opacity: .16;
  transition: opacity .3s ease;
}
.section-intro .animated-intro .content .word.active {
  opacity: 1;
}
.section-intro .spread {
  position: relative;
  z-index: 1;
  margin-top: -4rem;
  padding-top: 4rem;
}
/* 18-section-intro.css fija .spread .homepage-intro__media al 50% con mayor
   especificidad que la regla base, así que esta última nunca aplicaba.
   Se iguala la especificidad y se ajusta el ancho a 40% (572 px a 1640 px de
   viewport), que fue el valor corregido desde el navegador. */
.section-intro .spread .homepage-intro__media {
  width: 40%;
  margin-left: auto;
  background: #F4F6F9;
  overflow: hidden;
}
.section-intro .spread .homepage-intro__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 387 / 584;
  object-fit: cover;
  object-position: center top;
}

/* Product showcase: real packshots in evenly sized horizontal cards. */
.section-projectscroll .project-scroll-cards-swiper .product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.25rem;
}
.section-projectscroll .project-scroll-cards-swiper .product-grid > div {
  width: auto;
  flex: initial;
  min-width: 0;
}
.section-projectscroll .project-card .media-wrap {
  height: 13rem;
  background: #F4F6F9;
}
.section-projectscroll .project-card .media-wrap > img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: .4rem;
  box-sizing: border-box;
}
.section-projectscroll .project-card .media-wrap > img[src*="productos/5.jpeg"],
.section-projectscroll .project-card .media-wrap > img[src*="productos/6.jpeg"],
.section-projectscroll .project-card .media-wrap > img[src*="productos/8.jpeg"] {
  object-fit: cover;
}
.section-projectscroll .project-card .heading {
  min-height: 2.5em;
  font-size: 1.05rem;
}

/* Site identity belongs to the page, not the individual doctor. */
.main-footer .footer-name {
  font-size: clamp(4rem, 12vw, 10rem);
}

@media (max-width: 768px) {
  .section-intro .animated-intro {
    height: 150vh;
    min-height: 760px;
  }
  .section-intro .animated-intro .content {
    top: 12vh;
  }
  .section-intro .animated-intro .homepage-intro__intro {
    font-size: clamp(1.8rem, 8.5vw, 2.8rem);
  }
  .section-intro .spread {
    margin-top: -8vh;
  }
  .section-intro { padding-bottom: 0; }
  .section-intro .spread { padding-bottom: 0; margin-bottom: 0; }
  .section-intro .spread .homepage-intro__media {
    width: 50%;
    max-width: 26rem;
    margin: 2rem auto 0;
  }
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    grid-template-columns: 1fr;
  }
  .section-projectscroll .project-card .media-wrap {
    height: clamp(12rem, 60vw, 16rem);
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-intro .animated-intro {
    height: auto;
    min-height: 0;
  }
  .section-intro .animated-intro .content {
    position: static;
  }
  .section-intro .animated-intro .content .word {
    transition: none;
    opacity: 1;
  }
}

/* capture-only reveal for the CTA block heading */
html.capture-mode .block-heading,
html.capture-mode .block-heading *,
html.capture-mode .media-link__content,
html.capture-mode .media-link__content *,
html.capture-mode .footer-links,
html.capture-mode .footer-links *{opacity:1;transform:none;}

.case-card__link{margin-top:1.2em;padding-top:.9em;border-top: 1px solid rgba(10,20,40,.15);display:flex;justify-content:space-between;align-items:center;font-family:"PT Sans Caption",monospace;font-size:.72em;letter-spacing:.08em;text-transform:uppercase;}

/* tighten the background-media section */
.section-3.layout-background-media{min-height:62vh;}
.section-3.layout-background-media .media:after{background:rgba(244,242,237,.82);}

html.capture-mode{scrollbar-gutter:auto;}
html.capture-mode::-webkit-scrollbar{width:0;}
.mobile-top .mobile-nav .top-buttons .btn .icon { width: 18px; margin-left: .5em; }
.mobile-top .mobile-nav .top-buttons .btn .icon i { margin-left: 0; }

/* Final responsive bounds: preserve the layout without allowing child overflow. */
@media (max-width: 768px) {
  .section-projectscroll {
    padding-right: 1rem;
    padding-left: 1rem;
    overflow: hidden;
    box-sizing: border-box;
  }
  .section-projectscroll .project-scroll-intro {
    width: 100%;
    margin-bottom: 2rem;
  }
  .section-projectscroll .project-scroll__heading {
    margin-bottom: 1.5rem;
    font-size: clamp(2.15rem, 9vw, 3rem);
    overflow-wrap: anywhere;
  }
  .section-projectscroll .project-cards {
    width: 100%;
    margin: 0;
    overflow: hidden;
  }
  .section-projectscroll .project-scroll-cards-swiper,
  .section-projectscroll .project-scroll-cards-swiper .swiper-wrapper,
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .section-projectscroll .project-scroll-cards-swiper .product-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .section-projectscroll .project-scroll-cards-swiper .product-grid > div {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
  }
  .section-projectscroll .project-card {
    padding: 1rem;
  }
  .section-projectscroll .project-card .media-wrap {
    height: clamp(12rem, 60vw, 16rem);
  }
  .section-3.layout-background-media .spread__heading {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }
  .section-cta .content {
    width: 100%;
    padding: 0;
  }
  .section-cta .cta-intro,
  .section-cta .cta-post__form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .main-footer {
    width: 100%;
    max-width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    overflow: hidden;
    box-sizing: border-box;
  }
  .main-footer .logo {
    width: 100%;
    max-width: 100%;
  }
  .main-footer .footer-name {
    max-width: 100%;
    font-size: clamp(3.1rem, 16vw, 4.6rem);
    letter-spacing: -.065em;
    overflow-wrap: anywhere;
  }
  .latest-work-slides {
    overflow-x: clip;
  }
}

/* Restore the hero case strip to a contained horizontal scroller. */
.section-topbannerhome .latest-work-slides-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.section-topbannerhome .latest-work-slides-wrap::-webkit-scrollbar {
  display: none;
}
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides {
  max-width: 100%;
}
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides ul {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  max-width: none;
}

/* Slider de tarjetas destacadas (Hero cases y Hero productos en tienda) */
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active:active {
  cursor: grabbing;
}
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active ul {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0;
  padding: 0;
  transition-property: transform;
  box-sizing: content-box;
}
.section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active li {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 360px;
}
@media (max-width: 479px) {
  .section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active li {
    width: 80vw;
  }
}
@media (min-width: 480px) and (max-width: 989px) {
  .section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active li {
    width: 50vw;
  }
}
@media (min-width: 990px) {
  .section-topbannerhome .latest-work-slides-wrap .latest-work-slides.hero-cases-active li {
    width: 360px;
  }
}

/* Keep the existing hero content inside one viewport without changing its design. */
.section.section-topbannerhome {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

@media (min-width: 1200px) {
  .section.section-topbannerhome {
    padding-top: 20vh;
    padding-bottom: 1.5rem;
  }
  .section-topbannerhome .top-banner-home__heading-wrap {
    margin-bottom: 2.25rem;
  }
  .section-topbannerhome .top-banner-home__heading {
    margin-top: 0.4rem;
    margin-bottom: .05em;
  }
  .section-topbannerhome .hero-desc {
    margin: 8px 0 4px;
  }
  .section-topbannerhome .top-banner-home__heading-wrap > div:first-of-type {
    margin-bottom: 24px;
  }
  .section-topbannerhome .latest-work-slider > .heading,
  .section-topbannerhome .latest-work-links > .heading {
    margin: .3em 0;
    padding: .3em 0;
  }
}

@media (min-width: 1200px) and (max-height: 820px) {
  .section.section-topbannerhome {
    padding-top: 13vh;
    padding-bottom: 8px;
  }
  .section-topbannerhome .top-banner-home__heading-wrap {
    margin-bottom: 0.75rem;
  }
  .section-topbannerhome .top-banner-home__heading {
    margin-top: 0.4rem;
    margin-bottom: 0;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .section.section-topbannerhome {
    padding-top: clamp(5rem, 14vh, 8rem);
    padding-bottom: 8px;
  }
  .section-topbannerhome .top-banner-home__heading-wrap {
    margin-bottom: 0.75rem;
  }
  .section-topbannerhome .top-banner-home__heading {
    margin-top: 0.4rem;
    margin-bottom: .15em;
  }
  .section-topbannerhome .hero-desc {
    margin: 8px 0 8px;
  }
  .section-topbannerhome .top-banner-home__heading-wrap > div:first-of-type {
    margin-bottom: 24px;
  }
  .section-topbannerhome .latest-work-slider > .heading,
  .section-topbannerhome .latest-work-links > .heading {
    margin: .25em 0;
    padding: .2em 0;
  }
}

@media (max-width: 768px) {
  .section.section-topbannerhome {
    padding-top: clamp(4.5rem, 12vh, 6rem);
    padding-bottom: 1rem;
  }
  .section-topbannerhome .top-banner-home__heading-wrap {
    margin-bottom: 1.5rem;
  }
  .section-topbannerhome .top-banner-home__heading {
    font-size: clamp(2rem, 8vw, 2.4rem);
    margin-top: 0.4rem;
    margin-bottom: .25em;
  }
  .section-topbannerhome .hero-desc {
    margin: 8px 0 12px;
  }
  .section-topbannerhome .top-banner-home__heading-wrap > div:first-of-type {
    margin-bottom: 24px;
  }
  .section-topbannerhome .latest-work-slider > .heading,
  .section-topbannerhome .latest-work-links > .heading {
    margin: .25em 0;
    padding: .2em 0;
  }
}

/* QA 04-nov-2026: breathing room between the four access chips.
   Keeps inline-block flow so the 2x2 / 1x4 grid does not change. */
.section-topbannerhome .latest-work-links .label-style {
  margin-right: .5rem;
  margin-bottom: .75rem;
}
@media (min-width: 1400px) {
  .section-topbannerhome .latest-work-links .label-style {
    margin-right: 1rem;
  }
}

/* R4: equipo como tarjeta en loop. Una foto y una ficha visibles; el JS
   sincroniza foto, información y controles. */
#equipo {
  align-items: flex-start;
}
#equipo .column_1 {
  align-self: flex-start;
}
#equipo .spread__heading {
  margin-bottom: 1.25rem;
}
#equipo .team-gallery {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 387 / 584;
  margin: 0;
  overflow: hidden;
  background: #F4F6F9;
  align-self: flex-start;
}
#equipo .team-portrait {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease;
}
#equipo .team-portrait.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#equipo .team-portrait img {
  display: block;
  width: 100%;
  height: calc(100% - 2.6rem);
  object-fit: cover;
  object-position: center top;
}
#equipo .team-portrait figcaption {
  height: 2.6rem;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: #fff;
  color: #1E293B;
  font-family: "PT Sans Caption", monospace;
  font-size: .62rem;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
}
#equipo .team-person {
  display: none;
}
#equipo .team-person.is-active {
  display: block;
}
#equipo .team-nav {
  display: flex;
  gap: .55rem;
  margin-top: 1.25rem;
}
#equipo .team-nav__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #0A1428;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
#equipo .team-nav__dot.is-active {
  background: #0A1428;
}
#equipo .team-nav__dot:focus-visible {
  outline: 2px solid #0A1428;
  outline-offset: 3px;
}
@media (max-width: 768px) {
  #equipo .team-gallery {
    width: min(100%, 26rem);
    margin: 2rem auto 0;
  }
}

/* R5: la grilla de productos usa todo el ancho y las tarjetas igualan altura. */
@media (min-width: 1200px) {
  .section-projectscroll .project-cards {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
}
.section-projectscroll .project-scroll-cards-swiper .product-grid {
  width: 100%;
  align-items: stretch;
}
.section-projectscroll .project-scroll-cards-swiper .product-grid > div {
  display: flex;
  height: 100%;
}
.section-projectscroll .project-card {
  height: 100%;
}
.section-projectscroll .project-card .heading {
  min-height: 3.8em;
}
.section-projectscroll .project-card .media-wrap {
  height: 15rem;
}
.section-projectscroll .project-card .media-wrap > img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 1rem;
}
.section-projectscroll .project-card .product-desc {
  flex-grow: 1;
}
.section-projectscroll .project-card .product-action {
  margin-top: auto;
}

/* Keep every product photo frame-free, centered and frame-filling at every viewport.
   QA 11-nov-2026: the rule used to target only the first four cards, so the Bariatric
   Fusion cards (5 and 6) kept the grey box and border from the base .media-wrap style. */
#productos .product-grid > div > .project-card > .media-wrap {
  height: auto;
  aspect-ratio: 291 / 255;
  flex: 0 0 auto;
  background: #fff;
  border: 0;
}

#productos .product-grid > div > .project-card > .media-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 769px) {
  .section-projectscroll .project-card {
    min-height: 33rem;
  }
}

/* R6: replica del patrón "Our Work" del sitio de referencia.
   Intro fija a la izquierda y carrusel vertical de artículos a la derecha. */
#blog.section-blog {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
#blog .blog-intro {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  margin-bottom: 0;
}
#blog .blog-intro > * {
  width: 100%;
}
#blog .blog-kicker {
  display: block;
  margin-bottom: .8rem;
  font-family: "PT Sans Caption", monospace;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}
#blog .project-scroll__heading {
  margin: 0;
}
#blog .blog-intro__bottom {
  max-width: 25em;
}
#blog .blog-intro__bottom .lead {
  max-width: 25em;
  margin-bottom: 0;
}
#blog .blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 2.5rem;
}
#blog .blog-filter {
  margin: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
#blog .blog-filter.is-active {
  background: #0A1428;
  border-color: #0A1428;
  color: #fff;
}
#blog .blog-cards {
  box-sizing: border-box;
  margin: 0;
}
#blog .blog-cards-swiper {
  width: 100%;
}
#blog .blog-card {
  display: flex;
  flex-wrap: wrap;
  padding: 1em;
  border-bottom: 1px solid var(--color-grey);
  background: transparent;
  color: #1E293B;
  transition: background .25s ease, color .25s ease;
}
#blog .blog-card:hover,
#blog .blog-card:focus-within {
  background: #0A1428;
  color: #fff;
}
#blog .blog-card__title {
  display: block;
  width: 17rem;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
#blog .blog-card__category {
  display: block;
  margin-bottom: .75rem;
  font-family: "PT Sans Caption", monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}
#blog .blog-card:hover .blog-card__category,
#blog .blog-card:focus-within .blog-card__category {
  color: var(--color-gold);
}
#blog .blog-card .heading {
  margin: 0;
  color: inherit;
  font-family: "PT Sans Caption", sans-serif;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
#blog .blog-card .media-wrap {
  position: relative;
  width: calc(100% - 18rem);
  padding-bottom: 50%;
  overflow: hidden;
  background: #F4F6F9;
}
#blog .blog-card .media-wrap .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#blog .blog-card .media-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
#blog .blog-card .media-wrap .btn-with-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
#blog .blog-card:hover .media-wrap .btn-with-arrow,
#blog .blog-card:focus-within .media-wrap .btn-with-arrow {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1200px) {
  #blog.section-blog {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
  }
  #blog .blog-intro {
    position: static;
    width: calc(34% - 1em);
    height: 100vh;
    margin-bottom: 0;
  }
  #blog .blog-cards {
    width: calc(66% - 1em);
    height: 100vh;
    overflow: hidden;
    border-left: 1px solid var(--color-grey);
  }
  #blog .blog-cards-swiper {
    height: 100vh;
  }
  #blog .blog-cards-swiper .swiper-slide {
    height: auto;
    margin: 0;
  }
}
@media (min-width: 1400px) {
  #blog .blog-intro {
    width: calc(44% - 1em);
  }
  #blog .blog-cards {
    width: calc(56% - 1em);
  }
}
@media (max-width: 1199px) {
  #blog .blog-intro {
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
  }
  #blog .blog-cards {
    width: 100%;
    height: auto;
    border-left: 0;
  }
  #blog .blog-cards-swiper {
    height: auto;
  }
  #blog .blog-card {
    display: block;
  }
  #blog .blog-card__title {
    width: 100%;
    margin-bottom: 1rem;
  }
  #blog .blog-card .media-wrap {
    width: 100%;
  }
}

/* Navegación: acceso a la tienda anclado en la esquina superior derecha. */
.top-nav .nav-store {
  position: fixed;
  top: 1.25rem;
  right: 1rem;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5em 1rem;
  border: 1px solid #0A1428;
  border-radius: .2rem;
  background: #fff;
  color: #1E293B;
  font-family: "PT Sans Caption", monospace;
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}
.top-nav .nav-store:hover,
.top-nav .nav-store:focus-visible {
  background: #0A1428;
  color: #fff;
}
.top-nav .nav-store svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
@media (max-width: 768px) {
  .top-nav .nav-store {
    display: none;
  }
}
@media (max-width: 820px) {
  .top-nav .nav-store span {
    display: none;
  }
  .top-nav .nav-store {
    width: 46px;
    height: 36px;
    justify-content: center;
    padding: 0;
  }
}

/* Footer: legal row at the bottom, no absolute overlap and no dead gap. */
.main-footer {
  margin-top: 0;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.main-footer .footer-links {
  margin-top: 0;
  margin-bottom: 1.5rem;
}
.main-footer .logo {
  flex-basis: 100%;
  width: 100%;
  order: 1;
  margin-top: 1.5rem;
  margin-bottom: 0;
}
.main-footer .copyright,
.main-footer .acknowledge {
  position: static;
  inset: auto;
  width: 50%;
  max-width: none;
  margin: 1.5rem 0 0;
  font-size: 1em;
  line-height: 1.45;
  order: 2;
}
.main-footer .acknowledge {
  order: 3;
  text-align: center;
  text-wrap: balance;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  box-sizing: border-box;
}
@media (max-width: 479px) {
  .main-footer .copyright {
    width: 100%;
    text-align: left;
  }
  .main-footer .acknowledge {
    width: 100%;
    text-align: center;
  }
}


/* ===== Partners: carrusel infinito de respaldo institucional (entre R4 y R5) ===== */
.section-partners {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  overflow: hidden;
}
.partners-strip { position: relative; overflow: hidden; }
.partners-strip::before,
.partners-strip::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: clamp(2.5rem, 8vw, 8rem);
  z-index: 2;
  pointer-events: none;
}
.partners-strip::before { left: 0; background: linear-gradient(to right, var(--color-white), transparent); }
.partners-strip::after { right: 0; background: linear-gradient(to left, var(--color-white), transparent); }
.partners-track {
  display: flex;
  width: max-content;
  animation: partners-marquee 34s linear infinite;
  will-change: transform;
}
.partners-group {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 4rem);
  margin: 0;
  padding: 0 clamp(1.75rem, 5vw, 4rem) 0 0;
  list-style: none;
}
.partner { display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.partner-mark {
  font-family: "PT Sans Caption", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  letter-spacing: -0.02em;
  color: var(--color-night);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.partner:hover .partner-mark { opacity: 0.9; }
@keyframes partners-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
}

/* ===== R2: la foto del doctor toca el borde inferior de la sección ===== */
@media (min-width: 769px) {
  .section-intro { padding-bottom: 0; }
  .section-intro .spread { padding-bottom: 0; margin-bottom: 0; }
  .section-intro .homepage-intro__media {
    margin-bottom: 0;
    border: 0;
    background: transparent;
  }
  .section-intro .homepage-intro__media img { display: block; }
}

.partner img {
  display: block;
  flex: 0 0 auto;
  mix-blend-mode: multiply;
  height: clamp(1.75rem, 2.8vw, 2.5rem);
  width: auto;
  max-width: clamp(6.5rem, 13vw, 10rem);
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.partner:hover img { filter: none; opacity: 1; }
.partner-mark { font-size: clamp(0.95rem, 1.35vw, 1.2rem); }


/* ===== Modal de credenciales (botón "Ver credenciales" de R2) ===== */
.credentials-modal {
  border: 0;
  padding: 0;
  width: min(58rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  background: var(--color-white);
  color: var(--color-heading);
  border-radius: 0.2rem;
  overflow: auto;
  box-shadow: 0 24px 60px rgba(10, 20, 40, 0.35);
}
.credentials-modal::backdrop { background: rgba(10, 20, 40, 0.72); }
.credentials-modal__inner { padding: clamp(1.25rem, 3vw, 2.5rem); }
.credentials-modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.75rem; }
.credentials-modal__kicker { font-family: "PT Sans Caption", monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-primary); }
.credentials-modal__title { margin: 0.4rem 0 0; font-family: "PT Sans Caption", sans-serif; font-size: clamp(1.35rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.credentials-modal__close {
  border: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-heading);
  font-family: "PT Sans Caption", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55em 0.9em;
  border-radius: 0.065em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.credentials-modal__close:hover,
.credentials-modal__close:focus-visible { background: var(--color-night); color: var(--color-white); }
.credentials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; }
.credential-card {
  border: 1px solid var(--color-line);
  border-radius: 0.2rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--color-surface);
}
.credential-card__logo { height: 2.5rem; display: flex; align-items: center; }
.credential-card__logo img { max-height: 100%; width: auto; max-width: 100%; mix-blend-mode: multiply; filter: grayscale(1); opacity: 0.8; transition: filter 0.25s ease, opacity 0.25s ease; }
.credential-card:hover .credential-card__logo img { filter: none; opacity: 1; }
.credential-card__name { margin: 0; font-family: "PT Sans Caption", sans-serif; font-size: 1rem; letter-spacing: -0.01em; }
.credential-card__meta { margin: 0; font-family: "PT Sans Caption", monospace; font-size: 0.72rem; line-height: 1.55; color: var(--color-text); }
.credentials-modal__note { margin: 1.5rem 0 0; font-family: "PT Sans Caption", monospace; font-size: 0.7rem; line-height: 1.6; color: var(--color-text); }
@media (max-width: 640px) {
  .credentials-modal { width: calc(100vw - 1rem); }
  .credentials-modal__head { flex-direction: column; }
}

/* ===== Logo real del doctor en la navegación ===== */
.top-nav .logo .brand-logo,
.mobile-nav .logo .brand-logo,
.mobile-nav-full .logo .brand-logo {
  display: block;
  height: clamp(2rem, 2.6vw, 2.6rem);
  width: auto;
}
.top-nav .logo .brand-logo--light { display: none; }
html[data-section-background-color="background-color-black"] .top-nav .logo .brand-logo--dark { display: none; }
html[data-section-background-color="background-color-black"] .top-nav .logo .brand-logo--light { display: block; }
.mobile-nav-full .logo .brand-logo { height: 2.6rem; }

/* el contenedor del logo ya no es un monograma de 2.4rem: se ajusta al SVG */
.top-nav .logo,
.mobile-top .mobile-nav .logo,
.mobile-nav-full .logo { width: auto; }
html[data-section-background-color="background-color-black"] .top-nav .logo,
html[data-section-background-color="background-color-black"] .mobile-top .mobile-nav .logo,
.mobile-nav-full .logo { filter: none; }
.top-nav .logo .brand-logo,
.mobile-nav .logo .brand-logo,
.mobile-nav-full .logo .brand-logo { height: clamp(2.1rem, 2.9vw, 3rem); }

/* ===== Monograma del loader (MH) a escala legible ===== */
.preloader:before { background-size: 62% auto; }
@media (min-width: 769px) {
  .preloader:before { background-size: 40% auto; }
}

/* ===== Loader sin monograma (pedido del cliente) ===== */
html .preloader:before,
body .preloader:before,
.preloader:before { display: none; content: none; background: none; }

/* ===== Wordmark del footer: logo real a color ===== */
.main-footer .footer-logo {
  display: block;
  width: clamp(13rem, 30vw, 24rem);
  height: auto;
  margin: 0 0 1.5rem;
}

/* ===== Testimonios: cuerpo a 20px (pedido del cliente) ===== */
.section-3 .testi-item p { font-size: 20px; }

@media screen and (width: 402px) and (height: 874px) {
  .section-intro .spread .homepage-intro__media { width: 286px; }
  .section-topbannerhome .hero-credentials { font-size: 11px !important; }
  #contacto .cta-intro { width: 100% !important; }
  #contacto .cta-intro > h3 { max-width: 260px; }
}

@media (max-width: 768px) {
  .section-3 .testi-item > div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.3rem;
  }
  .section-3 .testi-item > div:first-child > span {
    white-space: nowrap;
  }
}

/* ===== R3: entradilla más grande y en tres líneas ===== */
.section-3 .column_1 .lead { font-size: 19px; line-height: 1.45; }

/* ===== R4: el retrato real del doctor va sin fondo añadido ===== */
#equipo .team-gallery { background: transparent; }
#equipo .team-portrait { background: transparent; }
#equipo .team-portrait[data-team-portrait="nutritionist"],
#equipo .team-portrait[data-team-portrait="psychologist"] { background: #F4F6F9; }

/* ===== Equipo de apoyo: tarjetas de asistentes ===== */
.section-staff { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.staff-head { max-width: 44rem; margin-bottom: 2.75rem; }
.staff-kicker { font-family: "PPFraktionMono", monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-primary); }
.staff-title { margin: 0.4rem 0 0; font-family: "SequelSans", sans-serif; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--color-heading); }
.staff-lead { margin-top: 0.9rem; max-width: 36rem; font-size: 1rem; line-height: 1.6; color: var(--color-text); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.staff-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2rem 1.5rem 1.6rem;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.staff-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(10, 20, 40, 0.10); }
.staff-photo { width: 7rem; height: 7rem; border-radius: 50%; overflow: hidden; margin-bottom: 1rem; background: var(--color-surface); }
.staff-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.staff-name { margin: 0; font-family: "SequelSans", sans-serif; font-size: 1.05rem; color: var(--color-heading); }
.staff-role { margin: 0.35rem 0 1.1rem; font-family: "PPFraktionMono", monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text); }
.staff-cta {
  font-family: "PPFraktionMono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.55rem 1.1rem; border: 1px solid var(--color-line); border-radius: 999px;
  color: var(--color-heading); text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.staff-cta:hover, .staff-cta:focus-visible { background: var(--color-night); color: var(--color-white); border-color: var(--color-night); }
@media (max-width: 640px) {
  .section-staff { padding-top: 3rem; padding-bottom: 3rem; }
}

/* ===== Equipo de apoyo: proporción de las tarjetas ===== */
.staff-grid {
  grid-template-columns: repeat(auto-fit, minmax(0, 19rem));
  justify-content: center;
  max-width: 62rem;
  margin: 0 auto;
}
.staff-card { padding: 2.25rem 1.5rem 1.75rem; }
.staff-photo { width: 7.5rem; height: 7.5rem; }
@media (max-width: 640px) {
  .staff-grid { grid-template-columns: minmax(0, 20rem); }
}

@media screen and (width: 768px) and (height: 1024px) {
  #asistentes .staff-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 19rem;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ===== Encabezado de asistentes centrado (todos los viewports) ===== */
.staff-head { max-width: 46rem; margin-left: auto; margin-right: auto; margin-bottom: 2.75rem; text-align: center; }
.staff-lead { margin-left: auto; margin-right: auto; }

/* ===== R3: fondo propio visible (velo más liviano) ===== */
.section-3.layout-background-media .media:before { background: none; }
.section-3.layout-background-media .media:after { background: rgba(244, 242, 237, 0.42); }
.section-3.layout-background-media .media img { object-position: center 35%; }

/* ===== R5: filtros y CTA del catálogo en una sola fila (CTA a la derecha) ===== */
.section-projectscroll .products-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}
.section-projectscroll .products-actions .buttons {
  margin: 0;
}
@media (max-width: 768px) {
  .section-projectscroll .products-actions {
    justify-content: flex-start;
  }
}

/* ===== Mobile: header compacto, isotipo legible y hero sin solaparse ===== */
@media (max-width: 768px) {
  .mobile-top .top { padding-top: 1.15em; padding-bottom: .6em; }
  .mobile-top .mobile-nav { padding-top: .55em; padding-bottom: .55em; background-color: #0A1428; }
  .section.section-topbannerhome {
    height: auto;
    min-height: 100dvh;
    padding-top: 8rem;
    padding-bottom: 1.25rem;
  }
}

/* ===== Mobile: márgenes del hero y accesos alineados a la página ===== */
@media (max-width: 768px) {
  .section-topbannerhome .top-banner-home__heading-wrap {
    margin-top: 10px;
    margin-bottom: 17px;
  }
  .section-topbannerhome .latest-work-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .section-topbannerhome .latest-work-links > .heading {
    grid-column: 1 / -1;
  }
  .section-topbannerhome .latest-work-links .label-style {
    margin: 0;
    text-align: center;
  }
  .section-intro .animated-intro .content {
    margin-left: 10px;
    margin-right: 10px;
  }
  .section-intro .spread .homepage-intro__body {
    margin-left: 10px;
    margin-right: 10px;
  }
}

/* ===== Mobile: márgenes de textos y CTA del hero (pedidos del preview) ===== */
@media (max-width: 768px) {
  .section-topbannerhome .top-banner-home__heading-wrap > div:nth-of-type(2) { margin-top: 50px; }

  #productos .project-scroll-intro .project-scroll__footer { margin-left: 10px; margin-right: 10px; }

  #asistentes .staff-head .staff-lead { margin-left: 10px; margin-right: 10px; }

  #equipo .column_1 { margin-left: 10px; margin-right: 10px; }

  #testimonios > div.column_1 > div { margin-bottom: 25px; }

  .section-topbannerhome .latest-work .latest-work-links > h2.heading { margin-top: -15px; }
}

/* ===== Mobile: centrados, márgenes y padding pedidos en el preview ===== */
@media (max-width: 768px) {
  .mobile-top .mobile-nav .logo { margin-left: 5px; }

  .section-topbannerhome .top-banner-home__heading-wrap > div:nth-of-type(2) { text-align: center; }

  .section-projectscroll .project-card .heading { text-align: center; }
  .section-projectscroll .project-card { padding-top: 0; }
  .section-projectscroll .products-actions a.btn-with-arrow { margin-top: 15px; }

  #contacto .cta-intro > p.lead { margin-left: 10px; margin-right: 10px; }
  #contacto .cta-intro > div.buttons { text-align: center; }

  .main-footer a.logo { display: block; text-align: center; }
  .main-footer .footer-logo { margin-left: auto; margin-right: auto; }
}

/* ===== Mobile: wordmark del menú (mayúsculas, bold y gap uniforme) ===== */
@media (max-width: 768px) {
  .mobile-nav-full .logo .brand-logo { height: 4.42rem; }
  .mobile-nav-full .middle { height: auto; max-height: none; overflow: visible; }
  .mobile-nav-full .bottom { height: auto; }
  .mobile-nav-full .block-heading span {
    font-size: 53px;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 0;
    padding: 0.18em 0.2em 0.08em;
    margin: 0.06em 0.1em 0.06em 0;
    line-height: 1.05;
  }
}

/* ===== Mobile: títulos de producto y fila FOLLOW del menú ===== */
@media (max-width: 768px) {
  .section-projectscroll .project-card h3.heading { padding-top: 15px; }

  .mobile-nav-full .follow-menu-wrap { justify-content: center; column-gap: 1.25rem; }
  .mobile-nav-full .follow-menu-wrap .heading { width: auto; }
  .mobile-nav-full .follow-menu-wrap ul { width: auto; column-gap: 1.25rem; }
  .mobile-nav-full .follow-menu-wrap li { width: auto; border-bottom: none; }
}

/* ===== Blog móvil: filtros sin scroll horizontal ===== */
@media (max-width: 479px) {
  #articulos .vertical-nav-wrap { overflow: visible; margin-left: 0; margin-right: 0; }
  #articulos .vertical-nav-wrap .vertical-nav { white-space: normal; overflow: visible; padding-left: 0; padding-right: 0; }
  #articulos .vertical-nav-wrap .vertical-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
  #articulos .vertical-nav-wrap .vertical-nav li { display: inline-block; margin-right: 0; }
}

/* ===== Casos: ventana emergente con el video de YouTube (réplica del sitio publicado) ===== */
.case-video-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.85rem;
  padding: 0.55em 1em;
  border: 1px solid var(--color-heading);
  border-radius: 0.22em;
  background: var(--color-heading);
  color: #fff;
  font-family: "PT Sans Caption", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.case-video-trigger:hover,
.case-video-trigger:focus-visible {
  background: #fff;
  color: var(--color-heading);
}
.case-video-trigger__icon { font-size: 0.8em; line-height: 1; }
.case-detail__body .case-video-trigger { margin-bottom: 1.1rem; }
.case-mobile__body .case-video-trigger { margin-bottom: 0.9rem; }

.case-video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.case-video-modal[hidden] { display: none; }
.case-video-modal.is-open { opacity: 1; pointer-events: auto; }
.case-video-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
.case-video-modal__panel {
  position: relative;
  width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #D9EBF5;
  border-radius: 100px 0 0 0;
  box-shadow: 0 30px 80px rgba(10, 20, 40, 0.35);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.28s ease;
}
.case-video-modal.is-open .case-video-modal__panel {
  transform: translateY(0) scale(1);
}
.case-video-modal__panel:focus { outline: none; }
.case-video-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 0;
  border-radius: 0 0 0 30px;
  background: #635DFF;
  color: #fff;
  box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.case-video-modal__close:hover {
  background: #fff;
  color: #635DFF;
}
.case-video-modal__close:focus-visible {
  outline: 2px solid #0A1428;
  outline-offset: 3px;
}
.case-video-modal__close svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.case-video-modal__title {
  margin: 0;
  padding: 48px 10% 48px;
  font-family: "Montserrat", "Mada", system-ui, sans-serif;
  font-weight: 300;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #000;
}
.case-video-modal__video {
  padding: 0 50px 50px;
}
.case-video-modal__video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #000;
}
html.case-video-open,
html.case-video-open body { overflow: hidden; }

@media (max-width: 768px) {
  .case-video-modal { padding: 8px; }
  .case-video-modal__panel { max-height: calc(100vh - 16px); border-radius: 60px 0 0 0; }
  .case-video-modal__close { width: 56px; height: 56px; padding: 16px; border-radius: 0 0 0 22px; }
  .case-video-modal__title { padding: 28px 72px 20px 20px; font-size: 22px; }
  .case-video-modal__video { padding: 0 12px 16px; }
}

/* Centrar las últimas dos tarjetas (5 y 6) en la fila inferior del grid de 4 columnas */
@media (min-width: 1200px) {
  .section-projectscroll .project-scroll-cards-swiper .product-grid > div:nth-child(5) {
    grid-column-start: 2;
  }
}
