/*
Theme Name: InterligaMed
Author: InterligaMed
Description: Tema de blocos institucional da InterligaMed - terceirizacao de profissionais para a saude.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: interligamed
*/

/* ============================================================
   InterligaMed — Protótipo da Home
   Direção: institucional refinado ("confiança clínica")
   ============================================================ */

:root {
  /* Marca (extraída do logo) */
  --brand-darkest: #0A2913;        /* footer / textos */
  --brand-dark: #143F1B;           /* primária (forest da marca) */
  --brand-mid: #1B6B3A;
  --brand-vivid: #1CB832;          /* acento / CTA (o "MED") */
  --brand-vivid-600: #169A2A;
  --sage-50: #F2F7F3;
  --sage-100: #E5EFE8;
  --sage-200: #CFE0D5;
  --ink: #15241C;
  --muted: #5C6F64;
  --white: #ffffff;

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(8,38,25,.06), 0 4px 16px rgba(8,38,25,.06);
  --shadow-md: 0 10px 30px rgba(8,38,25,.10);
  --shadow-lg: 0 24px 60px rgba(8,38,25,.16);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; color: var(--brand-dark); }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .9rem 1.6rem; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  cursor: pointer; border: 1.5px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-dark); color: var(--white); }
.btn-primary:hover { background: var(--brand-darkest); box-shadow: var(--shadow-md); }
.btn-vivid { background: var(--brand-vivid); color: #04210F; box-shadow: 0 8px 22px rgba(28,184,50,.32); }
.btn-vivid:hover { background: var(--brand-vivid-600); color: var(--white); box-shadow: 0 12px 28px rgba(28,184,50,.42); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); }
.btn-ghost-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sage-100);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 76px; }
.brand-logo { height: 42px; width: auto; }
.main-nav { display: flex; gap: 1.7rem; margin-left: auto; }
.main-nav a { font-weight: 500; font-size: .97rem; color: var(--brand-dark); position: relative; padding: .3rem 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--brand-vivid); transition: width .25s var(--ease); }
.main-nav a:hover::after { width: 100%; }
.header-cta { padding: .7rem 1.3rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--brand-dark); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100vh - 77px);
  min-height: calc(100svh - 77px);
  display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 120% at 80% -10%, rgba(28,184,50,.20) 0, transparent 60%),
              linear-gradient(155deg, #0C3216 0%, #134A1A 50%, #18601F 100%);
  color: var(--white);
  padding: clamp(2.4rem, 4.5vw, 4rem) 0 clamp(2.2rem, 4vw, 3.25rem);
}
.hero-arc {
  position: absolute; inset: auto -10% -55% auto; right: -12%; bottom: -55%;
  width: min(90vw, 900px); aspect-ratio: 1.7 / 1;
  border: 2px solid rgba(28,184,50,.35); border-radius: 50%;
  transform: rotate(-18deg); z-index: -1;
}
.hero-arc::after {
  content: ""; position: absolute; inset: 14% 14%; border: 2px solid rgba(255,255,255,.10); border-radius: 50%;
}
.hero-glow { position: absolute; top: -20%; right: 8%; width: 480px; height: 480px; background: radial-gradient(circle, rgba(28,184,50,.30), transparent 65%); filter: blur(20px); z-index: -1; }
.hero-inner { max-width: 880px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600; color: var(--brand-vivid); margin-bottom: 1.1rem; }
.hero h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--brand-vivid); }
.hero-slogan { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-family: var(--font-display); font-weight: 400; color: rgba(255,255,255,.92); margin-bottom: 1rem; }
.hero-slogan strong { color: var(--brand-vivid); font-weight: 600; }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.78); max-width: 620px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.6rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.14); }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 2.2rem; color: var(--white); line-height: 1; }
.hero-stats span { font-size: .9rem; color: rgba(255,255,255,.7); margin-top: .35rem; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--brand-vivid); color: #04210F; }
.trustbar-inner { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 1.4rem; padding: 1.4rem 24px; }
.trust-item { display: flex; align-items: baseline; gap: .55rem; }
.t-num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.t-label { font-weight: 500; font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-tint { background: var(--sage-50); }
.section-dark { background: linear-gradient(160deg, #0E3B23, #0A2D1A); }
.kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--brand-vivid-600); margin-bottom: .8rem; }
.kicker.center, .center { text-align: center; }
.kicker.center { margin-inline: auto; }
.on-dark { color: var(--white) !important; }
.kicker.on-dark { color: var(--brand-vivid); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.prose p { color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--brand-vivid-600); margin-top: .6rem; transition: gap .2s var(--ease); }
.link-arrow:hover { gap: .8rem; }

/* Problema / Solução */
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 2.6rem; }
.ps-card { background: var(--white); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--sage-100); }
.ps-card h3 { margin-bottom: .8rem; }
.ps-card p { color: var(--muted); margin: 0; }
.ps-problem { border-top: 4px solid #C2410C; }
.ps-solution { border-top: 4px solid var(--brand-vivid); }

/* Feature grid (qualidade técnica) */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.8rem; }
.feature { background: var(--white); border: 1px solid var(--sage-100); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fnum { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--brand-vivid); display: block; margin-bottom: .7rem; }
.feature p { margin: 0; color: var(--ink); font-weight: 500; }

/* Legal grid (segurança jurídica, dark) */
.legal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; margin-top: 2.8rem; }
.legal-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 1.8rem; }
.legal-card h3 { color: var(--white); margin-bottom: .6rem; }
.legal-card p { color: rgba(255,255,255,.74); margin: 0; font-size: .96rem; }

