/* ============================================
   ALSEEN - STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: #fafafa;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    padding-bottom: 140px;
    /* Prevent iOS Safari bounce scrolling */
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   HOME PAGE
   ============================================ */

.content {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.content.hidden {
    display: none;
}

.logo {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: #333;
    margin-bottom: 2rem;
}

.tree-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ============================================
   TEXT PAGES
   ============================================ */

.text-page {
    display: none;
    min-height: calc(100vh - 140px);
    padding: 40px 20px 160px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.text-page.active {
    display: block;
}

.text-page h1 {
    font-size: 2rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.text-page p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
    white-space: pre-line;
}

.text-page .text-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    white-space: pre-line;
}

/* ============================================
   TRADITION PAGES STYLES
   ============================================ */

.tradition-section {
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tradition-subheader {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

.tradition-essence {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    font-style: italic;
    margin: 0;
    font-family: 'Georgia', serif;
}

.tradition-quality {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin: 0;
    font-family: 'Georgia', serif;
}

.tradition-resource {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin: 0;
    font-family: 'Georgia', serif;
}

.tradition-resource a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid #4a90e2;
}

.tradition-resource a:hover {
    color: #357abd;
    border-bottom-color: #357abd;
}

/* Mobile adjustments for tradition pages */
@media screen and (max-width: 480px) {
    .tradition-section {
        margin-bottom: 30px;
        padding: 20px;
    }

    .tradition-subheader {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .tradition-essence {
        font-size: 1.1rem;
    }

    .tradition-quality {
        font-size: 1rem;
    }

    .tradition-resource {
        font-size: 1rem;
    }
}

/* ============================================
   BIBLIOGRAPHY STYLES
   ============================================ */

.bibliography-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.bibliography-header {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    font-family: 'Georgia', serif;
}

.bib-entry {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    line-height: 1.7;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.bib-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bib-number {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 28px;
    font-family: 'Georgia', serif;
}

.bib-text {
    font-size: 1rem;
    color: #444;
    flex: 1;
    font-family: 'Georgia', serif;
}

.bib-text em {
    font-style: italic;
    color: #333;
}

.bib-text a {
    color: #4a90e2;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s ease;
}

.bib-text a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* Mobile adjustments for bibliography */
@media screen and (max-width: 480px) {
    .bibliography-section {
        margin-top: 30px;
        padding-top: 25px;
    }

    .bibliography-header {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }

    .bib-entry {
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }

    .bib-number {
        min-width: 24px;
        font-size: 0.95rem;
    }

    .bib-text {
        font-size: 0.95rem;
    }
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */

.bottom-nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e0e0e0;
    z-index: 1100;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Mobile-specific fixes */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Prevent content from sliding under on iOS */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Sub-menu Row (Third Level) */
.submenu-row {
    height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    opacity: 0;
    max-height: 0;
    transition: none; /* Disable transition for instant response */
    scrollbar-width: none;
}

.submenu-row::-webkit-scrollbar {
    display: none;
}

.submenu-row.active {
    opacity: 1;
    max-height: 70px;
    border-bottom: 1px solid #e0e0e0;
}

/* Menu Items Row (Second Level) */
.menu-items-row {
    height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f8f8;
    opacity: 0;
    max-height: 0;
    transition: none; /* Disable transition for instant response */
    scrollbar-width: none;
}

.menu-items-row::-webkit-scrollbar {
    display: none;
}

.menu-items-row.active {
    opacity: 1;
    max-height: 70px;
    border-bottom: 1px solid #e0e0e0;
}

/* Hide Layer 2 when Layer 3 (submenu) is active */
.menu-items-row.hidden-by-submenu {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: none; /* No transition when hiding */
}

.menu-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 60px;
    padding: 8px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Active state for submenu items - subtle persistent highlighting */
.menu-item.active {
    background: #e3f2fd;
    border-color: #90caf9;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.menu-item.active .menu-item-text {
    color: #1976d2;
    font-weight: 500;
}

.menu-item-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.menu-item-text {
    font-size: 0.7rem;
    color: #666;
    font-family: 'Georgia', serif;
}

/* Bottom Buttons */
.bottom-buttons {
    height: 70px;
    display: flex;
    gap: 0;
    position: relative;
    z-index: 101;
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.explore-button {
    flex: 1;
    font-size: 0.95rem;
}

.back-button {
    width: 92px; /* 15% wider than original 80px */
    font-size: 0.8rem;
    border-left: 1px solid #e0e0e0;
}

/* Back button activated state when relevant */
.back-button.relevant {
    color: #1976d2;
    background: #f0f7ff;
}

.nav-button.active {
    color: #000;
    background: #f5f5f5;
}

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

.nav-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.back-button .nav-icon {
    font-size: 1.3rem;
}

/* ============================================
   SWIPEABLE MODAL
   ============================================ */

.swipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 140px; /* Above bottom-buttons (70px) + menu-items-row (70px) */
    background: rgba(255,255,255,0.98);
    z-index: 900;
    display: none;
    /* Flexbox layout: content area + controls area */
    flex-direction: column;
    /* Mobile-specific fixes */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.swipe-modal.active {
    display: flex; /* Changed from block to flex */
}

.swipe-container {
    flex: 1; /* Takes all available space except controls */
    width: 100%;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    min-height: 0; /* Important for flexbox scrolling */
}

.swipe-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 20px 40px;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Scrolls within flex container, cannot overflow into controls */
    position: relative;
}

.modal-image {
    max-width: 90%;
    max-height: 50vh;
    border-radius: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
    margin-bottom: 30px;
    object-fit: contain;
}

.modal-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 20px;
    white-space: pre-line;
}

.modal-quote {
    font-size: 1.4rem;
    font-style: italic;
    color: #333;
    line-height: 2;
    max-width: 650px;
    text-align: center;
    padding: 60px 30px;
    margin-bottom: 20px;
}

.quote-author {
    font-size: 1rem;
    color: #888;
    font-style: normal;
    margin-top: 30px;
    display: block;
}

/* Nonduality Split Layout */
.nonduality-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
}

.nonduality-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.nonduality-image-half {
    background: #f8f8f8;
}

.nonduality-text-half {
    background: white;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
}

.nonduality-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nonduality-text-container {
    max-width: 600px;
    text-align: left;
    padding: 30px;
    width: 100%;
}

.nonduality-header {
    font-size: 1.3rem;
    font-weight: bold;
    color: #222;
    margin: 0 0 20px 0;
    font-family: 'Georgia', serif;
}

.nonduality-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
    font-family: 'Georgia', serif;
    white-space: pre-line;
}

/* Override swipe-content padding for nonduality */
.swipe-content:has(.nonduality-content) {
    padding: 0;
}

/* Art Gallery Layout */
.art-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
}

.art-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: #fafafa;
}

