/*
Theme Name: Dehart Alarm Systems
Theme URI: https://dehartsystems.com
Author: Moreno Collective
Author URI: https://morenocollective.com
Description: Custom WordPress theme for Dehart Alarm Systems - family-owned security company since 1967. Alarm systems, security cameras, and 24/7 monitoring for homes and businesses across Florida.
Version: 1.0.0
License: All Rights Reserved
Text Domain: dehart
*/

/* ══════════════════════════════════════════════════════════════
   GLOBAL STYLES
   Shared across all pages (reset, variables, nav, buttons,
   sections, footer, animations, responsive breakpoints)
   ══════════════════════════════════════════════════════════════ */

/* ── RESET & ROOT VARIABLES ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0f1b2d;
  --navy-light: #1a2a42;
  --yellow: #f5c518;
  --yellow-hover: #e6b800;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-100: #f1f3f5;
  --gray-200: #e2e5e9;
  --gray-400: #8b95a5;
  --gray-600: #5a6577;
  --gray-800: #2d3748;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
}

/* ── BASE STYLES ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* Inline content links (light backgrounds) */
.inline-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.inline-link:hover {
  color: var(--yellow-hover);
}

/* Inline content links (dark backgrounds) */
.section-navy .inline-link {
  color: var(--yellow);
}
.section-navy .inline-link:hover {
  color: var(--white);
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 24px; height: 72px;
}
.nav-logo {
  display: flex; align-items: center;
  padding: 12px 0;
  margin-right: 40px;
}
.nav-logo img {
  height: 32px; width: auto;
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--gray-600);
  transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--navy); }
.nav-links a.active,
.nav-dropdown-trigger.active {
  color: var(--navy); font-weight: 600;
  background: rgba(15, 27, 45, 0.06);
  border-radius: 8px;
  padding: 6px 12px;
  margin: -6px -12px;
}

/* ── NAV DROPDOWN ── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 500; color: var(--gray-600);
  background: none; border: none; cursor: pointer;
  transition: color 0.2s;
  padding: 0; font-family: inherit;
}
.nav-dropdown-trigger:hover { color: var(--navy); }
.nav-dropdown-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(15, 27, 45, 0.12), 0 2px 8px rgba(15, 27, 45, 0.06);
  padding: 8px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 10px;
  transition: background 0.15s ease;
  text-decoration: none;
}
.nav-dropdown-item:hover {
  background: var(--off-white);
}
.nav-dropdown-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.nav-dropdown-item-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 400;
}
.nav-actions {
  display: flex; align-items: center; gap: 16px;
  margin-left: auto;
}
.nav-phone {
  font-size: 15px; font-weight: 600; color: var(--navy);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.nav-phone svg { width: 16px; height: 16px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 50px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: none;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--yellow); color: var(--navy);
}
.btn-primary:hover { background: var(--yellow-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,197,24,0.4); }
.btn-outline {
  background: rgba(255,255,255,0.15); color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.25); }
.btn-dark {
  background: var(--navy); color: var(--white);
}
.btn-dark:hover { background: var(--navy-light); transform: translateY(-1px); }
.nav-cta { padding: 10px 24px; font-size: 14px; white-space: nowrap; }

/* ── MOBILE NAV TOGGLE ── */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-right: 16px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: all 0.3s; border-radius: 2px;
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-cta-block { display: none; }

