/* ===== GLOBAL RESET & SCROLL SNAP ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}
body {
    width: 100%; min-height: 100%;
    font-family: 'Cormorant Garamond', serif;
    background: #0a0502; color: #f5e6c8;
    overflow-x: hidden;
}
.snap-page {
    position: relative; width: 100vw; height: 100vh;
    scroll-snap-align: start; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}

/* ===== PROGRESS BAR & PAGE INDICATOR ===== */
.progress-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 3px;
    background: rgba(10, 5, 2, 0.3); z-index: 10000;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #ff8c00, #d4af37);
    width: 0%; transition: width 0.3s ease;
}
.page-indicator {
    position: fixed; top: 15px; left: 30px;
    font-family: 'Playfair Display', serif; font-size: 0.9rem;
    color: #f5e6c8; z-index: 10000;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.1em;
    background: rgba(10, 5, 2, 0.7);
    padding: 8px 15px; border-radius: 3px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #0a0502; z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 1; transition: opacity 1s ease;
}
.loading-screen.loaded { opacity: 0; pointer-events: none; }
.loading-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 6vw, 5rem); color: #f5e6c8;
    text-shadow: 0 0 30px rgba(255, 69, 0, 0.4), 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 40px; opacity: 0;
    animation: loadingFadeIn 1s ease 0.5s forwards;
}
.loading-subtitle {
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 1.1rem; color: #e8d4a8; letter-spacing: 0.15em;
    opacity: 0; animation: loadingFadeIn 1s ease 1s forwards;
}
.loading-divider {
    width: 0; height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 140, 0, 0.6), transparent);
    margin: 30px 0; animation: loadingDivider 1.5s ease 1.5s forwards;
}
@keyframes loadingFadeIn { to { opacity: 1; } }
@keyframes loadingDivider { to { width: 200px; } }

