/**
 * Bay Area Mobile Notary - Main Stylesheet
 * Modern/Friendly Design with 8 Color Themes
 */

/* ============================================
   CSS CUSTOM PROPERTIES (THEME VARIABLES)
   ============================================ */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #38bdf8;
    --secondary: #06b6d4;
    --accent: #f97316;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f1f5f9;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', var(--font-primary);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

.theme-ocean { --primary: #0284c7; --primary-dark: #0369a1; --primary-light: #38bdf8; --secondary: #06b6d4; --accent: #f97316; --bg-alt: #f1f5f9; }
.theme-forest { --primary: #059669; --primary-dark: #047857; --primary-light: #34d399; --secondary: #10b981; --accent: #f59e0b; --bg-alt: #f0fdf4; }
.theme-sunset { --primary: #ea580c; --primary-dark: #c2410c; --primary-light: #fb923c; --secondary: #f97316; --accent: #0284c7; --bg-alt: #fff7ed; }
.theme-royal { --primary: #7c3aed; --primary-dark: #6d28d9; --primary-light: #a78bfa; --secondary: #8b5cf6; --accent: #10b981; --bg-alt: #faf5ff; }
.theme-crimson { --primary: #dc2626; --primary-dark: #b91c1c; --primary-light: #f87171; --secondary: #ef4444; --accent: #0284c7; --bg-alt: #fef2f2; }
.theme-slate { --primary: #475569; --primary-dark: #334155; --primary-light: #94a3b8; --secondary: #64748b; --accent: #0284c7; --bg-alt: #f8fafc; }
.theme-teal { --primary: #0d9488; --primary-dark: #0f766e; --primary-light: #2dd4bf; --secondary: #14b8a6; --accent: #f59e0b; --bg-alt: #f0fdfa; }
.theme-gold { --primary: #b45309; --primary-dark: #92400e; --primary-light: #fbbf24; --secondary: #d97706; --accent: #1e40af; --bg-alt: #fffbeb; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-primary); font-size: 16px; line-height: 1.6; color: var(--text); background-color: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }
p { margin-bottom: var(--space-md); }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-light { color: var(--text-light); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-narrow { max-width: 800px; }
.container-wide { max-width: 1400px; }
.section { padding: var(--space-3xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }
.section-alt { background-color: var(--bg-alt); }

.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-gap { gap: var(--space-md); }
.flex-gap-lg { gap: var(--space-lg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: 0.75rem 1.5rem; font-weight: 500; font-size: 1rem; line-height: 1; border-radius: var(--radius-md); transition: all var(--transition-fast); cursor: pointer; border: 2px solid transparent; text-decoration: none; }
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-secondary:hover { background-color: var(--primary); color: white; }
.btn-outline { background-color: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: white; }
.btn-accent { background-color: var(--accent); color: white; }
.btn-accent:hover { filter: brightness(1.1); color: white; }
.btn-white { background-color: white; color: var(--primary); }
.btn-white:hover { background-color: var(--bg-alt); color: var(--primary-dark); }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn-phone { background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%); color: white; font-size: 1.25rem; padding: 1rem 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.btn-phone:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); color: white; }
.btn-phone .phone-icon { animation: ring 1.5s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-10deg); } 20%, 40% { transform: rotate(10deg); } 50% { transform: rotate(0); } }

.site-header { position: sticky; top: 0; z-index: 1000; background-color: var(--bg); box-shadow: var(--shadow-sm); }
.header-top { background-color: var(--primary); color: white; padding: var(--space-sm) 0; font-size: 0.875rem; }
.header-top a { color: white; opacity: 0.9; }
.header-top a:hover { opacity: 1; color: white; }
.header-main { padding: var(--space-md) 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl); }

.logo { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--primary); }
.logo img { height: 50px; width: auto; }
.logo-icon { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }

.main-nav { display: flex; align-items: center; gap: var(--space-xl); }
.nav-menu { display: flex; align-items: center; gap: var(--space-lg); }
.nav-menu a { color: var(--text); font-weight: 500; padding: var(--space-sm) 0; position: relative; }
.nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary); transition: width var(--transition-base); }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background-color: var(--bg); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-sm) 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--transition-fast); z-index: 100; }
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a { display: block; padding: var(--space-sm) var(--space-lg); color: var(--text); }
.nav-dropdown-menu a:hover { background-color: var(--bg-alt); color: var(--primary); }
.nav-dropdown-menu a::after { display: none; }

