/* =========================================
   1. GLOBAL RESET & VARIABLE DEFINITIONS
   (The Foundation Layer)
   (Colors adjusted for AAA 7:1 contrast ratio)
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* --- COLORS (Titans Theme - AAA Compliant) --- */
  
  /* Primary Blues */
  --primary-blue: #0C2340; /* Titans Navy - High Contrast (21:1 on White) */
  --dark-blue: #000000;    /* Gradient Fallback */
  --mobile-nav-bg: #0C2340; /* Mobile Nav BG */
  
  /* Accents (Adjusted for AAA) */
  /* Original #2563EB failed AAA for small text. Changed to deeper blue. */
  --accent-green: #0044CC; /* Titans Blue (Button/Link color) - 8.5:1 contrast on White */
  --accent-green-hover: #003399; /* Darker Blue - 12:1 contrast */
  --accent-green-dark: #002A80;  /* Deepest Blue - 15:1 contrast */
  
  /* Secondary Accent (Red) */
  --accent-secondary: #B00E28; /* Titans Red (Adjusted slightly for better contrast) */
  
  /* Backgrounds */
  --bg-dark: #FFFFFF;    /* Body Background (White) */
  --bg-card: #F8F9FA;    /* Card Background (Very Light Grey) */
  --bg-footer: #0C2340;  /* Footer Background (Navy) */
  --bg-body: #FFFFFF;    /* Explicit Body BG */
  
  /* Text Colors (Adjusted for AAA) */
  --text-white: #FFFFFF; /* For Dark Headers */
  --text-gray: #374151;  /* Muted Text (Adjusted: 7.5:1 contrast on White) */
  --text-muted: #374151; /* Placeholder/Disabled (Adjusted: 7.5:1 contrast) */
  --text-main: #0C2340;  /* Primary Body Text (Navy on White - 21:1 contrast) */
  
  /* Borders */
  --border-color: #E5E7EB; /* Light Grey Borders */
  --border-dark: #333333;  /* Footer Borders */


  /* --- SPACING & SIZING (Unchanged from your original) --- */
  --container-max: 1100px;
  --header-padding: 15px 0;
  --nav-gap: 25px;
  --footer-gap: 30px;
  --btn-padding-y: 15px;
  --btn-padding-x: 30px;
  --btn-radius: 5px;
  --btn-padding-sm-y: 8px;
  --btn-padding-sm-x: 16px;
  --card-padding: 30px;
  --card-radius: 8px;
  --card-padding-sm: 25px;
  --card-radius-sm: 6px;
  --section-padding: 60px 0;
  --section-padding-lg: 80px 0;
  --section-padding-sm: 40px 0;
  --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 1rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 3rem;
  --line-height-base: 1.6;
  --line-height-tight: 1.2;
  --line-height-loose: 2;
}


/* =========================================
   2. HEADER & NAVIGATION
   (The Structure Layer)
   ========================================= */

.global-header {
  background-color: var(--dark-blue);
  padding: var(--header-padding);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area img {
  height: 50px;
  width: auto;
  display: block;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.main-nav a {
  color: var(--text-white);
  font-weight: 600;
  font-size: var(--font-size-base);
  text-decoration: none;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--accent-green); /* Now AAA compliant (8.5:1) */
}

.dropdown { position: relative; }

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-card);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  z-index: 1001;
}

@media (min-width: 769px) {
  .dropdown:hover .dropdown-content { display: block; }
}

@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    background-color: var(--mobile-nav-bg);
    border: none;
    margin-top: 10px;
  }
}

.dropdown-content.show { display: block !important; }

@media (max-width: 768px) {
  .dropdown:hover .dropdown-content.show { display: block !important; }
}

.nav-cta {
  background-color: var(--accent-green-hover);
  padding: var(--btn-padding-sm-y) var(--btn-padding-sm-x);
  border-radius: 4px;
  color: var(--text-white) !important;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
}

.nav-cta:hover {
  background-color: var(--accent-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.mobile-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--accent-green);
  text-decoration: none;
}

/* =========================================
   3. FOOTER, HERO, & CONTENT
   (The Content Layer)
   ========================================= */

.global-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--footer-gap);
  margin-bottom: 30px;
}

/* AAA Fix: H3 and P colors adjusted for contrast */
.footer-col h3 { color: var(--accent-green); margin-bottom: 15px; font-size: 1.2rem; } /* 8.5:1 */
.footer-col p { color: var(--text-gray); margin-bottom: 8px; font-size: 0.95rem; } /* 7.5:1 */
.footer-col a { color: var(--text-white); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-green); text-decoration: underline; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }

