/* ===========================================
   BSE.CSS - ORGANIZED VERSION (Dec 2025)
   =========================================== */

/* ======================
   1. CSS VARIABLES & ROOT
   ====================== */
:root {
    /* Color Palette */
    --cinematic-brown: #5D4037;
    --cinematic-brown-dark: #3E2723;
    --highlight-green: #4CAF50;
    --highlight-green-light: #81C784;
    --text-light: #6f0d0d;
    --theme-brown-glassy: rgba(58, 46, 40, 0.78);
    
    /* Glass Effects */
    --glassy-bg: rgba(255, 255, 255, 0.08);
    --glassy-border: rgba(255, 255, 255, 0.15);
    --glass-blur-amount: 12px;
}

/* ======================
   2. RESET & BASE STYLES
   ====================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: transparent !important;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
}

/* ======================
   3. BACKGROUND VIDEO
   ====================== */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.background-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
    border: none;
}

/* ======================
   4. HEADER & FOOTER
   ====================== */
/* Common Header/Footer Styles */
.glassy-header,
.glassy-footer {
    position: fixed;
    left: 0;
    width: 100vw;
    background: var(--theme-brown-glassy);
    backdrop-filter: blur(var(--glass-blur-amount));
    border: 1px solid var(--glassy-border);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Header Specific */
.glassy-header {
    top: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

/* Footer Specific */
.glassy-footer {
    bottom: 0;
    height: 60px;
    text-align: center;
    padding: 15px;
}

/* ======================
   5. NAVIGATION MENU
   ====================== */
.glassy-header .navbar-nav a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1.15rem;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.35s ease;
    text-decoration: none;
}

.glassy-header .navbar-nav a:hover {
    background: var(--highlight-green-light);
    color: white;
    transform: translateY(-2px);
}

.glassy-header .navbar-nav a.active {
    background: var(--highlight-green);
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

/* ======================
   6. HERO SECTION
   ====================== */
.hero-text-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    padding: 50px 40px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 1;
    transition: opacity 0.6s ease;
}

.hero-text-overlay.video-playing {
    opacity: 0;
    pointer-events: none;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: bold;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: 1.9rem;
    margin: 20px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

/* ======================
   7. CAROUSEL SYSTEM
   ====================== */
/* Text Overlay (25vh) */
.carousel-text-overlay {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    color: white;
    padding: 15px 25px;
    border-radius: 18px;
    text-align: center;
    z-index: 9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 92vw;
    max-width: 1500px;
    height: 25vh;
    animation: fadeInUp 0.7s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Carousel Container (15vh) */
.carousel-fixed-bottom {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 92vw;
    max-width: 1500px;
    height: 15vh;
    background: var(--glassy-bg);
    backdrop-filter: blur(var(--glass-blur-amount));
    border-radius: 20px;
    border: 1px solid var(--glassy-border);
    padding: 15px;
    z-index: 7;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Swiper/Slides Styling */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.swiper-slide-active {
    transform: scale(1.15);
    transition: 0.4s;
}

/* Carousel Text Styling */
.carousel-text-overlay h1 {
    color: var(--highlight-green);
    margin: 0 0 8px;
    font-size: 2.2rem;
    transition: font-size 0.3s ease;
}

.carousel-text-overlay p {
    margin: 0 0 12px;
    transition: font-size 0.3s ease;
}

/* ======================
   8. ANIMATIONS
   ====================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ======================
   9. RESPONSIVE DESIGN
   ====================== */
/* ---------- Desktop (≥ 992px) ---------- */
@media (min-width: 992px) {
    /* Hero Carousel Slides */
    .hero-carousel .swiper {
        --swiper-slides-per-view: 5;
    }
    
    /* Carousel Positioning */
    .carousel-text-overlay {
        bottom: calc(15vh + 80px + 10px);
    }
    
    .carousel-fixed-bottom {
        bottom: 80px;
    }
}

/* ---------- Tablet (768px - 991px) ---------- */
@media (max-width: 991px) and (min-width: 768px) {
    /* Hero Carousel Slides */
    .hero-carousel .swiper {
        --swiper-slides-per-view: 3;
    }
    
    /* Carousel Positioning */
    .carousel-text-overlay {
        bottom: calc(15vh + 80px + 10px);
    }
    
    .carousel-fixed-bottom {
        bottom: 80px;
    }
}

/* ---------- Mobile (≤ 767px) ---------- */
@media (max-width: 767px) {
    /* Hero Carousel Slides */
    .hero-carousel .swiper {
        --swiper-slides-per-view: 3;
    }
    
    /* Carousel Positioning */
    .carousel-text-overlay {
        bottom: calc(15vh + 70px + 10px);
        height: 25vh;
        padding: 10px 15px;
        width: 92vw;
    }
    
    .carousel-fixed-bottom {
        bottom: 70px;
        height: 15vh;
        width: 92vw;
    }
    
    /* Text Scaling for Mobile */
    .carousel-text-overlay h1 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        line-height: 1.2;
        margin-bottom: 4px;
    }
    
    .carousel-text-overlay p {
        font-size: clamp(0.85rem, 3vw, 1rem);
        line-height: 1.1;
        margin-bottom: 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    /* Content Container */
    .carousel-text-overlay .text-content {
        max-height: 90%;
        overflow-y: auto;
        width: 100%;
        padding: 0 5px;
    }
}

/* ---------- Very Small Screens (≤ 480px) ---------- */
@media (max-width: 480px) {
    /* Carousel Positioning */
    .carousel-text-overlay {
        bottom: calc(15vh + 60px + 10px);
        padding: 8px 12px;
        width: 92vw;
    }
    
    .carousel-fixed-bottom {
        bottom: 60px;
        height: 15vh;
        width: 92vw;
    }
    
    /* Text Scaling */
    .carousel-text-overlay h1 {
        font-size: clamp(1rem, 3.5vw, 1.4rem);
    }
    
    .carousel-text-overlay p {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
        -webkit-line-clamp: 2;
    }
    
    /* Footer */
    .glassy-footer {
        height: 50px;
        padding: 10px;
    }
}

/* ---------- Extra Small Screens (≤ 320px) ---------- */
@media (max-width: 320px) {
    /* Ensure Centering */
    .carousel-text-overlay {
        width: 95vw;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .carousel-fixed-bottom {
        width: 95vw;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ---------- Mobile Header/Footer Adjustments ---------- */
@media (max-width: 576px) {
    .glassy-header {
        height: 70px;
        padding: 0 15px;
    }
    
    .glassy-footer {
        height: 50px;
        padding: 10px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}