/* css/home.css */

/* ===========================
   HEADER FIXES
   =========================== */

   .main-header {
    display: flex;
    height: 80px;
    background: #fff;
    position: relative;
    z-index: 1030; /* FIXED: must be above Bootstrap's default stacking */
    overflow: visible; /* FIXED: critical — allows dropdown to escape header bounds */
}

/* Bootstrap container/row inside header must not clip */
.main-header .container-fluid,
.main-header .row {
    overflow: visible !important; /* FIXED: Bootstrap rows can clip absolute children */
    position: static; /* Let dropdown position relative to .dropdown parent, not row */
}

/* Desktop nav links */
.desktop-nav ul li a {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray, #333);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s;
}

.desktop-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red, #e63946);
    transition: width 0.3s;
}

.desktop-nav ul li a:hover::after,
.desktop-nav ul li a.active::after {
    width: 100%;
}

.desktop-nav ul li a:hover,
.desktop-nav ul li a.active {
    color: var(--primary-red, #e63946);
}

/* --- Lang Switcher Dropdown Fix --- */
/* Bootstrap .dropdown already sets position:relative on the wrapper,
   but we reinforce it and fix the z-index stacking */
.main-header .dropdown {
    position: relative;
}

.main-header .dropdown-menu {
    position: absolute !important; /* FIXED: must be absolute, not static */
    top: calc(100% + 8px) !important; /* 8px breathing room below button */
    z-index: 9999 !important; /* FIXED: above header z-index, overlay, sidebar */
    min-width: 130px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: visible; /* FIXED: never clip the dropdown itself */
    /* Remove Bootstrap's default margin that can cause misalignment */
    margin: 0 !important;
}

.main-header .dropdown-menu .dropdown-item {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    color: var(--dark-gray, #333);
    transition: background 0.2s, color 0.2s;
}

.main-header .dropdown-menu .dropdown-item:hover,
.main-header .dropdown-menu .dropdown-item.active {
    background-color: var(--primary-red, #e63946);
    color: #fff;
}

/* Dropdown toggle button style */
.main-header .dropdown .btn-outline-secondary {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border-color: #ddd;
    color: #555;
    padding: 4px 10px;
    transition: 0.2s;
}

.main-header .dropdown .btn-outline-secondary:hover,
.main-header .dropdown .btn-outline-secondary:focus,
.main-header .dropdown.show .btn-outline-secondary {
    background-color: var(--primary-red, #e63946);
    border-color: var(--primary-red, #e63946);
    color: #fff;
    box-shadow: none;
}

/* --- Menu Trigger (Hamburger) --- */
/* It's already inline-styled with position:absolute in your HTML,
   this just reinforces and cleans it up */
.menu-trigger {
    width: 80px;
    height: 80px;
    background-color: var(--primary-red, #e63946) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1050; /* Above header, same level as Bootstrap's sticky elements */
    flex-shrink: 0;
}

/* On mobile, shrink header padding so logo isn't pushed by the absolute trigger */
@media (max-width: 991.98px) {
    .main-header .container-fluid {
        padding-right: 90px !important; /* FIXED: reserve space so content doesn't go under the trigger */
        padding-left: 15px !important;
    }
}

/* ===========================
   HERO SECTION
   =========================== */

.hero-section {
    position: relative;
    height: calc(100vh - 80px);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    background: #1a1a1a;
}

.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.hero-main-title { font-size: 7rem; line-height: 0.9; }
.hero-subtitle { letter-spacing: 5px; }
.hero-stat-number { font-size: inherit; }

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-big-text {
    position: absolute;
    top: 20%;
    left: 5%;
    z-index: 10;
}
.hero-big-text h2 {
    font-family: var(--font-head);
    font-size: 8rem;
    color: #fff;
    text-transform: uppercase;
    line-height: 0.9;
}
.hero-big-text h3 {
    font-family: var(--font-head);
    font-size: 3rem;
    color: var(--primary-red);
    text-transform: uppercase;
    margin-left: 5px;
}

.hero-info-left {
    position: absolute;
    bottom: 100px;
    left: 120px;
    display: flex;
    gap: 15px;
    z-index: 20;
}
.red-bar { width: 4px; background: var(--primary-red); height: 100%; }
.info-text h4 { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.info-text p { color: #ccc; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

.hero-stats-right {
    position: absolute;
    top: 50%;
    right: 150px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 20;
}
.stat-item { text-align: left; }
.stat-value { font-size: 32px; font-family: var(--font-head); font-weight: 700; }
.stat-unit { font-size: 14px; color: #fff; text-transform: uppercase; }
.stat-label { font-size: 12px; color: #aaa; text-transform: uppercase; margin-top: 5px; }

.hero-bottom-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 0 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-media { display: flex; gap: 20px; }
.social-media i {
    color: #fff;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.3s;
}
.social-media i:hover { background: var(--primary-red); border-color: var(--primary-red); }

.slider-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--primary-red);
    font-weight: 700;
    font-size: 14px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.slider-nav .lines { display: flex; gap: 5px; }
.slider-nav .line { width: 40px; height: 2px; background: #555; }
.slider-nav .line.active { background: #fff; }

.video-preview {
    position: absolute;
    bottom: 0;
    right: 80px;
    width: 200px;
    height: 120px;
    z-index: 30;
}
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-red);
}

.side-dots {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.side-dots span {
    width: 8px; height: 8px;
    border: 1px solid #777;
    border-radius: 50%;
}
.side-dots span.active { background: #fff; border-color: #fff; transform: scale(1.2); }

/* ===========================
   SIDEBAR
   =========================== */

.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1060; /* FIXED: above Bootstrap's modal backdrop level */
    transition: 0.4s ease-in-out;
    padding: 100px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar-menu.active { right: 0; }

.sidebar-nav ul li { margin-bottom: 25px; }
.sidebar-nav ul li a {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-gray, #333);
    text-transform: uppercase;
    font-family: var(--font-head);
    position: relative;
    text-decoration: none;
}
.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active { color: var(--primary-red); }

.sidebar-nav ul li a.active::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-red);
    border-radius: 50%;
}

.sidebar-footer .social-icons { display: flex; gap: 15px; margin-bottom: 15px; }
.sidebar-footer .social-icons i { color: #999; font-size: 14px; }
.sidebar-footer .copyright { color: #ccc; font-size: 12px; }

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1055; /* Between sidebar (1060) and header (1030) */
    display: none;
}
.overlay.active { display: block; }

/* ===========================
   MOBILE RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .main-header {
        height: 70px;
        overflow: visible; /* FIXED: keep visible on mobile */
    }

    /* Dropdown on mobile aligns to right edge so it doesn't overflow viewport */
    .main-header .dropdown-menu {
        right: 0;
        left: auto !important;
    }

    .menu-trigger {
        width: 60px !important;
        height: 60px !important;
    }

    .hamburger span {
        width: 20px !important;
        margin: 4px 0 !important;
    }
}

@media (max-width: 991px) {
    .hero-section {
        height: auto !important;
        min-height: 100vh;
        padding: 40px 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-section .container {
        padding: 20px 15px;
        max-width: 100%;
        width: 100%;
    }

    .hero-main-title { font-size: 3rem !important; line-height: 1.1 !important; }
    .hero-subtitle { font-size: 1.5rem !important; letter-spacing: 2px !important; }
    .hero-text h2 { font-size: 3rem !important; line-height: 1.1 !important; }
    .hero-text h3 { font-size: 1.5rem !important; letter-spacing: 2px !important; }
    .hero-info-box { height: auto !important; padding-top: 20px !important; }
    .hero-stat-number { font-size: 2rem !important; }

    .hero-section .col-lg-4 { margin-top: 30px; }
    .hero-section .col-lg-4 .display-5 { font-size: 2rem !important; }
    .hero-section .col-lg-4 .small { font-size: 10px !important; }

    .hero-section .border-start {
        border-left: none !important;
        border-top: 4px solid var(--primary-red) !important;
        padding-top: 20px !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        height: auto !important;
    }

    .hero-section .position-absolute.bottom-0 {
        position: relative !important;
        padding-top: 30px;
    }

    .hero-section .col-md-4 {
        justify-content: center;
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .hero-main-title { font-size: 2.5rem !important; }
    .hero-subtitle { font-size: 1.2rem !important; letter-spacing: 1px !important; }
    .hero-text h2 { font-size: 2.5rem !important; }
    .hero-text h3 { font-size: 1.2rem !important; letter-spacing: 1px !important; }
    .hero-stat-number { font-size: 1.5rem !important; }
    .hero-section .col-lg-4 .display-5 { font-size: 1.5rem !important; }
    .hero-section .col-lg-4 { text-align: center !important; }
    .hero-section .col-lg-4 .text-end { text-align: center !important; }
    .hero-info-box { padding-top: 15px !important; margin-top: 30px !important; }
}