.copyright-bar {
  text-align: center;
  border-top: 1px solid var(--border-dark);
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-blue);
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  }
  .main-nav.active { display: flex; }
  .main-nav ul { flex-direction: column; width: 100%; padding: 0; gap: 0; }
  .main-nav ul li { width: 100%; text-align: center; }
  .main-nav ul li a { display: block; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .dropdown-content a { padding: 10px 15px; font-size: 0.9rem; }
}

.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
  padding: var(--section-padding-lg);
  text-align: center;
}
.hero h1 { font-size: var(--font-size-3xl); margin-bottom: 20px; font-weight: 700; line-height: var(--line-height-tight); color: var(--text-white); }
.hero p { font-size: var(--font-size-lg); margin-bottom: 30px; color: var(--text-white); }

.cta-button {
  display: inline-block;
  background-color: var(--accent-green); /* Now AAA compliant */
  color: var(--text-white);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--font-size-lg);
  font-weight: bold;
  border-radius: var(--btn-radius);
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.cta-button:hover { background-color: var(--accent-green-hover); transform: translateY(-2px); }
.sub-cta { font-size: 0.9rem; margin-top: 15px; color: var(--text-gray); } /* 7.5:1 */

.filter {
  background-color: var(--bg-card);
  padding: 50px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.filter h2 { font-size: var(--font-size-2xl); margin-bottom: 15px; color: var(--accent-green); }
.filter p { max-width: 800px; margin: 0 auto; font-size: 1.1rem; color: var(--text-gray); }

.services { padding: var(--section-padding); }
.services h2 { text-align: center; font-size: var(--font-size-2xl); margin-bottom: 10px; color: var(--text-white); }
.services-intro { text-align: center; margin-bottom: 30px; color: var(--text-muted); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.service-card-link { text-decoration: none; color: inherit; display: block; }
.service-card {
  background-color: var(--bg-card);
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  height: 100%;
}
.service-card:hover { transform: translateY(-5px); border-color: var(--accent-green); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.service-card h3 { color: var(--accent-green); margin-bottom: 15px; font-size: var(--font-size-xl); }
.service-card p { font-size: 1rem; margin-bottom: 15px; color: var(--text-gray); }

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.service-card:hover .read-more { border-bottom-color: var(--accent-green); }

.detail-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
  padding: 60px 0;
  text-align: center;
}
.detail-header h1 { font-size: 2.5rem; margin-bottom: 10px; line-height: var(--line-height-tight); color: var(--text-white); }
.detail-header p { font-size: 1.1rem; color: var(--text-white); }

.content-block { padding: var(--section-padding-sm); }
.content-block h2 { font-size: 1.8rem; margin-bottom: 20px; color: var(--text-white); font-weight: 700; }
.content-block ul { list-style: none; margin-bottom: 30px; }
.content-block li { margin-bottom: 10px; padding-left: 20px; position: relative; color: var(--text-gray); }
.content-block li::before { content: "•"; color: var(--accent-green); font-weight: bold; position: absolute; left: 0; font-size: 1.2rem; }

.price-box {
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: var(--card-radius);
  border: 1px solid var(--accent-green);
  text-align: center;
  margin: 30px 0;
}
.price-box h3 { color: var(--accent-green); margin-bottom: 10px; }
.price-box p { font-size: 1.1rem; color: var(--text-white); }

.process { background-color: var(--primary-blue); padding: 70px 0; text-align: center; }
.process h2 { margin-bottom: 40px; font-size: 2.2rem; color: var(--text-white); }
.process ol {
  max-width: 700px; margin: 0 auto; font-size: 1.2rem; line-height: var(--line-height-loose);
  text-align: left; list-style: decimal; padding-left: 20px;
}
.process li { margin-bottom: 15px; font-weight: 500; color: var(--text-white); }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .cta-button { font-size: 1rem; padding: 12px 25px; }
  .service-grid { grid-template-columns: 1fr; }
  .detail-header h1 { font-size: 2rem; }
}

.breadcrumbs { background-color: var(--bg-card); padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; align-items: center; }
.breadcrumbs li { display: flex; align-items: center; color: var(--text-gray); }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 10px; color: var(--accent-green); font-weight: bold; font-size: 1.1rem; }
.breadcrumbs a { color: var(--text-white); text-decoration: none; transition: color 0.3s; }
.breadcrumbs a:hover { color: var(--accent-green); text-decoration: underline; }
.breadcrumbs li[aria-current="page"] { color: var(--text-muted); font-weight: 500; }

