/* English LTR Support CSS */
/* Global styles for English pages (LTR direction) */

/* Global LTR setup */
html[dir="ltr"],
html[lang="en"] {
    direction: ltr;
}

html[dir="ltr"] body,
html[lang="en"] body {
    direction: ltr;
    text-align: left;
    font-family: 'Inter', 'Open Sans', 'Roboto', 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
}

/* Hide phone button from header - per client request */
.h-phone {
    display: none !important;
}

/* Header adjustments for LTR */
html[dir="ltr"] #mainmenu,
html[lang="en"] #mainmenu {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] #mainmenu li,
html[lang="en"] #mainmenu li {
    float: left;
}

html[dir="ltr"] #mainmenu ul,
html[lang="en"] #mainmenu ul {
    left: 0;
    right: auto;
}

/* Logo adjustments for LTR */
html[dir="ltr"] #logo,
html[lang="en"] #logo {
    float: left;
}

/* =====================================================
   DUAL LOGO STYLING FOR ENGLISH PAGES
   ===================================================== */

/* Override base style.css max-width constraint for dual logos */
header div#logo.dual-logo {
    max-width: none !important;
    width: auto !important;
}

/* Override base width:100% on images — let height control sizing */
header div#logo.dual-logo img {
    width: auto !important;
    height: auto;
    max-width: none;
}

#logo.dual-logo a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

#logo.dual-logo img {
    transition: all 0.3s ease;
    object-fit: contain;
    flex-shrink: 0;
}

#logo.dual-logo img:hover {
    transform: scale(1.02);
}

/* Secondary logo visibility */
#logo.dual-logo .logo-secondary {
    opacity: 0.95;
}

/* Large screens (desktop ≥1200px) */
@media (min-width: 1200px) {
    #logo.dual-logo a {
        gap: 12px;
    }
    #logo.dual-logo img.logo-main {
        max-height: 48px !important;
        height: 48px !important;
    }
    #logo.dual-logo img.logo-main.logo-secondary {
        max-height: 42px !important;
        height: 42px !important;
    }
    #logo.dual-logo img.logo-scroll {
        max-height: 40px !important;
        height: 40px !important;
    }
    #logo.dual-logo img.logo-scroll.logo-secondary {
        max-height: 34px !important;
        height: 34px !important;
    }
}

/* Medium screens (small desktops 992–1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    #logo.dual-logo a {
        gap: 8px;
    }
    #logo.dual-logo img.logo-main {
        max-height: 42px !important;
        height: 42px !important;
    }
    #logo.dual-logo img.logo-main.logo-secondary {
        max-height: 36px !important;
        height: 36px !important;
    }
    #logo.dual-logo img.logo-scroll {
        max-height: 36px !important;
        height: 36px !important;
    }
    #logo.dual-logo img.logo-scroll.logo-secondary {
        max-height: 30px !important;
        height: 30px !important;
    }
}

/* Tablet screens (768–991px) */
@media (min-width: 768px) and (max-width: 991px) {
    #logo.dual-logo a {
        gap: 6px;
    }
    #logo.dual-logo img.logo-main,
    #logo.dual-logo img.logo-scroll {
        max-height: 36px !important;
        height: 36px !important;
    }
    #logo.dual-logo img.logo-secondary {
        max-height: 30px !important;
        height: 30px !important;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    header div#logo.dual-logo {
        max-width: 55vw !important;
    }
    #logo.dual-logo a {
        gap: 5px;
    }
    #logo.dual-logo img.logo-main,
    #logo.dual-logo img.logo-scroll,
    #logo.dual-logo img.logo-mobile {
        max-height: 30px !important;
        height: 30px !important;
    }
    #logo.dual-logo img.logo-secondary {
        max-height: 25px !important;
        height: 25px !important;
    }
}

/* Very small mobile (≤480px) */
@media (max-width: 480px) {
    header div#logo.dual-logo {
        max-width: 50vw !important;
    }
    #logo.dual-logo a {
        gap: 4px;
    }
    #logo.dual-logo img.logo-mobile {
        max-height: 26px !important;
        height: 26px !important;
    }
    #logo.dual-logo img.logo-secondary.logo-mobile {
        max-height: 22px !important;
        height: 22px !important;
    }
}

/* =====================================================
   FORCE SCROLLED HEADER APPEARANCE
   Always show the post-scroll header version (white background)
   ===================================================== */

/* Force header to always have white background (scrolled state) */
header,
header.transparent,
header.transparent.scroll-light,
header.transparent.header-light,
header.transparent.has-topbar,
header.transparent.scroll-light.has-topbar,
header.transparent.header-light.has-topbar,
header.transparent.scroll-light.has-topbar.unified-header {
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Force topbar to have white background */
header #topbar,
header.transparent #topbar,
header.transparent.has-topbar #topbar {
    background: #ffffff !important;
}