/* Serviços */
.serv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 2.8rem; }
.serv-card { background: var(--white); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--sage-100); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.serv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.serv-card h3 { margin-bottom: 1rem; }
.serv-card ul li { padding: .5rem 0 .5rem 1.6rem; position: relative; color: var(--muted); border-bottom: 1px solid var(--sage-50); }
.serv-card ul li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-vivid); }
.serv-card .link-arrow { margin-top: 1.2rem; }
.chips-label { text-align: center; margin: 3rem 0 1rem; font-weight: 600; color: var(--brand-dark); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.chips li { background: var(--white); border: 1px solid var(--sage-200); color: var(--brand-dark); padding: .5rem 1.1rem; border-radius: 999px; font-size: .92rem; font-weight: 500; }

/* Parceiros */
.partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.8rem; }
.partners li { background: var(--sage-50); border: 1px solid var(--sage-100); border-radius: var(--radius-sm); padding: 1.5rem; font-weight: 600; color: var(--brand-dark); min-height: 110px; display: flex; align-items: center; transition: .3s var(--ease); }
.partners li:hover { background: var(--white); box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--brand-vivid); }

/* CTA final */
.cta-final { background: linear-gradient(135deg, var(--brand-vivid), #0E3B23); color: var(--white); padding: clamp(3.5rem, 7vw, 5.5rem) 0; text-align: center; }
.cta-inner { max-width: 720px; }
.cta-final h2 { color: var(--white); margin-bottom: 1rem; }
.cta-final p { color: rgba(255,255,255,.85); margin-bottom: 2rem; font-size: 1.1rem; }
.cta-final .hero-actions { justify-content: center; }

/* Footer */
.site-footer { background: var(--brand-darkest); color: rgba(255,255,255,.7); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2.5rem; }
.footer-logo { height: 46px; margin-bottom: 1.2rem; }
.footer-brand p { font-size: .95rem; max-width: 420px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.footer-col a { display: block; padding: .35rem 0; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-col a:hover { color: var(--brand-vivid); }
.footer-addr { margin-top: 1rem; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: rgba(255,255,255,.5); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37,211,102,.45); transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.loaded .reveal { opacity: 1; transform: none; }
.loaded .d1 { transition-delay: .08s; }
.loaded .d2 { transition-delay: .16s; }
.loaded .d3 { transition-delay: .24s; }
.loaded .d4 { transition-delay: .32s; }
.loaded .d5 { transition-delay: .42s; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-grid { grid-template-columns: repeat(2, 1fr); }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Menu hambúrguer já a partir de tablets — evita o nav desktop + CTA estourarem a largura */
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .main-nav {
    display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--white); padding: 1.2rem 24px; gap: .4rem; box-shadow: var(--shadow-md); border-bottom: 1px solid var(--sage-100);
  }
}
@media (max-width: 720px) {
  .grid-2, .ps-grid, .serv-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .feature-grid, .legal-grid, .partners { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .hero-stats strong { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ============================================================
   Ajustes: logos, blog, modal WhatsApp
   ============================================================ */

/* Logos (override) */
.brand-logo { height: 48px; width: auto; }
.footer-logo { height: 54px; width: auto; filter: brightness(0) invert(1); }  /* SVG escuro -> branco */

.section-lead { max-width: 640px; margin: 0 auto 1rem; color: var(--muted); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.6rem; }
.blog-card { background: var(--white); border: 1px solid var(--sage-100); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .7rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-tag { align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-vivid-600); background: var(--sage-100); padding: .3rem .7rem; border-radius: 999px; }
.blog-card h3 { font-size: 1.1rem; }
.blog-card p { color: var(--muted); margin: 0; flex: 1; }
.blog-soon { font-size: .8rem; font-weight: 600; color: var(--muted); }

/* WhatsApp float (agora é <button>) */
.wa-float { border: 0; padding: 0; cursor: pointer; font-family: var(--font-body); }
.wa-float-label { display: none; }

/* Modal WhatsApp */
.wa-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.wa-modal.open { display: flex; }
.wa-overlay { position: absolute; inset: 0; background: rgba(8,30,18,.62); backdrop-filter: blur(3px); animation: waFade .25s ease; }
.wa-dialog { position: relative; width: 100%; max-width: 440px; background: var(--sage-50); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); animation: waPop .3s var(--ease); }
.wa-head { background: linear-gradient(135deg, var(--brand-dark), #0C3216); color: #fff; padding: 1.4rem 1.5rem; display: flex; align-items: flex-start; gap: .8rem; }
.wa-head-icon { background: var(--brand-vivid); color: #04210F; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-head h3 { color: #fff; font-size: 1.05rem; line-height: 1.3; flex: 1; }
.wa-x { background: none; border: 0; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; opacity: .8; padding: 0 .2rem; }
.wa-x:hover { opacity: 1; }
.wa-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.wa-field { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--brand-dark); }
.wa-field .req { color: #C2410C; margin-left: 2px; }
.wa-field input, .wa-field select { font-family: var(--font-body); font-size: 1rem; padding: .75rem .9rem; border: 1.5px solid var(--sage-200); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.wa-field input:focus, .wa-field select:focus { outline: none; border-color: var(--brand-vivid); box-shadow: 0 0 0 3px rgba(28,184,50,.16); }
.wa-phone { display: flex; align-items: center; gap: .5rem; }
.wa-flag { font-size: 1.3rem; padding: .42rem .5rem; background: #fff; border: 1.5px solid var(--sage-200); border-radius: 10px; line-height: 1; }
.wa-phone input { flex: 1; }
.wa-submit { width: 100%; margin-top: .3rem; }
.wa-note { font-size: .78rem; color: var(--muted); text-align: center; margin: 0; }
@keyframes waFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes waPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 940px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .blog-grid { grid-template-columns: 1fr; } }
