/* assets/css/style.css - Viva Saúde Gama Modern Styles */

:root {
  --viva-blue-50: #f0f9ff;
  --viva-blue-100: #e0f2fe;
  --viva-blue-500: #0284c7;
  --viva-blue-600: #0369a1;
  --viva-blue-700: #075985;
  --viva-green-50: #f0fdf4;
  --viva-green-500: #22c55e;
  --viva-green-600: #16a34a;
  --viva-green-700: #15803d;
  --viva-navy: #0f172a;
  --viva-slate: #334155;
  --viva-light-border: rgba(226, 232, 240, 0.9);
}

html, body {
  overflow-x: clip;
  max-width: 100%;
}

html {
  scroll-behavior: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 132, 199, 0.35) transparent;
}

/* Scrollbar customizada ultra-fina, translúcida e com as cores da Viva+ Saúde */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.3) 0%, rgba(22, 163, 74, 0.38) 100%);
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: background 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.78) 0%, rgba(22, 163, 74, 0.85) 100%);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
}

/* Font helper */
.font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* Header container */
.site-header {
  position: relative;
  width: 100%;
  z-index: 1000;
}

/* Floating Navigation Pill */
.floating-navbar-container {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-navbar-pill {
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 36px -4px rgba(15, 23, 42, 0.08), 0 4px 14px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrolled sticky state for floating navbar */
.floating-navbar-container.is-sticky {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1050;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.floating-navbar-container.is-sticky .floating-navbar-pill {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px -6px rgba(15, 23, 42, 0.12), 0 6px 18px -3px rgba(0, 0, 0, 0.06);
  border-color: rgba(203, 213, 225, 0.85);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Nav links styling */
.nav-link-item {
  position: relative;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.93rem;
  color: #334155;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  transition: color 0.18s ease, background-color 0.18s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-link-item:hover {
  color: #0284c7;
  background-color: #f1f5f9;
}

.nav-link-item.active {
  color: #0369a1;
  background-color: #e0f2fe;
}

/* Animated Pulse for WhatsApp */
.pulse-badge {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}

.pulse-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.pulse-badge .pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Gradient CTA Button - matching reference mockup */
.btn-cta-viva {
  background: linear-gradient(135deg, #10b981 0%, #16a34a 100%);
  color: #ffffff !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-cta-viva:hover {
  background: linear-gradient(135deg, #059669 0%, #15803d 100%);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
  transform: translateY(-1px);
}

.btn-cta-viva:active {
  transform: translateY(1px);
}

.btn-cta-viva::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
  transform: skewX(-25deg);
  transition: all 0.75s ease;
}

.btn-cta-viva:hover::before {
  left: 125%;
}

/* Topbar Badges */
.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background-color: rgba(2, 132, 199, 0.08);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.15);
  transition: all 0.2s ease;
}

.topbar-badge-green {
  background-color: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.2);
}

.topbar-badge:hover {
  background-color: rgba(2, 132, 199, 0.14);
}

.topbar-badge-green:hover {
  background-color: rgba(34, 197, 94, 0.18);
}

/* Mobile Drawer */
.mobile-nav-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.is-open {
  transform: translateY(0);
}

/* =========================================================
   Mega-Menu Especialidades (3 Colunas Compacto & Moderno)
   ========================================================= */
.mega-menu-wrapper {
  position: static;
}

.mega-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(580px, calc(100vw - 2rem));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.15rem;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.14), 0 6px 18px -6px rgba(2, 132, 199, 0.1);
  z-index: 1080;
  display: none;
  opacity: 0;
  transform-origin: top center;
}

.mega-menu-panel.is-visible {
  display: block;
}

.mega-menu-panel--servicos {
  width: min(630px, calc(100vw - 2rem));
}

/* Ponte invisível para evitar fechamento ao mover o cursor */
.mega-menu-panel::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

/* Grid explícito de 3 colunas compacto */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.6rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: #334155;
  transition: background-color 0.15s ease, color 0.15s ease;
  background: transparent;
}

.mega-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mega-menu-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.42rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  background: #f8fafc;
  color: #64748b;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-menu-item:hover .mega-menu-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.mega-menu-arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #94a3b8;
  font-size: 0.65rem;
}

.mega-menu-item:hover .mega-menu-arrow {
  opacity: 1;
}

.mega-menu-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.42rem 0.65rem;
  border-radius: 0.6rem;
  background: #f0fdf4;
  color: #15803d;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-menu-cta-card:hover {
  background: #dcfce7;
  color: #166534;
}

/* Mobile Accordion Grid (2 colunas no celular) */
.mobile-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

/* =========================================================
   Footer Claro, Compacto & Moderno
   ========================================================= */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f0f9ff 65%, #e6f6fe 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 1.15fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

@media (max-width: 639px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-link:hover {
  color: #0284c7;
  transform: translateX(2px);
}



/* ==========================================================================
   PÁGINAS INDIVIDUAIS DE ESPECIALIDADES (/cardiologia, /psicologia, etc.)
   ========================================================================== */
.spec-page-shell {
  font-family: 'DM Sans', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.spec-hero-banner {
  background: radial-gradient(circle at 12% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 88% 30%, rgba(22, 163, 74, 0.09) 0%, transparent 50%),
              linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.spec-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .spec-page-grid {
    grid-template-columns: minmax(0, 1fr) 365px;
    gap: 2rem;
    align-items: stretch;
  }
}

.spec-sticky-aside {
  position: relative;
}

.spec-sticky-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 1.35rem;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.14), 0 4px 12px -4px rgba(2, 132, 199, 0.06);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .spec-sticky-card {
    position: sticky;
    top: 96px;
  }
}

.spec-photo-card {
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 12px 30px -15px rgba(15, 23, 42, 0.12);
}

.spec-checklist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .spec-checklist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.spec-exams-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .spec-exams-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.spec-related-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .spec-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .spec-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.spec-faq-item {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1rem;
  background: #ffffff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.spec-faq-item.is-open {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 20px -12px rgba(2, 132, 199, 0.16);
}

.spec-faq-chevron {
  transition: transform 0.25s ease;
}

.spec-faq-item.is-open .spec-faq-chevron {
  transform: rotate(180deg);
}

.spec-period-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: all 0.2s ease;
}

.spec-period-btn:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
  color: #0369a1;
}

.spec-period-btn.is-active {
  border-color: #16a34a;
  background: #ecfdf5;
  color: #15803d;
  font-weight: 600;
}