@media (min-width: 769px) {
  .dropdown-content { display: none; position: absolute; top: 100%; left: 0; background-color: var(--bg-card); min-width: 200px; box-shadow: 0 8px 16px rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: 4px; z-index: 1001; text-align: left; }
  .dropdown-content a { display: block !important; padding: 12px 16px; color: var(--text-main); text-decoration: none; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; text-align: left; }
  .dropdown-content a:last-child { border-bottom: none; }
  .dropdown-content a:hover { background-color: var(--primary-blue); }
  .dropdown:hover .dropdown-content { display: block; }
}

.brands-section, .models-section, .faq-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 30px;
  margin-top: 40px;
}
.brands-section h2, .models-section h2, .faq-section h2 { color: var(--accent-green); margin-bottom: 20px; font-size: 1.8rem; text-align: center; }
.brands-section p, .models-section p { text-align: center; color: var(--text-gray); margin-bottom: 30px; }
.brands-section > div, .models-section > div, .faq-section > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-top: 25px; }
.brands-section .service-card, .models-section > div > div { background: #222; padding: var(--card-padding-sm); border-radius: var(--card-radius-sm); border-left: 4px solid var(--accent-green); border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; }
.brands-section .service-card:hover, .models-section > div > div:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); border-color: var(--accent-green); }
.brands-section .service-card h3, .models-section > div > div h3 { color: var(--text-white); margin-bottom: 15px; font-size: 1.3rem; }
.brands-section ul, .models-section ul, .faq-section div { list-style: none; padding-left: 0; color: var(--text-gray); font-size: 0.95rem; }
.brands-section li, .models-section li { margin-bottom: 10px; line-height: 1.5; }
.faq-section div { max-width: 800px; margin: 0 auto; }
.faq-section h3 { color: var(--text-white); font-size: 1.1rem; margin-bottom: 8px; }
.faq-section p { color: var(--text-gray); line-height: 1.6; margin-left: 20px; }

@media (max-width: 768px) {
  .brands-section, .models-section, .faq-section { padding: 20px; margin-top: 25px; }
  .brands-section h2, .models-section h2, .faq-section h2 { font-size: 1.5rem; }
  .brands-section > div, .models-section > div, .faq-section > div { grid-template-columns: 1fr; gap: 20px; }
}


/* =========================================
   4. AAA COMPLIANT OVERRIDES (Footer, Buttons, Dropdowns)
   ========================================= */

/* FOOTER LINK FIX */
/* 1. Base State: All text in footer columns is White */
.footer-col h3,
.footer-col p,
.footer-col a {
  color: var(--text-white) !important;
}

