/* =========================================================
   Real Instituto do Pulmão — stylesheet
   ========================================================= */

:root {
  --maroon-900: #3d1428;
  --maroon-800: #4a1a35;
  --maroon-700: #6b2142;
  --maroon-600: #7d2b4d;
  --maroon-500: #96385f;
  --plum-500: #7a5169;

  --orange-700: #c85f1f;
  --orange-600: #e17a2e;
  --orange-500: #ec8f4f;
  --orange-100: #fbe3cf;

  --pink-500: #b23368;
  --pink-100: #f6dbe6;

  --cream-50: #fdf8f4;
  --cream-100: #fbeee9;
  --cream-200: #f5e2da;

  --ink-900: #241019;
  --ink-700: #4a3540;
  --ink-500: #6f5a65;

  --white: #ffffff;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-w: 1180px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 20px 45px -20px rgba(61, 20, 40, 0.35);
  --shadow-card: 0 10px 30px -15px rgba(61, 20, 40, 0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--maroon-800); }
p { margin: 0 0 1em; }
address { font-style: normal; }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--maroon-700); color: #fff;
  padding: 12px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  border: 2px solid transparent; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange-600), var(--pink-500));
  color: #fff; box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 40px -18px rgba(178,51,104,.5); }
.btn-ghost {
  background: transparent; border-color: rgba(255,255,255,.55); color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107,33,66,.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { display: inline-flex; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-real {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  color: var(--plum-500); font-size: 1.05rem;
}
.logo-inst {
  font-family: var(--font-serif); font-weight: 600; color: var(--orange-600);
  font-size: 1rem; letter-spacing: .01em;
}
.footer-brand .logo-real,
.footer-brand .logo-inst { color: var(--cream-100); }
.footer-brand .logo-real { color: #e9c9d8; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-weight: 600; font-size: .95rem; color: var(--ink-700);
  padding: 8px 0; position: relative;
}
.main-nav a:not(.nav-cta):hover { color: var(--maroon-700); }
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--orange-600); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--maroon-700); color: #fff !important; padding: 10px 20px !important;
  border-radius: 999px; transition: background .2s ease;
}
.nav-cta:hover { background: var(--maroon-800); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--maroon-800); margin: 0 auto; transition: transform .2s ease, opacity .2s ease; }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  color: var(--orange-600); margin: 0 0 .6em;
}
.eyebrow-light { color: var(--orange-100); }
.section-head { max-width: 700px; margin: 0 0 44px; }
.section-head-light h2 { color: #fff; }
.section-lead { color: var(--ink-500); font-size: 1.05rem; }
.section { padding: 88px 0; }
.section-tint { background: var(--cream-100); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; color: #fff; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 65%;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(36,16,25,.55) 0%, rgba(36,16,25,.72) 55%, rgba(36,16,25,.92) 100%),
    linear-gradient(100deg, rgba(107,33,66,.55) 0%, rgba(178,51,104,.15) 45%, rgba(225,122,46,.15) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 140px 0 80px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 16ch; margin-bottom: .4em; }
.hero-lead { max-width: 56ch; font-size: 1.15rem; color: rgba(255,255,255,.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 46px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; border-top: 1px solid rgba(255,255,255,.25); padding-top: 28px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-serif); font-size: 2rem; color: var(--orange-100); }
.hero-stats span { font-size: .88rem; color: rgba(255,255,255,.75); }

/* ---------- Sobre ---------- */
.sobre-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.sobre-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.sobre-text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.sobre-text p { color: var(--ink-700); }
.mission {
  margin: 28px 0; padding: 24px 28px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600)); color: #fff;
  position: relative;
}
.mission p { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; margin-bottom: .4em; color: #fff; }
.mission cite { font-size: .82rem; opacity: .8; font-style: normal; }
.pillars { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pillars li {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--cream-100); color: var(--maroon-700); font-weight: 700; font-size: .92rem;
  border: 1px solid var(--cream-200);
}
.pillar-icon { font-size: 1.05rem; }

/* ---------- Cards grid (especialidades) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radius-md); padding: 30px 26px;
  box-shadow: var(--shadow-card); border: 1px solid var(--cream-200);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -20px rgba(61,20,40,.3); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: linear-gradient(135deg, var(--orange-100), var(--pink-100)); margin-bottom: 16px;
}
.card h3 { font-size: 1.12rem; margin-bottom: .4em; color: var(--maroon-800); }
.card p { color: var(--ink-500); font-size: .95rem; margin-bottom: 0; }

/* ---------- Equipe ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.team-card {
  background: #fff; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--cream-200);
  display: flex; flex-direction: column; text-align: left;
}
.team-photo { aspect-ratio: 4/3.4; overflow: hidden; background: var(--cream-100); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.team-info { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.team-info h3 { font-size: 1.12rem; margin-bottom: 0; color: var(--maroon-800); }
.team-crm { color: var(--ink-500); font-size: .85rem; margin-bottom: 10px; }
.team-tag { color: var(--orange-700); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 12px;}
.team-more {
  margin-top: auto; align-self: flex-start; font-weight: 700; font-size: .9rem; color: var(--maroon-700);
  background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px;
}
.team-more:hover { color: var(--orange-600); }

/* ---------- Convenios ---------- */
.convenios-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.convenios-grid li {
  background: #fff; border: 1px solid var(--cream-200); border-radius: var(--radius-sm);
  padding: 18px 16px; text-align: center; font-weight: 700; color: var(--maroon-700);
  box-shadow: var(--shadow-card); font-size: .95rem;
}
.convenios-note { margin-top: 26px; color: var(--ink-500); font-size: .92rem; }

/* ---------- Info practica ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-card {
  padding: 30px 26px; border-radius: var(--radius-md); background: var(--cream-100);
  border: 1px solid var(--cream-200);
}
.info-icon { font-size: 1.8rem; margin-bottom: 14px; }
.info-card h3 { font-size: 1.08rem; margin-bottom: .4em; }
.info-card p { color: var(--ink-700); font-size: .95rem; margin-bottom: 0; }

/* ---------- Localizacao ---------- */
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.loc-text address { color: var(--ink-700); margin: 18px 0 26px; line-height: 1.6; }
.loc-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.loc-photos img { width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-card); aspect-ratio: 4/3.2; object-fit: cover; }
.loc-map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); height: 100%; min-height: 420px; }
.loc-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- Contato / CTA ---------- */
.contact-cta {
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-700) 55%, var(--pink-500));
  color: #fff;
}
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-md); padding: 26px 22px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s ease, background .2s ease;
}
.contact-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.14); }
.contact-highlight { background: rgba(255,255,255,.95); color: var(--maroon-800); }
.contact-highlight .contact-label { color: var(--orange-700); }
.contact-highlight:hover { background: #fff; }
.contact-icon { font-size: 1.6rem; margin-bottom: 6px; }
.contact-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--orange-100); }
.contact-value { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.75); }
.footer-inner {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px;
  padding: 56px 0 40px;
}
.footer-brand p { margin-top: 14px; font-size: .9rem; color: rgba(255,255,255,.6); max-width: 32ch; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 12px; font-size: .92rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--orange-100); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .82rem; color: rgba(255,255,255,.45); }

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(36,16,25,.65); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg); max-width: 560px; width: 100%;
  max-height: 86vh; overflow-y: auto; padding: 34px; position: relative; box-shadow: var(--shadow-soft);
}
.modal-close {
  position: absolute; top: 16px; right: 18px; background: var(--cream-100); border: none;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer;
  color: var(--maroon-700);
}
.modal-header { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.modal-header img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top center; }
.modal-header h3 { margin-bottom: .15em; }
.modal-crm { color: var(--ink-500); font-size: .88rem; margin: 0; }
.modal-bio { color: var(--ink-700); margin-bottom: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .sobre-grid, .loc-grid { grid-template-columns: 1fr; }
  .sobre-media { order: -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .convenios-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--cream-50); flex-direction: column; align-items: flex-start;
    padding: 30px 24px; gap: 22px; transform: translateX(100%); transition: transform .25s ease;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.1rem; width: 100%; }
  .nav-cta { text-align: center; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-content { padding-top: 110px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .cards-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .convenios-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .loc-photos { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