.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--space-sm); cursor: pointer; }
.mobile-menu-toggle span { width: 25px; height: 3px; background-color: var(--text); border-radius: 2px; transition: var(--transition-fast); }
.header-cta { display: flex; align-items: center; gap: var(--space-md); }

@media (max-width: 992px) {
    .mobile-menu-toggle { display: flex; }
    .main-nav { position: fixed; top: 0; right: -100%; width: 80%; max-width: 400px; height: 100vh; background-color: var(--bg); flex-direction: column; align-items: flex-start; padding: var(--space-2xl); box-shadow: var(--shadow-xl); transition: right var(--transition-base); z-index: 1001; }
    .main-nav.active { right: 0; }
    .nav-menu { flex-direction: column; align-items: flex-start; width: 100%; }
    .nav-menu a { padding: var(--space-md) 0; width: 100%; border-bottom: 1px solid var(--bg-alt); }
    .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: var(--space-lg); }
    .header-cta { flex-direction: column; width: 100%; margin-top: var(--space-lg); }
    .header-cta .btn { width: 100%; }
}

.mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: all var(--transition-base); z-index: 1000; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: var(--space-3xl) 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 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='%23ffffff' fill-opacity='0.05'%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"); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: center; position: relative; z-index: 1; }
.hero-content h1 { color: white; margin-bottom: var(--space-lg); font-size: clamp(2.25rem, 5vw, 3.5rem); }
.hero-content p { font-size: 1.125rem; opacity: 0.95; margin-bottom: var(--space-xl); max-width: 500px; }
.hero-cta { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.hero-features { display: flex; gap: var(--space-lg); margin-top: var(--space-xl); flex-wrap: wrap; }
.hero-feature { display: flex; align-items: center; gap: var(--space-sm); font-size: 0.9375rem; opacity: 0.95; }
.hero-feature svg { color: var(--accent); }
.hero-image { position: relative; }
.hero-image img { border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }

@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .hero-features { justify-content: center; }
    .hero-image { order: -1; max-width: 500px; margin: 0 auto; }
}

.video-section { padding: var(--space-3xl) 0; background-color: var(--bg-alt); }
.video-container { max-width: 900px; margin: 0 auto; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); background-color: var(--text); }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; cursor: pointer; transition: var(--transition-base); }
.video-placeholder:hover { filter: brightness(1.1); }
.video-play-btn { width: 80px; height: 80px; background-color: rgba(255, 255, 255, 0.95); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); box-shadow: var(--shadow-lg); transition: var(--transition-base); }
.video-play-btn svg { color: var(--primary); width: 32px; height: 32px; margin-left: 4px; }
.video-placeholder:hover .video-play-btn { transform: scale(1.1); }
.video-title { text-align: center; margin-bottom: var(--space-xl); }
.video-title h2 { margin-bottom: var(--space-sm); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.service-card { background-color: var(--bg); border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-md); transition: all var(--transition-base); border: 1px solid var(--bg-alt); }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); border-color: var(--primary-light); }
.service-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; margin-bottom: var(--space-lg); }
.service-card h3 { margin-bottom: var(--space-sm); }
.service-card p { color: var(--text-light); margin-bottom: var(--space-md); }
.service-link { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 500; color: var(--primary); }
.service-link:hover { gap: var(--space-sm); }

