/* ============================================================
   ROYAL THEME - Based on Lawyer Ace Template (TemplateMonster 330320)
   90% Design Extraction | Sunrise Bail Bonds – Santa Ana & Torrance
   Palette: Midnight Navy · Sovereign Gold · Platinum
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;600;700;900&family=Poppins:wght@300;400;500;600&family=Playfair+Display:wght@700;900&display=swap');

/* ── CSS Custom Properties (Royal Design Tokens) ─────────── */
:root {
  /* Primary Palette */
  --royal-navy:         #1b2a4a;
  --royal-navy-deep:    #0d1b35;
  --royal-navy-mid:     #162040;
  --royal-navy-light:   #243454;

  /* Gold Accent System */
  --royal-gold:         #c9a84c;
  --royal-gold-bright:  #d4af37;
  --royal-gold-deep:    #a8892a;
  --royal-gold-pale:    #f4e6b0;

  /* Neutrals */
  --royal-white:        #ffffff;
  --royal-off-white:    #f8f5ef;
  --royal-light-gray:   #f0ede6;
  --royal-mid-gray:     #8c8c8c;
  --royal-dark-gray:    #333333;
  --royal-charcoal:     #1b1b1b;
  --royal-section-dark: #33373d;

  /* Typography */
  --font-heading:       'Lato', 'Playfair Display', serif;
  --font-body:          'Poppins', system-ui, sans-serif;
  --font-ui:            'Lato', sans-serif;

  /* Spacing */
  --section-pad-v:      100px;
  --container-max:      1140px;
}

/* ── Global Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--royal-dark-gray);
  background-color: var(--royal-white);
  -webkit-font-smoothing: antialiased;
}

/* ── FORCE-OVERRIDE: Tailwind Blue Remnants ───────────────── */
[class*="bg-blue"],
[class*="from-blue"],
[class*="via-blue"],
[class*="to-blue"],
[class*="border-blue"],
[class*="text-blue"],
[class*="ring-blue"] {
  --tw-bg-opacity: 1;
}

/* Replace any remaining blue backgrounds with navy */
.bg-blue-600, .bg-blue-700, .bg-blue-800,
.bg-indigo-600, .bg-indigo-700 {
  background-color: var(--royal-navy) !important;
}

/* Replace blue text with gold */
.text-blue-600, .text-blue-500,
.text-indigo-600, .text-indigo-500 {
  color: var(--royal-gold) !important;
}

/* Replace border blues */
.border-blue-600, .border-blue-500,
.border-indigo-600 {
  border-color: var(--royal-gold) !important;
}

/* Tailwind gradient fixes */
.from-blue-600 {
  --tw-gradient-from: var(--royal-navy-deep) !important;
}
.via-indigo-500 {
  --tw-gradient-stops: var(--tw-gradient-from), var(--royal-gold), var(--tw-gradient-to) !important;
}
.to-blue-800 {
  --tw-gradient-to: var(--royal-navy) !important;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--royal-charcoal);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--royal-dark-gray);
}

/* ── NAVIGATION ───────────────────────────────────────────── */
nav,
header[class*="navbar"],
header[class*="nav"],
div[class*="navbar"],
div[class*="nav-bar"] {
  background-color: var(--royal-navy-deep) !important;
  border-bottom: 2px solid var(--royal-gold) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Nav links */
nav a, header a,
div[class*="navbar"] a,
div[class*="nav"] a {
  font-family: var(--font-ui) !important;
  font-weight: 600;
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--royal-white) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover, header a:hover {
  color: var(--royal-gold) !important;
}

/* ── HERO SECTION ─────────────────────────────────────────── */
.hero-section,
section[class*="hero"],
div[class*="hero-section"] {
  background: linear-gradient(
    165deg,
    var(--royal-navy-deep) 0%,
    var(--royal-navy) 60%,
    var(--royal-navy-light) 100%
  ) !important;
  position: relative;
  min-height: 100vh;
}

.hero-section::before,
section[class*="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Hero Title */
.hero-section h1,
section[class*="hero"] h1,
div[class*="hero"] h1,
.hero-title {
  color: var(--royal-white) !important;
  font-family: 'Lato', serif !important;
  font-weight: 900 !important;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Hero Gold Accent Line (Lawyer Ace Signature) */
.hero-section h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--royal-gold);
  margin-top: 16px;
}

/* ── SECTION HEADINGS (Lawyer Ace Divider Pattern) ─────────── */
.section-heading-divider,
h2 + hr,
h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--royal-gold);
  margin: 14px auto 0;
}

