/* =============================================
   BROCHURE PAGE STYLES - Rakthkosh Foundation
   ============================================= */

/* Badge */
.brochure-badge {
    display: inline-block;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
    padding: 8px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

/* Controls Bar */
.brochure-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    padding: 14px 28px;
    background: #fff;
    border-radius: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: sticky;
    top: 10px;
    z-index: 50;
}

.brochure-nav-btn,
.brochure-view-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.brochure-nav-btn:hover,
.brochure-view-btn:hover {
    background: #c0392b;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.brochure-view-btn.active {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.brochure-page-indicator {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    min-width: 60px;
    text-align: center;
}

/* ---- Grid View ---- */
.brochure-page-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.brochure-page-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 40px rgba(192, 57, 43, 0.18);
}

.brochure-page-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 419 / 595;
    background: #fafafa;
}

.brochure-page-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.brochure-page-card:hover .brochure-page-img-wrapper img {
    transform: scale(1.05);
}

.brochure-page-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(192, 57, 43, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    color: #fff;
    gap: 8px;
}

.brochure-page-overlay i {
    font-size: 2rem;
    transform: scale(0.7);
    transition: transform 0.35s ease;
}

.brochure-page-overlay span {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.brochure-page-card:hover .brochure-page-overlay {
    opacity: 1;
}

.brochure-page-card:hover .brochure-page-overlay i {
    transform: scale(1);
}

.brochure-page-number {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(192, 57, 43, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
}

.brochure-page-title {
    padding: 12px 14px;
    font-size: 0.82rem;
    color: #444;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    border-top: 2px solid #fceaea;
    background: linear-gradient(to bottom, #fff, #fef9f5);
}

/* ---- Single Page View ---- */
.brochure-single-view {
    max-width: 600px;
    margin: 0 auto;
}

.brochure-single-page-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.brochure-single-page {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    background: #fff;
    flex: 1;
    max-width: 520px;
}

.brochure-single-page img {
    width: 100%;
    display: block;
}

.brochure-arrow {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #c0392b;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.brochure-arrow:hover {
    background: #c0392b;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.3);
}

/* ---- Fullscreen Lightbox ---- */
.brochure-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.brochure-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.brochure-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.brochure-lightbox-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
}

.brochure-lightbox-img-wrapper {
    max-height: 85vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brochure-lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.4s ease;
}

.brochure-lightbox.active .brochure-lightbox-img-wrapper img {
    transform: scale(1);
}

.brochure-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.brochure-lightbox-close:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

.brochure-lightbox-arrow {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.brochure-lightbox-arrow:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.brochure-lightbox-counter {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    padding: 6px 20px;
    border-radius: 30px;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .brochure-single-page {
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    .brochure-controls {
        gap: 8px;
        padding: 10px 20px;
        max-width: 360px;
    }

    .brochure-nav-btn,
    .brochure-view-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .brochure-single-page-wrapper {
        gap: 10px;
    }

    .brochure-arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .brochure-lightbox-content {
        width: 95%;
        gap: 8px;
    }

    .brochure-lightbox-arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .brochure-lightbox-close {
        top: -45px;
        right: 0;
    }

    .brochure-page-title {
        font-size: 0.72rem;
        padding: 8px 8px;
    }

    .brochure-page-number {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
        bottom: 6px;
        right: 6px;
    }

    .or-section-title h2 {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 480px) {
    .brochure-lightbox-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .brochure-lightbox-content {
        gap: 4px;
    }

    .brochure-page-overlay i {
        font-size: 1.4rem;
    }

    .brochure-page-overlay span {
        font-size: 0.8rem;
    }
}

/* ---- Page Load Animation ---- */
.brochure-page-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.brochure-page-card:nth-child(1)  { animation-delay: 0.05s; }
.brochure-page-card:nth-child(2)  { animation-delay: 0.1s; }
.brochure-page-card:nth-child(3)  { animation-delay: 0.15s; }
.brochure-page-card:nth-child(4)  { animation-delay: 0.2s; }
.brochure-page-card:nth-child(5)  { animation-delay: 0.25s; }
.brochure-page-card:nth-child(6)  { animation-delay: 0.3s; }
.brochure-page-card:nth-child(7)  { animation-delay: 0.35s; }
.brochure-page-card:nth-child(8)  { animation-delay: 0.4s; }
.brochure-page-card:nth-child(9)  { animation-delay: 0.45s; }
.brochure-page-card:nth-child(10) { animation-delay: 0.5s; }
.brochure-page-card:nth-child(11) { animation-delay: 0.55s; }
.brochure-page-card:nth-child(12) { animation-delay: 0.6s; }
.brochure-page-card:nth-child(13) { animation-delay: 0.65s; }
.brochure-page-card:nth-child(14) { animation-delay: 0.7s; }
.brochure-page-card:nth-child(15) { animation-delay: 0.75s; }
.brochure-page-card:nth-child(16) { animation-delay: 0.8s; }
