/*
 Theme Name:   NABET Child Theme
 Description:  Child theme for Astra to convert NABET HTML template
 Author:       Antigravity
 Template:     astra
 Version:      1.0.0
*/

/* ----------------------------------------------------
   Theme Style Overrides & Astra Compatibility Fixes
   ---------------------------------------------------- */

/* Force Poppins font family across all elements */
body,
button,
input,
select,
textarea,
a,
li,
h1,
h2,
h3,
h4,
h5,
h6,
.menu-link {
    font-family: "Poppins", sans-serif !important;
}

/* Hide Astra native dropdown toggles and carets */
.ast-header-navigation-arrow,
.dropdown-menu-toggle,
.ast-menu-toggle {
    display: none !important;
}

/* Force standard navigation item styles to bypass Astra class-based overrides on desktop only */
@media (min-width: 992px) {
    .mainmenu ul>li>a {
        position: relative !important;
        display: block !important;
        padding-top: 29px !important;
        padding-bottom: 29px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        color: #707070 !important;
        line-height: 1 !important;
    }

    /* Specific overrides for parent items with dropdown submenus (MUST be below general rules) */
    .mainmenu ul>li.menu-item-has-children>a,
    .mainmenu ul>li.has-dropdown>a {
        position: relative !important;
        padding-right: 20px !important;
        padding-inline-end: 20px !important;
    }

    /* Restore custom bexon-icons dropdown carets */
    .mainmenu ul>li.menu-item-has-children>a::after,
    .mainmenu ul>li.has-dropdown>a::after {
        content: "\e929" !important;
        font-family: "bexon-icons" !important;
        font-weight: normal !important;
        font-style: normal !important;
        display: inline-block !important;
        position: absolute !important;
        top: 32px !important;
        inset-inline-end: 0 !important;
    }

    /* Hover & Active States for menu links */
    .mainmenu ul>li.current-menu-ancestor>a,
    .mainmenu ul>li.current-menu-item>a,
    .mainmenu ul>li:hover>a {
        color: var(--tj-color-theme-primary) !important;
    }
}