/* ── SECTION SHARED ── */
.section { padding: 100px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--yellow);
  margin-bottom: 12px;
}
.section-navy .section-label { color: var(--yellow); }
.section-title {
  font-size: clamp(30px, 3.5vw, 42px); font-weight: 700;
  color: var(--navy); line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-navy .section-title { color: var(--white); }
.section-subtitle {
  font-size: 17px; color: var(--gray-600); margin-top: 12px;
  max-width: 540px; line-height: 1.7;
}
.section-navy .section-subtitle { color: rgba(255,255,255,0.7); }
.section-navy .split-content p { color: rgba(255,255,255,0.75); }
.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .section-subtitle { margin-left: auto; margin-right: auto; }
.section-navy { background: var(--navy); }
.section-gray { background: var(--off-white); }

/* ── FINAL CTA (reusable) ── */
.final-cta {
  text-align: center;
  padding: 100px 24px;
  background: var(--off-white);
}
.final-cta h2 {
  font-size: clamp(30px, 3.5vw, 42px); font-weight: 700;
  color: var(--navy); margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.final-cta p {
  font-size: 17px; color: var(--gray-600);
  max-width: 480px; margin: 0 auto 36px; line-height: 1.7;
}
.final-cta .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
.footer {
  background: var(--navy); padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .logo {
  display: flex; align-items: center; margin-bottom: 16px;
}
.footer-brand .logo img {
  height: 36px; width: auto;
}
.footer-brand p {
  font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.7;
  max-width: 280px;
}
.footer h4 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; font-size: 14px; color: rgba(255,255,255,0.7); }
.footer-links a {
  font-size: 14px; color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--yellow); }
.footer-bottom {
  max-width: 1200px; margin: 48px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p {
  font-size: 13px; color: rgba(255,255,255,0.35);
}
.footer-badges {
  display: flex; gap: 16px; align-items: center;
}
.footer-badge {
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.5);
  padding: 6px 12px; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ══════════════════════════════════════════════════════════════
   INTERIOR PAGE COMPONENTS
   ══════════════════════════════════════════════════════════════ */

/* ── PAGE HERO (shorter interior page hero) ── */
.page-hero {
  position: relative;
  padding: 140px 24px 80px;
  background: var(--navy);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
.page-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,27,45,0.88) 0%, rgba(15,27,45,0.6) 50%, rgba(15,27,45,0.4) 100%);
}
.page-hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(34px, 4.5vw, 52px); font-weight: 700;
  color: var(--white); line-height: 1.15;
  max-width: 600px; margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-hero p {
  font-size: 18px; color: rgba(255,255,255,0.8);
  max-width: 520px; line-height: 1.7;
}
.page-hero .hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.breadcrumb a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb .sep { font-size: 12px; }