section h2 {
  position: relative;
  margin-bottom: 16px;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--royal-gold);
  background-image: linear-gradient(90deg, var(--royal-gold-deep), var(--royal-gold), var(--royal-gold-deep));
  margin-top: 14px;
}

/* ── BUTTONS (Lawyer Ace Style: Sharp, Gold on Navy) ────────── */
button,
a[class*="btn"],
a[class*="button"],
div[class*="btn"],
[class*="cta-button"],
[class*="call-now"] {
  font-family: var(--font-ui) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  border-radius: 0 !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

/* Primary Button: Gold Background */
button[class*="primary"],
a[class*="primary"],
button[class*="cta"],
a[class*="cta"],
[class*="btn-primary"],
button[type="submit"] {
  background-color: var(--royal-gold) !important;
  color: var(--royal-navy-deep) !important;
  padding: 14px 32px !important;
  border: 2px solid var(--royal-gold) !important;
}

button[class*="primary"]:hover,
a[class*="primary"]:hover,
[class*="btn-primary"]:hover {
  background-color: var(--royal-navy-deep) !important;
  color: var(--royal-gold) !important;
  border-color: var(--royal-gold) !important;
}

/* Outline / Secondary Button */
button[class*="outline"],
a[class*="outline"],
[class*="btn-secondary"] {
  background-color: transparent !important;
  color: var(--royal-gold) !important;
  border: 2px solid var(--royal-gold) !important;
  padding: 12px 30px !important;
}

button[class*="outline"]:hover {
  background-color: var(--royal-gold) !important;
  color: var(--royal-navy-deep) !important;
}

/* Phone / Call Now – always Gold */
a[href^="tel"] {
  color: var(--royal-gold) !important;
  font-weight: 700 !important;
  font-family: var(--font-ui) !important;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
a[href^="tel"]:hover { opacity: 0.8; }

/* ── CARDS & SERVICE TILES ─────────────────────────────────── */
[class*="card"],
[class*="service-card"],
[class*="feature-card"],
[class*="info-card"] {
  border-radius: 0 !important;
  border: 1px solid rgba(201, 168, 76, 0.2) !important;
  background-color: var(--royal-off-white) !important;
  transition: all 0.25s ease !important;
  position: relative;
  overflow: hidden;
}

[class*="card"]:hover,
[class*="service-card"]:hover {
  border-color: var(--royal-gold) !important;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.15) !important;
  transform: translateY(-3px) !important;
}

/* Gold bottom indicator on card hover (Lawyer Ace pattern) */
[class*="card"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--royal-gold);
  transition: width 0.3s ease;
}
[class*="card"]:hover::after { width: 100%; }

/* Card Headings */
[class*="card"] h3,
[class*="service-card"] h3 {
  color: var(--royal-navy) !important;
  font-family: var(--font-heading) !important;
}

/* ── DARK SECTIONS ─────────────────────────────────────────── */
section[class*="dark"],
section[class*="bg-dark"],
[class*="section-dark"],
[class*="cta-section"],
[class*="testimonial"] {
  background-color: var(--royal-section-dark) !important;
}

section[class*="dark"] h2,
section[class*="bg-dark"] h2,
[class*="section-dark"] h2 {
  color: var(--royal-white) !important;
}