/* Fix search button shape, padding, background, and alignment overridden by Astra */
.header-search .search {
    border: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: #0079af !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.header-search .search_close_btn {
    border: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: var(--tj-color-heading-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.search_popup .search-box button[type="submit"] {
    border: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* Prevent WOW.js scroll animation elements from staying hidden */
.wow {
    visibility: visible !important;
}

/* Fix submenu layout and alignment issues caused by Astra overrides on desktop only */
@media (min-width: 992px) {
    .mainmenu ul li .sub-menu {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-inline-start: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        list-style: none !important;
        list-style-type: none !important;
        text-indent: 0 !important;
    }

    .mainmenu ul li .sub-menu li {
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        list-style-type: none !important;
        width: 100% !important;
        display: block !important;
    }

    .mainmenu ul li .sub-menu li a {
        padding: 10px 20px !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-indent: 0 !important;
    }

    .mainmenu ul li .sub-menu li::before,
    .mainmenu ul li .sub-menu li a::before {
        display: none !important;
        content: none !important;
    }
}

/* ----------------------------------------------------
   Gallery & Lightbox Production Overrides
   ---------------------------------------------------- */

/* Force exact aspect ratio and border-radius on Homepage Gallery Cards */
.grid figure.effect-bubba {
    aspect-ratio: 1035 / 768 !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background-color: var(--tj-color-theme-bg, #04122d) !important;
}

.grid figure.effect-bubba img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Lightbox Navigation Arrow Overrides (Using Inline Base64 SVGs) */
.lb-nav a.lb-prev {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIxNSAxOCA5IDEyIDE1IDYiPjwvcG9seWxpbmU+PC9zdmc+') !important;
    background-position: left 20px center !important;
    background-size: 36px 36px !important;
    background-repeat: no-repeat !important;
    opacity: 0.65 !important;
    filter: alpha(Opacity=65) !important;
    transition: opacity 0.3s !important;
}

.lb-nav a.lb-prev:hover {
    opacity: 1 !important;
    filter: alpha(Opacity=100) !important;
}

.lb-nav a.lb-next {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI5IDE4IDE1IDEyIDkgNiI+PC9wb2x5bGluZT48L3N2Zz4=') !important;
    background-position: right 20px center !important;
    background-size: 36px 36px !important;
    background-repeat: no-repeat !important;
    opacity: 0.65 !important;
    filter: alpha(Opacity=65) !important;
    transition: opacity 0.3s !important;
}

.lb-nav a.lb-next:hover {
    opacity: 1 !important;
    filter: alpha(Opacity=100) !important;
}

/* Lightbox Close & Loading Indicator Overrides */
.lb-data .lb-close {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMi41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxsaW5lIHgxPSIxOCIgeTE9IjYiIHgyPSI2IiB5Mj0iMTgiPjwvbGluZT48bGluZSB4MT0iNiIgeTE9IjYiIHgyPSIxOCIgeTI9IjE4Ij48L2xpbmU+PC9zdmc+') !important;
    background-size: 24px 24px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    width: 32px !important;
    height: 32px !important;
    opacity: 0.7 !important;
    filter: alpha(Opacity=70) !important;
    transition: opacity 0.2s !important;
}

.lb-data .lb-close:hover {
    opacity: 1 !important;
    filter: alpha(Opacity=100) !important;
}

.lb-cancel {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzOCIgaGVpZ2h0PSIzOCIgdmlld0JveD0iMCAwIDM4IDM4IiBzdHJva2U9IiNmZmZmZmYiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxKSIgc3Ryb2tlLXdpZHRoPSIyIj48Y2lyY2xlIHN0cm9rZS1vcGFjaXR5PSIuNSIgY3g9IjE4IiBjeT0iMTgiIHI9IjE4Ii8+PHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4Ij48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgZnJvbT0iMCAxOCAxOCIgdG89IjM2MCAxOCAxOCIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L3BhdGg+PC9nPjwvZz48L3N2Zz4=') !important;
    background-size: 32px 32px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ----------------------------------------------------
   WordPress Admin Bar Compatibility Fixes
   ---------------------------------------------------- */

body.admin-bar .header-area.header-absolute,
body.admin-bar .header-area.header-duplicate {
    top: 32px;
}

body.admin-bar .hamburger-area {
    top: calc(32px + 15px);
    height: calc(100% - 30px - 32px);
}

@media (max-width: 782px) {

    body.admin-bar .header-area.header-absolute,
    body.admin-bar .header-area.header-duplicate {
        top: 46px;
    }

    body.admin-bar .hamburger-area {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/* ----------------------------------------------------
   Mobile Responsive Menu Color and Structure Fixes
   ---------------------------------------------------- */
.hamburger_menu .mean-nav ul li a,
.hamburger_menu .mean-nav ul li a.menu-link,
.hamburger_menu .mean-nav ul li a .menu-link,
.hamburger_menu .mean-nav ul li .menu-link {
    color: #606060 !important;
    border-top: none !important;
    border-bottom: 1px solid #e0e3ed !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    background: transparent !important;
}

.hamburger_menu .mean-nav ul li.current-menu-item>a,
.hamburger_menu .mean-nav ul li.current-menu-item>a.menu-link,
.hamburger_menu .mean-nav ul li.current-menu-ancestor>a,
.hamburger_menu .mean-nav ul li.current-menu-ancestor>a.menu-link,
.hamburger_menu .mean-nav ul li a:hover,
.hamburger_menu .mean-nav ul li a.menu-link:hover {
    color: #0079AF !important;
}

.hamburger_menu .mean-nav ul li a.mean-expand {
    color: #606060 !important;
    border-bottom: none !important;
    border-top: none !important;
    background: transparent !important;
}

.hamburger_menu .mean-nav ul li a.mean-expand:hover,
.hamburger_menu .mean-nav ul li a.mean-expand.mean-clicked {
    color: #0079AF !important;
}

.hamburger_menu .mean-nav ul li .sub-menu li a,
.hamburger_menu .mean-nav ul li .sub-menu li a.menu-link {
    border-bottom: 1px solid #f0f0f0 !important;
}

/* ----------------------------------------------------
   NABET CMS - Statistics Counter Centering Overrides
   ---------------------------------------------------- */
.stats-item {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.stats-item span {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    line-height: 1.4 !important;
    min-height: 25px !important;
}

.breadcrumbs-css {
    padding: 20px 0px 20px 0px;
    margin: 0;
    min-height: 4.2857142857rem;

    h5 {

        font-weight: var(--tj-fw-normal);
        color: #707070;
        padding: 0px;
        margin: 0px;
        font-size: 1rem;
        min-height: 2.2857142857rem;

        &::after {
            content: "";
            display: inline-block;
            width: 0.7rem;
            height: 0.7rem;
            background: url("data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%2212%22%20viewBox%3D%220%200%206%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0.5%2011L5.5%206L0.5%201%22%20stroke%3D%22%23636363%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat center;
            background-size: contain;
            margin-left: 0.4285714286rem;

            flex-shrink: 0;
        }

    }

    h4 {
        padding: 0px;
        margin: 0px;
        color: #606060;
        font-size: 32px;
        font-weight: var(--tj-fw-bold);
    }
}

/* ----------------------------------------------------
   Mobile Responsive Statistics Carousel Overrides (< 768px)
   ---------------------------------------------------- */
@media (max-width: 767.98px) {

    /* Style the dots for the stats carousel */
    .stats-carousel-wrapper.owl-theme .owl-dots {
        margin-top: 15px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .stats-carousel-wrapper.owl-theme .owl-dots .owl-dot {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .stats-carousel-wrapper.owl-theme .owl-dots .owl-dot span {
        display: block !important;
        width: 8px !important;
        height: 8px !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border-radius: 50% !important;
        transition: all 0.3s ease !important;
    }

    .stats-carousel-wrapper.owl-theme .owl-dots .owl-dot.active span {
        background: #ffffff !important;
        transform: scale(1.2) !important;
    }

    /* Ensure owl item takes full width and height is consistent */
    .stats-carousel-wrapper .stats-item {
        width: 100% !important;
        padding: 10px 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Hide the vertical separator bars on mobile completely */
    .stats-carousel-wrapper .stats-item::after {
        display: none !important;
    }
}