.coverage-section { background-color: var(--bg-alt); }
.cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-md); }
.city-link { display: block; padding: var(--space-md); background-color: var(--bg); border-radius: var(--radius-md); text-align: center; color: var(--text); font-weight: 500; transition: all var(--transition-fast); border: 1px solid var(--bg-alt); }
.city-link:hover { background-color: var(--primary); color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.testimonials-slider { max-width: 800px; margin: 0 auto; }
.testimonial-card { background-color: var(--bg); border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-md); text-align: center; }
.testimonial-stars { color: var(--accent); margin-bottom: var(--space-md); font-size: 1.25rem; }
.testimonial-text { font-size: 1.125rem; line-height: 1.7; color: var(--text); margin-bottom: var(--space-lg); font-style: italic; }
.testimonial-author { font-weight: 600; color: var(--text); }
.testimonial-location { color: var(--text-light); font-size: 0.875rem; }

.cta-section { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; text-align: center; padding: var(--space-3xl) 0; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 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='%23ffffff' fill-opacity='0.05'%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"); }
.cta-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta-section h2 { color: white; margin-bottom: var(--space-md); }
.cta-section p { font-size: 1.125rem; opacity: 0.95; margin-bottom: var(--space-xl); }
.cta-phone { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: var(--space-lg); }
.cta-phone a { color: white; display: inline-flex; align-items: center; gap: var(--space-sm); }
.cta-phone a:hover { color: var(--accent); }

.trust-badges { display: flex; justify-content: center; gap: var(--space-xl); flex-wrap: wrap; padding: var(--space-xl) 0; border-top: 1px solid var(--bg-alt); }
.trust-badge { display: flex; align-items: center; gap: var(--space-sm); color: var(--text-light); font-size: 0.9375rem; }
.trust-badge svg { color: var(--primary); }

.site-footer { background-color: var(--text); color: white; padding: var(--space-3xl) 0 var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-2xl); margin-bottom: var(--space-2xl); }
.footer-brand p { opacity: 0.8; margin-bottom: var(--space-lg); max-width: 300px; }
.footer-social { display: flex; gap: var(--space-sm); }
.footer-social a { width: 40px; height: 40px; background-color: rgba(255, 255, 255, 0.1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; transition: var(--transition-fast); }
.footer-social a:hover { background-color: var(--primary); }
.footer-heading { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-lg); color: white; }
.footer-links a { display: block; color: rgba(255, 255, 255, 0.7); padding: var(--space-xs) 0; transition: var(--transition-fast); }
.footer-links a:hover { color: white; padding-left: var(--space-xs); }
.footer-contact p { display: flex; align-items: flex-start; gap: var(--space-sm); color: rgba(255, 255, 255, 0.7); margin-bottom: var(--space-sm); }
.footer-contact a { color: rgba(255, 255, 255, 0.7); }
.footer-contact a:hover { color: white; }
.footer-bottom { padding-top: var(--space-lg); border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-md); font-size: 0.875rem; color: rgba(255, 255, 255, 0.6); }
.footer-bottom a { color: rgba(255, 255, 255, 0.6); }
.footer-bottom a:hover { color: white; }
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }

.form-group { margin-bottom: var(--space-lg); }
.form-label { display: block; font-weight: 500; margin-bottom: var(--space-sm); color: var(--text); }
.form-input, .form-textarea, .form-select { width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--bg-alt); border-radius: var(--radius-md); font-size: 1rem; transition: border-color var(--transition-fast); background-color: var(--bg); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { color: var(--error); font-size: 0.875rem; margin-top: var(--space-xs); }
.form-help { color: var(--text-light); font-size: 0.875rem; margin-top: var(--space-xs); }

.alert { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); margin-bottom: var(--space-lg); display: flex; align-items: center; justify-content: space-between; }
.alert-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

.breadcrumbs { padding: var(--space-md) 0; font-size: 0.875rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.breadcrumbs li { display: flex; align-items: center; gap: var(--space-sm); }
.breadcrumbs li:not(:last-child)::after { content: '/'; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text); }

