/* =========================================================
   PERFIL EDITORIAL MÉDICO V24
   Aislado: solo #perfil y #credenciales.profile-credentials
   ========================================================= */

#perfil.profile-editorial{
  --profile-cream:#f7f2ea;
  --profile-white:#ffffff;
  --profile-burgundy:#5f334f;
  --profile-coral:#d96f59;
  --profile-ink:#302930;
  --profile-muted:#756d74;
  --profile-line:rgba(95,51,79,.13);
  --profile-serif:"Iowan Old Style","Palatino Linotype","Book Antiqua",Georgia,"Times New Roman",serif;

  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:clamp(4.5rem,7vw,7rem) max(1.25rem,calc((100vw - 1380px)/2)) clamp(3.8rem,6vw,5.5rem) !important;

  display:block !important;
  background:var(--profile-cream) !important;
}

#perfil .profile-shell{
  width:min(100%,1380px);
  margin:0 auto;
}

#perfil .section-label{
  display:inline-flex !important;
  writing-mode:horizontal-tb !important;

  margin:0 0 1.6rem !important;
  padding:0 !important;

  color:var(--profile-coral) !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;

  font-size:.68rem !important;
  font-weight:850 !important;
  letter-spacing:.17em !important;
  line-height:1.2 !important;
  text-transform:uppercase !important;
}

#perfil .profile-main{
  display:grid !important;
  grid-template-columns:minmax(0,1.42fr) minmax(320px,.92fr) !important;
  gap:clamp(3rem,6vw,6rem) !important;
  align-items:center !important;

  width:100% !important;
  max-width:none !important;

  padding:0 !important;
  border:0 !important;
}

#perfil .profile-copy{
  min-width:0;
  max-width:790px;
}

#perfil .profile-specialty-pill{
  display:inline-flex;
  align-items:center;

  max-width:100%;

  margin:0 0 1.25rem;
  padding:.58rem .9rem;

  color:var(--profile-burgundy);
  background:rgba(255,255,255,.62);

  border:1px solid rgba(95,51,79,.10);
  border-radius:999px;

  font-size:.68rem;
  font-weight:850;
  letter-spacing:.15em;
  line-height:1.35;
  text-transform:uppercase;
}

#perfil.profile h2{
  max-width:12.5ch !important;

  margin:0 0 1.8rem !important;

  color:var(--profile-burgundy) !important;

  font-family:var(--profile-serif) !important;
  font-size:clamp(3.25rem,5.3vw,5.8rem) !important;
  font-weight:500 !important;
  letter-spacing:-.045em !important;
  line-height:.98 !important;
}

#perfil .profile-summary{
  position:relative;

  max-width:34ch;

  margin:0 0 1.9rem !important;
  padding:1rem 0 1rem 1.35rem !important;

  color:#4a3c46;

  font-family:var(--profile-serif);
  font-size:clamp(1.35rem,2vw,1.9rem);
  font-style:normal;
  font-weight:500;
  line-height:1.48;

  border-left:2px solid rgba(217,111,89,.72);
}

#perfil .profile-summary::before{
  content:"“";

  position:absolute;
  left:.55rem;
  top:-1.55rem;

  color:rgba(95,51,79,.075);

  font-family:Georgia,"Times New Roman",serif;
  font-size:6rem;
  line-height:1;
  pointer-events:none;
}

#perfil .profile-biography-card{
  max-width:720px;

  padding:1.35rem 1.55rem;

  background:var(--profile-white);

  border:1px solid rgba(95,51,79,.07);
  border-radius:18px;

  box-shadow:0 15px 40px rgba(55,41,51,.04);
}

#perfil .profile-biography-list{
  display:grid;
  gap:0;

  margin:0;
  padding:0;

  list-style:none;
}

#perfil .profile-biography-list li{
  position:relative;

  margin:0;
  padding:.82rem 0 .82rem 1.3rem;

  color:var(--profile-muted);

  font-size:1.125rem;
  font-weight:450;
  line-height:1.8;
}

#perfil .profile-biography-list li + li{
  border-top:1px solid var(--profile-line);
}

#perfil .profile-biography-list li::before{
  content:"";

  position:absolute;
  left:.05rem;
  top:1.62rem;

  width:6px;
  height:6px;

  background:var(--profile-coral);

  border-radius:50%;
}

#perfil .profile-cta{
  display:inline-flex;
  align-items:center;
  gap:.55rem;

  margin-top:1.45rem;
  padding:.35rem 0 .45rem;

  color:var(--profile-burgundy);

  font-size:.72rem;
  font-weight:850;
  letter-spacing:.13em;
  line-height:1.3;
  text-decoration:none;
  text-transform:uppercase;

  border-bottom:1px solid rgba(95,51,79,.45);
}

