/* 
 * VinFast Service Module Styles
 * Premium EV Style: Modern, Clean, High-Tech
 */

:root {
    --vf-blue: var(--primary);
    --vf-dark: var(--dark);
    --vf-gray: var(--light);
    --vf-border: var(--border);
    --vf-shadow: var(--shadow-lg);
    --vf-accent: var(--accent);
}

/* --- Global Animations --- */
@keyframes vfpbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vfpbFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: vfpbFadeIn 0.8s ease forwards;
}

.fade-up {
    animation: vfpbFadeUp 0.8s ease forwards;
}

/* --- Service Hero --- */
.service-hero {
    position: relative;
    padding: 120px 0 100px;
    background: var(--vf-dark);
    color: #fff;
    overflow: hidden;
    text-align: center;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 76, 151, 0.4) 0%, rgba(26, 26, 26, 0) 60%);
    z-index: 1;
}

.service-hero .container {
    position: relative;
    z-index: 2;
}

.service-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #fff;
}

.service-hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* --- Service Grid --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 80px 0;
}

.service-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--vf-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: var(--vf-dark);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--vf-shadow);
    border-color: var(--vf-accent);
}

.service-card .icon {
    width: 64px;
    height: 64px;
    background: var(--vf-gray);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: var(--vf-blue);
    transition: 0.3s;
}

.service-card:hover .icon {
    background: var(--vf-blue);
    color: #fff;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-card .read-more {
    font-weight: 600;
    color: var(--vf-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Process Steps (Timeline) --- */
.process-steps {
    display: flex;
    justify-content: space-between;
    padding: 60px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--vf-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 10px 20px rgba(0, 76, 151, 0.3);
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: var(--vf-border);
    z-index: -1;
}

/* --- Booking Form --- */
.booking-form-wrap {
    background: #fff;
    border-radius: 32px;
    padding: 60px;
    box-shadow: var(--vf-shadow);
    border: 1px solid var(--vf-border);
    max-width: 800px;
    margin: -100px auto 80px;
    position: relative;
    z-index: 10;
}

.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    height: 55px;
    border: 1.5px solid var(--vf-border);
    border-radius: 12px;
    padding: 0 20px;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
    background: var(--vf-gray);
}

.form-group textarea {
    height: 120px;
    padding: 15px 20px;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: var(--vf-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 76, 151, 0.1);
}

.booking-submit {
    grid-column: span 2;
    background: var(--vf-blue);
    color: #fff;
    border: none;
    height: 60px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.booking-submit:hover {
    background: #003a75;
    transform: translateY(-2px);
}

/* --- Floating Buttons --- */
.vf-floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: 0.3s;
    font-size: 24px;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn.call { background: #10b981; }
.floating-btn.zalo { background: #0068ff; }
.floating-btn.book { background: var(--vf-blue); }

/* --- Mobile Sticky CTA --- */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    z-index: 998;
}

.sticky-btn {
    width: 100%;
    background: var(--vf-blue);
    color: #fff;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
}

@media screen and (max-width: 991px) {
    .booking-form-grid { grid-template-columns: 1fr !important; }
    .booking-submit { grid-column: span 1 !important; }
    .booking-form-wrap { padding: 30px !important; margin-top: -50px !important; width: calc(100% - 30px) !important; border-radius: 20px !important; }
    .mobile-sticky-cta { display: block; }
    .vf-floating-actions { bottom: 80px; right: 20px; }
}

/* --- Maintenance Page Specifics --- */
.maintenance-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.m-tab-btn {
    padding: 12px 30px;
    background: #fff;
    border: 1.5px solid var(--vf-border);
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    color: var(--vf-dark);
}

.m-tab-btn.active {
    background: var(--vf-blue);
    color: #fff;
    border-color: var(--vf-blue);
    box-shadow: 0 10px 20px rgba(0, 76, 151, 0.2);
}

.maintenance-table-wrap {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--vf-shadow);
    overflow-x: auto;
    margin-bottom: 60px;
}

.m-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.m-table th, .m-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--vf-border);
}

.m-table th {
    background: var(--vf-gray);
    color: var(--vf-dark);
    font-weight: 700;
}

.m-table .m-item-name {
    font-weight: 600;
    color: var(--vf-dark);
    width: 300px;
}

.m-table .m-status {
    text-align: center;
    font-size: 20px;
}

.m-table .m-status.replace { color: var(--vf-blue); }
.m-table .m-status.check { color: #94a3b8; }

.maintenance-milestones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.milestone-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--vf-border);
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.milestone-card:hover {
    transform: translateY(-10px);
    border-color: var(--vf-accent);
    box-shadow: var(--vf-shadow);
}