.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: var(--space-3xl) 0; text-align: center; position: relative; }
.page-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 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='%23ffffff' fill-opacity='0.05'%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"); }
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: white; margin-bottom: var(--space-sm); }
.page-header p { font-size: 1.125rem; opacity: 0.95; max-width: 600px; margin: 0 auto; }
.page-header .breadcrumbs { margin-bottom: var(--space-md); }
.page-header .breadcrumbs a, .page-header .breadcrumbs li::after { color: rgba(255, 255, 255, 0.7); }
.page-header .breadcrumbs span { color: white; }

.content-section { padding: var(--space-3xl) 0; }
.content-body { max-width: 800px; margin: 0 auto; }
.content-body h2 { margin-top: var(--space-2xl); margin-bottom: var(--space-md); }
.content-body h3 { margin-top: var(--space-xl); margin-bottom: var(--space-md); }
.content-body p { margin-bottom: var(--space-lg); }
.content-body ul, .content-body ol { margin-bottom: var(--space-lg); padding-left: var(--space-xl); }
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li { margin-bottom: var(--space-sm); }

.chat-widget { position: fixed; bottom: var(--space-lg); right: var(--space-lg); z-index: 900; }
.chat-toggle { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; box-shadow: var(--shadow-lg); cursor: pointer; transition: all var(--transition-base); position: relative; }
.chat-toggle:hover { transform: scale(1.1); }
.chat-toggle.has-messages::after { content: ''; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background-color: var(--error); border-radius: 50%; border: 2px solid white; }
.chat-window { position: absolute; bottom: 70px; right: 0; width: 350px; max-height: 500px; background-color: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); display: none; flex-direction: column; overflow: hidden; }
.chat-window.active { display: flex; }
.chat-header { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: var(--space-md); display: flex; justify-content: space-between; align-items: center; }
.chat-header h4 { color: white; font-size: 1rem; }
.chat-close { color: white; opacity: 0.8; cursor: pointer; font-size: 1.25rem; }
.chat-close:hover { opacity: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: var(--space-md); max-height: 300px; }
.chat-message { margin-bottom: var(--space-md); display: flex; flex-direction: column; }
.chat-message.visitor { align-items: flex-end; }
.chat-message.admin { align-items: flex-start; }
.chat-bubble { max-width: 80%; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: 0.9375rem; }
.chat-message.visitor .chat-bubble { background-color: var(--primary); color: white; border-bottom-right-radius: var(--radius-sm); }
.chat-message.admin .chat-bubble { background-color: var(--bg-alt); color: var(--text); border-bottom-left-radius: var(--radius-sm); }
.chat-time { font-size: 0.75rem; color: var(--text-light); margin-top: var(--space-xs); }
.chat-form { padding: var(--space-md); border-top: 1px solid var(--bg-alt); display: flex; gap: var(--space-sm); }
.chat-input { flex: 1; padding: var(--space-sm) var(--space-md); border: 2px solid var(--bg-alt); border-radius: var(--radius-md); font-size: 0.9375rem; }
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-send { padding: var(--space-sm) var(--space-md); background-color: var(--primary); color: white; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast); }
.chat-send:hover { background-color: var(--primary-dark); }
.chat-start-form { padding: var(--space-lg); }
.chat-start-form .form-group { margin-bottom: var(--space-md); }
.chat-start-form .form-input { font-size: 0.9375rem; }
@media (max-width: 576px) { .chat-widget { bottom: var(--space-md); right: var(--space-md); } .chat-window { width: calc(100vw - var(--space-2xl)); right: calc(-1 * var(--space-md)); } }

