/* COLOR VARIABLES */
:root {
    --bg-main: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-nav: rgba(10, 10, 10, 0.85);
    --text-main: #f0f0f0;
    --text-secondary: #888888;
    --text-inverse: #000000;
    --text-hover-card: #ffffff;
    --text-hover-link: #ffffff;
    --border-color: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.15);
    --accent-color: #ffffff;
    --icon-color: #ffffff;
    --book-bg: #fdfbf7;
    --book-text: #2c2c2c;

    --mobile-hover-bg: #1f1f1f;
    --mobile-hover-text: #ffffff;
    --donation-btn-bg: #ffffff;
    --donation-btn-text: #000000;
}

[data-theme="light"] {
    --bg-main: #f4f4f4;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --text-main: #121212;
    --text-secondary: #555555;
    --text-inverse: #ffffff;
    --text-hover-card: #121212;
    --text-hover-link: #000000;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.3);
    --accent-color: #000000;
    --icon-color: #121212;

    --mobile-hover-bg: #e5e5e5;
    --mobile-hover-text: #000000;
    --donation-btn-bg: #000000;
    --donation-btn-text: #ffffff;
}

/* --- GLOBAL SCROLL FIXES --- */
html,
body {
    overflow-x: hidden;
    width: 100%;
    touch-action: pan-y;
}

body.is-loading {
    overflow: hidden !important;
    height: 100vh;
}

body.no-scroll {
    overflow: hidden !important;
}

body {
    font-family: 'Noto Sans Georgian', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* SCROLLBAR */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

h1,
h2,
h3,
.nav-item,
.page-title,
.book-title,
.geo-caps {
    font-family: 'BPG Banner Caps', sans-serif;
}

.font-eng {
    font-family: 'Aladin', cursive;
    letter-spacing: 0.05em;
}

/* Utility Classes */
.bg-theme-main {
    background-color: var(--bg-main);
}

.bg-theme-secondary {
    background-color: var(--bg-secondary);
}

.bg-theme-card {
    background-color: var(--bg-card);
}

.text-theme-main {
    color: var(--text-main);
}

.text-theme-secondary {
    color: var(--text-secondary);
}

.border-theme {
    border-color: var(--border-color);
}

.hover-text-dynamic:hover {
    color: var(--text-hover-link) !important;
}

.mobile-menu-link:hover {
    background-color: var(--mobile-hover-bg);
    color: var(--mobile-hover-text) !important;
}

.btn-donation {
    background-color: var(--donation-btn-bg);
    color: var(--donation-btn-text);
}

.btn-donation:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    z-index: 2147483647; /* Max Z-Index */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Navigation */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

[data-theme="light"] .dropdown-item:hover {
    background-color: #f0f0f0;
    color: #000000;
}

.group.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Responsive Navigation Logic */
@media (min-width: 1024px) {
    #desktop-menu-container {
        display: block !important;
    }
    #mobile-menu-btn-container {
        display: none !important;
    }
    #mobile-menu {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    #desktop-menu-container {
        display: none !important;
    }
    #mobile-menu-btn-container {
        display: flex !important;
    }
}

.swiper-button-next,
.swiper-button-prev {
    color: #ffffff;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (min-width: 1024px) {

    .swiper-button-next,
    .swiper-button-prev {
        width: 50px;
        height: 50px;
    }
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--accent-color);
    color: var(--text-inverse);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px;
}

@media (min-width: 1024px) {

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 18px;
    }
}

.journal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure full height */
}

.journal-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--border-hover);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
}

.journal-card:hover h3 {
    color: var(--text-hover-card) !important;
}

.journal-card>div:first-child {
    height: 55%;
    /* Default */
    flex-shrink: 0;
    /* Prevent shrinking */
}

@media (min-width: 1024px) {
    .journal-card>div:first-child {
        height: 60%;
        /* Slightly larger on this specific range if needed */
    }

    .journal-card img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }
}

.journal-tag {
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-section {
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.hidden-page {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

#mobile-menu {
    background-color: var(--bg-nav);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

/* Lenis */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Lightbox */
#lightbox {
    backdrop-filter: blur(30px);
    background-color: rgba(0, 0, 0, 0.8);
}

#lightbox-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

#lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center center;
}

#lightbox-img.zoomed {
    cursor: zoom-out;
}

