/* ==========================================================
   LOADING SPINNER GLOBAL
========================================================== */

#page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.4s ease;
}

#page-loader.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 55px;
    height: 55px;
    border: 6px solid #ddd;
    border-top-color: #e60012;
    /* warna merah Mitsubishi */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

body.loading-active {
    overflow: hidden;
    pointer-events: none;
}

/* ==========================================================
   GLOBAL STYLE
========================================================== */
@font-face {
    font-family: 'MMCOffice';
    src: url('font/mmcoffice-regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'MMCOffice';
    src: url('font/mmcoffice-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    position: relative;
    background-image: url("images/background-no-logo.webp");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    margin: 0;
    padding: 0;
    font-family: 'MMCOffice', sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    filter: blur(12px);
}

/* ==========================================================
   VIDEO PAGE
========================================================== */
.video-wrapper {
    position: relative;
    width: 400px;
    height: 700px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.overlay-content .btn {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease forwards;
}

.overlay-content .btn:nth-child(1) {
    animation-delay: 0.2s;
}

.overlay-content .btn:nth-child(2) {
    animation-delay: 0.4s;
}

.overlay-content .btn:nth-child(3) {
    animation-delay: 0.6s;
}

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

/* ==========================================================
   BUTTONS (GLOBAL)
========================================================== */
.btn {
    display: inline-block;
    background: #e60012;
    width: 150px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: 0.3s;
    margin: 5px 0;
}

.btn:hover {
    background: #b8000f;
}

.btn-games {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 30px);
    background: #e60012;
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: background 0.3s;
    opacity: 0;
    animation: gamesUp 0.8s ease forwards 1s;
    text-align: center;
}

@keyframes gamesUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.btn-games:hover {
    background: #b8000f;
}

/* ==========================================================
   CONTENT BOXES
========================================================== */
.center-box,
.content-page {
    text-align: center;
    width: 400px;
    background: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================================
   PAGE WRAPPER & POSTER (GENERAL)
========================================================== */
.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.poster {
    position: relative;
    width: 400px;
    height: 700px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

/* ==========================================================
   PAGE TRANSITIONS
========================================================== */
body {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-out {
    animation: fadeOut 0.6s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ==========================================================
   PRODUK PAGE
========================================================== */
.produk-page {
    position: relative;
    width: 400px;
    height: auto;
    background-image: url("images/background.png");
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.produk-page::-webkit-scrollbar {
    display: none;
}

.produk-content {
    text-align: center;
    color: #000;
    padding: 20px;
    animation: fadeIn 1s ease forwards;
}

.produk-content h1 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.produk-content p {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 20px;
}

.produk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    justify-items: center;
}

.produk-item {
    border-radius: 10px;
    padding: 10px 5px;
    width: 90%;
    max-width: 150px;
}

.produk-item h3 {
    background: #e60012;
    color: #fff;
    font-size: 15px;
    padding: 5px 20px;
    margin-bottom: -50px;
    position: relative;
    display: inline-block;
}

.produk-item h3::before,
.produk-item h3::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15px;
    background: #e60012;
}

.produk-item h3::before {
    left: -15px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.produk-item h3::after {
    right: -15px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.produk-item img {
    width: 100%;
}

/* ==========================================================
   DECADE PAGE (1970s, 1980s, dst)
========================================================== */
.decade-page {
    position: relative;
    width: 400px;
    height: 700px;
    background-image: url("images/product/background/1970.png");
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.decade-page::-webkit-scrollbar {
    display: none;
}

.decade-content {
    text-align: center;
    color: #000;
    padding: 20px;
    animation: fadeIn 1s ease forwards;
}

.decade-header h2 {
    background: #000;
    color: #fff;
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    padding: 4px 20px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.decade-text {
    font-size: 12px;
    line-height: 1.6;
    font-weight: 400;
    text-align: justify;
    margin-bottom: 25px;
}

.car-single {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    animation: fadeIn 0.8s ease forwards;
}

.car-single img {
    margin-top: -20px;
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* CAR SINGLE 7 MOBIL */
.car-single-7-cars {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    animation: fadeIn 0.8s ease forwards;
}

.car-single-7-cars img {
    margin-top: -30px;
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* CAR SINGLE 2020 */
.car-single-2020 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    animation: fadeIn 0.8s ease forwards;
}

.car-single-2020 img {
    margin-top: -30px;
    width: 100%;
    max-width: 250px;
    height: auto;
}

/* CAR SINGLE 2010 */
.car-single-2010 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    animation: fadeIn 0.8s ease forwards;
}

.car-single-2010 img {
    margin-top: -20px;
    width: 100%;
    max-width: 325px;
    height: auto;
}

/* CAR SINGLE 5 MOBIL */
.car-single-5-cars {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    animation: fadeIn 0.8s ease forwards;
}

.car-single-5-cars img {
    margin-top: -50px;
    width: 100%;
    max-width: 500px;
    height: auto;
}

.decade-page .nav-buttons {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.decade-page .btn-main,
.decade-page .btn-back {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: 0.3s;
    white-space: nowrap;
}

.decade-page .btn-main {
    background: #000;
    color: #fff;
}

.decade-page .btn-main:hover {
    background: #333;
}

.decade-page .btn-back {
    background: #e60012;
    color: #fff;
}

.decade-page .btn-back:hover {
    background: #b8000f;
}

/* ==========================================================
   MOTORSPORT PAGE
========================================================== */
.motorsport-page {
    position: relative;
    width: 400px;
    height: 700px;
    background-image: url("/../images/background-motorsport.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.motorsport-page img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.motorsport-page::-webkit-scrollbar {
    display: none;
}

.motorsport-header {
    text-align: center;
    padding: 20px 22px 0px;
}

.motorsport-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #972F25;
    line-height: 1.3;
}

.motorsport-header p {
    margin-top: 8px;
    font-size: 15px;
    color: #222;
    line-height: 1.5;
}

.section-title {
    background: #972F25;
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 700;
    margin: 0px 0px 10px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 18px;
    margin-bottom: 10px;
}

.year-box {
    background: #111;
    padding: 14px 10px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
}

.year-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.year-box span {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.9;
}

.more-btn {
    font-family: 'MMCOffice', sans-serif;
    margin-top: 6px;
    padding: 4px 12px;
    background: #e60012;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.more-btn:hover {
    background: #b8000f;
}

.year-img {
    width: 90%;
    margin-top: 10px;
    border-radius: 6px;
}

.motorsport-section {
    margin-bottom: 18px;
}

.motorsport-back {
    display: block;
    text-align: center;
    background: #e60012;
    width: 120px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border-radius: 6px;
    margin: 20px auto 25px;
    text-decoration: none;
}

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.popup.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-box {
    background: white;
    color: #000;
    width: 280px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    transition: 0.35s ease;
}

.popup.show .popup-box {
    transform: scale(1);
    opacity: 1;
}

.popup.closing {
    opacity: 0;
}

.popup.closing .popup-box {
    transform: scale(0.8);
    opacity: 0;
}

.popup-box img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0px;
    height: 200px;
    object-fit: cover;
}

.close-popup {
    font-family: "MMCOffice", sans-serif;
    font-weight: 700;
    margin-top: 10px;
    padding: 8px 12px;
    background: #e60012;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* =============================
   DAKAR RALLY
============================= */

.dakar-rally {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 18px;
    margin-top: 12px;
}

.dakar-rally>div {
    background: #111;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dakar-rally h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.dakar-rally span {
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
    color: #fff;
}

.dakar-rally .more-btn {
    margin-top: 8px;
    padding: 5px 14px;
    background: #e60012;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'MMCOffice', sans-serif;
    transition: 0.25s ease;
}

.dakar-rally .more-btn:hover {
    background: #b8000f;
}

.dakar-rally img.year-img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 12px;
}

.pajero3 {
    grid-column: span 2;
}

.pajero3 .year-img {
    height: 120px !important;
    object-fit: cover;
    border-radius: 6px;
}

/* ==========================================================
   SERVICE PAGE
========================================================== */

.service-page {
    position: relative;
    width: 400px;
    height: 700px;
    background-color: white;
    background-image: url("/../images/service/dealer.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.service-page::-webkit-scrollbar {
    display: none;
}

/* ---------------- HEADING ---------------- */
.service-heading {
    text-align: center;
    padding: 18px 10px;
    color: #972F25;
}

.service-heading h1 {
    font-size: 25px;
}

.service-heading span {
    font-weight: 600;
}

/* ---------------- GRID 1 ---------------- */
.service-grid-heading {
    background-color: #111;
    font-size: 15px;
    text-align: center;
    padding: 5px;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 6px;
}

.service-p {
    margin-top: 8px;
    font-size: 12px;
    color: #111;
    line-height: 1.5;
    text-align: justify;
    margin-left: 20px;
    margin-right: 20px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.service-box {
    background: #972F25;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
}

.service-box .icon {
    width: 70px;
    margin-bottom: 2px;
}

/* ---------------- GRID 2 ---------------- */
.combined-section {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.left-box {
    background: #111;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
}

.right-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* ---------------- GRID 3 ---------------- */
.service-small-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.small-box {
    background: #111;
    padding: 10px;
    text-align: center;
    color: #fff;
    border-radius: 10px;
}

.icon-small {
    width: 36px;
    margin-bottom: 4px;
}

.more-btn.small {
    padding: 3px 10px;
    font-size: 12px;
}

/* ---------------- BOTTOM IMAGE ---------------- */
.bottom-img {
    position: absolute;
    bottom: 0px;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* ============================================================
   QUIZ LAYOUT
============================================================ */
.quiz-wrapper {
    width: 400px;
    height: 700px;
    border-radius: 14px;
    background-image: url("images/background.png");
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
}

.quiz-page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.quiz-page.active {
    display: block;
}

.quiz-page h2,
.quiz-page h3 {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.quiz-page p {
    color: #111;
    font-size: 15px;
}

.quiz-img img {
    width: 100%;
    max-width: 400px;
    height: 200px;
    border-radius: 12px;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px;
}

.quiz-page input {
    font-family: "MMCOffice", sans-serif;
    width: 90%;
    padding: 12px 14px;
    margin: 10px auto;
    display: block;
    background: #ffffffcc;
    border: 2px solid #ffffff;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

.quiz-page input:focus {
    border-color: #e60012;
}

.error-text {
    color: #e60012;
    margin-top: 5px;
    font-size: 14px;
    display: none;
}

.option {
    background: #fff;
    color: #000;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}

.option.selected {
    border-color: #e60012;
    background: #ffe7e7;
}

.quiz-btn {
    font-family: "MMCOffice", sans-serif;
    display: block;
    box-sizing: border-box;
    text-align: center;
    width: 50%;
    margin: 50px auto 0;
    padding: 12px;
    background: #e60012;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.quiz-btn:hover {
    background: #b8000f;
}

.quiz-back-btn {
    font-family: "MMCOffice", sans-serif;
    display: block;
    box-sizing: border-box;
    text-align: center;
    width: 50%;
    margin: 10px auto 0;
    padding: 12px;
    background: #111;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.quiz-back-btn:hover {
    background: #000;
}

.score-box {
    margin: 20px auto;
    width: 180px;
    padding: 25px;
    font-size: 55px;
    font-weight: 700;
    background: #e60012;
    color: #fff;
    border-radius: 14px;
    text-align: center;
}

.score-logo {
    width: 200px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 40px auto 20px;
}

.fade-out {
    animation: fadeOut 0.35s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ============================
   SIMPLE LOADING SPINNER
============================ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ffffff55;
    border-top-color: #e60012;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 15px;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

@keyframes rotate {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 15px;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 768px) {

    html,
    body {
        overflow: hidden !important;
        height: 100%;
        touch-action: none;
    }

    .video-wrapper {
        width: 90%;
        height: auto;
        padding-bottom: 0px;
    }

    .page-wrapper,
    .center-box,
    .content-page {
        width: 90%;
        height: auto;
        padding-bottom: 0px;
    }

    .produk-page {
        width: 90%;
        height: auto;
        padding-bottom: 20px;
    }

    .decade-page {
        width: 90%;
        height: 80vh;
        padding-bottom: 20px;
    }

    .decade-page .nav-buttons {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        margin: 30px auto 10px;
        display: flex;
        flex-direction: row;
        gap: 15px;
    }

    .decade-page .btn-main,
    .decade-page .btn-back {
        text-align: center;
        width: auto;
        min-width: 50px;
        padding: 8px 18px;
    }

    .motorsport-page {
        width: 90%;
        max-width: 400px;
        height: 700px;
        overflow-y: auto;
    }

    .year-img {
        width: 100%;
    }

    .dakar-rally {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
        gap: 12px;
    }

    .dakar-rally img.year-img {
        height: 70px;
    }

    .pajero3 {
        grid-column: span 2;
    }

    .quiz-wrapper {
        width: 80%;
    }
}