#perfil .profile-cta span{
  transition:transform .2s ease;
}

#perfil .profile-cta:hover span{
  transform:translateX(4px);
}

/* Fotografía arquitectónica */
#perfil .profile-side{
  position:relative !important;

  width:min(100%,470px) !important;
  justify-self:end !important;

  margin:0 !important;
  padding:0 0 1.2rem 1.2rem !important;

  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
}

#perfil .profile-side::before,
#perfil .profile-side::after{
  display:none !important;
}

#perfil .profile-photo-layer{
  position:absolute;
  z-index:0;

  inset:1.3rem 0 0 1.3rem;

  background:#fff;

  border-radius:48% 48% 24px 24px / 25% 25% 24px 24px;

  box-shadow:0 18px 45px rgba(54,41,50,.055);
}

#perfil .profile-photo-frame{
  position:relative;
  z-index:1;

  width:100%;
  aspect-ratio:4/5;

  overflow:hidden;

  background:#eee7df;

  border-radius:48% 48% 24px 24px / 25% 25% 24px 24px;
}

#perfil .profile-photo-frame img{
  display:block !important;

  width:100% !important;
  height:100% !important;

  padding:0 !important;

  object-fit:cover !important;
  object-position:center !important;

  background:transparent !important;

  border:0 !important;
  border-radius:0 !important;

  box-shadow:none !important;

  filter:none !important;
}

#perfil .profile-photo-placeholder{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;

  border:0 !important;
  border-radius:0 !important;

  background:linear-gradient(145deg,#f7f2ea,#e7ded7) !important;
}

/* =========================================================
   FORMACIÓN DESTACADA — usa el mismo array $credentials
   ========================================================= */

#credenciales.profile-credentials{
  width:100% !important;
  max-width:none !important;

  margin:0 !important;
  padding:0 max(1.25rem,calc((100vw - 1380px)/2)) clamp(4.5rem,7vw,6rem) !important;

  color:var(--profile-ink) !important;
  background:#f7f2ea !important;
}

#credenciales .profile-credentials-shell{
  width:min(100%,1380px);
  margin:0 auto;
  padding-top:1.7rem;

  border-top:1px solid rgba(95,51,79,.14);
}

#credenciales .profile-credentials-label{
  margin:0 0 1.25rem;

  color:#8b7e87;

  font-size:.64rem;
  font-weight:850;
  letter-spacing:.18em;
  line-height:1.3;
  text-transform:uppercase;
}

#credenciales .credential-row{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:0 !important;

  width:100% !important;
  max-width:none !important;

  margin:0 !important;

  border:0 !important;
}

#credenciales .credential-row article{
  min-height:0 !important;

  padding:0 clamp(1.25rem,2.2vw,2.1rem) !important;

  background:transparent !important;

  border:0 !important;
  border-left:1px solid rgba(95,51,79,.12) !important;

  box-shadow:none !important;
}

#credenciales .credential-row article:first-child{
  padding-left:0 !important;
  border-left:0 !important;
}

#credenciales .credential-row strong{
  display:block;

  color:var(--profile-burgundy) !important;

  font-family:var(--profile-serif) !important;
  font-size:clamp(1.2rem,1.55vw,1.55rem) !important;
  font-weight:550 !important;
  line-height:1.3 !important;
}

#credenciales .credential-row span{
  display:block;

  margin-top:.45rem !important;

  color:#8b8188 !important;

  font-size:.82rem !important;
  font-weight:450 !important;
  line-height:1.55 !important;
}

/* Tablet */
@media(max-width:980px){
  #perfil .profile-main{
    grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr) !important;
    gap:2.7rem !important;
  }

  #perfil.profile h2{
    font-size:clamp(3rem,6vw,4.4rem) !important;
  }

  #perfil .profile-biography-list li{
    font-size:1.05rem;
  }

  #credenciales .credential-row{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:1.5rem 0 !important;
  }

  #credenciales .credential-row article:nth-child(odd){
    padding-left:0 !important;
    border-left:0 !important;
  }
}

