/*
Theme Name: Apex Garage
Author: Apex Garage
Description: Responsive San Jose garage door service landing page with an interactive troubleshooter, price estimator, and booking request form.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apex-garage
Tags: one-column, custom-logo, featured-images, translation-ready
*/

/* ==========================================
   RESET & VARIABLES
   ========================================== */
:root {
    --primary: #0B132B;
    --primary-light: #1C2541;
    --accent: #10B981;
    --accent-hover: #059669;
    --gold: #EAB308;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-main); color: var(--text-dark); background-color: var(--bg-light); line-height: 1.6; padding-bottom: 70px; }
@media (min-width: 992px) { body { padding-bottom: 0; } }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 10px 16px; background: #fff; color: var(--primary); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* ==========================================
   TYPOGRAPHY & BUTTONS
   ========================================== */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--primary); line-height: 1.2; }
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
@media (min-width: 768px) { h1 { font-size: 3.25rem; } h2 { font-size: 2.5rem; } }
.highlight { color: var(--accent); background: linear-gradient(120deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%); padding: 0 6px; border-radius: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1rem; padding: 14px 24px; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all 0.25s ease; text-align: center; }
.btn-primary { background-color: var(--accent); color: #FFFFFF; }
.btn-primary:hover, .btn-primary:focus-visible { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid #2563EB; outline-offset: 3px; }

/* ==========================================
   TOP EMERGENCY BAR
   ========================================== */
.top-bar { background-color: #090D16; color: var(--text-light); font-size: 0.875rem; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.dispatch-status { display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 10px; height: 10px; background-color: #22C55E; border-radius: 50%; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.top-contact { display: flex; align-items: center; gap: 20px; }
.phone-link { color: var(--accent); font-weight: 700; }

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar { background-color: var(--bg-white); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.nav-container { display: flex; align-items: center; justify-content: space-between; min-height: 70px; position: relative; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; color: var(--primary); }
.logo-icon { color: var(--accent); }
.logo-text span { color: var(--accent); }
.nav-links { display: none; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); transition: color 0.2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--accent); }
.mobile-menu-toggle { display: block; background: none; border: none; font-size: 1.5rem; color: var(--primary); cursor: pointer; padding: 8px; }
.nav-links.is-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: #FFFFFF; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 1001; }
.nav-links.is-open a { display: block; padding: 8px 0; }
@media (min-width: 992px) { .nav-links { display: flex; } .mobile-menu-toggle { display: none; } }
@media (max-width: 575px) { .nav-cta { display: none; } .top-bar-content { justify-content: center; text-align: center; } .top-contact { justify-content: center; flex-wrap: wrap; gap: 8px 14px; } }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero { background: linear-gradient(135deg, #0B132B 0%, #1C2541 100%); color: var(--text-light); padding: 50px 0 70px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: 1.2fr 0.8fr; } }
.badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(16, 185, 129, 0.12); color: var(--accent); padding: 6px 14px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 15px; border: 1px solid rgba(16, 185, 129, 0.3); }
.hero-text h1 { color: #FFFFFF; margin-bottom: 20px; }
.hero-sub { font-size: 1.1rem; color: #94A3B8; margin-bottom: 25px; }
.hero-bullets { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.bullet-item { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.bullet-item i { color: #22C55E; }
.hero-cta-group { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
@media (min-width: 576px) { .hero-cta-group { flex-direction: row; align-items: center; } }
.btn-call-hero { background-color: var(--accent); color: #FFFFFF; padding: 12px 24px; border-radius: var(--radius-md); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
.btn-call-hero i { font-size: 1.8rem; }
.btn-call-hero .btn-text { display: flex; flex-direction: column; text-align: left; }
.btn-subtext { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.btn-maintext { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.btn-secondary-hero { color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.2); padding: 14px 24px; border-radius: var(--radius-md); }
.btn-secondary-hero:hover { background: rgba(255, 255, 255, 0.05); }
.hero-trust-bar { display: flex; align-items: center; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.stars { color: var(--gold); }
.trust-divider { width: 1px; height: 35px; background: rgba(255, 255, 255, 0.15); }
.trust-badge { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.trust-badge i { color: var(--accent); font-size: 1.2rem; }

/* Quick booking card */
.quick-book-card { background-color: var(--bg-white); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-lg); color: var(--text-dark); }
.card-header h2 { font-size: 1.4rem; margin-bottom: 5px; }
.card-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.quick-form .form-group { margin-bottom: 15px; }
.quick-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--primary); }
.quick-form input, .quick-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.95rem; background-color: #F8FAFC; transition: border-color 0.2s; }
.quick-form input:focus, .quick-form select:focus { outline: none; border-color: var(--accent); background-color: #FFFFFF; }
.btn-form-submit { width: 100%; background-color: var(--primary); color: #FFFFFF; margin-top: 10px; }
.btn-form-submit:hover { background-color: var(--primary-light); }
.privacy-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 10px; }
.booking-notice { margin-bottom: 16px; padding: 12px; border-radius: var(--radius-sm); background: #ECFDF5; color: #065F46; font-size: 0.9rem; }
.booking-hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================
   SERVICES SECTION
   ========================================== */
.services-section { padding: 80px 0; background-color: var(--bg-light); }
.section-header { text-align: center; max-width: 650px; margin: 0 auto 50px; }
.section-header p { color: var(--text-muted); margin-top: 10px; }
.sub-title { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 8px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.service-card { background-color: var(--bg-white); padding: 30px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.service-icon { width: 50px; height: 50px; background-color: rgba(16, 185, 129, 0.1); color: var(--accent); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.service-card h3 { margin-bottom: 12px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.service-list li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; }
.service-list i { color: #22C55E; }

/* ==========================================
   INTERACTIVE DIAGNOSTIC TOOL
   ========================================== */
.interactive-section { padding: 80px 0; background-color: var(--bg-white); }
.diagnostic-wrapper { display: grid; grid-template-columns: 1fr; gap: 30px; background: var(--bg-light); padding: 30px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.diagnostic-display { transition: opacity 0.15s ease; }
@media (min-width: 992px) { .diagnostic-wrapper { grid-template-columns: 320px 1fr; } }
.diagnostic-buttons { display: flex; flex-direction: column; gap: 12px; }
.diag-btn { display: flex; align-items: center; gap: 12px; padding: 16px; background-color: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-family: var(--font-main); font-weight: 600; font-size: 0.95rem; color: var(--text-dark); cursor: pointer; text-align: left; transition: all 0.2s; }
.diag-btn i { color: var(--accent); font-size: 1.1rem; }
.diag-btn:hover { border-color: var(--accent); }
.diag-btn.active { background-color: var(--primary); color: #FFFFFF; border-color: var(--primary); }
.diag-btn.active i { color: var(--accent); }
.diag-content-box { background-color: var(--bg-white); padding: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: flex-start; }
.diag-badge { background: rgba(239, 68, 68, 0.1); color: #EF4444; font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-bottom: 15px; display: inline-flex; align-items: center; gap: 6px; }
.diag-content-box h3 { font-size: 1.6rem; margin-bottom: 12px; }
.diag-content-box p { color: var(--text-muted); margin-bottom: 25px; }
.diag-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; width: 100%; padding: 20px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin-bottom: 25px; }
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.meta-value { font-weight: 700; font-size: 1rem; color: var(--primary); margin-top: 4px; }
.danger-high { color: #EF4444; }

/* ==========================================
   PRICING CALCULATOR
   ========================================== */
.calculator-section { padding: 80px 0; background-color: var(--bg-light); }
.calculator-box { background-color: var(--bg-white); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
@media (min-width: 768px) { .calculator-box { padding: 50px; } }
.calc-header { text-align: center; margin-bottom: 40px; }
.calc-header p { color: var(--text-muted); margin-top: 10px; }
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 992px) { .calc-grid { grid-template-columns: 1.4fr 0.8fr; align-items: center; } }
.calc-field { margin-bottom: 25px; }
.calc-field h3 { display: block; font-weight: 700; margin-bottom: 10px; font-size: 0.95rem; }
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background-color: var(--bg-light); border: 1px solid var(--border-color); padding: 10px 16px; border-radius: 30px; font-family: var(--font-main); font-weight: 600; font-size: 0.875rem; color: var(--text-dark); cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: var(--accent); }
.chip.active { background-color: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.calc-result-card { background: linear-gradient(135deg, #0B132B 0%, #1C2541 100%); color: var(--text-light); padding: 35px; border-radius: var(--radius-md); text-align: center; }
.est-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: #94A3B8; }
.price-display { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; color: var(--accent); margin: 10px 0; }
.calc-disclaimer { font-size: 0.8rem; color: #94A3B8; margin-bottom: 25px; }

/* ==========================================
   SERVICE AREAS
   ========================================== */
.areas-section { padding: 60px 0; background-color: var(--bg-white); }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.area-tag { background-color: var(--bg-light); border: 1px solid var(--border-color); padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.area-tag i { color: var(--accent); }

/* ==========================================
   REVIEWS
   ========================================== */
.reviews-section { padding: 80px 0; background-color: var(--bg-light); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.review-card { background-color: var(--bg-white); padding: 30px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.review-stars { color: var(--gold); font-size: 1.2rem; margin-bottom: 15px; }
.review-text { font-style: italic; color: var(--text-dark); margin-bottom: 20px; font-size: 0.95rem; }
.reviewer { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; background-color: var(--primary); color: #FFFFFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.reviewer strong { display: block; font-size: 0.95rem; }
.reviewer span { font-size: 0.8rem; color: var(--text-muted); }

/* ==========================================
   STICKY MOBILE FOOTER BAR
   ========================================== */
.mobile-sticky-bar { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--primary); padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; z-index: 999; box-shadow: 0 -4px 10px rgba(0,0,0,0.15); }
@media (min-width: 992px) { .mobile-sticky-bar { display: none; } }
.sticky-info { display: flex; align-items: center; gap: 8px; color: #FFFFFF; font-size: 0.85rem; font-weight: 600; }
.sticky-pulse { width: 8px; height: 8px; background-color: #22C55E; border-radius: 50%; }
.sticky-call-btn { background-color: var(--accent); color: #FFFFFF; font-weight: 800; padding: 10px 18px; border-radius: var(--radius-sm); font-size: 0.9rem; }

/* ==========================================
   FOOTER & GENERIC CONTENT
   ========================================== */
.footer { background-color: #090D16; color: #94A3B8; padding-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-bottom: 40px; }
.footer-heading { color: #FFFFFF; font-size: 1.1rem; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a:hover, .footer-col ul a:focus-visible { color: var(--accent); }
.footer-col p { margin-top: 8px; }
.text-white { color: #FFFFFF !important; }
.footer-bottom { background-color: #05080E; padding: 20px 0; text-align: center; font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.content-page { padding-top: 60px; padding-bottom: 60px; min-height: 55vh; }
.content-entry { max-width: 820px; margin: 0 auto; }
.content-entry h1 { margin-bottom: 24px; }
.entry-content > * { margin-bottom: 1.25em; }
.entry-content a { color: var(--accent-hover); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
