/* ═══════════════════════════════════════════════════════
   Abogados de Accidentes de California — Main Stylesheet
   Single external file replacing ~6.5MB of inline CSS
   ═══════════════════════════════════════════════════════ */

:root {
  --navy: #0a1628;
  --navy-light: #132240;
  --gold: #c8962e;
  --gold-light: #e5b44a;
  --gold-dark: #a67a1f;
  --cream: #faf6ee;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-600: #6b7280;
  --gray-800: #1f2937;
  --red: #b91c1c;
  --red-light: #dc2626;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── SKIP NAV (Accessibility) ── */
.skip-nav {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  z-index: 9999;
}
.skip-nav:focus {
  position: fixed; top: 0; left: 0;
  width: auto; height: auto;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}

/* ── TOP BAR ── */
.top-bar {
  background: var(--navy);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
}
.top-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.top-bar-names { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.firm-name-primary { font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; }
.firm-name-secondary { font-weight: 600; color: var(--cream); }
.top-bar-divider { color: var(--gold); opacity: 0.5; }
.top-bar-contact { display: flex; gap: 20px; }
.top-bar-contact a { color: var(--cream); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.top-bar-contact a:hover { color: var(--gold); }

/* ── HEADER / NAVIGATION ── */
.site-header {
  background: var(--white);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.main-nav {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.nav-logo { text-decoration: none; padding: 12px 0; }
.nav-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem; font-weight: 700;
  color: var(--navy); line-height: 1.2;
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 28px; height: 3px;
  background: var(--navy); border-radius: 2px; transition: 0.3s;
}
.nav-links {
  display: flex; list-style: none; gap: 0; align-items: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block; padding: 20px 14px;
  color: var(--navy); text-decoration: none;
  font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-links > li > a:hover,
.nav-links > li > a[aria-current="page"] { color: var(--gold); }

/* Dropdown */
.has-dropdown > a::after { content: ' ▾'; font-size: 0.7em; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); min-width: 240px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border-top: 3px solid var(--gold); z-index: 100;
  border-radius: 0 0 6px 6px;
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown { display: block; }
.dropdown a {
  display: block; padding: 10px 18px;
  color: var(--gray-800); font-size: 0.88rem; font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s, color 0.2s;
}
.dropdown a:hover { background: var(--cream); color: var(--gold); }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 2px solid var(--gold);
  border-radius: 4px; color: var(--gold); font-weight: 700;
  font-size: 0.85rem; transition: 0.2s;
}
.lang-switch:hover { background: var(--gold); color: var(--white); }

/* ── HERO SECTIONS ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white); padding: 60px 24px; text-align: center;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; line-height: 1.2;
  margin-bottom: 12px;
}
.page-hero .hero-subtitle {
  font-size: 1.1rem; color: var(--gold-light);
  margin-bottom: 8px;
}
.page-hero .hero-tagline {
  font-size: 1rem; color: rgba(255,255,255,0.8);
  max-width: 600px; margin: 0 auto;
}

/* ── BREADCRUMBS ── */
.breadcrumbs {
  padding: 12px 0; font-size: 0.85rem; color: var(--gray-600);
}
.breadcrumbs a { color: var(--gold-dark); font-weight: 500; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; opacity: 0.5; }

/* ── CONTENT SECTIONS ── */
.section-light { background: var(--white); padding: 60px 0; }
.section-cream { background: var(--cream); padding: 60px 0; }
.section-navy { background: var(--navy); color: var(--white); padding: 60px 0; }

.section-header {
  text-align: center; margin-bottom: 40px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; color: var(--navy); margin-bottom: 12px;
}
.section-navy .section-header h2 { color: var(--white); }
.gold-line {
  display: block; width: 60px; height: 3px;
  background: var(--gold); margin: 0 auto; border-radius: 2px;
}

/* Content Grid (sidebar layout) */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px; align-items: start;
}
.content-main h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 700;
  color: var(--navy); margin: 32px 0 16px;
}
.content-main h2:first-child { margin-top: 0; }
.content-main p { margin-bottom: 16px; }
.content-main ul, .content-main ol {
  margin: 0 0 16px 24px;
}
.content-main li { margin-bottom: 6px; }

/* Sidebar */
.sidebar { position: sticky; top: 80px; }
.sidebar-box {
  background: var(--cream); border-radius: 8px;
  padding: 24px; margin-bottom: 20px;
  border-left: 4px solid var(--gold);
}
.sidebar-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 700;
  color: var(--navy); margin-bottom: 12px;
}
.sidebar-box p { font-size: 0.95rem; margin-bottom: 8px; }
.sidebar-box a { color: var(--gold-dark); font-weight: 500; }
.sidebar-box a:hover { text-decoration: underline; }

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: 10px; padding: 28px;
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.card-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem; font-weight: 700;
  color: var(--navy); margin-bottom: 8px;
}
.card h3 a { color: var(--navy); }
.card h3 a:hover { color: var(--gold); }
.card p { font-size: 0.95rem; color: var(--gray-600); margin-bottom: 12px; }