/* Móvil */
@media(max-width:700px){
  #perfil.profile-editorial{
    padding:3.6rem 1.25rem 3rem !important;
  }

  #perfil .section-label{
    margin-bottom:1.2rem !important;
  }

  #perfil .profile-main{
    grid-template-columns:1fr !important;
    gap:2.4rem !important;
  }

  #perfil .profile-copy{
    max-width:none;
  }

  #perfil.profile h2{
    max-width:none !important;
    margin-bottom:1.3rem !important;

    font-size:clamp(2.8rem,12vw,4rem) !important;
    line-height:1 !important;
  }

  #perfil .profile-summary{
    max-width:none;

    margin-bottom:1.35rem !important;

    font-size:clamp(1.25rem,5.7vw,1.6rem);
    line-height:1.48;
  }

  #perfil .profile-biography-card{
    padding:1rem 1.15rem;
  }

  #perfil .profile-biography-list li{
    padding:.72rem 0 .72rem 1.15rem;

    font-size:1rem;
    line-height:1.7;
  }

  #perfil .profile-biography-list li::before{
    top:1.48rem;
  }

  #perfil .profile-side{
    width:min(88%,430px) !important;
    justify-self:center !important;

    padding:0 0 .85rem .85rem !important;
  }

  #perfil .profile-photo-layer{
    inset:.9rem 0 0 .9rem;
  }

  #credenciales.profile-credentials{
    padding:0 1.25rem 3.8rem !important;
  }

  #credenciales .profile-credentials-shell{
    padding-top:1.35rem;
  }

  #credenciales .credential-row{
    grid-template-columns:1fr !important;
    gap:0 !important;
  }

  #credenciales .credential-row article,
  #credenciales .credential-row article:nth-child(odd){
    padding:1rem 0 !important;

    border-left:0 !important;
    border-top:1px solid rgba(95,51,79,.10) !important;
  }

  #credenciales .credential-row article:first-child{
    padding-top:0 !important;
    border-top:0 !important;
  }
}

@media(prefers-reduced-motion:reduce){
  #perfil .profile-cta span{
    transition:none !important;
  }
}


/* =========================================================
   PERFIL V25 — COMPACTO A 100% DE ZOOM
   SOLO afecta #perfil.
   No modifica credenciales ni otras secciones.
   ========================================================= */

#perfil.profile-editorial{
  padding:3.4rem max(1.25rem,calc((100vw - 1320px)/2)) 3rem !important;
}

#perfil .profile-shell{
  width:min(100%,1320px) !important;
}

#perfil .section-label{
  margin-bottom:1rem !important;
}

#perfil .profile-main{
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.78fr) !important;
  gap:clamp(2.4rem,4.2vw,4.2rem) !important;
  align-items:center !important;
}

#perfil .profile-copy{
  max-width:730px !important;
}

#perfil .profile-specialty-pill{
  margin-bottom:.9rem !important;
  padding:.48rem .8rem !important;
  font-size:.62rem !important;
  letter-spacing:.13em !important;
}

#perfil.profile h2{
  max-width:12ch !important;
  margin:0 0 1.15rem !important;

  font-size:clamp(2.8rem,4.45vw,4.75rem) !important;
  line-height:.96 !important;
}

#perfil .profile-summary{
  max-width:36ch !important;

  margin:0 0 1.15rem !important;
  padding:.72rem 0 .72rem 1.15rem !important;

  font-size:clamp(1.18rem,1.65vw,1.52rem) !important;
  line-height:1.38 !important;
}

#perfil .profile-summary::before{
  left:.45rem !important;
  top:-1.2rem !important;
  font-size:4.9rem !important;
}

#perfil .profile-biography-card{
  max-width:680px !important;

  padding:.9rem 1.15rem !important;

  border-radius:15px !important;
}

#perfil .profile-biography-list li{
  padding:.58rem 0 .58rem 1.1rem !important;

  font-size:1rem !important;
  line-height:1.58 !important;
}

#perfil .profile-biography-list li::before{
  top:1.18rem !important;

  width:5px !important;
  height:5px !important;
}

#perfil .profile-cta{
  margin-top:.9rem !important;
  padding:.28rem 0 .34rem !important;

  font-size:.67rem !important;
}

#perfil .profile-side{
  width:min(100%,410px) !important;

  padding:0 0 .9rem .9rem !important;
}

#perfil .profile-photo-layer{
  inset:1rem 0 0 1rem !important;
}

#perfil .profile-photo-frame{
  border-radius:46% 46% 20px 20px / 23% 23% 20px 20px !important;
}


/* Laptop / tablet grande */
@media(max-width:1100px){

  #perfil.profile-editorial{
    padding-top:3.2rem !important;
    padding-bottom:2.8rem !important;
  }

  #perfil .profile-main{
    grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr) !important;
    gap:2.5rem !important;
  }

  #perfil.profile h2{
    font-size:clamp(2.8rem,5vw,4.15rem) !important;
  }

  #perfil .profile-side{
    width:min(100%,380px) !important;
  }
}


