/* ============================================
   ASSURANCE PAGES — v4 Warm Overrides
   Extends design-system.css / components.css / pages.css
   Handles: hero, form, profile selector, multi-step form
   ============================================ */

/* Hero Page — Cream background, NO overlay image */
.hero-page {
    position: relative;
    padding: var(--section-py) 0;
    background: var(--cream);
    color: var(--gray-900);
    overflow: hidden;
}

.hero-page::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 50%;
    height: 120%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    z-index: 0;
}

.hero-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 40%;
    height: 80%;
    background: radial-gradient(circle, rgba(13, 159, 110, 0.06) 0%, transparent 65%);
    border-radius: 50%;
    z-index: 0;
}

.hero-page .hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
    position: relative;
    z-index: 2;
}

.hero-page .hero-text h1 {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.hero-page .hero-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-5);
    line-height: 1.65;
}

.hero-page .hero-subtitle strong {
    color: var(--gray-900) !important;
    font-weight: 700;
}

/* Benefits — on cream bg */
.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.benefit-item i {
    color: var(--cta);
    font-size: 0.875rem;
}

/* Trust Indicators — dark text */
.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    align-items: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--gray-600);
    font-weight: 500;
}

.trust-item i {
    color: var(--cta);
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--accent);
    font-size: 0.875rem;
}

/* Form Card */
.hero-form {
    position: relative;
    z-index: 2;
}

.comparison-form-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-header {
    background: linear-gradient(135deg, var(--cta) 0%, var(--teal) 100%);
    color: var(--white);
    padding: var(--space-5) var(--space-6);
    text-align: center;
}

.form-header h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--white);
}

.form-header p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: var(--text-sm);
}

/* Progress Steps */
.form-progress {
    display: flex;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--gray-400);
    position: relative;
    flex: 1;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 0.25rem);
    width: calc(100% - 0.5rem);
    height: 2px;
    background: var(--gray-200);
    transform: translateY(-50%);
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active {
    color: var(--cta);
}

.progress-step.completed {
    color: var(--cta);
}

.progress-step.completed::after {
    background: var(--cta);
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 600;
    transition: all 0.25s ease;
}

.progress-step.active .step-circle {
    background: var(--cta);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(13, 159, 110, 0.3);
}

.progress-step.completed .step-circle {
    background: var(--cta);
    color: var(--white);
}

/* Multi-Step Form */
.multi-step-form {
    padding: var(--space-5);
}

.form-step {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    margin-bottom: var(--space-5);
}

.form-section:last-child {
    margin-bottom: 0;
}

/* Profile Selector */
.profile-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.profile-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0.875rem 0.5rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.profile-option:hover {
    border-color: var(--cta);
    background: var(--cta-lightest);
}

.profile-option.active {
    border-color: var(--cta);
    background: var(--cta-lightest);
    color: var(--cta-dark);
    box-shadow: 0 2px 8px rgba(13, 159, 110, 0.15);
}

.profile-option i {
    font-size: 1.375rem;
    color: var(--cta);
}

/* Form Fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    position: relative;
    margin-bottom: var(--space-4);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--gray-800);
    font-family: var(--font-body);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cta);
    box-shadow: 0 0 0 3px rgba(13, 159, 110, 0.12);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

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

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-100);
}

/* Form Stats Footer */
.form-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.form-stats .stat {
    text-align: center;
}

.form-stats .stat strong {
    display: block;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--cta);
    margin-bottom: 2px;
}

.form-stats .stat span {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* Privacy Notice */
.privacy-notice {
    background: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    margin-top: var(--space-4);
}

.checkbox-container,
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--gray-600);
}

.checkbox-container input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    accent-color: var(--cta);
    cursor: pointer;
}

.privacy-notice p {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin: var(--space-2) 0 0;
    line-height: 1.6;
}

.privacy-notice a {
    color: var(--cta);
    text-decoration: underline;
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-dropdown .autocomplete-item {
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--gray-700);
    transition: background 0.15s ease;
}

.autocomplete-dropdown .autocomplete-item:hover {
    background: var(--cta-lightest);
    color: var(--cta-dark);
}

/* Sticky Mobile CTA */
.sticky-compare-button {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-3) var(--space-4);
    background: var(--cta);
    color: var(--white);
    text-align: center;
    font-weight: 700;
    font-size: var(--text-base);
    z-index: var(--z-sticky);
    text-decoration: none;
    box-shadow: 0 -2px 16px rgba(13, 159, 110, 0.2);
    transition: all 0.25s ease;
}

.sticky-compare-button i {
    margin-right: var(--space-2);
}

.sticky-compare-button:hover {
    background: var(--cta-dark);
    color: var(--white);
}

.sticky-compare-button.hidden-state {
    display: none !important;
}

@media (max-width: 768px) {
    .sticky-compare-button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
    }
}

/* Info Card Overrides */
.info-card {
    transition: all 0.25s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--gray-200);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cta-lightest);
    color: var(--cta);
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
}

/* Section Labels */
.label {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem var(--space-4);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.label--primary {
    background: var(--cta-lightest);
    color: var(--cta);
}

/* FAQ */
.faq-section {
    background: var(--gray-50);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #0F3060 50%, var(--teal-dark) 100%);
    padding: var(--section-py) 0;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-section .cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.cta-section .cta-content h2 {
    color: var(--white);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.cta-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-lg);
    margin-bottom: var(--space-6);
}

.cta-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
    list-style: none;
    padding: 0;
}

.cta-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
    font-weight: 500;
}

.cta-features li i {
    color: var(--accent);
}

.cta-button-large {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--gray-900);
    font-size: var(--text-lg);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.cta-button-large:hover {
    background: var(--accent-dark);
    color: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-page .hero-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-page .hero-text h1 {
        font-size: var(--text-3xl);
    }

    .profile-selector {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-stats {
        grid-template-columns: 1fr;
    }

    .hero-benefits {
        flex-direction: column;
    }

    .trust-indicators {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .multi-step-form {
        padding: var(--space-4);
    }

    .form-header {
        padding: var(--space-4);
    }

    .progress-step span {
        display: none;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }
}