/* ===== SHADOW BRIDGES ===== */
.shadow-bridge-top, .shadow-bridge-bottom {
    position: absolute; left: 0; width: 100%; height: 180px;
    z-index: 4; pointer-events: none;
}
.shadow-bridge-top {
    top: 0;
    background: linear-gradient(to bottom, #0a0502 0%, transparent 100%);
}
.shadow-bridge-bottom {
    bottom: 0;
    background: linear-gradient(to top, #0a0502 0%, transparent 100%);
}

/* =========================================
   ARCHIVIST TAB STYLES (With Pulse Animation)
   ========================================= */
@keyframes pulseTab {
    0% { transform: translateY(-50%) scale(1); box-shadow: 2px 2px 8px rgba(0,0,0,0.4); }
    50% { transform: translateY(-50%) scale(1.08); box-shadow: 0 0 15px rgba(139, 0, 0, 0.8); }
    100% { transform: translateY(-50%) scale(1); box-shadow: 2px 2px 8px rgba(0,0,0,0.4); }
}
.archivist-tab-btn {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    background-color: #8b0000; color: #f5e6c8; border: none;
    padding: 16px 10px; border-radius: 0 6px 6px 0;
    cursor: pointer; z-index: 100;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    transition: background-color 0.3s ease;
    animation: pulseTab 3s infinite ease-in-out; 
}
.archivist-tab-btn:hover {
    background-color: #a00000; animation: none;
    transform: translateY(-50%) scale(1.05);
}
.tab-icon { font-size: 1.3rem; display: block; }

.archivist-panel {
    position: absolute; top: 0; left: -400px; width: 320px; height: 100%;
    background-color: #4a0404; color: #f5e6c8; z-index: 101;
    padding: 50px 30px 30px 30px; box-shadow: 5px 0 20px rgba(0,0,0,0.6);
    transition: left 0.5s cubic-bezier(0.25, 1, 0.5, 1); overflow-y: auto;
}
.archivist-panel.open { left: 0; }
.close-panel-btn {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: #f5e6c8;
    font-size: 2rem; cursor: pointer; line-height: 1;
    transition: color 0.3s ease;
}
.close-panel-btn:hover { color: #d4af37; }
.panel-content { padding-top: 20px; }
.panel-title {
    font-family: 'Playfair Display', serif; font-size: 1.3rem;
    color: #f5e6c8; margin-bottom: 8px; line-height: 1.3;
}
.panel-subtitle {
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 1.05rem; color: #d4af37; margin-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3); padding-bottom: 12px;
}
.panel-details p {
    font-family: 'Cormorant Garamond', serif; font-size: 1rem;
    line-height: 1.5; margin-bottom: 12px; color: #e8d4a8;
}
.panel-details em { color: #d4af37; font-style: italic; }

/* =========================================
   CITATION POP-UPS (CLICKABLE TOOLTIPS)
   ========================================= */
.citation-pop {
    color: #ff8c00; font-style: italic; cursor: pointer;
    border-bottom: 1px dotted rgba(255, 140, 0, 0.5);
    transition: color 0.3s ease, border-color 0.3s ease; position: relative;
}
.citation-pop:hover { color: #ffa500; border-bottom-color: #ffa500; }
.citation-pop.active { color: #ffa500; border-bottom-color: #ffa500; font-weight: 600; }

#citation-tooltip {
    position: fixed; bottom: 40px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 5, 2, 0.95); color: #f5e6c8;
    padding: 15px 25px; border: 1px solid #d4af37; border-radius: 4px;
    font-family: 'Cormorant Garamond', serif; font-size: 1.05rem;
    font-style: italic; max-width: 600px; width: 90%; text-align: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 10000; box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    pointer-events: none; line-height: 1.5;
}
#citation-tooltip.visible {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0); pointer-events: auto;
}

/* =========================================
   NAVIGATION BUTTONS
   ========================================= */
.navigation-container {
    position: absolute; bottom: 40px; left: 50%;
    transform: translateX(-50%); z-index: 10;
    display: flex; gap: 20px; opacity: 0;
    transition: opacity 1s ease 2.5s;
}
/* Note: You will change .page-s4-1 to your actual last page class */
.page-s4-11.in-view .navigation-container { opacity: 1; } 

.nav-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 25px; background: rgba(10, 5, 2, 0.8);
    border: 2px solid #d4af37; color: #f5e6c8; text-decoration: none;
    font-family: 'Playfair Display', serif; font-size: 1rem;
    letter-spacing: 0.1em; text-transform: uppercase; border-radius: 4px;
    transition: all 0.3s ease;
}
.nav-btn:hover { background: rgba(212, 175, 55, 0.9); color: #0a0502; }
.btn-arrow { width: 20px; height: 20px; }

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    #citation-tooltip { bottom: 20px; font-size: 0.95rem; padding: 12px 20px; }
    .archivist-panel { width: 100%; left: -100%; }
    .navigation-container {
        bottom: 30px; flex-direction: column; width: 80%;
    }
    .nav-btn { justify-content: center; width: 100%; }
}
/* =========================================
   PAGE 1: FLORENCE - PALAZZO VECCHIO
   ========================================= */
.page-s4-1 {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Pushes content to the left */
    background-color: #1a0f0a;
}
.page-s4-1-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-clock-castle.jpg');
    background-size: cover;
    background-position: center right; /* Focuses on the castle on the right */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-1.in-view .page-s4-1-bg {
    transform: scale(1);
}

/* Text Box - Left Side with Golden Scrollbar */
.florence-history-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-left: 5%;
    padding: 40px 50px;
    /* Dark semi-transparent background for readability */
    background: linear-gradient(to right, rgba(10, 5, 2, 0.92) 0%, rgba(10, 5, 2, 0.7) 100%);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);

    /* Constrain height and enable internal scrolling */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-1.in-view .florence-history-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Text Styling */
.florence-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #f5e6c8;
    text-align: justify;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 20px;
}
.florence-text:last-child {
    margin-bottom: 0;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR TEXT BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.florence-history-box::-webkit-scrollbar {
    width: 8px;
}
.florence-history-box::-webkit-scrollbar-track {
    background: rgba(10, 5, 2, 0.3);
    border-radius: 4px;
}
.florence-history-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(10, 5, 2, 0.5);
}
.florence-history-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.florence-history-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(10, 5, 2, 0.3);
}