/* Móvil: conserva el diseño ya responsive, solo más compacto */
@media(max-width:700px){

  #perfil.profile-editorial{
    padding:3rem 1.25rem 2.7rem !important;
  }

  #perfil .profile-main{
    gap:1.9rem !important;
  }

  #perfil .profile-specialty-pill{
    margin-bottom:.75rem !important;
  }

  #perfil.profile h2{
    margin-bottom:1rem !important;

    font-size:clamp(2.65rem,11vw,3.65rem) !important;
  }

  #perfil .profile-summary{
    margin-bottom:1rem !important;

    font-size:clamp(1.12rem,5.2vw,1.45rem) !important;
  }

  #perfil .profile-biography-card{
    padding:.85rem 1rem !important;
  }

  #perfil .profile-biography-list li{
    padding:.58rem 0 .58rem 1.05rem !important;

    font-size:.96rem !important;
    line-height:1.58 !important;
  }

  #perfil .profile-side{
    width:min(82%,370px) !important;
  }
}


/* =========================================================
   PERFIL V26 — RESPONSIVE MÓVIL CORREGIDO
   SOLO afecta #perfil en pantallas <= 760px.
   Escritorio queda intacto.
   ========================================================= */

@media (max-width:760px){

  #perfil.profile-editorial{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:3rem 1.25rem 3.2rem !important;

    overflow:visible !important;
  }

  #perfil .profile-shell{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  #perfil .section-label{
    margin:0 0 1rem !important;
  }

  /*
   * En móvil no usamos el grid 60/40.
   * Se convierte en una columna real.
   */
  #perfil .profile-main{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;

    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    gap:2rem !important;

    padding:0 !important;
    margin:0 !important;
  }

  #perfil .profile-copy{
    order:1 !important;

    display:block !important;

    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 !important;
    padding:0 !important;
  }

  #perfil .profile-specialty-pill{
    display:inline-flex !important;

    width:auto !important;
    max-width:100% !important;

    margin:0 0 .8rem !important;
    padding:.48rem .72rem !important;

    font-size:.58rem !important;
    letter-spacing:.11em !important;
    line-height:1.4 !important;

    white-space:normal !important;
  }

  /*
   * Evita que el nombre se parta letra por letra.
   */
  #perfil.profile h2{
    display:block !important;

    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 0 1rem !important;

    font-size:clamp(2.5rem,10.5vw,3.55rem) !important;
    line-height:1.02 !important;
    letter-spacing:-.04em !important;

    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
  }

  #perfil .profile-summary{
    display:block !important;

    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 0 1.1rem !important;
    padding:.72rem 0 .72rem 1rem !important;

    font-size:clamp(1.12rem,4.8vw,1.4rem) !important;
    line-height:1.48 !important;

    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
  }

  #perfil .profile-summary::before{
    left:.35rem !important;
    top:-.95rem !important;

    font-size:4.2rem !important;
  }

  #perfil .profile-biography-card{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 !important;
    padding:.9rem 1rem !important;
  }

  #perfil .profile-biography-list{
    width:100% !important;
  }

  #perfil .profile-biography-list li{
    width:100% !important;
    min-width:0 !important;

    padding:.62rem 0 .62rem 1.05rem !important;

    font-size:.96rem !important;
    line-height:1.62 !important;

    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
  }

  #perfil .profile-cta{
    margin-top:1rem !important;
  }

  /*
   * Foto siempre debajo del texto.
   */
  #perfil .profile-side{
    order:2 !important;

    display:block !important;

    width:min(88%,380px) !important;
    max-width:380px !important;
    min-width:0 !important;

    justify-self:auto !important;
    align-self:center !important;

    margin:0 auto !important;
    padding:0 0 .8rem .8rem !important;

    background:transparent !important;
  }

  #perfil .profile-photo-layer{
    inset:.85rem 0 0 .85rem !important;
  }

  #perfil .profile-photo-frame{
    width:100% !important;
    max-width:none !important;

    aspect-ratio:4 / 5 !important;

    border-radius:44% 44% 18px 18px / 21% 21% 18px 18px !important;
  }

  #perfil .profile-photo-frame img{
    width:100% !important;
    height:100% !important;

    object-fit:cover !important;
    object-position:center !important;
  }
}


/* Teléfonos estrechos */
@media (max-width:430px){

  #perfil.profile-editorial{
    padding:2.7rem 1rem 3rem !important;
  }

  #perfil.profile h2{
    font-size:clamp(2.3rem,11vw,3.15rem) !important;
  }

  #perfil .profile-summary{
    font-size:1.1rem !important;
  }

  #perfil .profile-biography-list li{
    font-size:.92rem !important;
  }

  #perfil .profile-side{
    width:min(92%,340px) !important;
  }
}