/* 2. Interactive State: ONLY links change on hover/active */
.footer-col a:hover,
.footer-col a:active,
.footer-col a:focus {
  color: var(--accent-green) !important; /* Now AAA compliant */
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 3. Non-Interactive: Ensure H3 and P do NOT change on hover */
.footer-col h3:hover,
.footer-col p:hover {
  color: var(--text-white) !important;
  text-decoration: none;
}


/* FOOTER BUTTON FIX */
/* 1. Base State: White Text, Light Background */
.cta-button, 
.footer-col .cta-button, 
button, 
.btn {
  color: var(--text-white) !important;
  background-color: var(--accent-green) !important;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

/* 2. Hover/Active State: Dark Background, White Text */
.cta-button:hover, 
.footer-col .cta-button:hover, 
button:hover, 
.btn:hover,
.cta-button:active, 
.footer-col .cta-button:active {
  background-color: var(--accent-green-hover) !important;
  color: var(--text-white) !important;
  transform: translateY(-2px);
}


/* FINAL CONSOLIDATED OVERRIDES */
/* 1. DROPDOWN LINKS (Highest Priority) */
/* Navy text on light background for AAA compliance */
.dropdown-content a {
  color: var(--text-main) !important; /* Navy (#0C2340) - 21:1 contrast */
  background-color: transparent !important;
  border-bottom: 2px solid transparent !important;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important;
  text-decoration: none !important;
}

.dropdown-content a:hover {
  color: var(--text-white) !important;
  background-color: var(--primary-blue) !important;
  border-bottom-color: var(--text-white) !important;
}

/* 2. GLOBAL TEXT LINKS (Footer, Content, Nav) - Default White */
a:not(.cta-button):not(.nav-cta):not(.dropdown-content a) {
  color: var(--text-white) !important;
  border-bottom: 2px solid transparent !important;
  transition: color 0.3s ease, border-color 0.3s ease !important;
  text-decoration: none !important;
}

/* Hover for Global Links: Turn Blue + White Line */
a:not(.cta-button):not(.nav-cta):not(.dropdown-content a):hover,
a:not(.cta-button):not(.nav-cta):not(.dropdown-content a):focus {
  color: var(--accent-green) !important;
  border-bottom-color: var(--text-white) !important;
}

/* 3. FOOTER SPECIFICS */
.footer-col h3,
.footer-col p {
  color: var(--text-white) !important;
}
.footer-col h3:hover,
.footer-col p:hover {
  color: var(--text-white) !important;
  text-decoration: none !important;
}

/* 4. BUTTONS (Header & Footer) */
.nav-cta,
.cta-button,
.btn,
button {
  color: var(--text-white) !important;
  background-color: var(--accent-green) !important;
  border-bottom: 2px solid transparent !important;
  transition: border-color 0.3s ease, background-color 0.3s ease !important;
  cursor: pointer;
  text-decoration: none !important;
}

.nav-cta:hover,
.cta-button:hover,
.btn:hover,
button:hover,
.nav-cta:active,
.cta-button:active,
.btn:active {
  background-color: var(--accent-green-hover) !important;
  border-bottom-color: var(--text-white) !important;
  transform: translateY(-2px);
}


/* FINAL FIX: HEADER SERVICE DROPDOWN TEXT */
.dropdown-content a {
  color: var(--text-main) !important;
  background-color: transparent !important;
  border-bottom: 2px solid transparent !important;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important;
  text-decoration: none !important;
}

.dropdown-content a:hover {
  color: var(--text-white) !important;
  background-color: var(--primary-blue) !important;
  border-bottom-color: var(--text-white) !important;
}

/* =========================================
   FINAL AAA ACCESSIBILITY FIX (Consolidated)
   Targets: Dark Cards, FAQ, Price Box, Footer
   ========================================= */

/* 1. DARK MODEL CARDS (Background #222)
   Problem: Dark text on dark background.
   Fix: Force ALL text inside these cards to White (#FFFFFF).
*/
.models-section > div > div, 
.brands-section .service-card {
  background: #222 !important;
  color: #FFFFFF !important;
}

.models-section > div > div h3,
.brands-section .service-card h3,
.models-section > div > div ul li,
.brands-section .service-card ul li,
.models-section > div > div ul li strong,
.brands-section .service-card ul li strong,
.models-section > div > div p,
.brands-section .service-card p {
  color: #FFFFFF !important;
}

/* 2. FAQ SECTION (Background #F8F9FA - Light)
   Problem: White text on light background (Invisible).
   Fix: Force H3 (Questions) to Navy (#0C2340) and P (Answers) to Dark Gray (#374151).
*/
.faq-section h3,
.faq-section h3 strong {
  color: var(--text-main) !important; /* Navy #0C2340 */
  font-weight: 700;
}

.faq-section p {
  color: var(--text-gray) !important; /* Dark Gray #374151 */
}

/* 3. "THE DEAL" PRICE BOX (Background #F8F9FA - Light)
   Problem: White text on light background (Invisible).
   Fix: Force H3 and P to Navy (#0C2340).
*/
.price-box h3,
.price-box p {
  color: var(--text-main) !important; /* Navy #0C2340 */
}

.price-box strong {
  color: var(--accent-green-dark) !important; /* Deep Blue for emphasis */
}

/* 4. FOOTER COPYRIGHT (Background #0C2340 - Navy)
   Problem: Text too light/faded.
   Fix: Force text to pure White (#FFFFFF) with no opacity.
*/
.copyright-bar,
.copyright-bar p {
  color: #FFFFFF !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* 5. SAFETY: Override Inline Styles
   The HTML files use inline styles like "color: var(--text-white)".
   This block ensures the CSS above takes precedence everywhere.
*/
.faq-section div h3,
.faq-section div h3 strong,
.faq-section div p,
.price-box h3,
.price-box p,
.models-section > div > div *,
.brands-section .service-card * {
  color: inherit !important;
}