/* MEDICORE Public Pro UI - WEB-PRO-01
   Visual hardening for public home, team and professional profiles.
   Pure presentation layer: no business logic, routes or clinical flows are changed. */

:root{
  --pub-ink:#0b1f36;
  --pub-ink-2:#20364f;
  --pub-muted:#607187;
  --pub-line:#dfe8ee;
  --pub-surface:#ffffff;
  --pub-soft:#f5fafb;
  --pub-soft-2:#eef8f6;
  --pub-shadow-sm:0 8px 24px rgba(10,31,54,.06);
  --pub-shadow-md:0 18px 48px rgba(10,31,54,.10);
  --pub-radius:20px;
}

body.public-home,
body.public-team,
body.public-profile,
body.public-subpage{
  color:var(--pub-ink);
  background:#fff;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ---------- Shared header ---------- */
body.public-team .top,
body.public-subpage .top,
body.public-profile .top{
  min-height:82px;
  height:auto;
  padding:12px 28px;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(14px);
  border-bottom:1px solid #e8eff3;
  box-shadow:0 4px 20px rgba(10,31,54,.035);
}
body.public-team .brand,
body.public-subpage .brand,
body.public-profile .brand{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  color:var(--secondary);
  font-size:inherit;
  font-weight:inherit;
}
body.public-profile .brand:before{display:none!important}
.public-brand-mark{
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:15px;
  overflow:hidden;
  display:grid;
  place-items:center;
  color:var(--primary);
  background:#ebfaf7;
  border:2px solid color-mix(in srgb,var(--primary) 65%,#fff);
  font-size:26px;
  font-weight:800;
}
.public-brand-mark img{width:100%;height:100%;object-fit:cover;display:block}
.public-brand-copy{display:block;min-width:0}
.public-brand-copy strong{
  display:block;
  color:var(--secondary);
  font-size:19px;
  line-height:1.05;
  letter-spacing:-.015em;
  white-space:nowrap;
}
.public-brand-copy small{
  display:block;
  margin-top:4px;
  color:#607187;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
body.public-team .nav,
body.public-subpage .nav,
body.public-profile .nav{gap:9px 18px}
body.public-team .nav>a:not(.btn),
body.public-subpage .nav>a:not(.btn),
body.public-profile .nav>a:not(.btn){
  font-size:13.5px;
  font-weight:750;
  color:#20364f;
  padding:10px 0;
}
body.public-team .nav>a:not(.btn):hover,
body.public-subpage .nav>a:not(.btn):hover,
body.public-profile .nav>a:not(.btn):hover{color:var(--primary)}
body.public-team .btn,
body.public-subpage .btn,
body.public-profile .btn{
  border-radius:12px;
  font-weight:800;
  box-shadow:0 8px 20px rgba(8,81,76,.10);
}

/* ---------- Home refinement ---------- */
body.public-home .top{
  min-height:82px;
  height:auto;
  padding:11px 30px;
  box-shadow:0 4px 22px rgba(10,31,54,.035);
}
body.public-home .logo{
  width:54px;
  height:54px;
  border-width:2px;
  border-radius:16px;
}
body.public-home .brand strong{
  font-size:20px;
  font-weight:820;
  letter-spacing:-.01em;
}
body.public-home .brand small{font-size:12.5px;font-weight:700;color:#607187}
body.public-home .nav{gap:20px}
body.public-home .nav a{font-weight:760;font-size:13.5px}
body.public-home .nav a.active{border-bottom-width:2px;padding-bottom:7px}
body.public-home .btn{border-radius:12px;font-weight:820;box-shadow:0 8px 20px rgba(8,81,76,.12)}
body.public-home .hero{height:490px;box-shadow:none;border-bottom:1px solid #edf2f5}
body.public-home .hero h1{
  text-transform:none;
  font-size:clamp(37px,3.4vw,50px);
  line-height:1.03;
  letter-spacing:-1.3px;
  font-weight:850;
}
body.public-home .hero h1 .accent{margin-top:5px}
body.public-home .hero p{font-size:17px;line-height:1.6;color:#31465d}
body.public-home .slide:after{
  background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.93) 29%,rgba(255,255,255,.62) 48%,rgba(255,255,255,.12) 72%,rgba(255,255,255,.02) 100%);
}
body.public-home .hero-stat{font-weight:750;color:#31465d}
body.public-home .hero-stat span{
  width:34px;height:34px;border-radius:11px;font-size:17px;
  filter:grayscale(.8) saturate(.45);
}
body.public-home .special-band{
  margin-top:-20px;
  border-radius:20px;
  padding:26px 30px;
  box-shadow:0 18px 42px rgba(8,81,76,.14);
  background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 93%,#0b1f36),color-mix(in srgb,var(--primary) 72%,#0b1f36));
}
body.public-home .special-band h2{font-size:22px;font-weight:820;letter-spacing:-.02em}
body.public-home .special-grid{gap:12px}
body.public-home .special-item{
  min-height:94px;
  border-radius:15px;
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.20);
}
body.public-home .special-item .sicon{font-size:30px;filter:grayscale(.55) saturate(.55)}
body.public-home .special-item strong{font-size:13.5px;font-weight:780;text-align:center}
body.public-home .section{padding:48px 0}
body.public-home .section-title h2{font-size:29px;font-weight:840;letter-spacing:-.035em}
body.public-home .section-title p{font-size:15px}
body.public-home .feature-grid{gap:15px}
body.public-home .feature-card{
  min-height:245px;
  padding:25px 20px;
  border-radius:20px;
  border-color:#e1e9ee;
  box-shadow:var(--pub-shadow-sm);
  display:flex;
  flex-direction:column;
  align-items:center;
}
body.public-home .feature-card .icon{
  width:58px;height:58px;
  border-radius:17px;
  font-size:25px;
  filter:grayscale(.78) saturate(.45);
  background:#eff8f7;
  border:1px solid #deeeeb;
}
body.public-home .feature-card h3{font-size:18px;line-height:1.25;font-weight:820;letter-spacing:-.02em}
body.public-home .feature-card p{font-size:14px;line-height:1.58;margin-top:auto}
body.public-home .service-row{border-color:#e3eaef;box-shadow:none;background:#fbfdfe}
body.public-home .service-mini span{filter:grayscale(.8) saturate(.45)}
body.public-home .pro-strip{gap:16px}
body.public-home .pro{
  border-radius:19px;
  border-color:#e1e9ee;
  box-shadow:var(--pub-shadow-sm);
}
body.public-home .pro:hover{transform:translateY(-3px);box-shadow:var(--pub-shadow-md)}
body.public-home .pro img{height:230px;object-position:center 22%}
body.public-home .pro-body{padding:18px}
body.public-home .pro-body h3{font-size:18px;font-weight:820;letter-spacing:-.02em}
body.public-home .pro-body p{font-size:13.5px;color:#617287}
body.public-home .family-card,
body.public-home .blog-card{border-color:#e1e9ee;box-shadow:var(--pub-shadow-sm)}
body.public-home .contact-footer{margin-top:34px}

/* ---------- Team page ---------- */
body.public-team{background:linear-gradient(180deg,#fbfdfd 0,#fff 520px)}
body.public-team .wrap{width:min(1220px,calc(100% - 42px))}
body.public-team .team-hero{
  margin:34px auto 28px;
  padding:0;
  min-height:390px;
  display:grid;
  grid-template-columns:1.06fr .94fr;
  overflow:hidden;
  border:1px solid #dfe9ed;
  border-radius:28px;
  background:#fff;
  box-shadow:var(--pub-shadow-md);
}
body.public-team .team-hero-copy{padding:52px 48px;display:flex;flex-direction:column;justify-content:center}
body.public-team .eyebrow{
  display:inline-flex;
  width:max-content;
  align-items:center;
  gap:8px;
  padding:7px 11px;
  border-radius:999px;
  background:#edf8f6;
  color:var(--primary);
  font-size:12px;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
  margin-bottom:16px;
}
body.public-team .team-hero h1{
  margin:0 0 14px;
  color:var(--secondary);
  font-size:clamp(36px,4vw,52px);
  line-height:1.02;
  letter-spacing:-1.5px;
  font-weight:850;
}
body.public-team .team-hero p{margin:0 0 24px;font-size:17px;line-height:1.65;color:#42566c;max-width:620px}
body.public-team .team-hero-actions{display:flex;flex-wrap:wrap;gap:10px}
body.public-team .team-hero-media{position:relative;min-height:390px;background:#eef7f7}
body.public-team .team-hero-media img{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
body.public-team .team-hero-media:after{content:"";position:absolute;inset:0;box-shadow:inset 18px 0 40px rgba(255,255,255,.18);pointer-events:none}
body.public-team .team-trust{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:26px;
}
body.public-team .team-trust div{padding:12px 13px;border:1px solid #e2eaee;border-radius:14px;background:#fbfdfd}
body.public-team .team-trust strong{display:block;font-size:13px;color:var(--secondary);margin-bottom:3px}
body.public-team .team-trust span{display:block;font-size:12px;color:#718096}
body.public-team .team-section-head{display:flex;justify-content:space-between;align-items:end;gap:18px;padding:18px 0 4px}
body.public-team .team-section-head h2{margin:0;font-size:31px;letter-spacing:-.8px;color:var(--secondary)}
body.public-team .team-section-head p{margin:8px 0 0;color:#607187;line-height:1.55}
body.public-team .team-grid{grid-template-columns:repeat(auto-fit,minmax(265px,1fr));gap:18px;margin-top:18px}
body.public-team .pro-card{
  display:flex;
  flex-direction:column;
  min-height:100%;
  border-radius:22px;
  border:1px solid #dfe8ee;
  box-shadow:var(--pub-shadow-sm);
  transition:transform .18s ease,box-shadow .18s ease;
}
body.public-team .pro-card:hover{transform:translateY(-3px);box-shadow:var(--pub-shadow-md)}
body.public-team .pro-media{position:relative;background:#eef3f5;overflow:hidden}
body.public-team .pro-media img{height:270px;object-fit:cover;object-position:center 22%;display:block}
body.public-team .pro-specialty{
  position:absolute;
  left:15px;
  bottom:14px;
  max-width:calc(100% - 30px);
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 6px 18px rgba(10,31,54,.12);
  color:#18344a;
  font-size:12px;
  font-weight:820;
  backdrop-filter:blur(8px);
}
body.public-team .pro-card .body{padding:20px;display:flex;flex-direction:column;flex:1}
body.public-team .pro-card h2{font-size:21px;line-height:1.2;letter-spacing:-.03em;font-weight:840;margin-bottom:9px}
body.public-team .pro-summary{font-size:14px;line-height:1.6;color:#607187;margin:0 0 18px;flex:1}
body.public-team .pro-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:auto}
body.public-team .pro-actions .btn{padding:10px 12px;font-size:12.5px;min-height:42px}
body.public-team .team-note{
  margin:6px 0 10px;
  padding:18px 20px;
  border-radius:18px;
  border:1px solid #dde9ed;
  background:#f7fbfb;
  color:#52677b;
  line-height:1.55;
  font-size:14px;
}

/* ---------- Professional profile ---------- */
body.public-profile{background:#fbfdfd}
body.public-profile .wrap{width:min(1220px,calc(100% - 42px))}
body.public-profile .hero{
  margin-top:32px;
  min-height:430px;
  border-radius:28px;
  border-color:#dfe8ee;
  box-shadow:var(--pub-shadow-md);
  background:#fff;
}
body.public-profile .heroText{padding:48px 46px}
body.public-profile .kicker{
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-weight:850;
}
body.public-profile .hero h1{
  font-size:clamp(38px,4vw,52px);
  line-height:1.02;
  letter-spacing:-1.4px;
  font-weight:860;
}
body.public-profile .heroText>p{font-size:16.5px;line-height:1.65;color:#465a70}
body.public-profile .photo{background:#edf5f5}
body.public-profile .photo .area{filter:saturate(.88) contrast(.98)}
body.public-profile .portrait{
  width:154px;
  height:154px;
  border-radius:24px;
  border-width:5px;
  box-shadow:0 16px 38px rgba(10,31,54,.22);
  object-position:center 20%;
}
body.public-profile .meta{gap:10px}
body.public-profile .meta div{border-radius:15px;background:#fbfdfd;padding:13px}
body.public-profile .meta strong{font-size:12px;text-transform:uppercase;letter-spacing:.04em}
body.public-profile .micro-nav{gap:8px}
body.public-profile .micro-nav a{font-size:12.5px;font-weight:780;padding:8px 13px;border-color:#dde7ec}
body.public-profile .section{padding:34px 0}
body.public-profile .section h2{font-size:28px;font-weight:840;letter-spacing:-.6px}
body.public-profile .card{border-radius:20px;border-color:#dfe8ee;box-shadow:var(--pub-shadow-sm)}
body.public-profile .agenda{background:#f4fbfa}
body.public-profile .item,
body.public-profile .day,
body.public-profile .faq{border-color:#dfe8ee;box-shadow:none}
body.public-profile .item{background:#fff}
body.public-profile .gallery img{border-radius:17px;box-shadow:var(--pub-shadow-sm);filter:saturate(.94)}
body.public-profile .cta{
  background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 88%,#102c3d),color-mix(in srgb,var(--primary) 65%,#0b1f36));
  border-radius:22px;
  box-shadow:0 16px 38px rgba(8,81,76,.14);
}

/* ---------- Shared footer / floating actions ---------- */
.public-footer{margin-top:42px!important;background:#0d243a!important;padding:0!important;color:#d9e5ed!important}
.public-footer-main{display:grid;grid-template-columns:1.4fr .8fr .8fr;gap:28px;padding:34px 0}
.public-footer-brand{font-size:19px;font-weight:850;color:#fff;margin-bottom:7px}
.public-footer p{color:#c6d5df;line-height:1.55;margin:5px 0}
.public-footer strong{color:#fff}
.public-footer-links{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.public-footer a{color:#d9e5ed;text-decoration:none;font-size:13px}
.public-footer a:hover{color:#fff}
.public-footer-bottom{padding:14px 0 18px;border-top:1px solid rgba(255,255,255,.1);font-size:12px;color:#9db0bf}
.public-actions a{transition:transform .16s ease,box-shadow .16s ease}

@media(max-width:1050px){
  body.public-home .nav{gap:13px}
  body.public-home .feature-grid{grid-template-columns:repeat(3,1fr)}
  body.public-home .special-grid{grid-template-columns:repeat(3,1fr)}
  body.public-team .team-hero{grid-template-columns:1fr}
  body.public-team .team-hero-media{min-height:300px}
}
@media(max-width:900px){
  .public-brand-copy small{display:none}
  body.public-team .top,
  body.public-subpage .top,
  body.public-profile .top{align-items:center;flex-direction:row;flex-wrap:wrap}
  body.public-team .nav,
  body.public-subpage .nav,
  body.public-profile .nav{width:100%;justify-content:flex-start}
  body.public-team .team-hero-copy{padding:34px 28px}
  body.public-team .team-trust{grid-template-columns:1fr}
  body.public-profile .heroText{padding:34px 28px}
  .public-footer-main{grid-template-columns:1fr}
}
@media(max-width:760px){
  body.public-home .top{padding:10px 14px}
  body.public-home .brand strong{font-size:16px}
  body.public-home .brand small{display:none}
  body.public-home .hero{height:520px}
  body.public-home .hero-inner{align-items:flex-end;padding-bottom:55px}
  body.public-home .slide:after{background:linear-gradient(0deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.96) 42%,rgba(255,255,255,.35) 74%,rgba(255,255,255,.08) 100%)}
  body.public-home .hero h1{font-size:34px}
  body.public-home .hero-stats{display:none}
  body.public-home .special-grid{grid-template-columns:repeat(2,1fr)}
  body.public-home .feature-grid{grid-template-columns:1fr}
  body.public-home .feature-card{min-height:auto}
  body.public-team .wrap,
  body.public-profile .wrap{width:min(100% - 24px,1220px)}
  body.public-team .team-hero{margin-top:18px;border-radius:20px}
  body.public-team .team-hero h1{font-size:36px}
  body.public-team .team-section-head{align-items:flex-start;flex-direction:column}
  body.public-team .pro-actions{grid-template-columns:1fr}
  body.public-team .pro-media img{height:250px}
  body.public-profile .hero{border-radius:20px;margin-top:18px}
  body.public-profile .hero h1{font-size:36px}
  body.public-profile .portrait{width:126px;height:126px}
}


/* ================= WEB-PRO-02 refinements ================= */
body.public-home section[id],
body.public-profile section[id],
body.public-team section[id]{scroll-margin-top:110px}

/* Less visual weight: medical/institutional instead of promotional. */
body.public-home .brand strong,
body.public-team .public-brand-copy strong,
body.public-profile .public-brand-copy strong{font-weight:760}
body.public-home .nav a,
body.public-team .nav>a:not(.btn),
body.public-profile .nav>a:not(.btn){font-weight:700}
body.public-home .btn,
body.public-team .btn,
body.public-profile .btn{font-weight:760}
body.public-home .section-title h2,
body.public-team .team-section-head h2,
body.public-profile .section h2{font-weight:760}

/* Home: prevent anchored headings from disappearing beneath the sticky header. */
body.public-home #profesionales,
body.public-home #especialidades,
body.public-home #contacto{scroll-margin-top:105px}
body.public-home .hero{height:465px}
body.public-home .hero h1{font-weight:780;letter-spacing:-1px}
body.public-home .feature-card h3,
body.public-home .pro-body h3{font-weight:760}
body.public-home .pro img{height:220px}
body.public-home .pro-body{min-height:150px}
body.public-home .pro-body .btn{margin-top:auto}

/* Profile header: force contrast on system access button. */
body.public-profile .nav .btn.dark{
  background:#0b1f36!important;
  color:#fff!important;
  min-width:166px;
  border:1px solid #0b1f36!important;
}
body.public-profile .nav .btn.dark:hover{background:#132d49!important}

/* Professional hero and metadata. */
body.public-profile .hero{min-height:405px}
body.public-profile .heroText{padding:42px 44px}
body.public-profile .hero h1{font-weight:780}
body.public-profile .meta{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  align-items:stretch;
}
body.public-profile .meta div{
  font-size:14px;
  line-height:1.45;
  min-height:76px;
}
body.public-profile .photo .area{object-position:center;filter:saturate(.82) contrast(.98)}
body.public-profile .portrait{
  width:142px;
  height:142px;
  border-radius:22px;
}

/* Profile summary/contact: never show empty labels. */
body.public-profile .contact-list{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #dfe8ee;
  display:grid;
  gap:10px;
}
body.public-profile .contact-list p{
  margin:0;
  display:grid;
  grid-template-columns:92px 1fr;
  gap:12px;
  align-items:start;
  line-height:1.45;
}
body.public-profile .contact-list strong{color:#20364f}
body.public-profile .contact-list span{color:#52677b}

/* Six services become two balanced rows of three on desktop. */
body.public-profile .items{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
body.public-profile .item{
  min-height:100%;
  padding:20px;
  border-radius:18px;
}
body.public-profile .item h3{font-size:19px;font-weight:760}
body.public-profile .item .btn{
  width:100%;
  min-height:48px;
  padding:11px 14px;
  line-height:1.3;
}
body.public-profile .schedule{grid-template-columns:repeat(3,minmax(0,1fr))}
body.public-profile .gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
body.public-profile .gallery img{
  height:215px;
  object-fit:cover;
  background:#f4f8fa;
}

/* Team cards: calmer typography and consistent vertical rhythm. */
body.public-team .pro-card h2{font-weight:760}
body.public-team .pro-media img{height:255px}
body.public-team .pro-summary{min-height:68px}

@media(max-width:1050px){
  body.public-profile .items{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.public-profile .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.public-home .hero{height:500px}
  body.public-profile .items,
  body.public-profile .schedule,
  body.public-profile .gallery{grid-template-columns:1fr}
  body.public-profile .contact-list p{grid-template-columns:1fr;gap:2px}
  body.public-profile .nav .btn.dark{min-width:auto}
}

/* ================= WEB-PRO-03: HERO SAFE AREA =================
   Evita que títulos largos del carrusel queden recortados por el alto fijo.
   El contenido deja de centrarse verticalmente y obtiene una zona segura superior. */
body.public-home .hero{
  height:540px;
  min-height:540px;
}
body.public-home .hero-inner{
  align-items:flex-start;
  padding-top:34px;
  padding-bottom:40px;
}
body.public-home .hero-content{
  max-width:545px;
}
body.public-home .hero h1{
  margin-top:0;
  overflow:visible;
}

@media(max-width:1100px){
  body.public-home .hero{
    height:535px;
    min-height:535px;
  }
  body.public-home .hero-inner{
    align-items:flex-start;
    padding-top:32px;
    padding-bottom:38px;
  }
}

@media(max-width:760px){
  body.public-home .hero{
    height:565px;
    min-height:565px;
  }
  body.public-home .hero-inner{
    align-items:flex-start;
    padding-top:34px;
    padding-bottom:40px;
  }
  body.public-home .hero h1{
    font-size:32px;
    line-height:1.08;
  }
}
