/* PDF Pages Responsive Carousel - Matching Company Profile Layout */

/* Animation Keyframes for Content Overlay */
@keyframes animate {
    from {
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to {
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
    }
}

/* Container for the carousel */
.cont {
    max-width: 500px;
    height: 670px;
    background: #f5f5f5;
    box-shadow: 0 30px 50px #dbdbdb;
    margin: 50px auto;
    position: relative;
    border-radius: 20px;
    overflow: visible;
}

.slide {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Individual slide items */
.cont .slide .item {
    width: 200px;
    height: 300px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 20px;
    box-shadow: 0 30px 50px #505050;
    background-position: 50% 50%;
    background-size: cover;
    display: inline-block;
    transition: 0.5s;
    background-repeat: no-repeat;
}

/* Active slides - Main preview and behind */
.slide .item.carousel-active {
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 20px;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Active page on top */
}

.slide .item.carousel-behind {
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 20px;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind page below active */
}

/* Thumbnail preview positioning (Desktop) */
.slide .item.carousel-thumb-1 {
    left: calc(100% + 20px);
}

.slide .item.carousel-thumb-2 {
    left: calc(100% + 240px);
}

/* Hide items without positioning classes (fallback) */
.slide .item:not(.carousel-active):not(.carousel-behind):not(.carousel-thumb-1):not(.carousel-thumb-2) {
    left: calc(50% + 660px);
    opacity: 0;
}

/* Content Overlay */
.item .content {
    position: absolute;
    top: 50%;
    left: 100px;
    width: 300px;
    text-align: left;
    color: #fff;
    transform: translate(0, -50%);
    display: none;
    z-index: 1;
    padding: 20px;
}

.slide .item:nth-child(2) .content {
    display: block;
}

/* Blur effect applied dynamically to page 4 when active */
.slide .item.blur-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    border-radius: 20px;
    transition: backdrop-filter 0.3s ease;
}

/* Carousel Overlay (shown only on page 4) */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    border-radius: 20px;
}

.carousel-overlay.active {
    display: flex !important;
}

.overlay-content {
    text-align: center;
    color: #fff;
    pointer-events: auto;
    padding: 20px;
}

.overlay-title {
    font-size: 40px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.overlay-text {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.overlay-btn {
    padding: 12px 35px;
    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.overlay-btn:active {
    transform: translateY(0);
}

/* Fade In Up Animation for Overlay Content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   NAVIGATION BUTTONS - GENERAL STYLING
   ============================================ */

/* Shared button container */
.button {
    position: absolute;
    bottom: 50px;
    /* Vertical position - adjust as needed */
    left: calc(100% + 230px);
    /* Horizontal center position */
    transform: translateX(-50%);
    width: auto;
    height: auto;
    z-index: 100;
    display: flex;
    gap: 15px;
    /* Space between prev and next buttons */
}

/* Shared button styling (size, colors, effects) */
.button button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Shared hover effects */
.button button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 1);
}

.button button:active {
    transform: scale(0.95);
}

/* ============================================
   PREV BUTTON - INDIVIDUAL STYLING
   Edit position properties below
   ============================================ */
.button .prev {
    position: static;
    /* Keep as static for flex layout */
    /* Add custom position styles here if needed */
}

.button .prev i {
    font-size: 22px;
    color: #273d4e;
    transition: transform 0.3s ease;
}

.button .prev:hover i {
    transform: translateX(-3px);
}

/* ============================================
   NEXT BUTTON - INDIVIDUAL STYLING
   Edit position properties below
   ============================================ */
.button .next {
    position: static;
    /* Keep as static for flex layout */
    /* Add custom position styles here if needed */
}

.button .next i {
    font-size: 22px;
    color: #273d4e;
    transition: transform 0.3s ease;
}

.button .next:hover i {
    transform: translateX(3px);
}

/* Responsive Media Queries */

/* Tablet View (768px - 991px) */
@media (max-width: 991px) {

    /* Hide the thumbnail previews on the right */
    .slide .item:nth-child(n+3) {
        display: none;
    }

    /* Hide thumbnail classes to prevent overflow */
    .slide .item.carousel-thumb-1,
    .slide .item.carousel-thumb-2 {
        display: none !important;
    }

    /* Container adjustments for smaller screens */
    .cont {
        width: 90%;
        max-width: 100%;
        margin: 20px auto;
        height: auto;
        aspect-ratio: 2/3;
        min-height: 500px;
        max-height: 70vh;
    }

    /* Position buttons INSIDE carousel with proper spacing */
    .button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        right: 0;
        width: 100%;
        height: 0;
        padding: 0;
        display: block;
        /* Override flex from desktop */
    }

    .button .prev {
        left: 15px;
        /* Inside carousel edge */
        position: absolute;
        pointer-events: auto;
    }

    .button .next {
        right: 15px;
        /* Inside carousel edge */
        position: absolute;
        pointer-events: auto;
    }

    .button button {
        width: 50px;
        height: 50px;
    }

    .button button i {
        font-size: 20px;
    }

    /* Overlay adjustments for tablet */
    .overlay-content {
        padding: 15px;
    }

    .overlay-title {
        font-size: 32px;
    }

    .overlay-text {
        font-size: 16px;
    }

    .overlay-btn {
        padding: 10px 28px;
        font-size: 15px;
    }
}

/* Mobile View (< 768px) */
@media (max-width: 767px) {
    .cont {
        width: 95%;
        height: auto;
        aspect-ratio: 2/3;
        min-height: 450px;
        max-height: 75vh;
        margin: 15px auto;
        border-radius: 15px;
    }

    .slide .item:nth-child(1),
    .slide .item:nth-child(2) {
        border-radius: 15px;
    }

    /* Position buttons INSIDE carousel */
    .button {
        display: block;
        /* Override flex from desktop */
    }

    .button .prev {
        left: 12px;
        position: absolute;
        pointer-events: auto;
    }

    .button .next {
        right: 12px;
        position: absolute;
        pointer-events: auto;
    }

    .button button {
        width: 46px;
        height: 46px;
    }

    .button button i {
        font-size: 18px;
    }

    /* Overlay adjustments for mobile */
    .overlay-content {
        padding: 15px;
    }

    .overlay-title {
        font-size: 28px;
    }

    .overlay-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .overlay-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* Extra Small Mobile (< 575px) */
@media (max-width: 575px) {
    .cont {
        width: 100%;
        height: auto;
        aspect-ratio: 2/3;
        min-height: 400px;
        max-height: 80vh;
        margin: 10px auto;
        border-radius: 10px;
    }

    .slide .item:nth-child(1),
    .slide .item:nth-child(2) {
        border-radius: 10px;
    }

    /* Overlay adjustments for extra small mobile */
    .overlay-content {
        padding: 10px;
    }

    .overlay-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .overlay-text {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .overlay-btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    /* Position buttons closer to edges */
    .button {
        display: block;
        /* Override flex from desktop */
    }

    .button .prev {
        left: 10px;
        position: absolute;
        pointer-events: auto;
    }

    .button .next {
        right: 10px;
        position: absolute;
        pointer-events: auto;
    }

    .button button {
        width: 44px;
        /* Minimum touch target */
        height: 44px;
    }

    .button button i {
        font-size: 16px;
    }
}