.error-page { text-align: center; padding: var(--space-3xl) 0; }
.error-code { font-size: clamp(6rem, 20vw, 12rem); font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: var(--space-md); }
.error-page h1 { margin-bottom: var(--space-md); }
.error-page p { color: var(--text-light); margin-bottom: var(--space-xl); max-width: 500px; margin-left: auto; margin-right: auto; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-slide-up { animation: slideUp 0.5s ease forwards; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.mt-xl { margin-top: var(--space-xl) !important; }
.mb-xl { margin-bottom: var(--space-xl) !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.w-100 { width: 100% !important; }
.mw-100 { max-width: 100% !important; }
/* ============================================
   MOBILE NAV FIXES
   ============================================ */

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Mobile toggle button - hamburger to X animation */
.mobile-menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; padding: var(--space-sm); cursor: pointer; width: 44px; height: 44px; }
.mobile-menu-toggle span { display: block; width: 25px; height: 3px; background-color: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; transform-origin: center; }
.mobile-menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Close button inside nav panel */
.nav-close-btn { display: none; }

/* Desktop CTA */
.header-cta-desktop { display: flex; align-items: center; }

@media (max-width: 992px) {
    .mobile-menu-toggle { display: flex; }
    .header-cta-desktop { display: none; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background-color: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-lg) var(--space-xl) var(--space-2xl);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-nav.active { right: 0; }

    /* Close X button inside nav */
    .nav-close-btn {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        margin-bottom: var(--space-lg);
        font-size: 1.5rem;
        color: var(--text-light);
        cursor: pointer;
        background: none;
        border: none;
        padding: var(--space-xs) 0;
    }
    .nav-close-btn:hover { color: var(--primary); }

    /* Nav menu items */
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--bg-alt);
    }
    .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md) 0;
        width: 100%;
        font-size: 1rem;
        color: var(--text);
        font-weight: 500;
    }
    .nav-menu > li > a::after { display: none; }
    .nav-menu > li > a:hover { color: var(--primary); }

    /* Dropdown arrow rotation on open */
    .nav-arrow { transition: transform 0.25s ease; font-size: 0.7rem; }
    .nav-dropdown.mobile-open > a .nav-arrow { transform: rotate(180deg); }

    /* Dropdown menu - hidden by default on mobile, shown when .mobile-open */
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 var(--space-sm) var(--space-lg);
        background: transparent;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-dropdown.mobile-open .nav-dropdown-menu {
        max-height: 400px;
    }
    .nav-dropdown-menu a {
        padding: var(--space-sm) 0;
        font-size: 0.9375rem;
        color: var(--text-light);
        border-bottom: none;
        display: block;
    }
    .nav-dropdown-menu a:hover { color: var(--primary); background: none; }

    /* Mobile CTA buttons at bottom of nav */
    .nav-mobile-cta {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        width: 100%;
        margin-top: var(--space-xl);
        padding-top: var(--space-lg);
        border-top: 1px solid var(--bg-alt);
    }
}

/* Hide mobile CTA on desktop */
@media (min-width: 993px) {
    .nav-mobile-cta { display: none; }
    .nav-close-btn { display: none; }
    .nav-arrow { font-size: 0.65rem; margin-left: 0.2rem; }
}

/* ============================================
   STICKY PHONE BAR
   ============================================ */

.sticky-phone-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.sticky-phone-bar.visible {
    transform: translateY(0);
}
.sticky-phone-link,
.sticky-appt-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem var(--space-md);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.sticky-phone-link {
    border-right: 1px solid rgba(255,255,255,0.25);
}
.sticky-phone-link:hover,
.sticky-appt-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}
.sticky-phone-link i,
.sticky-appt-link i {
    font-size: 1rem;
}

/* Add bottom padding to body so sticky bar doesn't cover content when visible */
body {
    padding-bottom: 60px;
}

/* ============================================
   GENERAL MOBILE LAYOUT FIXES
   ============================================ */

