/* ==========================================================================
   Clearview Geographic — home.css
   Single source of truth for all homepage styles.
   No duplicate or conflicting rules with index.html inline styles.
   ========================================================================== */

:root {
  --primary-blue: #1a365d;
  --primary-blue2: #1e3c72;
  --accent-green: #10b981;
  --dark-bg: #0f172a;
  --light-bg: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

/* =========================================================================
   Reset & Base
   ========================================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: #ffffff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-green);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 10px 16px;
  background: var(--primary-blue);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* =========================================================================
   CVG Global Nav
   ========================================================================= */

#cvg-global-nav {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 9999;
}

#cvg-global-nav .nav-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cvg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 800;
}

.cvg-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

#cvg-global-nav a,
#cvg-global-nav button {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#cvg-global-nav a:hover,
#cvg-global-nav button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cvg-more {
  position: relative;
}

#cvg-dropdown {
  max-height: 70vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cvg-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: white;
  min-width: 980px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  padding: 10px;
  z-index: 10000;
}

.cvg-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 10px;
  padding: 6px;
}

.cvg-dropdown-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.cvg-dropdown-title {
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  color: #0f172a;
  margin: 4px 6px 10px;
}

.cvg-menu-link {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  color: #1e293b !important;
  background: transparent !important;
  text-decoration: none;
  border-radius: 10px;
}

.cvg-menu-link:hover {
  background: rgba(26, 54, 93, 0.08) !important;
}

.cvg-menu-title {
  display: block;
  font-weight: 900;
}

.cvg-menu-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

/* =========================================================================
   Trust Banner
   ========================================================================= */

.trust-banner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  border-bottom: none;
}

/* =========================================================================
   Site Nav  — DARK gradient to match the dark hero
   ========================================================================= */

.site-nav {
  background: linear-gradient(135deg, #1e293b, #334155);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}

/* Logo */
.site-nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;               /* white on dark nav */
  text-decoration: none;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease;
}

.site-nav .logo:hover {
  opacity: 0.9;
}

.logo-image {
  max-width: 50px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover .logo-image {
  transform: scale(1.05);
}

/* Mobile toggle */
.site-nav .nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.site-nav .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Nav links */
.site-nav .nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

/* All nav links — white on dark nav (no higher-specificity conflicts) */
.site-nav .nav-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 0.97rem;
}

.site-nav .nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* CTA button in nav */
.site-nav .nav-links .cta-btn,
.site-nav .cta-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: white !important;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.site-nav .nav-links .cta-btn:hover,
.site-nav .cta-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55) !important;
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  background: radial-gradient(
      900px 520px at 15% 10%,
      rgba(16, 185, 129, 0.25),
      transparent 60%
    ),
    linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.2rem;
  text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  max-width: 780px;
  margin: 0 auto 2rem;
  opacity: 0.92;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease;
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================================================================
   Buttons — used across hero, contact, etc.
   ========================================================================= */

.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Primary — green gradient */
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.7s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.45);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Secondary — transparent, white border (for dark backgrounds) */
.btn-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: white;
  color: white;
  transform: translateY(-3px);
}

/* Outline — transparent, white border (for dark backgrounds) */
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: white;
  transform: translateY(-3px);
}

/* =========================================================================
   Content Sections
   ========================================================================= */

.section {
  padding: 5rem 0;
}

.section--light {
  background: var(--light-bg);
}

.section--white {
  background: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 920px;
  margin: 0 auto;
}

/* =========================================================================
   Steps (How It Works)
   ========================================================================= */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-top: 5px solid var(--accent-green);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  color: var(--text);
}

.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 0.6rem;
}

/* =========================================================================
   Stats
   ========================================================================= */

.stats {
  background: var(--light-bg);
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

/* White cards for each stat */
.stats-grid > div {
  background: white;
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #3b82f6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text);
}

.stats-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 0.75rem;
  display: block;
  font-size: 1.05rem;
}

.stats-grid > div > p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* =========================================================================
   Services
   ========================================================================= */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  border: 2px solid var(--border);
  border-top: 5px solid var(--accent-green);
  padding: 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: var(--text);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
}

.service-card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.7rem;
  font-weight: 800;
  font-size: 1.15rem;
  padding-left: 1.6rem;
  position: relative;
}

.service-card h3::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-size: 0.9rem;
  top: 2px;
}

.service-card strong {
  display: block;
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

/* =========================================================================
   Portal Cards
   ========================================================================= */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.portal-card {
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary-blue);
  border-radius: 14px;
  padding: 1.8rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
}

.portal-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 0.6rem;
}

.portal-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* =========================================================================
   FAQ
   ========================================================================= */

.faq {
  max-width: 980px;
  margin: 0 auto;
}

.faq details {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--text);
}

.faq details + details {
  margin-top: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary-blue);
  font-size: 1rem;
  padding-right: 1rem;
  user-select: none;
}

.faq details[open] summary {
  margin-bottom: 0.5rem;
}

.faq details p {
  margin-top: 10px;
  color: #475569;
  line-height: 1.65;
}

/* =========================================================================
   Contact CTA section
   ========================================================================= */

.contact {
  background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.contact a {
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.contact-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
}

.contact-lead {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  color: white;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-footnote {
  margin-top: 2rem;
  opacity: 0.72;
  font-size: 0.9rem;
  color: white;
}

/* =========================================================================
   Footer
   ========================================================================= */

footer {
  background: var(--dark-bg);
  color: #94a3b8;
  padding: 60px 2rem 28px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}

.footer-section h4 {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
  border-bottom: 2px solid #334155;
  padding-bottom: 10px;
}

.footer-section a {
  color: #94a3b8;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: #e2e8f0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p + p {
  margin-top: 6px;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 980px) {
  .cvg-dropdown {
    min-width: 92vw;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .cvg-dropdown-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3.8rem 0;
  }

  /* Show toggle on mobile */
  .site-nav .nav-toggle {
    display: inline-flex;
  }

  /* Mobile nav: hidden by default, revealed by JS when .active added */
  .site-nav .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    gap: 4px;
    z-index: 999;
  }

  .site-nav .nav-links.active {
    display: flex;
  }

  .site-nav .nav-links a {
    padding: 10px 14px;
    width: 100%;
    text-align: left;
    border-radius: 8px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .contact-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* =========================================================================
   Reduced Motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
