/* assets/css/components.css — consolidated shared site styles */

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('/assets/fonts/barlow-condensed-700-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/assets/fonts/barlow-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 600;
  font-display: optional;
  src: url('/assets/fonts/barlow-600-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: optional;
  src: url('/assets/fonts/dm-sans-400-500-latin.woff2') format('woff2');
}

:root {
  --color-primary: #1A2C4E;
  --color-secondary: #C0231E;
  --color-accent: #E8E0D0;
  --color-surface: #F5F4F2;
  --color-dark: #111111;
  --color-text: #2E2E2E;
  --color-muted: #6B6B6B;
  --color-white: #FFFFFF;
  --font-heading: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'DM Sans', Arial, sans-serif;
  --font-accent: 'Barlow', Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --max-width: 100%;
  --margin-wide: 90px;
  --margin-section: 120px;
  --margin-block: 64px;
  --margin-element: 32px;
  --margin-tight: 16px;
  --nav-height: 104px;
  --radius-card: 8px;
  --radius-btn: 4px;
  --shadow-card: 0 2px 20px rgba(26, 44, 78, 0.08);
  --shadow-btn: 0 2px 8px rgba(192, 35, 30, 0.20);
  --transition-base: 200ms ease;
  --transition-slow: 400ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: var(--margin-tight);
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-4xl); }
h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }
p { margin-bottom: var(--margin-tight); }
a { color: var(--color-primary); text-decoration: none; transition: opacity var(--transition-base); }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--margin-wide);
}

.section { padding-block: var(--margin-section); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 768px) {
  :root {
    --margin-section: 72px;
    --margin-wide: 24px;
    --nav-height: 64px;
    --text-6xl: 2.75rem;
  }
}

/* ══════════════════════════════════════
   TOP INFO BAR
   ══════════════════════════════════════ */
.site-nav-wrapper {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.nav-topbar {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  height: 40px;
}

.nav-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--margin-wide);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  transition: color var(--transition-base);
}

a.topbar-item:hover {
  color: var(--color-secondary);
}

@media (max-width: 768px) {
  .nav-topbar { display: none; }
}

/* ══════════════════════════════════════
   MAIN NAV BAR
   ══════════════════════════════════════ */
.site-nav {
  width: 100%;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 300ms ease;
}

.site-nav.scrolled {
  box-shadow: 0 4px 20px rgba(26, 44, 78, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--margin-wide);
}

/* Logo lockup: icon square + text */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-dark);
  text-decoration: none;
}

.nav-logo-img {
  height: clamp(38px, 4vw, 48px);
  width: auto;
  display: block;
}

/* Footer Logo Styling */
.footer-logo-img {
  height: clamp(45px, 5vw, 55px);
  width: auto;
  display: block;
  margin-bottom: 24px;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-dark);
  font-weight: 500;
  font-size: var(--text-sm);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-base);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width var(--transition-base);
}

.nav-links a:hover {
  color: var(--color-secondary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-secondary);
  font-weight: 600;
}

/* ══════════════════════════════════════
   SERVICES DROPDOWN
   ══════════════════════════════════════ */
.nav-dropdown-parent {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-chevron {
  transition: transform var(--transition-base);
}

.nav-dropdown-parent:hover .nav-dropdown-chevron {
  transform: rotate(180deg);
}

/* Bridge element — prevents hover gap between trigger and dropdown */
.nav-dropdown-parent::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 16px;
  display: none;
}

.nav-dropdown-parent:hover::after {
  display: block;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 320px;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(26, 44, 78, 0.16), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 200;
}

/* Red accent line at top */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 0 0 3px 3px;
}

.nav-dropdown-parent:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  transition: background var(--transition-base);
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: var(--color-surface);
}

.nav-dropdown-item.active {
  background: rgba(192, 35, 30, 0.05);
}

/* Reset pseudo-element underline for dropdown items */
.nav-dropdown-item::after {
  display: none !important;
}

.nav-dropdown-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--color-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background var(--transition-base), color var(--transition-base);
}

.nav-dropdown-item:hover .nav-dropdown-icon {
  background: var(--color-primary);
  color: var(--color-white);
}

.nav-dropdown-item.nav-dropdown-main .nav-dropdown-icon {
  background: var(--color-primary);
  color: var(--color-white);
}

.nav-dropdown-title {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-dark);
  line-height: 1.3;
}

.nav-dropdown-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 4px 16px;
}

