/* --------------------------------------------------------------------------
   1. Header Base
   -------------------------------------------------------------------------- */
.esg-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 0;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease,
        transform 0.4s ease, opacity 0.3s ease;
}

.esg-header.esg-header--scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.esg-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0;
    min-height: 100px;
    transition: padding 0.3s ease;
}

.esg-header.esg-header--scrolled .esg-header__inner {
    padding: 12px 0;
}

/* --------------------------------------------------------------------------
   2. Logo
   -------------------------------------------------------------------------- */
.esg-header__logo {
    flex-shrink: 0;
}

.esg-header__logo a {
    display: inline-block;
    text-decoration: none;
}

.esg-header__logo-img {
    height: 36px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.esg-header__logo-dark {
    display: none;
}

.esg-header__logo-white {
    display: block;
}

.esg-header.esg-header--scrolled .esg-header__logo-dark {
    display: block;
}

.esg-header.esg-header--scrolled .esg-header__logo-white {
    display: none;
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */
.esg-header__nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.esg-header__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.esg-header__menu-item {
    position: relative;
}

.esg-header__menu-link {
    display: inline-block;
    padding: 8px 18px;
    font-size: 15px;
    line-height: 18px;
    font-weight: 300;
    font-family: 'Manrope', sans-serif;
    color: #E6E7E8;
    text-decoration: none;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    transition: color 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.esg-header__menu-link:hover,
.esg-header__menu-link:focus {
    color: #fff;
    opacity: 0.75;
    text-decoration: none;
}

.esg-header.esg-header--scrolled .esg-header__menu-link {
    color: #212121;
}

.esg-header.esg-header--scrolled .esg-header__menu-link:hover,
.esg-header.esg-header--scrolled .esg-header__menu-link:focus {
    color: #E8611A;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   4. Search Button
   -------------------------------------------------------------------------- */
.esg-header__search {
    margin-left: 10px;
    flex-shrink: 0;
}

.esg-header__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    outline: none;
    transition: opacity 0.3s ease;
}

.esg-header__search-btn:hover {
    opacity: 0.7;
}

.esg-header__search-btn svg path {
    fill: #fff;
    transition: fill 0.3s ease;
}

.esg-header.esg-header--scrolled .esg-header__search-btn svg path {
    fill: #212121;
}

/* --------------------------------------------------------------------------
   5. Mobile Toggle
   -------------------------------------------------------------------------- */
.esg-header__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    flex-direction: column;
    gap: 5px;
    z-index: 10001;
    outline: none;
}

.esg-header__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.esg-header.esg-header--scrolled .esg-header__toggle-bar {
    background-color: #212121;
}

.esg-header__toggle.active .esg-header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.esg-header__toggle.active .esg-header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.esg-header__toggle.active .esg-header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Fullscreen Search Overlay
   -------------------------------------------------------------------------- */
.esg-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.esg-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.esg-search-overlay__close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    padding: 8px;
    outline: none;
    transition: opacity 0.3s ease;
}

.esg-search-overlay__close:hover {
    opacity: 0.7;
}

.esg-search-overlay__inner {
    width: 100%;
    max-width: 680px;
    padding: 0 20px;
}

.esg-search-overlay__form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 10px;
}

.esg-search-overlay__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 22px;
    font-weight: 300;
    padding: 10px 0;
    font-family: inherit;
}

.esg-search-overlay__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.esg-search-overlay__submit {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    outline: none;
    transition: opacity 0.3s ease;
}

.esg-search-overlay__submit:hover {
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   7. Responsive - Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .esg-header__toggle {
        display: flex;
    }

    .esg-header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 30px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
        transition: right 0.35s ease;
        z-index: 10000;
        overflow-y: auto;
    }

    .esg-header__nav.active {
        right: 0;
    }

    .esg-header__menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    .esg-header__menu-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .esg-header__menu-link {
        color: #212121;
        padding: 14px 10px;
        font-size: 14px;
        display: block;
        width: 100%;
    }

    .esg-header__menu-link:hover,
    .esg-header__menu-link:focus {
        color: #E8611A;
        opacity: 1;
    }

    .esg-header__search {
        margin-left: 0;
        margin-top: 15px;
        padding: 0 10px;
    }

    .esg-header__search-btn svg path {
        fill: #212121;
    }

    .esg-header__nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    .esg-header__nav.active::before {
        opacity: 1;
        visibility: visible;
    }
}

/* --------------------------------------------------------------------------
   8. Responsive - Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .esg-header__logo-img {
        height: 28px;
    }

    .esg-header__inner {
        padding: 14px 0;
    }

    .esg-header.esg-header--scrolled .esg-header__inner {
        padding: 10px 0;
    }
}

/* --------------------------------------------------------------------------
   9. Utility
   -------------------------------------------------------------------------- */
body.esg-header-active nav.bootsnav {
    display: none !important;
}