/**
 * PHM Tech — Home editorial 2026
 * Camada final deliberadamente isolada do histórico de experimentos da home.
 */

.phm-home-page .home-hero-v4 {
  position: relative;
  overflow: hidden;
  padding: clamp(2.4rem, 4.5vw, 4rem) 0 clamp(2rem, 3.5vw, 3.25rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 28rem),
    var(--bg);
}

.phm-home-page .home-hero-v4::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, #000 70%, transparent);
}

.home-hero-v4__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.home-hero-v4__copy { max-width: 760px; }

.home-hero-v4__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: 1.15rem;
  color: var(--teal);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.home-hero-v4__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.home-hero-v4__meta span + span { padding-left: 1rem; border-left: 1px solid var(--line-strong); color: var(--text-muted); }

.home-hero-v4 h1 {
  max-width: 14ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(2.35rem, 4.5vw, 3.95rem);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.055em;
}

.home-hero-v4 h1 em {
  display: block;
  color: var(--teal);
  font-style: normal;
}

.home-hero-v4__copy > p {
  max-width: 62ch;
  margin: 1.35rem 0 1.5rem;
  color: var(--text-soft);
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.68;
}

.home-hero-v4__feedback-link {
  color: var(--teal, #0f766e);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition);
}

.home-hero-v4__feedback-link:hover {
  color: var(--navy, #0f172a);
}

[data-theme="dark"] .home-hero-v4__feedback-link {
  color: var(--teal);
}

[data-theme="dark"] .home-hero-v4__feedback-link:hover {
  color: #38bdf8;
}

.home-hero-v4__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.home-hero-v4__actions .button,
.home-hero-v4__primary-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 1.35rem !important;
  min-height: 44px !important;
  border-radius: 4px !important;
  font-family: var(--font-body) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
  background: var(--navy, #0b1e3d) !important;
  color: #ffffff !important;
  border: 1px solid var(--navy, #0b1e3d) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

.home-hero-v4__actions .button:hover,
.home-hero-v4__primary-btn:hover {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
}

.home-hero-v4__primary-btn svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.2s ease;
}

.home-hero-v4__primary-btn:hover svg {
  transform: translateY(3px);
}

.home-hero-v4__text-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  padding: 0.65rem 1.15rem !important;
  min-height: 44px !important;
  border-radius: 4px !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  background: var(--surface, #ffffff) !important;
  color: var(--navy, #0b1e3d) !important;
  font-family: var(--font-body) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.home-hero-v4__text-link:hover {
  background: var(--surface-soft, #f1f5f9) !important;
  border-color: var(--navy, #0b1e3d) !important;
  color: var(--navy, #0b1e3d) !important;
}

.home-hero-v4__text-link svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488);
  transition: transform 0.2s ease;
}

.home-hero-v4__text-link:hover svg {
  transform: translateX(3px);
}

.home-hero-v4__map {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.home-hero-v4__map a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: .8rem;
  min-height: 76px;
  padding: .75rem .4rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: padding var(--transition), color var(--transition), background var(--transition);
}

.home-hero-v4__map a:hover {
  padding-inline: .85rem;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, transparent);
}

.home-hero-v4__map span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .68rem;
}

.home-hero-v4__map strong { font-family: var(--font-heading); font-size: 1.03rem; }
.home-hero-v4__map small { color: var(--text-muted); font-size: .72rem; text-align: right; }

/* ==========================================================================
   CARD DE SUSTENTABILIDADE & BIBLIOTECA VIRTUAL MARIA CELENY MACIEL
   ========================================================================== */
.home-hero-v4__support-card {
  position: relative;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line-strong, #cbd5e1);
  border-radius: 6px;
  padding: clamp(1.35rem, 2vw, 1.65rem);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-hero-v4__support-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.support-card__eyebrow {
  display: flex;
  align-items: center;
}

.support-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line-strong, #cbd5e1);
  border-radius: 4px;
  color: var(--teal, #0f766e);
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.support-card__title {
  margin: 0;
  color: var(--navy, #0f172a);
  font-family: var(--font-heading);
  font-size: clamp(1.18rem, 1.6vw, 1.38rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.support-card__text {
  margin: 0;
  color: var(--text-soft, #475569);
  font-size: 0.9rem;
  line-height: 1.62;
}

.support-card__text strong {
  color: var(--navy, #0f172a);
  font-weight: 700;
}

.support-card__pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.support-card__pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
}

.support-card__pill--free .pill-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.support-card__pill--support .pill-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  flex-shrink: 0;
}

.pill-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.pill-info strong {
  color: var(--navy, #0f172a);
  font-size: 0.76rem;
  font-weight: 700;
}

.pill-info small {
  color: var(--text-muted, #64748b);
  font-size: 0.69rem;
  font-weight: 600;
}

.support-card__action {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 0.35rem !important;
  padding: 0.62rem 0.95rem !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: var(--navy, #0b1e3d) !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  border-radius: 4px !important;
  font-family: var(--font-body);
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.support-card__action:hover {
  background: var(--navy, #0b1e3d) !important;
  color: #ffffff !important;
  border-color: var(--navy, #0b1e3d) !important;
  box-shadow: 0 4px 14px rgba(11, 30, 61, 0.2) !important;
}

.support-card__action svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}

.support-card__action:hover svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

.phm-home-page .home-projects-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0 5rem;
  background: var(--surface-soft);
}

.phm-home-page .home-section-heading {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.phm-home-page .home-section-title { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.045em; }
.phm-home-page .home-section-lead { max-width: 720px; margin: 0; }
.phm-home-page .home-search-wrapper { max-width: none; margin: 0 0 1.75rem; }
.phm-home-page .project-filters-row {
  margin-bottom: 2rem;
}

.phm-home-page .project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.phm-home-page .project-card {
  min-height: 210px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.phm-home-page .project-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

@media (max-width: 980px) {
  .home-hero-v4__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-hero-v4__map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero-v4__map a:nth-child(odd) { border-right: 1px solid var(--line-strong); }
  .phm-home-page .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .phm-home-page .home-hero-v4 { padding-top: 2rem; padding-bottom: 2rem; background: var(--bg); }
  .home-hero-v4__layout { gap: 1.75rem; }
  .home-hero-v4 h1 { font-size: clamp(2.1rem, 9.5vw, 3rem); }
  .home-hero-v4__meta span + span { padding-left: 0; border-left: 0; }
  .home-hero-v4__actions { align-items: stretch; flex-direction: column; }
  .home-hero-v4__actions .button { justify-content: center; }
  .home-hero-v4__text-link { justify-content: center; }
  .home-hero-v4__map { grid-template-columns: 1fr; }
  .home-hero-v4__map a:nth-child(odd) { border-right: 0; }
  .phm-home-page .home-section-heading { grid-template-columns: 1fr; gap: .75rem; }
  .phm-home-page .project-filters-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
  .phm-home-page .filter-pill-btn { flex: 0 0 auto; }
  .phm-home-page .project-grid { grid-template-columns: 1fr; }
}

/* Modo Escuro (Dark Mode) */
[data-theme="dark"] .home-hero-v4__actions .button,
[data-theme="dark"] .home-hero-v4__primary-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .home-hero-v4__actions .button:hover,
[data-theme="dark"] .home-hero-v4__primary-btn:hover {
  background: #0369a1 !important;
  border-color: #7dd3fc !important;
}

[data-theme="dark"] .home-hero-v4__text-link {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

[data-theme="dark"] .home-hero-v4__text-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .home-hero-v4__text-link svg {
  color: #38bdf8;
}

/* Dark mode para o card de sustentabilidade */
[data-theme="dark"] .home-hero-v4__support-card {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .home-hero-v4__support-card:hover {
  border-color: var(--teal);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .support-card__badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #2dd4bf;
}

[data-theme="dark"] .support-card__title {
  color: #f8fafc;
}

[data-theme="dark"] .support-card__text {
  color: #cbd5e1;
}

[data-theme="dark"] .support-card__text strong {
  color: #f8fafc;
}

[data-theme="dark"] .support-card__pill {
  background: #152037;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .pill-info strong {
  color: #f1f5f9;
}

[data-theme="dark"] .pill-info small {
  color: #94a3b8;
}

[data-theme="dark"] .support-card__action {
  background: #0f1a30 !important;
  color: #f1f5f9 !important;
  border: 1px solid #334e7a !important;
  box-shadow: none !important;
}

[data-theme="dark"] .support-card__action:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .support-card__action svg {
  color: #38bdf8 !important;
}

[data-theme="dark"] .support-card__action:hover svg {
  color: #ffffff !important;
}

/* Modo Sépia */
[data-theme="sepia"] .home-hero-v4__actions .button,
[data-theme="sepia"] .home-hero-v4__primary-btn {
  background: #78401a !important;
  color: #ffffff !important;
  border: 1px solid #78401a !important;
}

[data-theme="sepia"] .home-hero-v4__actions .button:hover,
[data-theme="sepia"] .home-hero-v4__primary-btn:hover {
  background: #5c3014 !important;
}

[data-theme="sepia"] .home-hero-v4__text-link {
  background: #eae1cf !important;
  color: #3c2817 !important;
  border: 1px solid #ded2bd !important;
}

[data-theme="sepia"] .home-hero-v4__text-link:hover {
  background: #ded2bd !important;
}

[data-theme="sepia"] .home-hero-v4__support-card {
  background: var(--surface);
  border-color: var(--editorial-rule-strong);
}

[data-theme="sepia"] .support-card__action {
  background: #eae1cf !important;
  color: #3c2817 !important;
  border: 1px solid #ded2bd !important;
}

[data-theme="sepia"] .support-card__action:hover {
  background: #78401a !important;
  color: #ffffff !important;
  border-color: #78401a !important;
}
