/* ========= Base ========= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* evita scroll lateral no mobile */
}

img, svg { max-width: 100%; height: auto; display: block; }

/* ========= Escopo Biomed ========= */
.bm-site {
  --bm-bg: #ffffff;
  --bm-ink: #0f172a;
  --bm-ink-soft: #334155;
  --bm-ink-mute: #64748b;
  --bm-brand: #0ea5e9;
  --bm-brand-ink: #075985;
  --bm-wa: #25d366;
  --bm-ice-2: #eef2f7;
  --bm-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* ========= Container ========= */
.bm-container { width: 100%; max-width: 1200px; padding: 0 24px; margin: 0 auto; }
.container    { width: 100%; max-width: 1200px; padding: 0 24px; margin: 0 auto; }

/* ========= Topbar ========= */
.bm-topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--bm-ice-2);
  backdrop-filter: saturate(180%) blur(6px);
}
.bm-topbar__inner {
  display: flex; align-items: center; justify-content: space-between; min-height: 72px;
}
.bm-brand__logo { height: 34px; width: auto; display: block; }

.bm-nav {
  display: flex; align-items: center; gap: 16px;
}
.bm-nav__link {
  text-decoration: none; color: var(--bm-ink-soft); font-weight: 500;
}
.bm-nav__link:hover { color: var(--bm-brand-ink); }

/* Botão hamburguer (só aparece no mobile) */
.bm-nav-toggle{
  display: none;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid #e5e7eb; background: #fff;
  align-items: center; justify-content: center; gap: 4px;
}
.bm-nav-toggle__bar{
  width: 18px; height: 2px; background: #0f172a; display: block;
}

/* ========= Botões ========= */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 18px; border-radius: 12px;
  border: 1px solid transparent; text-decoration: none;
  font-weight: 600; line-height: 1;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  box-shadow: 0 2px 0 rgba(2, 6, 23, 0.05);
  white-space: nowrap;
}
.bm-btn:hover { transform: translateY(-1px); }
.bm-btn--ghost { background: #fff; color: var(--bm-ink); border-color: var(--bm-ice-2); }
.bm-btn--ghost:hover { border-color: var(--bm-brand); color: var(--bm-brand-ink); }
.bm-btn--wa { background: var(--bm-wa); color: #fff; }
.bm-btn--wa:hover { filter: brightness(0.95); }
.bm-btn--xl { padding: 16px 22px; font-size: 1.05rem; }

/* ========= HERO ========= */
.bm-hero {
  position: relative; overflow: hidden;
  padding: 48px 0 72px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}
.bm-hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(14,165,233,0.18), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(14,165,233,0.12), transparent 60%);
  pointer-events: none;
}
.bm-hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px;
}
.bm-hero__col--text { align-self: center; }

.bm-eyebrow {
  display: inline-block; color: var(--bm-brand-ink);
  background: rgba(14,165,233,0.10); border: 1px solid rgba(14,165,233,0.22);
  padding: 6px 10px; border-radius: 999px;
  font-weight: 700; font-size: .85rem; letter-spacing: .3px; margin-bottom: 14px;
}
.bm-hero__title {
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; font-weight: 800;
  margin: 0 0 14px 0; color: var(--bm-ink);
  text-wrap: balance;
}
.bm-underline { text-decoration: underline 8px solid rgba(14,165,233,0.25); text-underline-offset: 6px; }
.bm-hero__subtitle { font-size: 1.1rem; color: var(--bm-ink-soft); margin: 0 0 22px 0; }
.bm-hero__note { display: inline-block; margin-left: 6px; font-size: .9rem; color: var(--bm-ink-mute); }
.bm-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0; }

/* Imagem da HERO */
.bm-hero__col--image { align-self: center; }
.bm-hero__image { position: relative; overflow: visible; border: none; background: none; box-shadow: none; }
.bm-hero__image img { width: 100%; height: auto; object-fit: contain; }