/* Reading Room - IMPROVED FIXED HEADER STRUCTURE */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Main Container: Fixed, No Scroll (Scroll happens inside inner div) */
.reading-room-bg {
    background: #0d0d0d;
    background-image: radial-gradient(circle at center, #1f1c19 0%, #050505 100%);
    position: fixed;
    inset: 0;
    z-index: 2000;
    /* Above everything */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent body scroll */
}

/* Fixed Header inside Flex Container */
.reading-header {
    width: 100%;
    flex-shrink: 0;
    /* Stays at top, never shrinks */
    z-index: 2100;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Default for Mobile: Space Between (Back Left, Title Right) */
    gap: 0.5rem;
    background: #0a0a0a;
    /* Solid background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Title Alignment: Right */
.reading-header .title-container {
    margin-left: auto; /* Pushes title to the right */
    margin-right: 0;
    max-width: 70%; /* Prevent overlap with back button */
}

@media (min-width: 1024px) {
    .reading-header {
        padding: 2rem 3rem; /* UPDATED: More padding for desktop */
        gap: 1rem;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        justify-content: center; /* Desktop: Center everything */
        position: relative;
    }

    /* Desktop Title Alignment: Center */
    .reading-header .title-container {
        margin-left: 0;
        margin-right: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 60%;
    }

    /* Back button positioning on desktop to not interfere with center title */
    .reading-header > button:first-child {
        position: absolute;
        left: 3rem; /* Match padding */
    }
}

/* Scrollable Content Area - FIXED SCROLLING */
.reading-content-scroll {
    flex-grow: 1;
    overflow-y: auto; /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%; /* Ensure it takes height */
}

.book-wrapper {
    width: 100%;
    flex-grow: 1;
    /* Fills remaining space */
    display: flex;
    align-items: flex-start;
    /* Default top alignment */
    justify-content: center;
    perspective: 2000px;
    padding: 10px;
    padding-bottom: 100px;
    /* Space for mobile controls */
    min-height: 100%; /* Ensure wrapper is at least full height */
}

@media (min-width: 1024px) {
    .book-wrapper {
        padding: 20px;
        padding-bottom: 80px;
        align-items: center;
        /* Center vertically on desktop */
    }
}

/* --- Book Container Logic (Mobile vs Desktop) --- */
.book-container {
    background-color: #f7f4ed;
    color: #1a1a1a;
    font-family: 'Noto Serif Georgian', serif;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.05);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1023px) {

    /* Mobile Specifics - Fixed Height */
    .book-container {
        width: 100%;
        max-width: 600px;
        flex-grow: 0;
        height: 75vh !important; /* FIXED: Specific size */
        min-height: 75vh !important;
        max-height: 75vh !important;
        border-radius: 10px;
        margin-bottom: 40px; /* Space at bottom for scrolling */
        overflow: hidden !important; /* FIXED: No growing */
    }

    .book-page-left {
        background: #f7f4ed;
        flex: 0 0 100% !important;
        /* Force 100% width */
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 10px;
        height: 100% !important; /* FIXED: Full height */
        min-height: 100%;
    }

    .book-page-right {
        display: none !important;
        /* Force hide right page on mobile */
    }

    .book-spine-shadow {
        display: none;
    }
}

@media (min-width: 1024px) {

    /* Desktop Specifics - Fixed Aspect Ratio */
    .book-container {
        flex-direction: row;
        width: 95%;
        max-width: 1400px;
        height: 85vh;
        max-height: 900px;
        flex-grow: 0;
        /* Fixed size on desktop */
        border-radius: 4px;
        background: linear-gradient(to right, #e3dccb 0%, #f7f4ed 5%, #f7f4ed 95%, #e3dccb 100%);
    }

    .book-page-left {
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        background: linear-gradient(to right, #e8dfd1 0%, #fcf8f0 10%, #fcf8f0 100%);
        display: flex;
        flex-direction: column;
        flex: 0 0 50% !important;
        /* Force 50% width */
        width: 50% !important;
        max-width: 50% !important;
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
        height: 100%; /* Fixed height on desktop */
    }

    .book-page-right {
        border-left: 1px solid rgba(0, 0, 0, 0.08);
        background: linear-gradient(to left, #e8dfd1 0%, #fcf8f0 10%, #fcf8f0 100%);
        display: flex;
        flex-direction: column;
        flex: 0 0 50% !important;
        /* Force 50% width */
        width: 50% !important;
        max-width: 50% !important;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        height: 100%; /* Fixed height on desktop */
    }

    .book-spine-shadow {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 80px;
        transform: translateX(-50%);
        background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.15) 30%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.15) 70%, transparent 100%);
        pointer-events: none;
        z-index: 20;
        mix-blend-mode: multiply;
        height: 100%;
        display: block !important;
        /* Ensure spine is visible on desktop */
    }
}

.paper-texture {
    background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png");
    opacity: 0.5;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    border-radius: inherit;
    height: 100%;
}

.book-page-content {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left !important;
    color: #2b2b2b;
    padding-right: 0;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.book-container .book-page-content {
    height: 100%;
    /* Fill the page height */
    overflow: hidden !important;
    /* STRICTLY NO SCROLL */
    flex-grow: 1;
    width: 100% !important;
    /* Ensure content takes full width */
}

@media (max-width: 1023px) {
    .book-container .book-page-content {
        overflow: hidden !important; /* FIXED: No overflow */
        height: 100% !important;
    }
}

@media (min-width: 1024px) {
    .book-page-content {
        font-size: 1.15rem;
        line-height: 1.7;
    }
}

.book-page-content p {
    margin-bottom: 1.2rem;
    width: 100%;
    /* Ensure paragraphs take full width */
    max-width: 100%;
    /* Prevent overflowing container */
    text-align: left !important;
}

@media (min-width: 1024px) {
    .book-page-content p {
        margin-bottom: 1.5rem;
    }
}

/* Reading Room Content Styling */
.book-page-content * {
    background-color: transparent !important;
    color: inherit !important;
}

.book-page-content b,
.book-page-content strong {
    font-size: 1.2rem;
    font-weight: 700; /* Ensure it's bold */
}

.book-page-content p,
.book-page-content div,
.book-page-content span {
    font-size: 0.875rem;
}

/* Page Layout Helper - keeps page number at bottom */
.book-page-left,
.book-page-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Space between content and page number */
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    /* Ensure content stays within page bounds */
}

@media (max-width: 1023px) {
    .book-page-left {
        overflow: hidden !important; /* FIXED: No overflow */
    }
}

@media (min-width: 1024px) {

    .book-page-left,
    .book-page-right {
        padding: 3rem;
    }
}

.book-nav-btn {
    position: absolute;
    bottom: 25px;
    top: auto;
    transform: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(60, 50, 40, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 200;
    border: none;
    background: transparent;
}

.book-nav-btn:hover {
    color: rgba(0, 0, 0, 1);
    transform: scale(1.25);
}

.nav-prev-desktop {
    left: 40px;
}

.nav-next-desktop {
    right: 40px;
}

.book-nav-btn.disabled {
    opacity: 0;
    pointer-events: none;
}

.mobile-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    padding: 10px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 2500;
    min-width: max-content;
    /* FIXED: Above everything */
}

@media (min-width: 1024px) {
    .mobile-controls {
        display: none !important;
        /* Force hide on desktop */
    }
}

.mobile-btn {
    color: #9ca3af;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.mobile-btn:hover,
.mobile-btn:active {
    color: white;
    transform: scale(1.2);
}

.mobile-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.mobile-page-num {
    font-family: 'Noto Sans Georgian', monospace;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 2px;
    min-width: 50px;
    text-align: center;
}

/* Lists */
.list-item-card-horizontal {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .list-item-card-horizontal {
        flex-direction: row;
        height: 300px;
    }

    .list-item-card-horizontal > div:first-child {
        width: 40%;
        height: 100%; /* Height 100% ONLY on desktop */
    }

    .list-item-card-horizontal img {
        max-width: 100%; /* Ensure image doesn't overflow */
        height: 100%;
        transition: transform 0.5s ease-out; /* Smooth transition */
    }
}

@media (max-width: 1023px) {
    .list-item-card-horizontal > div:first-child {
        height: 250px; /* Fixed height for mobile */
        width: 100%;
    }

    .list-item-card-horizontal img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease-out; /* Smooth transition */
    }
}

.list-item-card-horizontal:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.list-item-card-horizontal:hover h3 {
    color: var(--text-hover-card) !important;
}

.list-item-card-horizontal:hover img {
    transform: scale(1.05);
}

/* Cinema Carousel */
.cinema-swiper-container {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 60px;
}

.cinema-slide {
    background-position: center;
    background-size: cover;
    width: 85%;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    opacity: 0.3;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (min-width: 1024px) {
    .cinema-slide {
        width: 800px;
        height: 520px;
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    }
}

.swiper-slide-active {
    opacity: 1;
    z-index: 10;
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.3);
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    width: 6px;
    height: 6px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #ffffff;
    width: 20px;
    border-radius: 4px;
}

.cinema-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 1024px) {
    .cinema-overlay-content {
        padding: 3rem;
        background: rgba(0, 0, 0, 0.85);
    }
}