section[class*="dark"] p,
[class*="section-dark"] p {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ── STATS / NUMBERS COUNTERS ──────────────────────────────── */
[class*="stats"],
[class*="counter"],
[class*="number-section"] {
  background-color: var(--royal-navy) !important;
  color: var(--royal-white) !important;
}

[class*="stat-number"],
[class*="counter-number"],
[class*="stats"] h3 {
  color: var(--royal-gold) !important;
  font-family: var(--font-heading) !important;
  font-weight: 900 !important;
  font-size: 3rem !important;
}

[class*="stats"] p,
[class*="counter"] p {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ── ICONS & ACCENTS ────────────────────────────────────────── */
[class*="icon"],
svg[class*="icon"] {
  color: var(--royal-gold) !important;
  fill: var(--royal-gold) !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

[class*="icon"]:hover {
  transform: scale(1.1) !important;
  color: var(--royal-gold-deep) !important;
}

/* Custom gold bullet points (Lawyer Ace arrow style) */
ul:not([class]) li::before,
[class*="check-list"] li::before {
  content: '▸';
  color: var(--royal-gold);
  font-size: 1.1em;
  margin-right: 8px;
}

/* ── SECTION BACKGROUNDS ────────────────────────────────────── */
section:nth-child(odd) {
  background-color: var(--royal-white);
}

section:nth-child(even) {
  background-color: var(--royal-off-white);
}

/* Navy hero/intro override */
.hero-section,
section:first-of-type {
  background: linear-gradient(165deg, var(--royal-navy-deep), var(--royal-navy)) !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer,
div[class*="footer"] {
  background-color: var(--royal-navy-deep) !important;
  color: var(--royal-off-white) !important;
  border-top: 3px solid var(--royal-gold) !important;
  font-family: var(--font-body) !important;
}

footer h3, footer h4,
div[class*="footer"] h3 {
  color: var(--royal-gold) !important;
  font-family: var(--font-heading) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

footer a,
div[class*="footer"] a {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--royal-gold) !important; }

footer p,
div[class*="footer"] p {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 14px;
}

/* Footer copyright bar */
div[class*="footer-bottom"],
footer div:last-child {
  border-top: 1px solid rgba(201, 168, 76, 0.2);
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 13px;
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
input, textarea, select {
  border: 1px solid rgba(201, 168, 76, 0.3) !important;
  border-radius: 0 !important;
  background-color: var(--royal-off-white) !important;
  color: var(--royal-charcoal) !important;
  font-family: var(--font-body) !important;
  padding: 12px 16px !important;
  transition: border-color 0.2s !important;
}

input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--royal-gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15) !important;
}

/* ── SCROLL ANIMATIONS ──────────────────────────────────────── */
@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); }
}

.animate-slide-up {
  animation: slideUpFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-in forwards;
}

/* CTA buttons with gold pulse */
a[href^="tel"],
button[class*="cta"] {
  animation: goldPulse 2.5s infinite;
}

/* ── DIVIDERS ────────────────────────────────────────────────── */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--royal-gold), transparent);
  margin: 40px auto;
}

/* ── GOLD ACCENT BORDER UTILITY ─────────────────────────────── */
.gold-border-left {
  border-left: 4px solid var(--royal-gold) !important;
  padding-left: 16px !important;
}

/* ── TRUST BADGES & CERTIFICATIONS ─────────────────────────── */
[class*="badge"],
[class*="trust"],
[class*="certification"] {
  border: 1px solid var(--royal-gold) !important;
  background-color: rgba(201, 168, 76, 0.06) !important;
  color: var(--royal-navy) !important;
}

/* ── BREADCRUMBS ────────────────────────────────────────────── */
[class*="breadcrumb"] {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 13px;
}

[class*="breadcrumb"] a { color: var(--royal-gold) !important; }

/* ── TABLES ─────────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; }

th {
  background-color: var(--royal-navy) !important;
  color: var(--royal-gold) !important;
  font-family: var(--font-ui) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
}

td {
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  padding: 12px 16px;
  color: var(--royal-dark-gray);
}

tr:hover td { background-color: var(--royal-off-white); }

/* ── SCROLLBAR (Chrome) ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--royal-navy-deep); }
::-webkit-scrollbar-thumb {
  background: var(--royal-gold);
  border-radius: 0;
}

/* ── SELECTION ───────────────────────────────────────────────── */
::selection {
  background-color: var(--royal-gold);
  color: var(--royal-navy-deep);
}

/* ── MODAL / OVERLAY ─────────────────────────────────────────── */
[class*="modal"],
[class*="overlay"],
[class*="dialog"] {
  background-color: rgba(13, 27, 53, 0.92) !important;
}

[class*="modal"] [class*="content"],
[class*="dialog"] [class*="content"] {
  background-color: var(--royal-white) !important;
  border-top: 4px solid var(--royal-gold) !important;
  border-radius: 0 !important;
}

/* ── REDUCED MOTION SUPPORT ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RESPONSIVE OVERRIDES ────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-pad-v: 60px;
  }

  .hero-section h1, section[class*="hero"] h1 {
    font-size: 2rem !important;
  }

  h2 { font-size: 1.6rem !important; }
  h3 { font-size: 1.2rem !important; }
}