/* ── FEATURE GRID ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-icon {
  width: 52px; height: 52px;
  background: rgba(245,197,24,0.12);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 26px; height: 26px; color: var(--yellow); }
.feature-card h3 {
  font-size: 18px; font-weight: 700; color: var(--navy);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 15px; color: var(--gray-600); line-height: 1.6;
}

/* ── STEPS ── */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step { text-align: center; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.step h3 {
  font-size: 18px; font-weight: 700; color: var(--navy);
  margin-bottom: 8px;
}
.step p {
  font-size: 15px; color: var(--gray-600); line-height: 1.6;
  max-width: 300px; margin: 0 auto;
}

/* ── SPLIT SECTION (image + content) ── */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: stretch;
}
.split-img {
  border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── WHY LIST (icon + text list items) ── */
.why-list { list-style: none; margin-top: 36px; }
.why-list li {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.why-list li:last-child { border-bottom: none; }
.why-icon {
  flex-shrink: 0; width: 44px; height: 44px;
  background: rgba(245,197,24,0.12); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.why-icon svg { width: 22px; height: 22px; color: var(--yellow); }
.why-text h4 {
  font-size: 16px; font-weight: 600; color: var(--navy);
  margin-bottom: 4px;
}
.why-text p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS (global components)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) and (min-width: 969px) {
  .nav-logo { margin-right: 24px; }
  .nav-links { gap: 20px; }
  .nav-links a,
  .nav-dropdown-trigger { font-size: 13px; }
  .nav-actions { gap: 12px; }
  .nav-phone { font-size: 13px; }
  .nav-cta { padding: 9px 18px; font-size: 13px; }
}

@media (max-width: 968px) {
  /* Nav */
  .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 82px; left: 16px; right: 16px;
    left: 16px; right: 16px;
    transform: translateY(-12px) scale(0.98) translateX(0);
    background: var(--white);
    padding: 0 0 12px 0;
    border-radius: var(--radius);
    box-shadow: 0 12px 48px rgba(15,27,45,0.15), 0 2px 8px rgba(15,27,45,0.06);
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
    pointer-events: auto;
  }
  .nav-inner { justify-content: space-between; }
  .nav-toggle { display: block; }
  .nav-actions { display: none; }

  /* Reset active pill style on mobile */
  .nav-links a.active,
  .nav-dropdown-trigger.active {
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }

  /* Mobile nav link items */
  .nav-links a:not(.mobile-cta-link):not(.mobile-cta-phone):not(.nav-dropdown-item) {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 24px;
    font-size: 15px; font-weight: 500; color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
  }
  .nav-links a:not(.mobile-cta-link):not(.mobile-cta-phone):not(.nav-dropdown-item):hover {
    background: var(--off-white);
  }

  /* Mobile dropdown */
  .nav-dropdown {
    width: 100%;
    border-bottom: 1px solid var(--gray-100);
    text-align: center;
  }
  .nav-dropdown-trigger {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 16px 24px;
    font-size: 15px; font-weight: 500; color: var(--gray-800);
  }
  .nav-dropdown-trigger.active {
    color: var(--navy); font-weight: 600;
  }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
    transform: none;
  }
  .nav-dropdown-card {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 12px 12px 12px;
    background: var(--off-white);
    min-width: unset;
  }
  .nav-dropdown-item {
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    align-items: center;
  }
  .nav-dropdown-item:hover {
    background: rgba(15, 27, 45, 0.04);
  }

  /* Mobile nav CTA card */
  .mobile-cta-block {
    display: block;
    background: var(--navy);
    padding: 24px 20px;
    text-align: center;
    margin: 4px 12px 0 12px;
    border-radius: var(--radius-sm);
  }
  .mobile-cta-block p {
    font-size: 14px; color: rgba(255,255,255,0.85);
    font-weight: 600;
    margin-bottom: 16px; line-height: 1.5;
  }
  .mobile-cta-block .mobile-cta-link {
    display: block;
    padding: 14px 32px;
    background: var(--yellow); color: var(--navy);
    font-size: 15px; font-weight: 700;
    border-radius: 50px;
    text-align: center;
    transition: all 0.2s ease;
  }
  .mobile-cta-block .mobile-cta-link:hover {
    background: var(--yellow-hover);
  }
  .mobile-cta-phone {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 14px;
    font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
  }
  .mobile-cta-phone:hover { color: var(--white); }
  .mobile-cta-phone svg { width: 15px; height: 15px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr 1fr; }

  /* Interior page components */
  .feature-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-img img { height: 280px; }
  .page-hero { padding: 120px 24px 60px; }
}

@media (max-width: 640px) {
  /* Sections */
  .section { padding: 72px 20px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .footer-badges { justify-content: center; }

  /* Final CTA */
  .final-cta .btn-group .btn { width: 100%; }

  /* Interior page components */
  .page-hero { padding: 100px 20px 48px; }
  .page-hero h1 { font-size: 40px; }
  .feature-grid { gap: 16px; }
  .feature-card { padding: 28px; }
  .final-cta { padding: 72px 20px; }
}

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   Common one-off overrides to replace inline styles
   ══════════════════════════════════════════════════════════════ */

/* Margin-top utilities */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }

/* Feature grid: 2-column variant */
.feature-grid--2col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 968px) {
  .feature-grid--2col { grid-template-columns: 1fr; }
}

/* Feature card as a link (removes default link styling) */
a.feature-card { text-decoration: none; color: inherit; }

/* Card link text (yellow arrow link inside feature cards) */
.card-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 12px; font-size: 14px; font-weight: 600;
  color: var(--yellow); text-decoration: none; transition: gap 0.2s;
}
.card-link:hover { gap: 8px; }

/* Button text (yellow CTA text inside cards) */
.btn-text {
  color: var(--yellow); font-weight: 600;
  margin-top: 12px; display: inline-block;
}

/* Multi-column list variant */
.app-features--columns {
  display: block; columns: 2; column-gap: 24px;
}
@media (max-width: 640px) {
  .app-features--columns { columns: 1; }
}

/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════════════ */

/* Screen-reader only (visually hidden but accessible) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus-visible styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.25);
}
.nav-links a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 0;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-delay-1, .reveal-delay-2, .reveal-delay-3 { transition-delay: 0s; }
}