.cinema-overlay-content.active {
    transform: translateY(0);
}

.cinema-main-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    z-index: 10;
    text-align: center;
    transition: opacity 0.4s;
}

@media (min-width: 1024px) {
    .cinema-main-ui {
        padding: 3rem;
    }
}

.cinema-slide:not(.swiper-slide-active) .cinema-main-ui {
    opacity: 0;
    pointer-events: none;
}

.cinema-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.7rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    margin: 0 4px;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    font-family: 'BPG Banner Caps', sans-serif;
}

@media (min-width: 1024px) {
    .cinema-btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.8rem;
        margin: 0 6px;
        letter-spacing: 0.1em;
    }
}

.cinema-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.cinema-btn:hover::before {
    transform: translateX(0);
}

.cinema-btn:hover {
    transform: translateY(-2px);
}

.btn-synopsis {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-synopsis:hover {
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-session {
    background: white;
    color: black;
    border: 1px solid white;
}

.btn-session:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.close-overlay-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s;
}

@media (min-width: 1024px) {
    .close-overlay-btn {
        top: 30px;
        right: 30px;
        font-size: 1.8rem;
    }
}

.close-overlay-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Profile Dropdown Styles */
.profile-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-btn-active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Custom Alert & Confirm Styles */
#custom-alert-modal .modal-content,
#custom-confirm-modal .modal-content {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#custom-alert-modal.active,
#custom-confirm-modal.active {
    opacity: 1;
    visibility: visible;
}

