/* ============================================
   Psicóloga Ivina Rabelo — Global Stylesheet
   ============================================ */

/* --- Base Reset & Defaults --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; overscroll-behavior: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* --- Sacramento Script & Editorial Typography --- */
.font-sacramento, .display-script {
  font-family: 'Sacramento', cursive !important;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Main section & hero titles use Sacramento */
h1:not(article h1), h2:not(article h2):not(.blog-content h2), .font-display-hero, .font-headline-lg, .font-headline-md {
  font-family: 'Sacramento', cursive !important;
  color: #364455;
}

/* Card titles, subtitles & component headings use Playfair Display (font anterior) */
h3, h4, h5, h6, .font-headline-sm, .font-title-editorial {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: #364455;
}

/* --- Theme Palette Overrides — Ultra Pure & Airy (#f9fbfe + #fffcf1 + Light Header) ---
   Base Canvas BG: #f9fbfe (Pure Light Wash — 2 Tones Lighter)
   Breathing Cards & Surfaces: #fffcf1 (Warm Cream)
   Section Alternate: #f2f6fa (Soft Air Wash)
   Header BG: rgba(255, 255, 255, 0.98) (4 Tones Lighter)
   Primary Text & Headings: #364455 (Deep Slate Blue)
   Secondary Text: #455875
*/
:root {
  --color-primary: #364455;
  --color-secondary: #455875;
  --color-bg-site: #f9fbfe;
  --color-bg-cream: #fffcf1;
  --color-bg-subtle: #f2f6fa;
  --color-text-main: #364455;
  --color-text-subtle: #455875;
  --color-border-light: rgba(54, 68, 85, 0.05);
}

body { 
  background-color: #f9fbfe !important; 
  color: #364455 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  line-height: 1.8;
}

/* Extra Spacious Breathing Room Between Dobras */
section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  section {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

header.fixed { 
  background-color: rgba(249, 251, 254, 0.92) !important; 
  border-bottom: 1px solid rgba(54, 68, 85, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02) !important;
}

header.fixed > div {
  height: 6rem; /* 96px height - Increased header size */
}

/* Ensure article content headers inside pages remain completely transparent */
header:not(.fixed),
header.mb-8,
article header,
.article-header {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

main { background-color: #f9fbfe !important; }

/* Dobras and Surfaces */
.bg-surface-cream, [class*="bg-surface-cream"] { 
  background-color: #f9fbfe !important; 
}

.bg-surface-subtle, [class*="bg-surface-subtle"] { 
  background-color: #f2f6fa !important; 
}

/* Cards & Respiro Containers in #fffcf1 */
.card, 
.bg-surface-container,
[class*="bg-surface-container"],
.author-box,
.toc,
.faq-item {
  background-color: #fffcf1;
  border: 1px solid rgba(54, 68, 85, 0.08);
  border-radius: 1rem;
  box-shadow: 0 10px 35px rgba(54, 68, 85, 0.04);
}

/* Headings */
h1, h2, h3, h4, .display-script {
  color: #364455 !important;
}

/* Buttons */
.btn-primary, button.bg-primary, a.bg-primary {
  background-color: #364455 !important;
  color: #fffcf1 !important;
  border: 1px solid #364455 !important;
  border-radius: 0.375rem;
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background-color: #263342 !important;
  box-shadow: 0 4px 14px rgba(54, 68, 85, 0.2);
}

.btn-outline {
  background-color: #fffcf1 !important;
  color: #364455 !important;
  border: 1px solid rgba(54, 68, 85, 0.3) !important;
  border-radius: 0.375rem;
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background-color: #364455 !important;
  color: #fffcf1 !important;
}

/* --- Dark Blue Footer (#364455) --- */
footer {
  background-color: #364455 !important;
  color: #fffcf1 !important;
  border-top: 1px solid #455875 !important;
}

footer h1, footer h2, footer h3, footer h4, footer .font-label-md, footer .text-text-deep {
  color: #fffcf1 !important;
  font-weight: 600 !important;
}

footer p, footer address, footer span, footer li, footer .font-body-sm, footer .font-caption, footer .text-secondary, footer .text-on-surface-variant, footer .text-outline {
  color: #e5eef6 !important;
}

footer a {
  color: #e5eef6 !important;
  transition: color 0.2s ease !important;
}

footer a:hover {
  color: #fffcf1 !important;
}

footer .font-title-editorial, footer a[href*="wa.me"] {
  color: #fffcf1 !important;
}

/* --- Scroll Reveal Animations --- */
.scroll-fade { 
  opacity: 0; 
  transform: translateY(16px);
  will-change: opacity, transform;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); 
}
.scroll-up { 
  opacity: 0; 
  transform: translateY(36px) scale(0.97); 
  will-change: opacity, transform;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); 
}
.scroll-left { 
  opacity: 0; 
  transform: translateX(-32px) scale(0.98); 
  will-change: opacity, transform;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); 
}
.scroll-right { 
  opacity: 0; 
  transform: translateX(32px) scale(0.98); 
  will-change: opacity, transform;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); 
}
.scroll-scale { 
  opacity: 0; 
  transform: scale(0.92) translateY(20px); 
  will-change: opacity, transform;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); 
}
.revealed { 
  opacity: 1 !important; 
  transform: translate(0, 0) scale(1) !important; 
}

