/* ===================================
   Washington RetroFoam - Main Styles
   Matching RetroFoam.com dealer page design
   =================================== */

/* CSS Variables */
:root {
    --color-primary: #1a3a6e;
    --color-primary-dark: #0f2847;
    --color-primary-light: #e8eef5;
    --color-secondary: #c41e3a;
    --color-accent: #c41e3a;
    --color-dark: #1a3a6e;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --color-light-gray: #f5f5f5;
    --color-mid-gray: #dddddd;
    --color-error: #dc3545;
    --color-success: #28a745;

    --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --max-width: 1200px;
    --header-height: 80px;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Header & Navigation
   =================================== */
header {
    background-color: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 70px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.logo-text:hover {
    text-decoration: none;
    color: var(--color-primary-dark);
}

nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav a {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-phone {
    color: var(--color-primary) !important;
    font-weight: 700;
    font-size: 1.1rem !important;
}

.nav-cta {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 12px 24px !important;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-cta:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-dark);
    transition: all 0.3s ease;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    color: var(--color-white);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 25px;
}

.hero-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.hero-phone {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-white);
}

.hero-phone a {
    color: var(--color-white);
    text-decoration: none;
}

.hero-phone a:hover {
    text-decoration: underline;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #e55f00;
    color: var(--color-white);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-blue {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-blue:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

/* ===================================
   Sections
   =================================== */
section {
    padding: 70px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.section-title p {
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Alt Section (Gray Background) */
.section-alt {
    background-color: var(--color-light-gray);
}

/* ===================================
   Problem/Solution Section
   =================================== */
.problem-section {
    background-color: var(--color-white);
}

.problem-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.problem-content h2 {
    color: var(--color-dark);
    margin-bottom: 25px;
}

.problem-content p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

/* ===================================
   Benefits Cards
   =================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.benefit-card {
    background: var(--color-white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
}

.benefit-card h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.benefit-card p {
    color: var(--color-text-light);
    margin-bottom: 0;
    line-height: 1.7;
}

/* ===================================
   Testimonial Section
   =================================== */
.testimonial-section {
    background: var(--color-primary-light);
    text-align: center;
}

.testimonial-content {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 25px;
    line-height: 1.8;
}

.testimonial-quote::before {
    content: '"';
    font-size: 3rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 10px;
}

.testimonial-author {
    font-weight: 700;
    color: var(--color-dark);
}

/* ===================================
   Service Area Section
   =================================== */
.service-area {
    background-color: var(--color-white);
}

.service-area-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    max-width: var(--max-width);
    margin: 0 auto;
}

.area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.area-tag {
    background-color: var(--color-light-gray);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-text);
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===================================
   Contact Form Section
   =================================== */
.contact-section {
    background-color: var(--color-light-gray);
}

.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 45px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-dark);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--color-error);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 1px solid var(--color-mid-gray);
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* Consent Section Styles */
.consent-section {
    margin: 35px 0;
}

.consent-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 20px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.consent-checkbox:last-child {
    margin-bottom: 0;
}

.consent-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 2px;
    border: 2px solid var(--color-mid-gray);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--color-white);
    position: relative;
}

.consent-checkbox input[type="checkbox"]:hover {
    border-color: var(--color-primary);
}

.consent-checkbox input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.consent-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.consent-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 58, 110, 0.15);
}

.consent-checkbox label {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text);
    cursor: pointer;
}

.consent-checkbox label strong {
    color: var(--color-dark);
    font-weight: 600;
}

.consent-checkbox label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.consent-error {
    display: none;
    color: var(--color-error);
    font-size: 0.85rem;
    padding-left: 36px;
    margin-top: -6px;
    margin-bottom: 15px;
}

/* SMS Consent Card */
.sms-consent-card {
    margin-top: 28px;
    padding: 28px;
    background-color: var(--color-white);
    border: 2px solid var(--color-mid-gray);
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.sms-consent-card:hover {
    border-color: #bbb;
}

.sms-consent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.sms-consent-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.optional-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    background-color: var(--color-light-gray);
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: lowercase;
}

.sms-consent-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 22px;
}

.sms-consent-legal {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--color-text-light);
    padding-left: 36px;
    margin-bottom: 20px;
}

.sms-consent-legal a {
    color: var(--color-primary);
    text-decoration: underline;
}

.marketing-consent {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-light-gray);
}

.marketing-consent input[type="checkbox"] {
    border-color: var(--color-primary);
    border-width: 2.5px;
}

/* Legacy checkbox styles for backwards compatibility */
.checkbox-group {
    margin: 30px 0;
    padding: 25px;
    background-color: var(--color-light-gray);
    border-radius: 8px;
    border: 1px solid var(--color-mid-gray);
}

.checkbox-group-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--color-dark);
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.checkbox-wrapper:last-child {
    margin-bottom: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-wrapper label {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-light);
    cursor: pointer;
    font-weight: 400;
}

.checkbox-wrapper label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.checkbox-divider {
    border: none;
    border-top: 1px solid var(--color-mid-gray);
    margin: 18px 0;
}

/* Form Error States */
.form-group.error input,
.form-group.error textarea {
    border-color: var(--color-error);
}

.error-message {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Form Success Message */
.form-success {
    text-align: center;
    padding: 40px;
}

.form-success h3 {
    color: var(--color-success);
    margin-bottom: 15px;
}

.form-success p {
    color: var(--color-text-light);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===================================
   Footer
   =================================== */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto 40px;
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--color-white);
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 15px;
    display: block;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    margin-bottom: 15px;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.footer-phone {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white) !important;
}

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

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Terms Page Specific
   =================================== */
.terms-page main {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.terms-page h1 {
    text-align: center;
    margin-bottom: 10px;
}

.terms-page .last-updated {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 40px;
}

.terms-page h2 {
    font-size: 1.4rem;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.highlight-box {
    background-color: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.contact-box {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.contact-box p {
    margin-bottom: 10px;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

.contact-box a {
    color: var(--color-primary);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero h1 {
        font-size: 2rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .service-area-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        display: none;
        box-shadow: var(--shadow);
    }

    nav.active {
        display: flex;
    }

    .nav-cta {
        text-align: center;
    }

    .hero {
        padding: 50px 20px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero-phone {
        font-size: 1.4rem;
    }

    section {
        padding: 50px 20px;
    }

    .form-container {
        padding: 30px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .checkbox-wrapper label {
        font-size: 0.8rem;
    }

    .hero-contact {
        flex-direction: column;
        gap: 15px;
    }

    /* Consent section mobile */
    .consent-title {
        font-size: 1.1rem;
    }

    .consent-checkbox label {
        font-size: 0.88rem;
    }

    .sms-consent-card {
        padding: 20px;
    }

    .sms-consent-header {
        flex-wrap: wrap;
    }

    .sms-consent-header h4 {
        font-size: 1rem;
    }

    .sms-consent-legal {
        padding-left: 0;
        margin-top: 12px;
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-white);
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