#custom-alert-modal.active .modal-content,
#custom-confirm-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}


/* Small Screen Responsiveness */
@media (max-width: 380px) {
    .hero-title {
        font-size: 3rem !important;
    }

    .hero-subtitle {
        font-size: 0.6rem !important;
    }

    .nav-item {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .swiper {
        height: 350px !important;
    }

    .btn-donation {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.8rem !important;
    }

    .cinema-slide {
        height: 300px !important;
    }

    .cinema-main-ui h3 {
        font-size: 1.2rem !important;
    }

    .cinema-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.6rem !important;
    }
}

@media (max-width: 340px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.6rem !important;
        letter-spacing: 0.1em !important;
    }

    .nav-item {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.7rem !important;
    }

    .logo-trigger img {
        height: 2.5rem !important;
        width: 2.5rem !important;
    }

    .logo-trigger span {
        font-size: 1rem !important;
    }

    .swiper {
        height: 300px !important;
    }

    .btn-donation {
        padding: 0.6rem 1rem !important;
        font-size: 0.7rem !important;
    }

    .cinema-slide {
        height: 250px !important;
    }

    .cinema-main-ui h3 {
        font-size: 1rem !important;
    }

    .cinema-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.5rem !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.2rem !important;
    }

    .p-6 {
        padding: 1rem !important;
    }

    .p-8 {
        padding: 1.5rem !important;
    }
}

/* --- Custom Loader --- */
.custom-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-loader-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-visual {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.loader-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.loader-circle-spin {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    animation: spinLoader 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    animation: pulseLoader 2s infinite;
}

.loader-text {
    font-family: 'Alkatra', cursive;
    color: #ffffff;
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseLoader {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}
