/* =====================================================
   BROCHURE FLIPBOOK COMPONENT - LIGHT THEME
   ===================================================== */

   .iyeg-brochure-flipbook {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f5f5f0; /* Light cream background */
    z-index: 9999;
    font-family: "Inter", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.iyeg-brochure-flipbook__container {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    max-height: 100vh;
    padding: 1rem 4rem 1rem 4rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===== BRAND LOGO OVERLAY ===== */
.iyeg-brochure-logo {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.iyeg-brochure-logo img {
    height: 40px;
    width: auto;
}

.iyeg-brochure-logo:hover {
    opacity: 0.8;
}

/* ===== HEADER ===== */
.iyeg-brochure-flipbook__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0.75rem 0;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.iyeg-brochure-flipbook__counter {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4); /* Dark text on light background */
    letter-spacing: 0.08em;
}

.iyeg-brochure-flipbook__current-page {
    color: #000000;
    font-weight: 600;
}

.iyeg-brochure-flipbook__separator {
    margin: 0 0.25rem;
    color: rgba(0, 0, 0, 0.2);
}

.iyeg-brochure-flipbook__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iyeg-brochure-flipbook__btn {
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.4); /* Dark icon on light background */
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, background-color 0.3s ease;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.iyeg-brochure-flipbook__btn:hover {
    color: #000000;
    background-color: rgba(0, 0, 0, 0.06);
}

/* ===== 3D VIEWER ===== */
.iyeg-brochure-flipbook__viewer {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: #e8e8e0; /* Light gray background for viewer */
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.15); /* Softer shadow */
}

.iyeg-brochure-flipbook__book-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e0;
    border-radius: 12px;
    overflow: hidden;
}

/* ===== FLIPBOOK ===== */
.flipbook {
    width: 100%;
    height: 100%;
}

.flipbook .page,
.flipbook .hard {
    background: #ffffff; /* White pages */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: none;
    box-shadow: none !important;
    color: #000000;
    position: relative;
    overflow: hidden;
}

.flipbook .hard {
    background: #f0f0ea !important; /* Slightly different for hard covers */
}

.flipbook .page img,
.flipbook .hard img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Page numbers on each page */
.flipbook .page .iyeg-brochure-flipbook__page-number,
.flipbook .hard .iyeg-brochure-flipbook__page-number {
    position: absolute;
    bottom: 1.5rem;
    font-family: "Inter", sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.3); /* Darker text on light background */
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 2;
}

/* Left pages get number on bottom-left, right pages on bottom-right */
.flipbook .page:not(.even) .iyeg-brochure-flipbook__page-number {
    left: 2rem;
}

.flipbook .page.even .iyeg-brochure-flipbook__page-number {
    right: 2rem;
}

/* Subtle page shadow for 3D depth on light background */
.flipbook .page:not(.even) {
    box-shadow: inset -10px 0 20px rgba(0, 0, 0, 0.08) !important;
}

.flipbook .page.even {
    box-shadow: inset 10px 0 20px rgba(0, 0, 0, 0.08) !important;
}

.flipbook .hard {
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.06) !important;
}

/* =====================================================
   CUSTOM CAROUSEL-STYLE NAVIGATION BUTTONS
   ===================================================== */
.iyeg-brochure-flipbook__nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.iyeg-brochure-flipbook__nav-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.iyeg-brochure-flipbook__nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.iyeg-brochure-flipbook__nav-btn--prev {
    left: 20px;
}

.iyeg-brochure-flipbook__nav-btn--next {
    right: 20px;
}

/* Ring - Dark theme for buttons on light background */
.iyeg-brochure-flipbook__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.iyeg-brochure-flipbook__ring-base {
    fill: none;
    stroke: rgba(0, 0, 0, 0.15); /* Dark ring on light background */
    stroke-width: 1.5;
}

