:root {
    --brand-1: #0a2a6b;
    --brand-2: #123a8f;
    --brand-3: #1b48a8;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #06183f;
    font-family: "Montserrat", system-ui, sans-serif
}

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* background: linear-gradient(135deg, #06183f 0%, #0a2a6b 30%, #1b48a8 50%, #0a2a6b 70%, #06183f 100%); */
    background-color: #d0aea4eb;
    opacity: 1;
    transition: opacity .8s ease
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none
}

.loader-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin-bottom: 18px
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.loader-text {
    color: #fff;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300
}

/* ---------- Portrait Orientation Warning ---------- */
#orientationWarning {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;

    /* background: linear-gradient(135deg, #06183f 0%, #0a2a6b 30%, #1b48a8 50%, #0a2a6b 70%, #06183f 100%) */
    background-color: #d0aea4eb;
}

.rotate-icon {
    width: 65px;
    height: 65px;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px
}

.rotate-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: rgba(255, 255, 255, .8);
    stroke-width: 1.5
}

.orientation-text {
    color: #fff;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.8
}

/* ---------- Main Viewer ---------- */
#viewer {
    position: fixed;
    inset: 0;
    z-index: 1;
    /* background: radial-gradient(circle at 50% 40%, #0d2f78 0%, #0a2a6b 55%, #06183f 100%) */
    background-color: #d0aea4eb;
}

/* ---------- Slides (vertical crossfade) ---------- */
.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2
}

.slide.fade-out {
    opacity: 0;
    visibility: hidden;
    z-index: 1
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

/* ---------- Navigation Buttons (top & bottom centered) ---------- */
.nav-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 46px;
    height: 46px;
    border: 1.5px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease
}

.nav-btn:hover {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .9);
    transform: translateX(-50%) scale(1.1)
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

#prevBtn {
    top: 20px
}

#nextBtn {
    bottom: 20px
}

/* ---------- Page Indicators (right side vertical) ---------- */
.page-indicators {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    transition: all .4s ease;
    cursor: pointer
}

.page-dot.active {
    background: #fff;
    height: 24px;
    border-radius: 4px
}

/* ---------- Page counter ---------- */
.page-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    color: rgba(255, 255, 255, .7);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 400;
    background: rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 20px
}

/* ---------- Responsive ---------- */
@media (max-width:768px) and (orientation:portrait) {
    #orientationWarning {
        display: flex !important
    }

    #viewer,
    .nav-btn,
    .page-indicators,
    .page-counter {
        display: none !important
    }
}

@media (max-width:768px) and (orientation:landscape) {
    .nav-btn {
        width: 36px;
        height: 36px
    }

    .nav-btn svg {
        width: 16px;
        height: 16px
    }

    #prevBtn {
        top: 10px
    }

    #nextBtn {
        bottom: 10px
    }

    .page-counter {
        top: 10px;
        right: 12px;
        font-size: 9px
    }

    .page-indicators {
        right: 8px;
        gap: 4px
    }

    .page-dot {
        width: 5px;
        height: 5px
    }

    .page-dot.active {
        height: 14px;
        border-radius: 3px
    }
}

@media (max-height:400px) and (orientation:landscape) {
    .page-indicators {
        right: 6px;
        gap: 2px
    }

    .page-dot {
        width: 4px;
        height: 4px
    }

    .page-dot.active {
        height: 10px;
        border-radius: 2px
    }
}