/* City Grid */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.city-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px; background: var(--white);
  border: 2px solid var(--gray-200); border-radius: 8px;
  font-weight: 700; color: var(--navy);
  text-align: center; transition: 0.2s;
}
.city-card:hover {
  border-color: var(--gold); color: var(--gold);
  transform: translateY(-2px);
}
.city-card small {
  font-weight: 400; font-size: 0.8rem; color: var(--gray-600);
  margin-top: 4px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block; padding: 12px 28px;
  border-radius: 6px; font-weight: 700;
  font-size: 1rem; text-align: center;
  transition: 0.2s; cursor: pointer;
  text-decoration: none;
}
.btn-gold {
  background: var(--gold); color: var(--white);
  border: 2px solid var(--gold);
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-red {
  background: var(--red); color: var(--white);
  border: 2px solid var(--red);
}
.btn-red:hover { background: var(--red-light); border-color: var(--red-light); }
.btn-outline {
  background: transparent; color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-block { display: block; width: 100%; margin-bottom: 8px; }

/* ── CTA BANNER ── */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, #8b1a1a 100%);
  color: var(--white); padding: 48px 24px; text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; margin-bottom: 8px;
}
.cta-sub { font-size: 1rem; opacity: 0.9; margin-bottom: 20px; }
.cta-phones { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 6px;
  font-weight: 700; font-size: 1.1rem;
  background: var(--white); color: var(--red);
  transition: 0.2s; text-decoration: none;
}
.cta-btn:hover { transform: scale(1.03); }
.cta-btn.es { background: var(--gold); color: var(--white); }
.cta-note { font-size: 0.9rem; opacity: 0.85; }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
}
.faq-question {
  padding: 18px 0;
  font-weight: 700; font-size: 1.05rem;
  cursor: pointer; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center;
}
.faq-question::after {
  content: '+'; font-size: 1.4rem; color: var(--gold);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px; padding-bottom: 18px;
}
.faq-answer p { color: var(--gray-600); line-height: 1.7; }

/* ── AVVO BADGE ── */
.avvo-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: var(--white);
  padding: 8px 16px; border-radius: 6px;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
}
.avvo-score {
  background: var(--gold); color: var(--navy);
  padding: 2px 8px; border-radius: 4px;
  font-weight: 900;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--navy); color: var(--cream);
  padding: 48px 0 0;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 700;
  color: var(--gold); margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: var(--cream); font-size: 0.9rem;
  opacity: 0.8; transition: 0.2s;
}
.footer-links a:hover { opacity: 1; color: var(--gold); }
.footer-address {
  font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5;
}
.footer-phones { display: flex; flex-direction: column; gap: 6px; }
.footer-phones a {
  color: var(--gold-light); font-weight: 600;
  font-size: 0.95rem;
}
.footer-phones a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 32px; padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom p { margin-bottom: 8px; max-width: 800px; margin-left: auto; margin-right: auto; }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--gray-100); border-radius: 8px;
  padding: 20px 24px; margin-bottom: 32px;
  border-left: 4px solid var(--gold);
}
.toc h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--navy); }
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--gold-dark); font-weight: 500; font-size: 0.95rem; }
.toc a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 968px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column;
    width: 100%; background: var(--white);
    border-top: 1px solid var(--gray-200);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 14px 0; }
  .dropdown {
    position: static; box-shadow: none;
    border-top: none; padding-left: 16px;
  }
  .has-dropdown.open .dropdown { display: block; }
  .page-hero { padding: 40px 16px; }
  .cards-grid { grid-template-columns: 1fr; }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .top-bar-contact { display: none; }
  .cta-phones { flex-direction: column; align-items: center; }
}