.iyeg-brochure-flipbook__ring-progress {
    fill: none;
    stroke: var(--iyeg-active-green, #00e676);
    stroke-width: 1.5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 169.65;
    stroke-dashoffset: 169.65;
    transition: stroke-dashoffset 0.6s ease;
}

.iyeg-brochure-flipbook__nav-btn:hover .iyeg-brochure-flipbook__ring-progress {
    stroke-dashoffset: 0;
}

/* Icon - Dark on light background */
.iyeg-brochure-flipbook__nav-icon {
    width: 18px;
    height: 18px;
    display: block;
    color: #000000; /* Black icon */
    z-index: 2;
    position: relative;
    transition: color 0.3s ease;
}

.iyeg-brochure-flipbook__nav-btn--prev .iyeg-brochure-flipbook__nav-icon {
    transform: rotate(180deg);
}

.iyeg-brochure-flipbook__nav-btn:hover .iyeg-brochure-flipbook__nav-icon {
    color: var(--iyeg-active-green, #00e676);
}

/* =====================================================
   FULLSCREEN
   ===================================================== */
.iyeg-brochure-flipbook__viewer:fullscreen {
    background: #f5f5f0;
    padding: 0;
    border-radius: 0;
    height: 100vh;
    width: 100vw;
}

.iyeg-brochure-flipbook__viewer:fullscreen .iyeg-brochure-flipbook__book-wrapper {
    max-height: 100vh;
    border-radius: 0;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
    .iyeg-brochure-flipbook__container {
        padding: 0.75rem 3rem 0.75rem 3rem;
    }
    
    .iyeg-brochure-flipbook__nav-btn {
        width: 48px;
        height: 48px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--prev {
        left: 12px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--next {
        right: 12px;
    }
    
    .iyeg-brochure-flipbook__nav-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .iyeg-brochure-logo {
        top: 0.75rem;
        left: 0.75rem;
    }

    .iyeg-brochure-logo img {
        height: 28px;
    }

    .iyeg-brochure-flipbook__container {
        padding: 0.5rem 2.5rem 0.5rem 2.5rem;
    }

    .iyeg-brochure-flipbook__header {
        padding: 0 0 0.5rem 0;
    }

    .iyeg-brochure-flipbook__counter {
        font-size: 0.75rem;
    }

    .iyeg-brochure-flipbook__btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        padding: 0.25rem;
    }

    .iyeg-brochure-flipbook__nav-btn {
        width: 42px;
        height: 42px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--prev {
        left: 8px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--next {
        right: 8px;
    }
    
    .iyeg-brochure-flipbook__nav-icon {
        width: 14px;
        height: 14px;
    }

    .flipbook .page .iyeg-brochure-flipbook__page-number,
    .flipbook .hard .iyeg-brochure-flipbook__page-number {
        font-size: 0.55rem;
        bottom: 0.75rem;
    }

    .flipbook .page:not(.even) .iyeg-brochure-flipbook__page-number {
        left: 1rem;
    }

    .flipbook .page.even .iyeg-brochure-flipbook__page-number {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .iyeg-brochure-logo {
        top: 0.5rem;
        left: 0.5rem;
    }

    .iyeg-brochure-logo img {
        height: 22px;
    }

    .iyeg-brochure-flipbook__container {
        padding: 0.25rem 1.5rem 0.25rem 1.5rem;
    }

    .iyeg-brochure-flipbook__counter {
        font-size: 0.65rem;
    }

    .iyeg-brochure-flipbook__btn {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
        padding: 0.15rem;
    }

    .iyeg-brochure-flipbook__nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--prev {
        left: 4px;
    }
    
    .iyeg-brochure-flipbook__nav-btn--next {
        right: 4px;
    }
    
    .iyeg-brochure-flipbook__nav-icon {
        width: 12px;
        height: 12px;
    }

    .flipbook .page .iyeg-brochure-flipbook__page-number,
    .flipbook .hard .iyeg-brochure-flipbook__page-number {
        font-size: 0.45rem;
        bottom: 0.5rem;
    }

    .flipbook .page:not(.even) .iyeg-brochure-flipbook__page-number {
        left: 0.75rem;
    }

    .flipbook .page.even .iyeg-brochure-flipbook__page-number {
        right: 0.75rem;
    }
}

@media (max-width: 360px) {
    .iyeg-brochure-logo img {
        height: 18px;
    }

    .iyeg-brochure-flipbook__container {
        padding: 0.15rem 1rem 0.15rem 1rem;
    }

    .iyeg-brochure-flipbook__counter {
        font-size: 0.55rem;
    }

    .iyeg-brochure-flipbook__btn {
        width: 20px;
        height: 20px;
        font-size: 0.55rem;
    }

    .iyeg-brochure-flipbook__nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .iyeg-brochure-flipbook__nav-icon {
        width: 10px;
        height: 10px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .flipbook .page {
        transition: none !important;
    }
    .iyeg-brochure-flipbook__nav-btn:hover {
        transform: translateY(-50%) scale(1) !important;
    }
    .iyeg-brochure-flipbook__nav-btn:hover .iyeg-brochure-flipbook__ring-progress {
        stroke-dashoffset: 169.65 !important;
    }
}