.art-text-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 15px 20px;
    min-height: 60px;
}

.art-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.art-text-container {
    text-align: center;
    max-width: 600px;
}

.art-title {
    font-weight: bold;
    font-size: 1.05rem;
    color: #222;
    font-family: 'Georgia', serif;
    margin-right: 8px;
}

.art-description {
    font-size: 1rem;
    color: #666;
    font-family: 'Georgia', serif;
}

/* Override swipe-content padding for art */
.swipe-content:has(.art-content) {
    padding: 0;
}

/* Typewriter Gallery Layout */
.typewriter-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
}

.typewriter-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: #fafafa;
}

.typewriter-text-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 15px 20px;
    min-height: 60px;
}

.typewriter-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.typewriter-text-container {
    text-align: center;
    max-width: 600px;
}

.typewriter-title {
    font-weight: bold;
    font-size: 1.05rem;
    color: #222;
    font-family: 'Georgia', serif;
}

/* Override swipe-content padding for typewriter */
.swipe-content:has(.typewriter-content) {
    padding: 0;
}

/* Modal Button Container - Fixed height flex item at bottom */
.modal-button-container {
    flex-shrink: 0; /* Don't shrink this area */
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the counter between arrows */
    /* Solid white background */
    background: #ffffff;
    pointer-events: none;
    padding: 0 15px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    gap: 15px;
    width: 100%;
}

/* Navigation Arrows */
.nav-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: auto;
    /* Prevent iOS tap delay */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
}

.nav-arrow:active {
    transform: scale(0.9);
}

.nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.modal-close {
    display: none; /* Hidden - removed from UI */
}