.milestone-card h4 {
    color: var(--vf-blue);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.milestone-card p {
    font-size: 1rem;
    color: var(--vf-dark);
    margin-bottom: 0;
    font-weight: 500;
}

.milestone-card strong {
    color: var(--vf-blue);
    font-size: 1.2rem;
}

/* --- Model Selector --- */
.model-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 50px;
}

.model-card {
    background: #fff;
    border: 1.5px solid var(--vf-border);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.model-card:hover, .model-card.active {
    border-color: var(--vf-blue);
    background: #f0f7ff;
    box-shadow: 0 5px 15px rgba(0,76,151,0.1);
}

.model-card .model-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--vf-dark);
}

/* --- Maintenance Matrix --- */
.matrix-container {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--vf-shadow);
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1000px;
}

.matrix-table th, .matrix-table td {
    border: 1px solid #e2e8f0;
    padding: 12px 8px;
    text-align: center;
}

.matrix-table th {
    background: #f8fafc;
    color: var(--vf-dark);
    font-weight: 700;
}

.matrix-table .item-label {
    text-align: left;
    background: #fcfdfe;
    font-weight: 600;
    width: 250px;
    position: sticky;
    left: 0;
    z-index: 2;
}

.matrix-table .status-dot {
    font-size: 18px;
    line-height: 1;
}

.matrix-table .replace { color: var(--vf-blue); }
.matrix-table .check { color: #94a3b8; }

.matrix-legend {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    font-size: 14px;
    color: #64748b;
}

/* --- Interactive Details --- */
.maintenance-details-box {
    background: #ffffff;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.level-info-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px dashed #e2e8f0;
}

.level-info-header h3 {
    font-size: 2.2rem;
    color: var(--vf-blue);
    margin-bottom: 10px;
    font-weight: 800;
}

.level-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px; /* Large gap between Replace and Check */
}

.level-category h5 {
    font-size: 1.6rem; /* Much bigger heading as requested */
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-category.cat-replace h5 {
    border-color: var(--vf-blue);
    color: var(--vf-blue);
}

.level-category.cat-check h5 {
    border-color: #94a3b8;
    color: #475569;
}

.level-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.level-category ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.6;
}

.level-category ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--vf-blue);
    font-weight: bold;
    font-size: 1.8rem;
    line-height: 1;
}

@media (max-width: 991px) {
    .level-items-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* --- Flatpickr Mobile & Touch Optimization --- */
@media screen and (max-width: 768px) {
    .flatpickr-calendar {
        width: 325px !important;
        font-size: 16px !important;
    }
    .flatpickr-months {
        height: 60px !important;
    }
    .flatpickr-month {
        height: 60px !important;
    }
    .flatpickr-current-month {
        font-size: 1.3rem !important;
        padding: 15px 0 !important;
        height: 60px !important;
    }
    .flatpickr-current-month .flatpickr-monthDropdown-months {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        padding: 5px 12px !important;
    }
    .flatpickr-current-month input.cur-year {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        padding-left: 8px !important;
    }
    .flatpickr-prev-month, 
    .flatpickr-next-month {
        height: 60px !important;
        width: 60px !important;
        padding: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 0 !important;
        z-index: 10 !important;
    }
    .flatpickr-prev-month svg, 
    .flatpickr-next-month svg {
        width: 26px !important;
        height: 26px !important;
        fill: var(--primary) !important;
    }
    .flatpickr-time {
        height: 75px !important;
        line-height: 75px !important;
        border-top: 1px solid var(--border) !important;
    }
    .flatpickr-time input {
        font-size: 1.6rem !important;
        height: 65px !important;
        font-weight: 700 !important;
    }
    .flatpickr-time .flatpickr-time-separator {
        font-size: 1.6rem !important;
        font-weight: 700 !important;
    }
    .flatpickr-time .flatpickr-am-pm {
        font-size: 1.3rem !important;
        width: 32% !important;
        height: 65px !important;
        font-weight: 600 !important;
    }
    .flatpickr-day {
        height: 46px !important;
        line-height: 46px !important;
        max-width: 46px !important;
        font-size: 1.15rem !important;
        margin: 1px 0 !important;
    }
    .flatpickr-weekday {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: var(--primary) !important;
        padding-bottom: 5px !important;
    }
    .numInputWrapper span {
        width: 28px !important;
        border: none !important;
        opacity: 1 !important;
    }
    .numInputWrapper span:after {
        border-left: 7px solid transparent !important;
        border-right: 7px solid transparent !important;
    }
    .numInputWrapper span.arrowUp:after {
        border-bottom: 9px solid var(--primary) !important;
        top: 25% !important;
    }
    .numInputWrapper span.arrowDown:after {
        border-top: 9px solid var(--primary) !important;
        top: 50% !important;
    }
}