/* Mobile Responsiveness for Page 1 */
@media (max-width: 768px) {
    .page-s4-1 {
        justify-content: center;
        align-items: center;
    }
    .florence-history-box {
        width: 90%;
        max-width: 90%;
        margin-left: 0;
        padding: 30px 25px;
        background: rgba(10, 5, 2, 0.92); /* Solid dark background on mobile */
        max-height: 80vh;
    }
    .florence-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    .page-s4-1-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 2: VILLANI - LITTLE ROME (TOWER)
   ========================================= */
.page-s4-2 {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes content to the right */
    background-color: #1a0f0a;
}
.page-s4-2-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-tower.jpg');
    background-size: cover;
    background-position: center left; /* Focuses on the tower on the left */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-2.in-view .page-s4-2-bg {
    transform: scale(1);
}

/* Ornate Text Box - Right Side with Golden Scrollbar */
.villani-tower-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-right: 8%;
    padding: 50px 60px;
    /* Light parchment background with red/gold borders */
    background-color: #f5e6c8;
    border: 8px solid #8b0000;
    outline: 3px solid #d4af37;
    outline-offset: -12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);

    /* Constrain height and enable internal scrolling */
    max-height: 55vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-2.in-view .villani-tower-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Quote Text Styling */
.villani-tower-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #1a0f0a; /* Dark brown/black text for light background */
    text-align: justify;
    font-style: italic;
    font-weight:600;
    margin-bottom: 25px;
}
.villani-tower-quote em {
    font-style: italic;
    color: #8b0000; /* Red emphasis for key terms */
}

/* Decorative Drop Cap */
.villani-tower-box .drop-cap {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #8b0000;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 5px;
}

/* Citation Styling */
.villani-tower-citation {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #8b0000; /* Red citation to match the presentation */
    line-height: 1.6;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
    padding-top: 15px;
}
.villani-tower-citation .author {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.villani-tower-citation em {
    font-style: italic;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR VILLANI BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.villani-tower-box::-webkit-scrollbar {
    width: 8px;
}
.villani-tower-box::-webkit-scrollbar-track {
    background: rgba(139, 0, 0, 0.1); /* Subtle red-tinted track */
    border-radius: 4px;
}
.villani-tower-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(245, 230, 200, 0.5);
}
.villani-tower-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.villani-tower-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(139, 0, 0, 0.1);
}

