/**
 * Sticky Header Widget Styles
 */

/* ── Base ── */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.sticky-header.is-sticky {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sh-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 70px;
    transition: height 0.3s ease;
}

.sticky-header.is-sticky .sh-inner {
    height: 60px;
}

/* ── Logo ── */
.sh-logo img {
    height: 40px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.sh-logo .sh-logo--dark {
    display: none;
}

.sticky-header.is-sticky .sh-logo .sh-logo--light {
    display: none;
}

.sticky-header.is-sticky .sh-logo .sh-logo--dark {
    display: block;
}

/* ── Navigation ── */
.sh-nav {
    display: flex;
    align-items: center;
}

.sh-nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sh-nav__item {
    position: relative;
}

.sh-nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.sh-nav__link:hover {
    opacity: 0.75;
}

.sticky-header.is-sticky .sh-nav__link {
    color: #333;
}

.sticky-header.is-sticky .sh-nav__link:hover {
    opacity: 1;
    color: #0066cc;
}

.sh-nav__arrow {
    display: inline-flex;
    transition: transform 0.25s ease;
}

.sh-nav__arrow svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
}

/* ── Dropdown ── */
.sh-nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 100;
}

.sh-nav__item:hover > .sh-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sh-nav__item:hover > .sh-nav__link .sh-nav__arrow {
    transform: rotate(180deg);
}

.sh-nav__dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sh-nav__dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.sh-nav__dropdown-link:hover {
    background: #f5f5f5;
    color: #0066cc;
}

/* ── Right area ── */
.sh-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ── Search (icon + slide-left black bar) ── */
.sh-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sh-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sh-search-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    transition: stroke 0.3s ease;
}

.sticky-header.is-sticky .sh-search-toggle svg {
    stroke: #333;
}

.sh-search-bar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 40px;
    background: transparent;
    overflow: hidden;
    transition: width 0.35s ease;
    box-sizing: border-box;
}

.sh-search-bar.is-open {
    width: 300px;
}

.sh-search-bar__form {
    display: flex;
    align-items: center;
    height: 100%;
    width: 300px;
    margin: 0;
    padding: 0;
    border: 1px solid #fff;
    box-sizing: border-box;
}

.sticky-header.is-sticky .sh-search-bar__form {
    border-color: #333;
}

.sh-search-bar input,
.sh-search-bar input[type="text"] {
    flex: 1 1 auto;
    height: 100% !important;
    padding: 0 0 0 14px !important;
    font-size: 14px;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #fff;
    box-sizing: border-box;
    min-width: 0;
    box-shadow: none !important;
    border-radius: 0 !important;
    line-height: normal;
    margin: 0;
}

.sh-search-bar input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.sh-search-bar input::placeholder {
    color: rgba(255,255,255,0.6);
}

.sticky-header.is-sticky .sh-search-bar input {
    color: #333;
}

.sticky-header.is-sticky .sh-search-bar input::placeholder {
    color: #999;
}

.sh-search-bar .sh-search-toggle {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: transparent;
    border: none;
}

.sh-search-bar .sh-search-toggle svg {
    stroke: #fff;
}

.sticky-header.is-sticky .sh-search-bar .sh-search-toggle svg {
    stroke: #333;
}

/* ── Language ── */
.sh-lang {
    position: relative;
}

.sh-lang__trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.sh-lang__trigger svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    transition: stroke 0.3s ease;
}

.sticky-header.is-sticky .sh-lang__trigger svg {
    stroke: #333;
}

/* Language popup modal */
.sh-lang-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10002;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sh-lang-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.sh-lang-popup__dialog {
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.25s ease;
}

.sh-lang-popup.is-open .sh-lang-popup__dialog {
    transform: translateY(0);
}

.sh-lang-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 30px;
    border-bottom: 1px solid #eee;
}

.sh-lang-popup__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.sh-lang-popup__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.sh-lang-popup__close:hover {
    background: #f5f5f5;
}

.sh-lang-popup__close svg {
    width: 22px;
    height: 22px;
    stroke: #333;
    fill: none;
}

.sh-lang-popup__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px 30px;
    padding: 30px;
}

.sh-lang-popup__item {
    display: block;
    padding: 10px 0;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sh-lang-popup__item:hover,
.sh-lang-popup__item.trp-current-lang {
    color: #0066cc;
    font-weight: 700;
}

@media (max-width: 900px) {
    .sh-lang-popup__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .sh-lang-popup__grid { grid-template-columns: repeat(2, 1fr); padding: 20px; gap: 8px 16px; }
    .sh-lang-popup__header { padding: 16px 20px; }
    .sh-lang-popup { padding: 40px 12px 12px; }
}

/* ── Mobile burger ── */
.sh-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.sh-burger i {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: background 0.3s ease;
    font-style: normal;
}

.sticky-header.is-sticky .sh-burger i {
    background: #333;
}

/* ── Mobile nav panel ── */
.sh-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    overflow-y: auto;
    transition: right 0.35s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.sh-mobile-nav.is-open {
    right: 0;
}

.sh-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.sh-mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
}

.sh-mobile-close svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    fill: none;
}

.sh-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sh-mobile-menu .sh-nav__item {
    border-bottom: 1px solid #f0f0f0;
}

.sh-mobile-menu .sh-nav__link {
    color: #333;
    padding: 14px 20px;
    font-size: 15px;
    justify-content: space-between;
}

.sh-mobile-menu .sh-nav__dropdown {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border-radius: 0;
    min-width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0;
    transition: max-height 0.3s ease;
}

.sh-mobile-menu .sh-nav__item.is-open > .sh-nav__dropdown {
    max-height: 500px;
    padding: 4px 0;
}

.sh-mobile-menu .sh-nav__item.is-open > .sh-nav__link .sh-nav__arrow {
    transform: rotate(180deg);
}

/* Mobile submenu link color — locked to black, not controlled by Elementor settings */
.sh-mobile-menu .sh-nav__dropdown-link {
    padding: 10px 20px 10px 36px;
    color: #222 !important;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .sh-nav {
        display: none;
    }
    .sh-burger {
        display: flex;
    }
    .sh-mobile-nav {
        display: block;
    }

    /* Mobile: initial state icons and nav should be black (not inheriting desktop white) */
    .sticky-header .sh-burger i {
        background: #222 !important;
    }
    .sticky-header .sh-search-toggle svg,
    .sticky-header .sh-lang__trigger svg {
        stroke: #222 !important;
    }
    .sticky-header .sh-nav__link {
        color: #222 !important;
    }

    /* Mobile: opaque header (no transparent) + placeholder to reserve space */
    .sticky-header {
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    .sticky-header-widget {
        min-height: 70px;
    }

    /* Hide search on mobile */
    .sticky-header .sh-search {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .sh-inner {
        padding: 0 16px;
        height: 56px;
    }
    .sticky-header.is-sticky .sh-inner {
        height: 50px;
    }
    .sh-logo img {
        height: 30px;
    }
    .sh-right {
        gap: 14px;
    }
    .sticky-header-widget {
        min-height: 56px;
    }
}
