:root {
  /* Brand Colors - First Responder Palette */
  --color-navy: #003366;       /* Primary Brand Color */
  --color-red: #CE2029;        /* Accent/Action Color */
  --color-white: #ffffff;
  --color-slate: #f4f4f4;      /* Content Backgrounds */
  --color-grey-light: #e0e0e0;
  --color-grey-medium: #cccccc;
  --color-text-main: #333333;  /* Dark Grey for Readability */
  --color-text-muted: #555555;
  --color-text-light: #ffffff; /* For text on dark backgrounds */

  /* Theme Defaults */
  --color-bg-body: var(--color-white);
  --color-bg-section: var(--color-slate);
  --color-bg-header: var(--color-navy);
  --color-bg-footer: #1a1a1a;
  --color-bg-card: var(--color-white);

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Merriweather', serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: 1.6;
}

p {
  margin-bottom: 1.5em;
  color: var(--color-text-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 1.75rem;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-full {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.section-grey {
  background-color: var(--color-bg-card);
}

.text-center {
  text-align: center;
}
.text-white {
  color: var(--color-white);
}
.text-red {
  color: var(--color-red);
}
.text-navy {
  color: var(--color-navy);
}

/* Header */
.site-header {
  background-color: var(--color-navy); /* UPDATED: Navy Background */
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-top {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  min-height: 80px;
}

.header-left {
  display: none;
}

.header-right {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.header-center {
  text-align: center;
  display: flex;
  justify-content: center;
}

/* Logo Typography */
.logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-decoration: none;
  color: var(--color-white);
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
}

.logo-subtitle {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.15em;
  margin-top: 0.2rem;
}

/* Divider */
.header-divider {
  height: 1px;
  background-color: rgba(255,255,255,0.1);
  width: 100%;
}

/* Navigation Links (Bottom Row) */
.header-bottom {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.main-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav-links a {
  display: block;
  color: var(--color-white);
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
  transition: all 0.3s ease;
}

.main-nav-links a:hover,
.main-nav-links a.active {
  color: var(--color-white);
  opacity: 1;
  text-decoration: none; /* Removed underline */
  background-color: rgba(255,255,255,0.1); /* Added subtle background on hover */
  border-radius: 4px;
}

/* Sections */
.section {
  padding: var(--spacing-lg) 0;
  background-color: var(--color-white);
}

.section-full {
  min-height: auto; 
  display: flex;
  align-items: center;
  justify-content: center; /* UPDATED: Center Vertically */
  text-align: center;      /* UPDATED: Center Text */
}

/* Hero Content Centering Fix */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.section-grey {
  background-color: var(--color-slate);
  border-top: 1px solid var(--color-grey-light);
  border-bottom: 1px solid var(--color-grey-light);
}

.text-center {
  text-align: center;
}
/* Text Colors */
.text-red { color: var(--color-red); }
.text-navy { color: var(--color-navy); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-text-muted); }

/* Base Buttons */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--color-red);
  color: var(--color-white);
  box-shadow: 0 4px 6px rgba(206, 32, 41, 0.3);
}

.btn-primary:hover {
  background-color: #a3001e;
  transform: translateY(-2px);
  color: var(--color-white);
  box-shadow: 0 6px 8px rgba(206, 32, 41, 0.4);
}

.btn-outline {
  background-color: var(--color-red);
  border: 2px solid var(--color-red);
  color: var(--color-white);
  box-shadow: 0 4px 6px rgba(206, 32, 41, 0.3);
}

.btn-outline.text-white {
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-outline.text-white:hover {
    background-color: #a3001e;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
  background-color: #a3001e;
  border-color: #a3001e;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(206, 32, 41, 0.4);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--color-bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--color-red);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--color-red);
}

/* Mobile */
@media (max-width: 900px) {
  .header-divider {
    display: none;
  }
  .mobile-menu-toggle {
    display: block !important;
  }
  .header-bottom {
    display: none; /* Hidden until toggled via active class */
    width: 100%;
    background-color: var(--color-navy);
  }
  .header-bottom.active {
    display: block;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .main-nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 1rem 1rem 1rem;
  }
  .main-nav-links > a, 
  .main-nav-links > .dropdown {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 0;
  }
  .main-nav-links a {
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
  }
  .dropdown .dropbtn {
    width: 100%;
    text-align: left;
  }
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: rgba(0,0,0,0.15);
    box-shadow: none;
    min-width: 100%;
    margin-top: 0;
    padding: 0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
  }
  .dropdown-content::before,
  .dropdown-content::after {
    display: none; /* Remove caret on mobile */
  }
  .dropdown-content a {
    color: var(--color-white) !important;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
  }
  .dropdown-content a:hover {
    background-color: transparent;
    padding-left: 1.5rem; /* Slight indent hover effect */
  }
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  .logo-title {
    font-size: 1.25rem;
  }
  .logo-subtitle {
    font-size: 0.65rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Dropdown Navigation - REFINED */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px); /* Center horizontally, offset vertically */
  background-color: var(--color-white);
  min-width: 240px;
  box-shadow: 0px 10px 25px rgba(0,0,0,0.2); /* Softer, deeper shadow */
  z-index: 1001;
  border-radius: 12px; /* Rounded Edges */
  padding: 0.5rem 0;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin-top: 12px; /* Spacing from menu */
}

/* Connect the hover gap so menu doesn't disappear */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

/* Caret / Carrot */
.dropdown-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--color-white) transparent;
}

.dropdown-content a {
  color: var(--color-text-main);
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.2s ease;
}

.dropdown-content a:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.dropdown-content a:last-child {
  border-bottom: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.dropdown-content a:hover {
  background-color: #f8f9fa;
  color: var(--color-navy);
  padding-left: 24px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropbtn::after {
  content: " ▾";
  font-size: 0.8em;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn::after {
    transform: rotate(180deg);
}

.dropdown:hover .dropbtn {
  color: var(--color-white);
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}