/* Mobile Responsiveness for Page 2 */
@media (max-width: 768px) {
    .page-s4-2 {
        justify-content: center;
    }
    .page-s4-2-bg {
        background-position: left center !important;
        /* OR use a percentage value like: */
        /* background-position: 0% center !important; */
    }
    .villani-tower-box {
        width: 90%;
        max-width: 90%;
        margin-right: 0;
        padding: 30px 25px;
        border-width: 6px;
        outline-width: 2px;
        outline-offset: -10px;
        max-height: 80vh;
    }
    .villani-tower-quote {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    .villani-tower-box .drop-cap {
        font-size: 2.5rem;
    }
    .villani-tower-citation {
        font-size: 0.9rem;
    }
    .page-s4-2-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 3: CIACCO'S PROPHECY (HELL CIRCLE 3)
   ========================================= */
.page-s4-3 {
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the text box */
    background-color: #1a0f0a;
}
.page-s4-3-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-ciacco.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-3.in-view .page-s4-3-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Centered */
.ciacco-prophecy-box {
    position: relative;
    z-index: 4;
    width: 50%;
    max-width: 500px;
    padding: 40px 50px;
    margin-left: -60%;
    margin-top: 25%;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-3.in-view .ciacco-prophecy-box {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.ciacco-prophecy-box:hover {
    background: rgba(10, 5, 2, 0.75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Text Styling */
.ciacco-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin: 0;
    font-style: italic;
}

/* Mobile Responsiveness for Page 3 */
@media (max-width: 768px) {
    .ciacco-prophecy-box {
        width: 90%;
        max-width: 90%;
        margin-left: 10%;
        margin-right: 10%;
        margin-top: 95%;
        padding: 30px 25px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.8);
    }
    .ciacco-text {
        font-size: 1.25rem;
        line-height: 1.5;
    }
    .page-s4-3-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 4: CIACCO'S PROPHECY POEM
   ========================================= */
.page-s4-4 {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Pushes content to the left */
    background-color: #1a0f0a;
}
.page-s4-4-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-ciacco-poem.jpg');
    background-size: cover;
    background-position: center right; /* Focuses on the plaque on the right */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-4.in-view .page-s4-4-bg {
    transform: scale(1);
}

/* Ornate Text Box - Left Side (Parchment Style) */
.ciacco-poem-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 550px;
    margin-left: 7%;
    padding: 50px 60px;
    /* Light parchment background with red/gold borders */
    background-color: #f5e6c8;
    border: 8px solid #8b0000;
    outline: 3px solid #d4af37;
    outline-offset: -12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);

    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-4.in-view .ciacco-poem-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Poem Text Styling */
.ciacco-poem-box .poem-content {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #1a0f0a; /* Dark brown/black text for light background */
    text-align: center;
    font-style: italic;
}

/* Stanza Spacing */
.ciacco-poem-box .poem-stanza {
    margin-bottom: 18px;
}
.ciacco-poem-box .poem-stanza:last-child {
    margin-bottom: 0;
}

/* Decorative Drop Cap - Absolutely Positioned */
.ciacco-poem-box .drop-cap {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: #8b0000;
    position: absolute;
    top: 45px;
    left: 50px;
    line-height: 1;
    z-index: 2;
}

/* All stanzas left-aligned with consistent indentation */
.ciacco-poem-box .poem-stanza {
    text-align: left;
    padding-left: 60px; /* Consistent indent for all lines */
    margin-bottom: 18px;
}

.ciacco-poem-box .poem-stanza:last-child {
    margin-bottom: 0;
}

/* Tiny Book Icon (Citation Trigger) - Reusing styles from Section 3 */
.ciacco-poem-box .poem-citation-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.3rem;
    color: rgba(139, 0, 0, 0.6); /* Darker red to match parchment */
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 5;
}
.ciacco-poem-box .poem-citation-icon:hover {
    color: #8b0000;
    transform: scale(1.2);
}

/* Mobile Responsiveness for Page 4 */
@media (max-width: 768px) {
    .page-s4-4 {
        justify-content: center;
    }
    .ciacco-poem-box {
        width: 90%;
        max-width: 90%;
        margin-left: 0;
        padding: 40px 10px;
        border-width: 6px;
        outline-width: 2px;
        outline-offset: -10px;
    }
    .ciacco-poem-box .poem-content {
        font-size: 1.0rem;
        margin-left: -5px;
    }
    .ciacco-poem-box .poem-stanza {
        margin-bottom: 12px;
    }
    .ciacco-poem-box .drop-cap {
        font-size: 2.5rem;
        margin-left: -38px;
    }
    .page-s4-4-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 5: FARINATA DEGLI UBERTI (DORÉ)
   ========================================= */
.page-s4-5 {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Pushes content to the left */
    background-color: #1a0f0a;
}
.page-s4-5-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-farinata.jpg');
    background-size: cover;
    background-position: center right; /* Focuses on the figures on the right */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-5.in-view .page-s4-5-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Left Side */
.farinata-desc-box {
    position: relative;
    z-index: 4;
    width: 35%;
    max-width: 400px;
    margin-left: 5%;
    margin-top: 25%;
    padding: 35px 40px;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-5.in-view .farinata-desc-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.farinata-desc-box:hover {
    background: rgba(10, 5, 2, 0.72);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

/* Text Styling */
.farinata-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin: 0;
    font-style: italic;
}

/* Mobile Responsiveness for Page 5 */
@media (max-width: 768px) {
    .page-s4-5 {
        align-items: center;
        justify-content: center;
    }
    .farinata-desc-box {
        width: 90%;
        max-width: 90%;
        margin-left: 0;
        margin-top: 90%;
        padding: 30px 25px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.75);
    }
    .farinata-text {
        font-size: 1.25rem;
        text-align: center;
    }
    .page-s4-5-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 6: DANTE'S EXILE & SOLITUDE
   ========================================= */
.page-s4-6 {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Pushes content to the left */
    background-color: #1a0f0a;
}
.page-s4-6-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-dante-hawk.jpg');
    background-size: cover;
    background-position: center right; /* Focuses on the statue on the right */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-6.in-view .page-s4-6-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Left Side */
.exile-text-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-left: 5%;
    padding: 40px 50px;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    /* Constrain height and enable internal scrolling */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-6.in-view .exile-text-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.exile-text-box:hover {
    background: rgba(10, 5, 2, 0.75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

/* Text Styling */
.exile-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #ffffff;
    text-align: justify;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}
.exile-text:last-child {
    margin-bottom: 0;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR EXILE BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.exile-text-box::-webkit-scrollbar {
    width: 8px;
}
.exile-text-box::-webkit-scrollbar-track {
    background: rgba(10, 5, 2, 0.3);
    border-radius: 4px;
}
.exile-text-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(10, 5, 2, 0.5);
}
.exile-text-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.exile-text-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(10, 5, 2, 0.3);
}

/* Mobile Responsiveness for Page 6 */
@media (max-width: 768px) {
    .page-s4-6 {
        align-items: center;
        justify-content: center;
    }
    .exile-text-box {
        width: 90%;
        max-width: 90%;
        margin-left: 0;
        padding: 30px 25px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.8);
        max-height: 80vh;
    }
    .exile-text {
        font-size: 1.15rem;
        line-height: 1.5;
    }
    .page-s4-6-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 7: VILLANI - DANTE THE SCHOLAR
   ========================================= */
.page-s4-7 {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes content to the right */
    background-color: #1a0f0a;
}
.page-s4-7-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-flag.jpg');
    background-size: cover;
    background-position: center left; /* Focuses on the flag on the left */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-7.in-view .page-s4-7-bg {
    transform: scale(1);
}

/* Ornate Text Box - Right Side (Parchment Style) */
.villani-scholar-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-right: 8%;
    padding: 50px 60px;
    /* Light parchment background with red/gold borders */
    background-color: #f5e6c8;
    border: 8px solid #8b0000;
    outline: 3px solid #d4af37;
    outline-offset: -12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);

    /* Constrain height and enable internal scrolling */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-7.in-view .villani-scholar-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Quote Text Styling */
.villani-scholar-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #1a0f0a; /* Dark brown/black text for light background */
    text-align: justify;
    font-style: italic;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Decorative Drop Cap */
.villani-scholar-box .drop-cap {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #8b0000;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 5px;
}

/* Citation Styling */
.villani-scholar-citation {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #8b0000; /* Red citation to match the presentation */
    line-height: 1.6;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
    padding-top: 15px;
}
.villani-scholar-citation .author {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.villani-scholar-citation em {
    font-style: italic;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR VILLANI SCHOLAR BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.villani-scholar-box::-webkit-scrollbar {
    width: 8px;
}
.villani-scholar-box::-webkit-scrollbar-track {
    background: rgba(139, 0, 0, 0.1); /* Subtle red-tinted track */
    border-radius: 4px;
}
.villani-scholar-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(245, 230, 200, 0.5);
}
.villani-scholar-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.villani-scholar-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(139, 0, 0, 0.1);
}

/* Mobile Responsiveness for Page 7 */
@media (max-width: 768px) {
    .page-s4-7 {
        justify-content: center;
    }
    .page-s4-7-bg {
        background-position: left center !important;
        /* OR use a percentage value like: */
        /* background-position: 0% center !important; */
    }
    .villani-scholar-box {
        width: 90%;
        max-width: 90%;
        margin-right: 0;
        padding: 30px 25px;
        border-width: 6px;
        outline-width: 2px;
        outline-offset: -10px;
        max-height: 80vh;
    }
    .villani-scholar-quote {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    .villani-scholar-box .drop-cap {
        font-size: 2.5rem;
    }
    .villani-scholar-citation {
        font-size: 0.9rem;
    }
    .page-s4-7-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 8: LEONARDO BRUNI - DANTE'S PRIORATE
   ========================================= */
.page-s4-8 {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes content to the right */
    background-color: #1a0f0a;
}
.page-s4-8-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-column.jpg');
    background-size: cover;
    background-position: center left; /* Focuses on the column on the left */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-8.in-view .page-s4-8-bg {
    transform: scale(1);
}

/* Ornate Text Box - Right Side (Parchment Style) */
.bruni-column-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-right: 9%;
    padding: 50px 60px;
    /* Light parchment background with red/gold borders */
    background-color: #f5e6c8;
    border: 8px solid #8b0000;
    outline: 3px solid #d4af37;
    outline-offset: -12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);

    /* Constrain height and enable internal scrolling if needed */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-8.in-view .bruni-column-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Quote Text Styling */
.bruni-column-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #1a0f0a; /* Dark brown/black text for light background */
    text-align: justify;
    font-weight: 600;   
    font-style: italic;
    margin-bottom: 25px;
}

/* Decorative Drop Cap */
.bruni-column-box .drop-cap {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #8b0000;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 5px;
}

/* Citation Styling */
.bruni-column-citation {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #8b0000; /* Red citation to match the presentation */
    line-height: 1.6;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
    padding-top: 15px;
    text-align: center;
}
.bruni-column-citation .author {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.bruni-column-citation em {
    font-style: italic;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR BRUNI BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.bruni-column-box::-webkit-scrollbar {
    width: 8px;
}
.bruni-column-box::-webkit-scrollbar-track {
    background: rgba(139, 0, 0, 0.1); /* Subtle red-tinted track */
    border-radius: 4px;
}
.bruni-column-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(245, 230, 200, 0.5);
}
.bruni-column-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.bruni-column-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(139, 0, 0, 0.1);
}

/* Mobile Responsiveness for Page 8 */
@media (max-width: 768px) {
    .page-s4-8 {
        justify-content: center;
    }
    .page-s4-8-bg {
        background-position: left center !important;
        /* OR use a percentage value like: */
        /* background-position: 0% center !important; */
    }
    .bruni-column-box {
        width: 90%;
        max-width: 90%;
        margin-right: 0;
        padding: 30px 25px;
        border-width: 6px;
        outline-width: 2px;
        outline-offset: -10px;
        max-height: 80vh;
    }
    .bruni-column-quote {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    .bruni-column-box .drop-cap {
        font-size: 2.5rem;
    }
    .bruni-column-citation {
        font-size: 0.9rem;
    }
    .page-s4-8-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 9: DANTE'S EXILE (CONVIVIO QUOTE)
   ========================================= */
.page-s4-9 {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Pushes content to the left */
    background-color: #1a0f0a;
}
.page-s4-9-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-house.jpg');
    background-size: cover;
    background-position: center right; /* Focuses on the house on the right */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-9.in-view .page-s4-9-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Left Side */
.convivio-house-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-left: 5%;
    padding: 40px 50px;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    /* Constrain height and enable internal scrolling */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-9.in-view .convivio-house-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.convivio-house-box:hover {
    background: rgba(10, 5, 2, 0.75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

/* Quote Text Styling */
.convivio-house-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #ffffff;
    text-align: justify;
    font-style: italic;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
}

/* Decorative Drop Cap */
.convivio-house-box .drop-cap {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #d4af37;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 5px;
}

/* Citation Styling */
.convivio-house-citation {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #e8d4a8;
    line-height: 1.6;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding-top: 15px;
}
.convivio-house-citation .author {
    font-weight: 700;
    color: #d4af37;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.convivio-house-citation em {
    font-style: italic;
    color: #f5e6c8;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR CONVIVIO BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.convivio-house-box::-webkit-scrollbar {
    width: 8px;
}
.convivio-house-box::-webkit-scrollbar-track {
    background: rgba(10, 5, 2, 0.3);
    border-radius: 4px;
}
.convivio-house-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(10, 5, 2, 0.5);
}
.convivio-house-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.convivio-house-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(10, 5, 2, 0.3);
}

/* Mobile Responsiveness for Page 9 */
@media (max-width: 768px) {
    .page-s4-9 {
        align-items: center;
        justify-content: center;
    }
    .page-s4-9-bg {
        background-position: right center !important;
        /* OR use a percentage value like: */
        /* background-position: 0% center !important; */
    }
    .convivio-house-box {
        width: 90%;
        max-width: 90%;
        margin-left: 0;
        padding: 30px 25px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.8);
        max-height: 80vh;
    }
    .convivio-house-quote {
        font-size: 1.15rem;
        line-height: 1.5;
    }
    .convivio-house-box .drop-cap {
        font-size: 2.5rem;
    }
    .convivio-house-citation {
        font-size: 0.9rem;
    }
    .page-s4-9-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 10: FIFTH CIRCLE (DORÉ - WRATHFUL)
   ========================================= */
.page-s4-10 {
    display: flex;
    align-items: flex-end; /* Pushes content to the bottom */
    justify-content: flex-end; /* Pushes content to the right */
    background-color: #1a0f0a;
}
.page-s4-10-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-maniosi.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-10.in-view .page-s4-10-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Lower Right */
.maniosi-desc-box {
    position: relative;
    z-index: 4;
    width: 35%;
    max-width: 400px;
    margin-right: 5%;
    margin-bottom: 5%; /* Distance from the bottom */
    padding: 35px 40px;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-10.in-view .maniosi-desc-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.maniosi-desc-box:hover {
    background: rgba(10, 5, 2, 0.72);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(-5px);
}

/* Text Styling */
.maniosi-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin: 0;
    font-style: italic;
}

/* Mobile Responsiveness for Page 10 */
@media (max-width: 768px) {
    .page-s4-10 {
        align-items: center;
        justify-content: center;
    }
    .maniosi-desc-box {
        width: 90%;
        max-width: 70%;
        margin-right: 0;
        margin-bottom: -120%;
        padding: 10px 5px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.75);
    }
    .maniosi-text {
        font-size: 1.1rem;
        text-align: center;
    }
    .page-s4-10-bg {
        background-position: center center;
    }
}
/* =========================================
   PAGE 11: DANTE'S FINAL CONDEMNATION
   ========================================= */
.page-s4-11 {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes content to the right */
    background-color: #1a0f0a;
}
.page-s4-11-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/section-4-eugenio.jpg');
    background-size: cover;
    background-position: center left; /* Focuses on the figure on the left */
    z-index: 1;
    transform: scale(1.05);
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.page-s4-11.in-view .page-s4-11-bg {
    transform: scale(1);
}

/* Glassmorphic Text Box - Right Side */
.eugenio-text-box {
    position: relative;
    z-index: 4;
    width: 45%;
    max-width: 700px;
    margin-right: 5%;
    padding: 40px 50px;
    
    /* GLASSMORPHISM EFFECT */
    background: rgba(10, 5, 2, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Light-catching glass edges */
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Floating shadow + inner depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.15);
    
    border-radius: 12px;

    /* Constrain height and enable internal scrolling */
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entrance Animation */
.page-s4-11.in-view .eugenio-text-box {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease 1s, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1s;
}

/* Hover effect */
.eugenio-text-box:hover {
    background: rgba(10, 5, 2, 0.75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(-5px);
}

/* Text Styling */
.eugenio-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #ffffff;
    text-align: justify;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 0 1px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}
.eugenio-text:last-child {
    margin-bottom: 0;
}
/* Citation Styling */
.eugenio-citation {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #e8d4a8;
    line-height: 1.6;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}
.eugenio-citation .author {
    font-weight: 700;
    color: #d4af37;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.eugenio-citation em {
    font-style: italic;
}

/* =========================================
   CUSTOM GOLDEN SCROLLBAR FOR EUGENIO BOX
   ========================================= */
/* Webkit browsers (Chrome, Safari, Edge) */
.eugenio-text-box::-webkit-scrollbar {
    width: 8px;
}
.eugenio-text-box::-webkit-scrollbar-track {
    background: rgba(10, 5, 2, 0.3);
    border-radius: 4px;
}
.eugenio-text-box::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000); /* Gold to deep red */
    border-radius: 4px;
    border: 1px solid rgba(10, 5, 2, 0.5);
}
.eugenio-text-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f5e6c8, #d4af37); /* Lighter gold on hover */
}

/* Firefox */
.eugenio-text-box {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(10, 5, 2, 0.3);
}

/* Mobile Responsiveness for Page 11 */
@media (max-width: 768px) {
    .page-s4-11 {
        align-items: center;
        justify-content: center;
    }
    .page-s4-11-bg {
        background-position: left center !important;
    }
    .eugenio-text-box {
        width: 90%;
        max-width: 90%;
        margin-right: 0;
        margin-bottom: 30%;
        padding: 30px 25px;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        background: rgba(10, 5, 2, 0.8);
        max-height: 60vh;
    }
    .eugenio-text {
        font-size: 1.15rem;
        line-height: 1.5;
    }
    .page-s4-11-bg {
        background-position: center center;
    }
}