@media (prefers-reduced-motion: reduce) {
  .scroll-fade, .scroll-up, .scroll-left, .scroll-right, .scroll-scale { 
    opacity: 1 !important; 
    transform: none !important; 
    transition: none !important; 
  }
}

/* --- Dark Blue Demand Cards --- */
.demand-card {
  background-color: #455875 !important;
  border: 1px solid rgba(69, 88, 117, 0.8) !important;
  color: #fffcf1 !important;
  transition: all 0.3s ease-out !important;
}
.demand-card:hover {
  background-color: #364455 !important;
  border-color: #364455 !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(54, 68, 85, 0.25);
}
.demand-card h3 {
  color: #fffcf1 !important;
}
.demand-card p {
  color: #e5eef6 !important;
  opacity: 0.95;
}
.demand-card div[class*="w-12"],
.demand-card div[class*="w-10"] {
  background-color: #fffcf1 !important;
  border-radius: 0.5rem;
}
.demand-card .material-symbols-outlined {
  color: #364455 !important;
}

/* --- FAQ Accordion --- */
.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-item.active .faq-content { max-height: 500px; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-item.active { background-color: #fffcf1 !important; }

/* --- LGPD Consent Bar --- */
#consent-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 252, 241, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e2ded2;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(30, 38, 49, 0.06);
  transform: translateY(0);
  transition: transform 0.4s ease;
}
#consent-bar.hidden { transform: translateY(110%); pointer-events: none; }
#consent-bar .consent-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#consent-bar p { font-size: 13px; color: #455875; line-height: 1.5; flex: 1; min-width: 250px; margin: 0; }
#consent-bar .consent-buttons { display: flex; gap: 0.75rem; flex-shrink: 0; }
#consent-bar button {
  padding: 0.5rem 1.25rem;
  border-radius: 0.125rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2ded2;
  transition: all 0.2s;
  min-height: 44px;
  min-width: 44px;
}
#consent-bar .btn-accept { background: #364455; color: #fffcf1; border-color: #364455; }
#consent-bar .btn-accept:hover { background: #202e3e; }
#consent-bar .btn-reject { background: transparent; color: #364455; }
#consent-bar .btn-reject:hover { background: #f7f4e9; }

/* --- Header Compact State --- */
header.compact { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; box-shadow: 0 2px 12px rgba(30,38,49,0.06); }