/* Ensure logo always has dark filter (for white background) */
header #logo img,
header.transparent #logo img,
#logo img {
    filter: brightness(0) saturate(100%) invert(25%) sepia(20%) saturate(800%) hue-rotate(100deg) brightness(90%) !important;
}

/* Ensure menu text is always dark */
header #mainmenu li a,
header.transparent #mainmenu li a,
header #mainmenu li.has-child:after {
    color: #333333 !important;
}

/* Ensure topbar text is dark */
header .topbar-widget,
header #topbar .topbar-widget {
    color: #333333 !important;
}

/* Override any scroll-based transitions */
header.smaller,
header.header-scrolled {
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* =====================================================
   MOBILE HEADER - GLOBAL FIXES FOR ENGLISH PAGES
   Unified mobile header styling
   ===================================================== */

@media (max-width: 991px) {
    /* Mobile header layout - ensure proper flex container */
    header .de-flex {
        flex-wrap: wrap !important;
    }
    
    header .de-flex-col:last-child {
        flex: 0 0 auto !important;
    }
    
    /* Menu side area - flex layout for language switcher and menu button */
    .menu_side_area {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 10px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    
    /* Language switcher positioning */
    .language-switcher {
        margin: 0 !important;
        padding: 0 !important;
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
    /* Language button mobile styling - flag only */
    .language-switcher .lang-btn {
        font-size: 22px !important;
        padding: 8px !important;
        min-width: auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }
    
    .language-switcher .lang-btn:hover,
    .language-switcher .lang-btn:focus {
        background: transparent !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Menu button styling */
    #menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 2 !important;
        width: 44px !important;
        height: 44px !important;
        cursor: pointer !important;
        color: #333 !important;
        background: transparent !important;
        border: none !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
    
    #menu-btn:before {
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome !important;
        font-weight: 900 !important;
        font-style: normal !important;
        font-variant: normal !important;
        text-rendering: auto !important;
        -webkit-font-smoothing: antialiased !important;
        content: "\f0c9" !important;
        font-size: 24px !important;
        color: #333 !important;
        line-height: 1 !important;
        display: block !important;
    }
    
    #menu-btn.menu-open:before {
        content: "\f00d" !important;
    }
    
    /* Hide donation button and phone on mobile */
    .menu_side_area .btn-main,
    .menu_side_area .h-phone,
    .menu_side_area a.btn-main {
        display: none !important;
    }
    
    /* Ensure proper header padding and spacing */
    header .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    header .de-flex.sm-pt10 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* Fix logo container to not overflow */
    header #logo,
    header #logo.dual-logo {
        max-width: 72% !important;
        overflow: visible !important;
        padding-inline: 4px !important;
    }
    
    /* Keep both logos fully visible, only show mobile pair */
    header #logo.dual-logo a {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    
    /* Hide desktop/scroll variants on mobile to avoid duplicates */
    header #logo.dual-logo img.logo-main,
    header #logo.dual-logo img.logo-scroll {
        display: none !important;
    }
    
    /* Show only the mobile pair */
    header #logo.dual-logo img.logo-mobile {
        display: inline-block !important;
        height: auto !important;
        max-height: 30px !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
    }
    
    header #logo.dual-logo img.logo-mobile.logo-secondary {
        max-height: 26px !important;
    }
    
    /* Ensure icons don't get cut off */
    header .de-flex-col:last-child {
        min-width: 100px !important;
        overflow: visible !important;
    }
}

@media (max-width: 767px) {
    /* Smaller screens - tighter spacing */
    .menu_side_area {
        gap: 8px !important;
    }
    
    #menu-btn {
        width: 40px !important;
        height: 40px !important;
    }
    
    #menu-btn:before {
        font-size: 22px !important;
    }
    
    .language-switcher .lang-btn {
        font-size: 20px !important;
        padding: 6px !important;
    }
    
    /* Prevent header content from overflowing */
    header #logo,
    header #logo.dual-logo {
        max-width: 70% !important;
    }
    
    header #logo.dual-logo img.logo-mobile {
        max-height: 28px !important;
    }
    
    header #logo.dual-logo img.logo-mobile.logo-secondary {
        max-height: 24px !important;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    .menu_side_area {
        gap: 5px !important;
    }
    
    #menu-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    #menu-btn:before {
        font-size: 20px !important;
    }
    
    .language-switcher .lang-btn {
        font-size: 18px !important;
        padding: 5px !important;
    }
    
    header #logo,
    header #logo.dual-logo {
        max-width: 68% !important;
    }
    
    header #logo.dual-logo img.logo-mobile {
        max-height: 26px !important;
    }
    
    header #logo.dual-logo img.logo-mobile.logo-secondary {
        max-height: 22px !important;
    }
}

/* LTR specific menu button adjustments */
html[dir="ltr"] #menu-btn,
html[lang="en"] #menu-btn {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
