/* ========================================
   MODERN QUOTE FORM STYLES (PREMIUM & MOBILE FIRST)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --primary-color: #e74c3c;
    --primary-hover: #c0392b;
    --secondary-color: #3b82f6;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

.quote-page-section {
    padding: 60px 0;
    background: var(--bg-light);
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
}

.quote-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.quote-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -1px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.quote-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.5;
}

.quote-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    padding-bottom: 30px;
    transition: all 0.3s ease;
}

/* --- STEPPER (TIMELINE) --- */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    padding: 30px 50px;
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.stepper-item.active {
    opacity: 1;
    transform: translateY(-2px);
}

.step-counter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

.stepper-item.active .step-counter {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 10px 15px -3px rgba(231, 76, 60, 0.3);
}

.step-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.3s;
}

/* Progress Line */
.progress-line-bg {
    position: absolute;
    top: 52px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* --- FORM CONTENT --- */
.quote-form-container {
    padding: 40px 60px;
}

.quote-step {
    display: none;
    animation: fadeInSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.quote-step.active {
    display: block;
}

.step-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
}

.step-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 35px;
    font-size: 1rem;
}

/* --- CARDS GRID --- */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 20px;
}

.selection-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.selection-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.selection-card.active {
    border-color: var(--primary-color);
    background: #fffafa;
    box-shadow: 0 10px 20px -5px rgba(231, 76, 60, 0.15);
}

.card-icon-circle {
    width: 70px;
    height: 70px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.card-text-icon {
    font-size: 2rem;
    font-weight: 800;
    color: #cbd5e1;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.selection-card:hover .card-icon-circle,
.selection-card.active .card-icon-circle {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1) rotate(-5deg);
}

.selection-card:hover .card-text-icon,
.selection-card.active .card-text-icon {
    color: var(--primary-color);
}

.card-title {
    font-weight: 700;
    color: #334155;
    font-size: 1rem;
    line-height: 1.35;
}

/* --- INPUTS & ADDRESS --- */
.address-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.address-panel {
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.panel-header.from {
    background: #3b82f6;
}

.panel-header.to {
    background: #ef4444;
}

.panel-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.modern-input,
.modern-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: all 0.2s ease;
    appearance: none;
    font-family: inherit;
}

.modern-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.modern-input:focus,
.modern-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* --- DETAILS (STEP 4) --- */
.details-split-container {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.detail-col {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.detail-head {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.method-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.method-card-mini {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 100%;
}

.method-card-mini i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.method-card-mini:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.method-card-mini.active {
    border-color: var(--secondary-color);
    background: #eff6ff;
    color: var(--secondary-color);
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.date-selection-section {
    margin-top: 30px;
}

.date-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.date-option-card {
    background: #fff;
    border: 2px solid var(--border-color);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.date-option-card i {
    font-size: 1.4rem;
    color: #94a3b8;
}

.date-option-card.active {
    border-color: var(--secondary-color);
    background: #eff6ff;
    color: var(--secondary-color);
}

.date-option-card.active i {
    color: var(--secondary-color);
}

/* --- CONTACT (STEP 5) --- */
.contact-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.modern-input.contact {
    padding-left: 50px;
}

/* --- NAVIGATION --- */
.form-navigation {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.btn-nav {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-gray);
}

.btn-outline:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: var(--text-dark);
}

.btn-solid {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.2);
}

.btn-solid:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.3);
}

/* --- ANIMATIONS --- */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   MOBILE & RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 900px) {
    .address-grid-container {
        grid-template-columns: 1fr;
    }

    .details-split-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .quote-page-section {
        padding: 0;
        background: #fff;
    }

    /* Clean look on mobile */
    .quote-container {
        box-shadow: none;
        border-radius: 0;
        margin-bottom: 0;
    }

    .quote-header {
        margin-bottom: 20px;
        padding-top: 20px;
    }

    .quote-header h1 {
        font-size: 1.8rem;
    }

    /* Mobile Stepper (Horizontal Scroll/Compact) */
    .stepper-wrapper {
        padding: 15px 20px;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 25px;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 50;
        /* Persistent header */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .stepper-wrapper::-webkit-scrollbar {
        display: none;
    }

    .progress-line-bg {
        display: none;
    }

    .stepper-item {
        flex: 0 0 auto;
        min-width: auto;
        opacity: 0.4;
    }

    .stepper-item.active {
        opacity: 1;
        pointer-events: none;
    }

    .step-counter {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .step-name {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Form Content Mobile */
    .quote-form-container {
        padding: 20px;
        padding-bottom: 100px;
        /* Space for sticky nav */
    }

    .step-title {
        font-size: 1.5rem;
        text-align: left;
    }

    .step-subtitle {
        text-align: left;
        margin-bottom: 25px;
        font-size: 0.95rem;
    }

    /* Grids Mobile */
    .selection-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Make cards horizontal on mobile for better space usage */
    .selection-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
        border-radius: 16px;
    }

    .card-icon-circle {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        margin: 0;
        margin-right: 15px;
        flex-shrink: 0;
    }

    .card-text-icon {
        font-size: 1.5rem;
        margin: 0 15px 0 0;
    }

    .card-title {
        font-size: 1.05rem;
    }

    /* Inputs Mobile */
    .modern-input,
    .modern-select {
        padding: 16px;
        font-size: 16px;
        /* No zoom */
    }

    /* Details Mobile */
    .method-grid-mini {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    /* Keep 3 cols but tighter */
    .method-card-mini {
        font-size: 0.75rem;
        padding: 10px 5px;
        flex-direction: column;
    }

    .method-card-mini i {
        font-size: 1.1rem;
    }

    .date-options-grid {
        grid-template-columns: 1fr;
    }

    .date-option-card {
        flex-direction: row;
        padding: 15px;
        justify-content: center;
    }

    /* Sticky Navigation Mobile */
    .form-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px 20px 25px;
        /* Safe area bottom */
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
        z-index: 100;
        margin: 0;
        border: none;
        flex-direction: row-reverse;
        /* Next on right */
        gap: 15px;
    }

    .btn-nav {
        padding: 14px 24px;
        font-size: 1rem;
        width: auto;
    }

    .btn-solid {
        flex: 2;
        justify-content: center;
    }

    .btn-outline {
        flex: 1;
        justify-content: center;
        padding: 14px 10px;
    }
}