/* --- Breadcrumbs --- */
.breadcrumbs { font-size: 13px; color: #455875; }
.breadcrumbs a { color: #455875; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs a:hover { color: #364455; }
.breadcrumbs span { color: #74777d; }

/* --- Blog Author Box --- */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2ded2;
  border-radius: 0.25rem;
  margin-top: 2rem;
}
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .author-info h4 { font-family: 'Playfair Display', serif !important; font-size: 17px; color: #1e2631; margin: 0 0 0.25rem; }
.author-box .author-info p { font-size: 13px; color: #455875; line-height: 1.5; margin: 0; }

/* --- Table of Contents (Blog) --- */
.toc { background: #f8fafc; border: 1px solid #e2ded2; border-radius: 0.25rem; padding: 1.5rem; margin: 1.5rem 0 2rem; }
.toc h3 { font-family: 'Playfair Display', serif !important; font-size: 17px !important; line-height: 1.4 !important; color: #1e2631; margin: 0 0 0.75rem; }
.toc ol { padding-left: 1.25rem; margin: 0; }
.toc li { font-size: 14px; color: #455875; line-height: 1.8; }
.toc a { text-decoration: underline; text-underline-offset: 3px; }
.toc a:hover { color: #364455; }

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998 !important;
  background: rgba(30, 38, 49, 0.5);
  backdrop-filter: blur(4px);
}
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999 !important;
  width: 85%;
  max-width: 320px;
  background: #fffcf1;
  padding: 2rem 1.5rem;
  box-shadow: -8px 0 30px rgba(30, 38, 49, 0.15);
  overflow-y: auto;
}
.mobile-menu-panel a {
  display: block;
  padding: 0.875rem 0;
  font-size: 15px;
  font-weight: 500;
  color: #364455;
  border-bottom: 1px solid #e2ded2;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu-panel a:hover { color: #455875; }

/* --- Utility --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Services Header Nav Dropdown --- */
.nav-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -0.75rem;
  width: 270px;
  background-color: #fffcf1;
  border: 1px solid rgba(54, 68, 85, 0.12);
  border-radius: 0.85rem;
  box-shadow: 0 14px 35px rgba(30, 38, 49, 0.12);
  padding: 0.5rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}

.nav-dropdown-container:hover .nav-dropdown-menu,
.nav-dropdown-container:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 13.5px;
  font-weight: 500;
  color: #455875 !important;
  transition: all 0.2s ease !important;
  text-transform: none !important;
  border: none !important;
  line-height: 1.4;
}

.nav-dropdown-item:hover {
  background-color: #f2f6fa !important;
  color: #364455 !important;
  transform: translateX(3px);
}

.nav-dropdown-item .material-symbols-outlined {
  font-size: 19px;
  color: #364455;
  flex-shrink: 0;
}

.nav-dropdown-header {
  font-weight: 600 !important;
  color: #364455 !important;
  background-color: rgba(54, 68, 85, 0.04);
  border-bottom: 1px solid rgba(54, 68, 85, 0.08) !important;
  margin-bottom: 0.35rem;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* --- Floating WhatsApp Pulsing Button --- */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 22px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-float {
  position: fixed !important;
  bottom: 1.75rem !important;
  right: 1.75rem !important;
  z-index: 9999 !important;
  width: 62px !important;
  height: 62px !important;
  background-color: #25D366 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5) !important;
  animation: whatsapp-pulse 2s infinite !important;
  transition: transform 0.3s ease, background-color 0.3s ease !important;
  text-decoration: none !important;
}

.whatsapp-float:hover {
  transform: scale(1.14) !important;
  background-color: #20ba5a !important;
}

.whatsapp-float svg {
  width: 34px !important;
  height: 34px !important;
  fill: #ffffff !important;
}

/* --- Print --- */
@media print {
  header, footer, #consent-bar, .mobile-menu-overlay, .mobile-menu-panel, .whatsapp-float { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}


/* --- FAQ & Blog Titles (Playfair Display) --- */
.faq-item h2, .faq-item h3, .faq-item h4, .faq-question, .faq-title, article h1, article h2, article h3, article h4, article h5, article h6, .blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4, .prose h1, .prose h2, .prose h3, .prose h4, .blog-card h2, .blog-card h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* Material Symbols Icons must ALWAYS use Material Symbols Outlined font */
.material-symbols-outlined,
[class*="material-symbols"],
.faq-icon,
span.faq-icon,
span.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
}

/* All Blog subheadings (h1, h2, h3, h4, h5, h6) use Playfair Display */
article h1, article h2, article h3, article h4, article h5, article h6, .blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4, .prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'Playfair Display', Georgia, serif !important;
}