/* ── Mobile Dropdown ── */
.mobile-dropdown-toggle {
  background: none;
  border: none;
  color: var(--color-dark);
  font-size: var(--text-lg);
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  width: 100%;
}

.mobile-dropdown-toggle .nav-dropdown-chevron {
  transition: transform var(--transition-base);
  margin-left: auto;
}

.mobile-dropdown-toggle.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.mobile-dropdown-items {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
  padding: 0;
}

.mobile-dropdown-items.open {
  max-height: 200px;
  padding: 12px 0 0 16px;
}

.mobile-dropdown-items li { margin-bottom: 16px; }
.mobile-dropdown-items a {
  color: var(--color-muted);
  font-size: var(--text-base);
  font-weight: 500;
  transition: color var(--transition-base);
}
.mobile-dropdown-items a:hover,
.mobile-dropdown-items a.active {
  color: var(--color-secondary);
}

/* CTA Button — Red accent like inspiration */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding-inline: 28px;
  background: var(--color-secondary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: background var(--transition-base), transform 150ms ease;
}

.nav-cta:hover {
  background: #a01d19;
  transform: translateY(-1px);
  color: white;
  opacity: 1;
}

/* btn-primary stays navy */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding-inline: 32px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: background var(--transition-base), transform 150ms ease;
}

.btn-primary:hover { background: #243d6b; transform: translateY(-1px); color: white; opacity: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding-inline: 32px;
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: background var(--transition-base), color var(--transition-base);
}

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-primary);
  opacity: 1;
}

.btn-secondary.dark-text {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary.dark-text:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ══════════════════════════════════════
   MOBILE NAV
   ══════════════════════════════════════ */
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--color-dark); }
.mobile-drawer { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-menu-toggle { display: block; }
  .mobile-drawer {
    position: fixed;
    top: calc(var(--nav-height));
    left: 0;
    width: 100%;
    background: white;
    padding: var(--margin-wide);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 300ms ease;
    z-index: 99;
  }
  .mobile-drawer.open { transform: translateY(0); opacity: 1; display: block; }
  .nav-links-mobile { list-style: none; display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
  .nav-links-mobile a { color: var(--color-dark); font-size: var(--text-lg); font-weight: 500; }
  .nav-links-mobile a.active { color: var(--color-secondary); font-weight: 600; }
  .nav-cta-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    background: var(--color-secondary);
    color: white;
    border-radius: var(--radius-btn);
    font-weight: 600;
  }
}

/* Hero Section — styles now defined per-page inline */

/* Trust Bar */
.trust-bar { background: var(--color-primary); color: var(--color-white); padding-block: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.trust-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-family: var(--font-accent); }
.trust-icon { color: var(--color-secondary); font-weight: bold; }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--margin-element); }
.service-card {
  background: var(--color-white);
  padding: 0;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(26, 44, 78, 0.12);
}
.service-icon { width: 48px; height: 48px; background: var(--color-surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; color: var(--color-primary); }

@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* Dark Section */
.section-dark { background: var(--color-primary); color: var(--color-white); }
.section-dark h2 { color: var(--color-white); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--margin-element); }
@media (max-width: 900px) { .features-grid { grid-template-columns: 1fr; gap: var(--margin-block); } }

/* Pledge Strip */
.pledge-strip { background: var(--color-surface); text-align: center; display: flex; flex-direction: column; align-items: center; }
.pledge-list { list-style: none; font-size: var(--text-2xl); font-family: var(--font-heading); color: var(--color-primary); margin-block: var(--margin-block); display: flex; flex-direction: column; gap: var(--margin-tight); }

/* Footer Redesign */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--margin-block);
}

.footer-col .footer-logo {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: var(--text-2xl);
  margin-bottom: var(--margin-tight);
}

.footer-col .footer-desc {
  color: var(--color-muted);
  margin-bottom: var(--margin-element);
  max-width: 400px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: var(--text-xl);
  margin-bottom: var(--margin-element);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a, .footer-col address p a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-col ul a:hover, .footer-col address p a:hover {
  color: var(--color-secondary);
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-dark);
}

.credentials-list strong {
  font-family: var(--font-accent);
  color: var(--color-primary);
}

.footer-col address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--color-muted);
}

.footer-bottom {
  margin-top: var(--margin-block);
  padding-top: var(--margin-element);
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--margin-block);
  }
}
