/* ==========================================================================
   EMP-R BRAND VARIABLES & BASE STYLES
   ========================================================================== */
:root {
    --primary-blue: #123C87;
    --dark-navy: #082C64;
    --steel-gray: #6B7280;
    --light-gray: #F5F7FA;
    --pure-white: #FFFFFF;
    --accent-red: #ED1C24;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-price: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--primary-blue) 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   LOADING SCREEN
   ========================================================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--dark-navy);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--pure-white);
    letter-spacing: 2px;
}

.brand-subtitle {
    color: var(--steel-gray);
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
}

.loading-bar {
    width: 250px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 10px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

.loading-text {
    color: var(--pure-white);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ==========================================================================
   HEADER / BRAND BAR
   ========================================================================== */
.brand-header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
}

.brand-header .logo-fallback {
    font-family: var(--font-heading);
    color: var(--pure-white);
    letter-spacing: 2px;
}



/* ==========================================================================
   MAIN VIEWPORT & FLIPBOOK HOUSING
   ========================================================================== */
.flipbook-viewport {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}

/* ==========================================================================
   BOTTOM GLASSMORPHISM TOOLBAR
   ========================================================================== */
.bottom-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
}

.toolbar-wrapper {
    background: rgba(8, 44, 100, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 18px;
    border-radius: 30px;
    display: flex;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.toolbar-wrapper button {
    background: transparent;
    border: none;
    color: var(--pure-white);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.toolbar-wrapper button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    transform: translateY(-2px);
}

.toolbar-wrapper button:active {
    transform: translateY(0) scale(0.95);
}

/* ==========================================================================
   FLOATING SIDE NAVIGATION ARROWS
   ========================================================================== */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 600;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(8, 44, 100, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.nav-arrow.nav-prev {
    left: 25px;
}

.nav-arrow.nav-next {
    right: 25px;
}

.nav-arrow:hover {
    background: var(--accent-red);
    color: var(--pure-white);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--accent-red);
    box-shadow: 0 10px 25px rgba(237, 28, 36, 0.4);
}

/* Page Counter Badge above toolbar */
/* ==========================================================================
   COMPACT EMBEDDED PAGE INDICATOR
   ========================================================================== */
.page-indicator-badge {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: var(--pure-white);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 0 4px;
}

.toolbar-wrapper {
    align-items: center; /* Ensures smooth vertical centering */
    padding: 6px 14px;
}

/* Page Click Hint */
#flipbook .page {
    cursor: pointer;
}