/* ========= Strip (colada na HERO) ========= */
.bm-strip { margin: 0; padding: 18px 0; background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%); color: #fff; }
.bm-strip--white { color: #fff; }
.bm-strip .bm-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.bm-strip__list {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px; list-style: none; padding: 0; margin: 0;
}
.bm-strip__list li {
  display: grid; gap: 4px; align-content: center;
  padding: 12px 14px; border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px; background: rgba(255,255,255,0.08); backdrop-filter: blur(2px);
}
.bm-strip__list li strong { font-weight: 800; font-size: clamp(.98rem, 1.6vw, 1.05rem); line-height: 1.2; }
.bm-strip__list li span { opacity: .95; font-size: .92rem; }

/* ========= Serviços ========= */
.bm-services{ background: #ffffff; color: #0f172a; padding: clamp(40px, 7vh, 80px) 0; border-top: 1px solid rgba(2,8,23,0.06); border-bottom: 1px solid rgba(2,8,23,0.06); }
.bm-services__header{ text-align: center; margin-bottom: clamp(18px, 2.4vh, 28px); }
.bm-services__title{ margin: 0 0 6px 0; font-weight: 800; letter-spacing: -.2px; font-size: clamp(1.5rem, 2.6vw, 2rem); color: #0b1220; }
.bm-services__subtitle{ margin: 0; color: #475569; font-size: clamp(.95rem, 1.6vw, 1.025rem); }
.bm-services__grid{ display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2vw, 26px); margin-top: clamp(14px, 2vh, 22px); }
.bm-col{ padding: clamp(18px, 2vw, 22px); border: 1px solid rgba(2,8,23,0.08); border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); box-shadow: 0 10px 30px rgba(2, 8, 23, 0.04), inset 0 1px 0 rgba(255,255,255,.65); }
.bm-col__title{ margin: 0 0 10px 0; font-weight: 800; font-size: clamp(1.05rem, 1.8vw, 1.15rem); color: #0b1220; }
.bm-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bm-list li{ position: relative; padding-left: 28px; font-size: clamp(.98rem, 1.5vw, 1.02rem); color: #1f2937; line-height: 1.45; }
.bm-list li::before{ content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #38bdf8, #0ea5e9); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }

/* ========= Profissionais ========= */
.pros { padding: 64px 0; }
.section-title { font-size: clamp(22px, 3.2vw, 28px); line-height: 1.2; margin: 0 0 28px; }

.pros-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 100%; }
.pro-card { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; min-width: 0; overflow: hidden; }
.pro-name { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.3; word-wrap: break-word; }
.pro-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; max-width: 100%; }
.pro-info { margin: 0; padding-left: 18px; }
.pro-info li { margin-bottom: 6px; line-height: 1.45; }

/* ========= Sobre Dermatologia ========= */
.section-about-derm{ position: relative; background: #ffffff; color: #2b211c; border-top: 1px solid rgba(0,0,0,.06); border-bottom: 1px solid rgba(0,0,0,.05); padding: clamp(48px, 8vh, 92px) 0; margin: clamp(44px, 6vh, 84px) 0; }
.about-derm__container{ width: min(1180px, 92vw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(22px, 4vw, 40px); align-items: center; }
.about-derm__media{ margin: 0; padding: 0; display: block; align-self: stretch; }
.about-derm__photo{ width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: #f3f4f6; box-shadow: 0 24px 70px rgba(0,0,0,.12); outline: 1px solid rgba(0,0,0,.05); max-width: 100%; }
.about-derm__content{ display: grid; gap: 14px; }
.about-derm__header{ display: grid; gap: 10px; }
.about-derm__title{ margin: 0; font-weight: 800; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -.2px; color: #1f2937; text-wrap: balance; }
.about-derm__lead{ margin: 0; color: #4b5563; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.65; }
.about-derm__bullets{ list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.about-derm__item{ display: grid; grid-template-columns: 16px 1fr; align-items: start; gap: 10px; font-size: clamp(14px, 1.1vw, 16px); color: #374151; line-height: 1.6; }
.about-derm__dot{ width: 8px; height: 8px; border-radius: 999px; margin-top: 8px; background: linear-gradient(180deg, #8b5e3c, #6f4a30); box-shadow: 0 1px 0 rgba(0,0,0,.12); }

/* ========= Convênios ========= */
.section-convenios{ background: #ffffff; color: #0f172a; padding: clamp(36px, 6vh, 72px) 0; border-top: 1px solid rgba(0,0,0,.06); border-bottom: 1px solid rgba(0,0,0,.05); }
.convenios__container{ width: min(1180px, 92vw); margin: 0 auto; }
.convenios__header{ display: grid; gap: 6px; margin-bottom: clamp(18px, 2.2vw, 28px); }
.convenios__title{ margin: 0; font-weight: 800; font-size: clamp(22px, 3vw, 28px); line-height: 1.15; letter-spacing: -0.2px; }
.convenios__subtitle{ margin: 0; color: #6b7280; font-size: clamp(13px, 1.1vw, 14px); }
.convenios__grid{ list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); align-items: center; }
.convenios__item{ display: grid; place-items: center; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 14px; padding: 14px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.convenios__item:hover{ transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.08); background: #ffffff; }
.convenios__logo{ max-width: 150px; max-height: 60px; width: 100%; height: auto; object-fit: contain; display: block; filter: grayscale(20%) contrast(1.05); transition: filter .2s ease; }
.convenios__item:hover .convenios__logo{ filter: none; }

/* ========= Footer ========= */
.site-footer{ background: #0ea5e9; color:#fff; padding: 56px 0 0; }
.footer__wrap{ display:grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items:flex-start; }
.footer__logo{ display:block; height:auto; margin: -6px 0 14px 0; }
.footer__title{ margin: 0 0 8px 0; font-size: 1rem; font-weight: 700; letter-spacing: .2px; }
.footer__text{ margin: 0 0 16px 0; opacity: .95; }
.footer__contact{ margin: 8px 0 0 0; }
.footer__wa{ color:#fff; text-decoration: underline; text-underline-offset: 2px; }
.footer__block + .footer__block{ margin-top: 18px; }
.footer__bottom{ margin-top: 36px; background: rgba(0,0,0,.08); color: #f8fafc; }
.footer__bottomWrap{ display:flex; align-items:center; justify-content:space-between; gap: 16px; padding: 14px 0; font-size: .9rem; }
.footer__mini{ opacity: .9; }

/* ========= WhatsApp Float ========= */
:root{ --wa-1: #28d366; --wa-2: #20c05a; }
.wa-float{
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(180deg, var(--wa-1), var(--wa-2));
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 6px 12px rgba(0,0,0,.18);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 9999; transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float svg{ width: 28px; height: 28px; fill: #fff; }
.wa-float:hover{ transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 28px rgba(0,0,0,.26), 0 8px 14px rgba(0,0,0,.2); }

/* ========= Acessibilidade utilitária ========= */
.sr-only{
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ========= Mobile: ajustes finos ========= */
@media (max-width: 1100px){
  .pros-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px){
  .bm-hero__grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 920px){
  .bm-services__grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  /* Topbar: mostrar botão e transformar nav em dropdown */
  .bm-nav-toggle{ display: inline-flex; }
  .bm-nav{
    position: absolute; right: 16px; top: calc(100% + 8px);
    display: grid; gap: 10px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 12px; box-shadow: var(--bm-shadow);
    width: min(88vw, 320px);
    opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .bm-nav.is-open{
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
  }
  .no-scroll{ overflow: hidden; } /* trava scroll quando menu aberto */

  .bm-topbar__inner{ min-height: 60px; }
  .bm-brand__logo{ height: 30px; }

  /* Hero respiro */
  .bm-hero{ padding: 28px 0 52px; }
  .bm-hero__title{ font-size: clamp(1.8rem, 7vw, 2.3rem); }
  .bm-hero__subtitle{ font-size: 1rem; }
  .bm-hero__cta .bm-btn{ width: 100%; padding: 14px 18px; } /* touch-target cheio */

  /* Strip empilha */
  .bm-strip__list { grid-template-columns: 1fr; }

  /* Profissionais: 1 por linha */
  .pros-grid { grid-template-columns: 1fr; }

  /* Sobre derm empilha */
  .about-derm__container{ grid-template-columns: 1fr; }
  .about-derm__photo{ border-radius: 16px; }
}
@media (max-width: 680px){
  .convenios__grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px){
  .about-derm__title{ font-size: 24px; }
  .about-derm__lead{ font-size: 15px; }
  .about-derm__item{ font-size: 14px; }
}
@media (max-width: 480px){
  .convenios__grid{ grid-template-columns: repeat(2, 1fr); }
  .convenios__logo{ max-height: 54px; }
}
@media (max-width: 420px){
  .wa-float{ right: max(12px, env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .wa-float svg{ width: 26px; height: 26px; }
}

/* ========= Motion preference ========= */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