@media (max-width: 576px) {
    .container { padding: 0 var(--space-md); }
    .header-top { display: none; } /* hide top bar on small phones - saves space */
    .header-main { padding: var(--space-sm) 0; }
    .logo { font-size: 1.1rem; }
    .logo-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .section { padding: var(--space-2xl) 0; }
    .section-sm { padding: var(--space-xl) 0; }
    /* Chat window full width on small screens */
    .chat-window { width: calc(100vw - 2rem); right: -0.5rem; }
}

@media (max-width: 992px) {
    /* Ensure page content isn't shifted by nav */
    body.menu-open { overflow: hidden; }
}


/* ============================================
   MOBILE NAV FIXES
   ============================================ */

html, body { overflow-x: hidden; width: 100%; }

/* Hamburger to X animation */
.mobile-menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; padding: var(--space-sm); cursor: pointer; width: 44px; height: 44px; }
.mobile-menu-toggle span { display: block; width: 25px; height: 3px; background-color: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; transform-origin: center; }
.mobile-menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-close-btn { display: none; }
.header-cta-desktop { display: flex; align-items: center; }

@media (max-width: 992px) {
    .mobile-menu-toggle { display: flex; }
    .header-cta-desktop { display: none; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background-color: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-lg) var(--space-xl) var(--space-2xl);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-nav.active { right: 0; }

    .nav-close-btn {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        margin-bottom: var(--space-lg);
        font-size: 1.5rem;
        color: var(--text-light);
        cursor: pointer;
        background: none;
        border: none;
        padding: var(--space-xs) 0;
    }
    .nav-close-btn:hover { color: var(--primary); }

    .nav-menu { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .nav-menu > li { width: 100%; border-bottom: 1px solid var(--bg-alt); }
    .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md) 0;
        width: 100%;
        font-size: 1rem;
        color: var(--text);
        font-weight: 500;
    }
    .nav-menu > li > a::after { display: none; }
    .nav-menu > li > a:hover { color: var(--primary); }

    .nav-arrow { transition: transform 0.25s ease; font-size: 0.7rem; }
    .nav-dropdown.mobile-open > a .nav-arrow { transform: rotate(180deg); }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 var(--space-sm) var(--space-lg);
        background: transparent;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-dropdown.mobile-open .nav-dropdown-menu { max-height: 400px; }
    .nav-dropdown-menu a { padding: var(--space-sm) 0; font-size: 0.9375rem; color: var(--text-light); border-bottom: none; display: block; }
    .nav-dropdown-menu a:hover { color: var(--primary); background: none; }

    .nav-mobile-cta {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        width: 100%;
        margin-top: var(--space-xl);
        padding-top: var(--space-lg);
        border-top: 1px solid var(--bg-alt);
    }
}

@media (min-width: 993px) {
    .nav-mobile-cta { display: none; }
    .nav-close-btn { display: none; }
    .nav-arrow { font-size: 0.65rem; margin-left: 0.2rem; }
}

/* ============================================
   STICKY PHONE BAR
   ============================================ */

.sticky-phone-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.sticky-phone-bar.visible { transform: translateY(0); }
.sticky-phone-link, .sticky-appt-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem var(--space-md);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.sticky-phone-link { border-right: 1px solid rgba(255,255,255,0.25); }
.sticky-phone-link:hover, .sticky-appt-link:hover { background: rgba(255,255,255,0.15); color: white; }
.sticky-phone-link i, .sticky-appt-link i { font-size: 1rem; }

body { padding-bottom: 60px; }

/* ============================================
   GENERAL MOBILE LAYOUT FIXES
   ============================================ */

@media (max-width: 576px) {
    .container { padding: 0 var(--space-md); }
    .header-top { display: none; }
    .header-main { padding: var(--space-sm) 0; }
    .logo { font-size: 1.1rem; }
    .logo-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .section { padding: var(--space-2xl) 0; }
    .section-sm { padding: var(--space-xl) 0; }
    .chat-window { width: calc(100vw - 2rem); right: -0.5rem; }
    .chat-widget { bottom: 70px; }
}