/* Counter */
.counter {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   MOBILE-SPECIFIC FIXES
   ============================================ */

/* Small mobile devices (phones in portrait) */
@media screen and (max-width: 480px) {
    .swipe-content {
        padding: 90px 15px 40px;
    }

    .modal-image {
        max-width: 95%;
        max-height: 45vh;
    }

    .modal-text {
        margin-bottom: 20px;
    }

    .modal-quote {
        font-size: 1.2rem;
        padding: 50px 20px;
        margin-bottom: 20px;
    }

    .nonduality-text-container {
        padding: 20px;
    }

    .nonduality-header {
        font-size: 1.2rem;
        margin: 0 0 15px 0;
    }

    .nonduality-text {
        font-size: 1rem;
    }

    .nonduality-half {
        padding: 15px;
    }

    .art-image-section {
        padding: 15px;
    }

    .art-text-section {
        padding: 12px 15px;
        min-height: 55px;
    }

    .art-title {
        font-size: 1rem;
        margin-right: 6px;
    }

    .art-description {
        font-size: 0.95rem;
    }

    .modal-button-container {
        height: 70px;
        padding: 0 10px;
        gap: 10px;
    }

    .nav-arrow {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }

    .modal-close {
        width: 48px;
        height: 48px;
    }

    .counter {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* Landscape orientation fixes */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .swipe-content {
        padding: 70px 15px 40px;
    }

    .modal-image {
        max-height: 40vh;
    }

    .modal-text {
        margin-bottom: 20px;
    }

    .modal-quote {
        font-size: 1.1rem;
        padding: 40px 20px;
        margin-bottom: 20px;
    }

    .nonduality-text-container {
        padding: 20px;
    }

    .nonduality-header {
        font-size: 1.15rem;
        margin: 0 0 12px 0;
    }

    .nonduality-text {
        font-size: 0.95rem;
    }

    .art-image-section {
        padding: 15px;
    }

    .art-text-section {
        padding: 10px 15px;
        min-height: 50px;
    }

    .art-title {
        font-size: 0.95rem;
    }

    .art-description {
        font-size: 0.9rem;
    }

    .modal-button-container {
        height: 70px;
    }
}

/* Android-specific fixes using user-agent based detection fallback */
@supports (-webkit-touch-callout: none) {
    /* iOS specific */
    .bottom-nav-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Ensure modals don't interfere with navigation on any mobile device */
@media screen and (max-width: 768px) {
    body {
        /* Use dynamic viewport units on mobile */
        min-height: 100dvh;
        position: relative;
    }

    .swipe-modal {
        /* Position above bottom nav on mobile */
        bottom: 140px;
    }

    .bottom-nav-container {
        /* Ensure nav stays on top with increased specificity */
        z-index: 1100 !important;
        position: fixed !important;
        will-change: transform;
    }

    /* Prevent text selection on controls */
    .nav-arrow,
    .modal-close,
    .nav-button,
    .menu-item {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}

/* ============================================
   DESKTOP STYLES
   ============================================ */

/* Desktop layout (tablets and larger screens) */
@media screen and (min-width: 769px) {
    /* Center menu buttons horizontally */
    .menu-items-row,
    .submenu-row {
        justify-content: center;
    }

    /* Make back button wider on desktop */
    .back-button {
        width: 184px; /* Double the mobile width (92px * 2) */
    }

    /* Center and constrain modal controls to 1/3 - 1/2 width */
    .modal-button-container {
        max-width: 40%;
        margin: 0 auto;
        justify-content: center;
        gap: 20px;
        padding: 0 20px;
    }
}

/* ============================================
   INFO BUTTON FEATURE (REVERSIBLE)
   To disable this feature, add: .info-button, .info-cta-overlay, .info-lightbox { display: none !important; }
   ============================================ */

/* Info Button (circular '+' button with subtle color) */
.info-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
    border: 2px solid #90caf9;
    font-size: 1.8rem;
    font-weight: 300;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.25);
    z-index: 1002;
    color: #1976d2;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.info-button:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #64b5f6;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.35);
}

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

/* CTA Overlay (full screen, centered CTAs) */
.info-cta-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* CTA Overlay Close Button */
.info-cta-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #666;
    border: 2px solid #555;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2001;
    color: #ccc;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.info-cta-close:hover {
    background: #555;
    border-color: #444;
    transform: scale(1.1);
}

.info-cta-close:active {
    transform: scale(0.9);
}

.info-cta-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px;
    max-width: 450px;
    width: 90%;
}

/* CTA Buttons (stacked vertically, square corners, no italic) */
.info-cta-button {
    padding: 22px 35px;
    background: white;
    border: 2px solid #90caf9;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #1976d2;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.info-cta-button:hover {
    background: #f0f7ff;
    border-color: #64b5f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.25);
}

.info-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Lightbox Modal (full screen, light yellow bg) */
.info-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.info-lightbox-content {
    position: relative;
    background: #fffef5;
    border-radius: 16px;
    padding: 50px 40px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    -webkit-overflow-scrolling: touch;
}

.info-lightbox-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #333;
    font-style: italic;
    font-family: Georgia, serif;
    white-space: pre-line;
}

.info-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #666;
    border: 2px solid #555;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1;
    color: #ccc;
    transition: all 0.2s ease;
}

.info-lightbox-close:hover {
    background: #555;
    border-color: #444;
}

.info-lightbox-close:active {
    transform: scale(0.9);
}

/* Image Lightbox Modal (full-screen image view) */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-lightbox-img {
    max-width: 95%;
    max-height: 95vh; /* Fallback for older browsers */
    max-height: 95dvh; /* Dynamic viewport height - accounts for browser UI */
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #666;
    border: 2px solid #555;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 3501;
    color: #ccc;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.image-lightbox-close:hover {
    background: #555;
    border-color: #444;
    transform: scale(1.1);
}

.image-lightbox-close:active {
    transform: scale(0.9);
}

/* Landscape orientation support for image lightbox */
@media screen and (orientation: landscape) {
    .image-lightbox-img {
        max-width: 90vw;
        max-height: 90vh; /* Fallback for older browsers */
        max-height: 90dvh; /* Dynamic viewport height - accounts for browser UI */
    }
}

/* Mobile adjustments for info feature */
@media screen and (max-width: 480px) {
    .info-button {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
    }

    .info-cta-close {
        width: 42px;
        height: 42px;
        top: 15px;
        right: 15px;
    }

    .info-cta-button {
        padding: 20px 28px;
        font-size: 1rem;
    }

    .info-lightbox-content {
        padding: 40px 25px;
    }

    .info-lightbox-text {
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .image-lightbox-close {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }

    .image-lightbox-img {
        max-width: 98%;
        max-height: 92vh; /* Fallback for older browsers */
        max-height: 92dvh; /* Dynamic viewport height - accounts for browser UI */
    }
}
