/*
Theme Name: Veritas Crest
Theme URI: https://veritascrest.com
Author: Veritas Crest Financial Group
Author URI: https://veritascrest.com
Description: Authoritative USA Mortgage, PMI, and Property Insurance Educational Theme. Built to exact 1:1 parity with the Veritas Crest interactive portal, featuring all 10 editorial guides, statutory HPA 1998 PMI cancellation models, dwelling replacement cost calculators, and RESPA escrow synergy architectures.
Version: 2.5.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: MIT
Text Domain: veritas-crest
*/


/* ==========================================================================
   Universal Rules & XML Namespace Handling for Direct Browser Rendering
   ========================================================================== */
b:skin, b:template-skin, b:include {
  display: none !important;
}
b:section, b:widget, b:includable, b:if, b:else, b:loop {
  display: block;
}

/* ==========================================================================
   Veritas Crest Design System - CSS Core
   Palette: Celestial Slate (#050814, #0a1026) | Frosted Glass | Editorial Typography
   ========================================================================== */

:root {
  --bg-primary: #050814;
  --bg-secondary: #0a1026;
  --bg-card: rgba(18, 26, 47, 0.75);
  --bg-card-hover: rgba(26, 38, 68, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(59, 130, 246, 0.4);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, .font-serif {
  font-family: var(--font-serif);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.glass-panel-card {
  background: rgba(10, 16, 38, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9 !important;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Top Emergency & Compliance Bar */
.top-compliance-bar {
  background: rgba(5, 8, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.top-compliance-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #34d399;
  display: inline-block;
  margin-right: 6px;
  animation: pulseAnim 2s infinite;
}
@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-emblem {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #312e81);
  border: 1px solid rgba(96, 165, 250, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}
.brand-tagline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover, .site-nav .active {
  color: #ffffff;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 8px;
  margin-top: 8px;
  background: rgba(10, 16, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.nav-dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: rgba(37, 99, 235, 0.12);
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 10;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 48px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-title span {
  font-style: italic;
  font-weight: 400;
  color: #93c5fd;
}
.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.hero-visual img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.hero-overlay-card {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 16px;
  background: rgba(10, 16, 38, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Category Cards Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.category-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.category-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}
.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* Interactive Calculators */
.calc-container {
  padding: 36px;
  border-radius: 20px;
  margin: 60px 0;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
}
.calc-input-group {
  margin-bottom: 20px;
}
.calc-input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}
.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  -webkit-appearance: none;
  accent-color: #3b82f6;
  cursor: pointer;
}
.calc-select, .calc-input-text {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(10, 16, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  outline: none;
}
.calc-select:focus, .calc-input-text:focus {
  border-color: #3b82f6;
}
.btn-toggle-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.btn-toggle {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(10, 16, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.15s ease;
}
.btn-toggle.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #93c5fd;
}

/* Calculator Results Box */
.calc-result-box {
  background: rgba(10, 16, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calc-breakdown-bar {
  height: 12px;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: #1e293b;
  margin: 16px 0;
}

/* Accordion FAQs */
.faq-item {
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(10, 16, 38, 0.7);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-answer {
  padding: 0 24px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  display: none;
}
.faq-item.open .faq-answer {
  display: block;
}

/* Table of Contents & Tables */
.editorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}
.editorial-table th {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.editorial-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #02040a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 64px 0 32px;
  margin-top: auto;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 13px;
}
.footer-col a:hover {
  color: #ffffff;
}
.footer-disclaimer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  .site-nav {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .btn-toggle-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

