﻿/* ================================
   Navbar / Mega Menu
   Bootstrap 5 Compatible
================================ */

.corporate-header {
    z-index: 1030;
}

.corporate-logo {
    letter-spacing: 0;
    font-size: 1.15rem;
}

.text-primary-brand {
    color: #005f73 !important;
}

.corporate-nav .nav-link {
    color: #111827;
    padding-inline: 1rem;
    transition: color 0.2s ease;
}

    .corporate-nav .nav-link:hover,
    .corporate-nav .nav-link:focus {
        color: #005f73;
    }

/* Mega menu parent */
.mega-dropdown {
    position: static;
}

/* Mega menu panel */
.mega-menu {
    width: 100%;
    left: 0;
    right: 0;
    margin-top: 0;
    border: 0;
    border-top: 3px solid #005f73;
    border-radius: 0;
    padding: 1.75rem 3rem;
    background: #fff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

/* Mega menu content grid */
.mega-menu-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 0.95fr 1.55fr;
    gap: 2rem;
    align-items: start;
}

/* Columns */
.mega-menu-col h6 {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    color: #005f73;
}

.mega-menu .dropdown-item {
    padding: 0.45rem 0;
    white-space: normal;
    font-size: 0.96rem;
    color: #374151;
    background: transparent;
    transition: color 0.2s ease, padding-inline-start 0.2s ease;
}

    .mega-menu .dropdown-item:hover,
    .mega-menu .dropdown-item:focus {
        color: #005f73;
        padding-inline-start: 0.35rem;
    }

/* Image block */
/*.mega-menu-image img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}*/

.mega-menu-caption {
    margin-top: 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
}

.mega-menu-image {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.mega-menu-preview-frame {
    position: relative;
    width: 100%;
    height: 320px;
    min-height: 320px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    display: block;
    object-fit: contain;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.35s ease;
    will-change: opacity;
    background: #ffffff;
    box-sizing: border-box;
}

    .mega-menu-preview.is-active {
        opacity: 1;
        z-index: 2;
    }

.mega-menu-preview-back {
    z-index: 1;
}



/* Desktop hover behavior */
@media (min-width: 992px) {
    .mega-dropdown:hover > .mega-menu {
        display: block;
    }

    .mega-dropdown .dropdown-toggle::after {
        vertical-align: 0.15em;
    }

    .mega-menu-preview-frame {
        height: 380px;
        min-height: 380px;
    }
}

/* Mobile behavior */
@media (max-width: 991.98px) {
    .corporate-header .navbar {
        padding-inline: 1rem;
    }

    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-top: 0;
        padding: 1rem 0;
    }

    .mega-menu-inner {
        display: block;
    }

    .mega-menu-col {
        margin-bottom: 1.25rem;
    }


    .mega-menu-preview-frame {
        height: 260px;
        min-height: 260px;
    }
}

/* RTL support */
html[dir="rtl"] .mega-menu .dropdown-item:hover,
html[dir="rtl"] .mega-menu .dropdown-item:focus {
    padding-inline-start: 0;
    padding-inline-end: 0.35rem;
}













/* Language switcher */

.language-switcher {
    position: relative;
}

.language-menu {
    min-width: 9.5rem;
    max-width: calc(100vw - 2rem);
    text-align: start;
}

    .language-menu[data-bs-popper] {
        top: 100%;
        right: 0;
        left: auto;
    }

/* In RTL, keep the menu attached to the visible side of the button. */
html[dir="rtl"] .language-menu[data-bs-popper] {
    right: auto;
    left: 0;
}

.language-menu .dropdown-item {
    font-weight: 600;
    text-align: start;
    white-space: nowrap;
    color: #212529;
}

    .language-menu .dropdown-item.active,
    .language-menu .dropdown-item:active {
        background-color: rgba(238, 155, 0, 0.14);
        color: var(--oc-primary, #005f73);
        font-weight: 700;
        border-inline-start: 3px solid var(--oc-secondary, #ee9b00);
    }



    .language-menu .dropdown-item:hover,
    .language-menu .dropdown-item:focus {
        background-color: rgba(0, 95, 115, 0.08);
        color: var(--oc-primary, #005f73);
    }


/* Mobile navbar: make the language menu flow inside the collapsed menu. */
@media (max-width: 991.98px) {
    .header-utilities {
        width: 100%;
    }

    .language-switcher,
    .language-switcher .dropdown-toggle {
        width: 100%;
    }

    .language-menu {
        width: 100%;
    }

        .language-menu[data-bs-popper] {
            position: static;
            transform: none;
            margin-top: 0.5rem;
        }
}



/* =========================================================
   RTL Header / Navbar
========================================================= */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .navbar .container,
html[dir="rtl"] .navbar .container-fluid {
    direction: rtl;
}

html[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] .navbar-nav .nav-link {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
}

html[dir="rtl"] .header-utilities {
    justify-content: flex-start;
}



/* =========================================================
   RTL Mega Menu
========================================================= */

html[dir="rtl"] .mega-menu,
html[dir="rtl"] .mega-dropdown-menu {
    direction: rtl;
    text-align: right;
}

    html[dir="rtl"] .mega-menu .row,
    html[dir="rtl"] .mega-dropdown-menu .row {
        direction: rtl;
    }

    html[dir="rtl"] .mega-menu .dropdown-item,
    html[dir="rtl"] .mega-dropdown-menu .dropdown-item {
        text-align: right;
    }

    html[dir="rtl"] .mega-menu h6,
    html[dir="rtl"] .mega-dropdown-menu h6,
    html[dir="rtl"] .mega-menu .mega-menu-title,
    html[dir="rtl"] .mega-dropdown-menu .mega-menu-title {
        text-align: right;
    }

    html[dir="rtl"] .mega-menu img,
    html[dir="rtl"] .mega-dropdown-menu img {
        display: block;
    }


/* =========================================================
   Language Switcher
========================================================= */
.language-switcher-modern {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(20, 30, 45, 0.12);
    border-radius: 999px;
    background: #f6f8fa;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.language-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 72px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    color: #263238;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .language-option:hover {
        color: #0f172a;
        background: #ffffff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
        transform: translateY(-1px);
    }

    .language-option.active {
        color: #ffffff;
        background: #1f2937;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    }

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 1rem;
    line-height: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

.language-option.active .language-flag {
    background: rgba(255, 255, 255, 0.18);
}

.language-code {
    letter-spacing: 0;
}

.language-flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}



/* =========================================================
   LOGO
========================================================= */
.corporate-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}
