:root {
    --primary: #1a73e8;
    --secondary: #f5f7fb;
    --text-dark: #1f2937;
    --border-light: #e5e7eb;
    --radius-lg: 12px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: 0.4s ease;
    --font: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

body {
    background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.5rem;
    gap: 1rem;
}

/* FORM WRAPPER CONTAINER */
.form-wrapper-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

/* FORM WRAPPER */
.form-wrapper {
    width: 100%;
    max-width: 900px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem 2.5rem;
}

/* STEP INDICATOR */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 3px solid #ccc;
    transition: all 0.3s ease;
}

.step.active {
    color: var(--primary);
    border-color: var(--primary);
}

/* FORM STEPS */
.form-step {
    display: none;
    flex-direction: column;
    min-height: 50vh;
    opacity: 0;
    transform: translateX(50px);
    transition: all var(--transition);
}

.form-step.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
    background-color: #fff;
}


/* HEADINGS */
h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

/* CARD GRID */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    background: #ffffff;
}

.card-grid .branch-card,
.card-grid .car-card {
    flex: 1 1 200px;
    max-width: 250px;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    box-shadow: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-grid .branch-card:hover,
.card-grid .car-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-grid .branch-card.active,
.card-grid .car-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.total-price {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    margin: 0;
}

/* INPUT GROUP */
.input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-input,
select {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    outline: none;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.form-input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* BUTTONS */
button {
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.next-btn,
.submit-btn {
    background: var(--primary);
    color: #fff;
}

.back-btn {
    background: #ccc;
    color: #000;
}

button:hover {
    opacity: 0.9;
}

/* LICENCE + ADD-ON BUTTONS */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.licence-btn,
.addon-btn {
    flex: 1;
    background: #fff;
    border: 2px solid var(--border-light);
    font-weight: 700;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.licence-btn.active,
.addon-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* TIME SLOTS */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.time-slot {
    text-align: center;
    padding: 0.6rem 0;
    border-radius: 999px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.25s ease;
}

.time-slot.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ADDON SECTION */
.addon-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* FOOTER */
footer {
    text-align: center;
}

/* ================================
   MOBILE STEP PROGRESS
================================ */
.mobile-progress {
    display: none;
    margin-bottom: 1.5rem;
}

.mobile-step-text {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.mobile-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.mobile-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* ================================
   ADD-ON SERVICES DESIGN
================================ */

.addon-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.addon-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    background: #fff;
}

.addon-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.addon-icon {
    font-size: 1.8rem;
}

.addon-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.addon-info p {
    font-size: 0.85rem;
    color: #6b7280;
}

.addon-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.addon-price {
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.addon-card .addon-btn.active~.addon-price,
.addon-card.active .addon-price {
    color: #ffffff !important;
}

.addon-card .addon-btn.active~.addon-info p,
.addon-card.active .addon-info p {
    color: #ffffff !important;
}

/* Button overrides inside addon */
.addon-card .button-group {
    margin: 0;
    gap: 0.5rem;
}

.addon-card .addon-btn {
    min-width: 64px;
}

/* ================================
   SCHEDULE SESSION DESIGN
================================ */

.schedule-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: #fff;
}

.schedule-block {
    margin-bottom: 1.5rem;
}

.schedule-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Duration chips */
.duration-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.duration-chip {
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 2px solid var(--border-light);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.duration-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Time slots tweak */
.time-slots-grid {
    gap: 0.75rem;
}

.time-slot {
    font-size: 0.85rem;
}

/* MOBILE */
@media (max-width: 768px) {
    .schedule-card {
        padding: 1rem;
    }

    .duration-chips {
        justify-content: space-between;
    }

    .duration-chip {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
    }
}

/* ================================
   LICENCE SECTION DESIGN
================================ */

.licence-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: #fff;
}

.licence-question {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* YES / NO CARDS */
.licence-choice {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.licence-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 2px solid var(--border-light);
    background: #fff;
    font-weight: 700;
    transition: all 0.3s ease;
}

.licence-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.licence-icon {
    font-size: 2rem;
}

/* DETAILS */
.licence-details {
    margin-top: 1rem;
}

.licence-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

/* NO LICENCE MESSAGE */
.licence-info {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.9rem;
}

/* MOBILE */
@media (max-width: 768px) {
    .licence-choice {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .addon-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .addon-action {
        width: 100%;
        justify-content: space-between;
    }
}

/* ================================
   PERSONAL INFORMATION DESIGN
================================ */

.personal-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: #fff;
}

.personal-group {
    margin-bottom: 1.75rem;
}

.personal-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.personal-note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    background: #f0f9ff;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    color: #0369a1;
}

/* SUBMIT BUTTON POLISH */
.submit-btn {
    font-size: 1rem;
    padding: 0.9rem 1.75rem;
}

/* DOB FIELD */
.dob-field {
    display: flex;
    flex-direction: column;
}

.dob-label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #6b7280;
}

/* ================================
   SELECT YOUR CAR DESIGN
================================ */

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.car-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.car-card:hover {
    border-color: var(--primary);
}

.car-card.active {
    border-color: var(--primary);
    background: #f5f9ff;
}

/* Card content */
.car-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.car-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
}

.car-price {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
}

.car-price-note {
    font-size: 0.8rem;
    color: #6b7280;
}

.car-card.active::after {
    content: "✓ Selected";
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.car-card.active {
    transform: scale(1.02);
}

/* ================================
   SELECT BRANCH DESIGN
================================ */

.branch-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Branch list */
.branch-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Branch card */
.branch-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.branch-card:hover {
    border-color: var(--primary);
}

.branch-card.active {
    border-color: var(--primary);
    background: #f5f9ff;
}

/* Text */
.branch-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* Action badge */
.branch-action {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

/* Selected state */
.branch-card.active .branch-action {
    background: var(--primary);
    color: #fff;
}

/* INSTRUCTOR SECTION */
.instructor-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 2px solid var(--border-light);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.instructor-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.instructor-choice {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===============================
   SUCCESS MODAL
================================ */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    margin: auto;
    box-shadow: var(--shadow-soft);
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.modal-content button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.modal-content button:hover {
    opacity: 0.9;
}

.time-slot.disabled {
    background-color: #eee;
    color: #999;
    cursor: not-allowed;
}

/* RED WARNING NOTE */
.licence-warning {
    background: #fef2f2;
    /* light red background */
    border: 2px solid #fecaca;
    /* soft red border */
    color: #b91c1c;
    /* dark red text */
    font-size: 0.9rem;
}

.licence-warning strong {
    color: #991b1b;
}

.apply-licence-box {
    margin-top: 1.5rem;
}

.apply-licence-btn {
    padding: 0.8rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.apply-licence-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.licence-options {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.licence-option {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    cursor: pointer;
}

.licence-option.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

#licenceOptions[hidden] {
    display: none !important;
}

.car-card {
    position: relative;
    overflow: hidden;
    /* important for ribbon cut */
}

/* ==========================
   TOP RIGHT RIBBON BADGE
========================== */

.car-ribbon {
    position: absolute;
    top: 16px;
    right: -45px;

    background: #e60000;
    /* strong red */
    color: #fff;

    padding: 6px 50px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    transform: rotate(45deg);
    text-align: center;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

/* MOBILE */
@media (max-width: 768px) {
    .instructor-choice {
        grid-template-columns: 1fr;
    }
}


/* MOBILE */
@media (max-width: 768px) {
    .branch-card {
        padding: 0.9rem 1rem;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .car-grid {
        grid-template-columns: 1fr;
    }

    .car-card {
        padding: 1rem;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .personal-card {
        padding: 1rem;
    }

    .personal-title {
        font-size: 1rem;
    }
}


/* RESPONSIVE */
@media(max-width:768px) {
    .card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        justify-content: stretch;
        background: #ffffff;
    }

    card-grid .branch-card,
    .card-grid .car-card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .step-indicator {
        display: none;
    }

    .mobile-progress {
        display: block;
    }
}