/**
 * Modern Responsive Styles for A-1 Auto Insurance
 * Mobile-first, accessible design
 */

/* ============================================
   CSS Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1F2937;
    background: #ffffff;
}

/* ============================================
   Typography
   ============================================ */
h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #073B6D;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 14px;
    color: #073B6D;
    font-weight: 700;
}

h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #073B6D;
    font-weight: 600;
}

h4 {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #073B6D;
    font-weight: 600;
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: #4B5563;
    margin-bottom: 16px;
}

a {
    color: #0EA5E9;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #073B6D;
}

ul, ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: #4B5563;
}

strong, b {
    font-weight: 700;
    color: #073B6D;
}

/* ============================================
   Layout & Container
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: #013472;
    color: #ffffff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-link {
    display: block;
    line-height: 0;
}

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

.header-phone {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    margin-left: auto;
    margin-right: 15px;
    white-space: nowrap;
}

.header-cta {
    background: #FF6B00;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s;
    font-size: 15px;
    white-space: nowrap;
}

.header-cta:hover {
    background: #e55f00;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   Product Navigation
   ============================================ */
.product-nav {
    background: #F5FAFF;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.product-nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: min-content;
}

.product-nav-item {
    flex-shrink: 0;
}

.product-nav-link {
    display: block;
    padding: 10px 12px;
    color: #073B6D;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s;
    border-bottom: 3px solid transparent;
    font-size: 13px;
    font-weight: 600;
}

.product-nav-link:hover,
.product-nav-link.active {
    background: #ffffff;
    color: #0EA5E9;
    border-bottom-color: #0EA5E9;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, #073B6D 0%, #0EA5E9 100%);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-intro {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* ============================================
   Quote Form - WordPress Plugin V3 Style
   ============================================ */
.quote-form-hero-v3 {
    background: #073B6D;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.iqf-v3-form {
    width: 100%;
}

.iqf-v3-container {
    display: grid;
    gap: 20px;
}

.iqf-v3-field {
    display: grid;
    gap: 8px;
}

.iqf-v3-field label {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
}

.iqf-v3-field input,
.iqf-v3-field select {
    width: 100%;
    height: 56px;
    padding: 16px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.iqf-v3-field input:focus,
.iqf-v3-field select:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.iqf-v3-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.iqf-v3-btn {
    width: 100%;
    height: 56px;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: bold;
    background: #FF6B00;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.iqf-v3-btn:hover {
    background: #e55f00;
}

.iqf-v3-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.3);
}

/* Product Page Quote Form - V4 Two-Step */
.iqf-v4-wrapper {
    background: #013472;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin: 30px auto;
    max-width: 600px;
}

.iqf-v4-progress-container {
    margin-bottom: 24px;
}

.iqf-v4-progress-bar {
    background: rgba(255,255,255,0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.iqf-v4-progress-fill {
    background: #FF6B00;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.iqf-v4-progress-text {
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.iqf-v4-form {
    width: 100%;
}

.iqf-v4-step {
    display: block;
}

.iqf-v4-hidden {
    display: none !important;
}

.iqf-v4-field {
    margin-bottom: 20px;
}

.iqf-v4-field label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.iqf-v4-field select,
.iqf-v4-field input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    color: #1f2937;
    font-weight: 500;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.iqf-v4-field select:focus,
.iqf-v4-field input[type="tel"]:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.iqf-v4-radio-group {
    display: flex;
    gap: 12px;
}

.iqf-v4-radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.iqf-v4-radio:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.iqf-v4-radio input[type="radio"] {
    margin-right: 8px;
}

.iqf-v4-radio input[type="radio"]:checked + span {
    font-weight: 700;
}

.iqf-v4-radio span {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
}

.iqf-v4-btn,
.iqf-v4-btn-secondary {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.iqf-v4-btn {
    background: #FF6B00;
    color: #ffffff;
}

.iqf-v4-btn:hover {
    background: #e55f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.iqf-v4-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.4);
}

.iqf-v4-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
}

.iqf-v4-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .iqf-v4-wrapper {
        padding: 24px 20px;
    }
    
    .iqf-v4-buttons {
        grid-template-columns: 1fr;
    }
    
    .iqf-v4-btn-secondary {
        order: 2;
    }
}

/* Legacy quote form styles */
.quote-form-hero {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-field {
    flex: 1;
    min-width: 200px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1F2937;
    font-size: 14px;
}

.form-field select,
.form-field input[type="tel"],
.form-field input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    min-height: 48px;
}

.form-field select:focus,
.form-field input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.btn-primary {
    background: #FF6B00;
    color: #ffffff;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-height: 48px;
    width: 100%;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #e55f00;
}

.btn-primary:active {
    background: #cc5500;
}

/* ============================================
   Trust Bullets
   ============================================ */
.trust-bullets {
    background: #F5FAFF;
    padding: 40px 0;
}

.trust-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    list-style: none;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.trust-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #0EA5E9;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.trust-text {
    flex: 1;
}

.trust-text strong {
    display: block;
    margin-bottom: 5px;
    color: #073B6D;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
    padding: 60px 0;
    background: #ffffff;
}

.how-it-works-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.how-it-works-text {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step-item-new {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #013472;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 18px;
    font-weight: bold;
    color: #073B6D;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 15px;
    color: #4B5563;
    line-height: 1.7;
}

.how-it-works-image {
    text-align: center;
}

.how-it-works-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ============================================
   Product Cards
   ============================================ */
.product-cards {
    padding: 60px 0;
    background: #F5FAFF;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    color: #073B6D;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #013472;
    stroke-width: 2;
}

.product-card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #073B6D;
}

.product-card-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

/* ============================================
   All States
   ============================================ */
.all-states {
    background: #F5FAFF;
    padding: 60px 0;
}

.states-grid-all {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.state-link {
    display: block;
    padding: 14px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    color: #073B6D;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.state-link:hover {
    background: #0EA5E9;
    color: #ffffff;
    border-color: #0EA5E9;
}

/* ============================================
   FAQs
   ============================================ */
.faqs {
    padding: 60px 0;
}

.faq-item {
    margin-bottom: 24px;
}

.faq-question {
    font-size: 18px;
    font-weight: bold;
    color: #073B6D;
    margin-bottom: 8px;
}

.faq-answer {
    color: #4B5563;
    line-height: 1.8;
}

/* ============================================
   Disclaimer
   ============================================ */
.disclaimer {
    background: #F5FAFF;
    padding: 40px 0;
    border-top: 1px solid #e5e7eb;
}

.disclaimer-text {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #073B6D;
    color: #ffffff;
    padding: 40px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    opacity: 0.8;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-intro {
        font-size: 16px;
    }
    
    .quote-form-hero-v3 {
        padding: 24px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-field {
        min-width: 100%;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .header-inner {
        gap: 10px;
    }
    
    .header-phone {
        font-size: 16px;
        margin-left: 0;
    }
    
    .header-cta {
        display: none;
    }
    
    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
        order: 4;
    }
    
    /* Hide product nav by default on mobile */
    .product-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .product-nav.mobile-open {
        display: block;
    }
    
    .product-nav-list {
        flex-direction: column;
        padding: 10px 0;
    }
    
    .product-nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .states-grid-all {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .how-it-works-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .how-it-works-image {
        order: 1;
    }
    
    .how-it-works-text {
        order: 2;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .states-grid-all {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid #0EA5E9;
    outline-offset: 2px;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
