/* Navbar Custom CSS */
:root {
    --tg-primary-color: #FFA800;
    --tg-heading-color: #0A1628;
    --tg-body-color: #5F6C7B;
    --tg-white: #ffffff;
    --tg-border-color: #E2E2E2;

    /* Global Light Theme Variables (Synced with Homepage) */
    --hp-primary: #14176c;
    /* Navy Blue */
    --hp-secondary: #f7a400;
    /* Gold */
    --hp-body-color: #3e4073;
    /* Text Color */
    --hp-gray-light: #f8fafc;
    /* Light Background */
    --hp-white: #ffffff;
    --hp-border: #e6e7f3;
    --hp-shadow: 0 10px 30px rgba(20, 23, 108, 0.08);
    --hp-shadow-hover: 0 20px 50px rgba(20, 23, 108, 0.15);
}

/* Header Container - Transparent with blur when at top */
.tg-header__style-two {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    position: relative !important;
    z-index: 99 !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.4s ease;
}

/* Sticky Header Styles - !important ile main.css'i override eder */
.tg-header__style-two.sticky-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08) !important;
    animation: slideDownNavbar 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    z-index: 9999 !important;
}

/* Sticky modda üst bar (telefon, email, adres) gizle */
.tg-header__style-two.sticky-active .tg-header__top-two {
    display: none !important;
}

/* Sticky modda logo küçült */
.tg-header__style-two.sticky-active .custom-logo-area {
    width: 120px !important;
    flex: 0 0 120px !important;
    min-height: auto !important;
    padding: 8px 0 !important;
}

.tg-header__style-two.sticky-active .custom-logo-area img {
    max-height: 60px !important;
    transition: all 0.4s ease !important;
}

/* Sticky modda navbar padding ayarla */
.tg-header__style-two.sticky-active .tg-header__area-two {
    padding: 5px 0 !important;
}

/* Yukarıdan aşağı belirme animasyonu - daha belirgin */
@keyframes slideDownNavbar {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Placeholder for fixed header space */
#header-fixed-height {
    display: none;
}

#header-fixed-height.active-height {
    display: block;
}

.padding-reset {
    padding-left: 30px;
    padding-right: 30px;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Custom Split Layout */
.header-custom-row {
    display: flex;
    width: 100%;
}

/* Fixed Width Column for Logo */
.custom-logo-area {
    width: 190px;
    /* Narrowed from 250px to reduce whitespace */
    flex: 0 0 190px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Zero padding to maximize logo */
    overflow: hidden;
}

.custom-logo-area img {
    max-width: 100%;
    /* Let logo take full width */
    max-height: 150px;
    /* But restrict height if needed, or let it grow if header is tall */
    width: auto;
    object-fit: contain;
}

/* Fluid Column for Content */
.custom-content-area {
    flex: 1;
    /* Takes remaining space */
    display: flex;
    flex-direction: column;
}

/* Top Bar Styling */
.tg-header__top-two {
    background-color: #ffffff;
    padding: 12px 0;
}

.tg-header__top-info-two li,
.tg-header__top-right-two li {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-body-color);
    margin-right: 30px;
}

.tg-header__top-info-two li i,
.tg-header__top-right-two li i {
    color: #FFA800;
    /* Force Yellow for BI icons */
    margin-right: 10px;
    font-size: 16px;
    opacity: 1;
}

.tg-header__top-right-two {
    justify-content: flex-end;
    display: flex;
}

/* Main Navbar Area */
.tg-header__area-two {
    padding: 0;
    background: #ffffff;
    flex-grow: 1;
    /* Fill remaining height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center content */
}

.tgmenu__nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    padding: 20px;
    /* Added requested left spacing */
}

/* Navigation Links */
.tgmenu__navbar-wrap ul.navigation {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 30px;
}

.tgmenu__navbar-wrap ul.navigation>li {
    position: relative;
    /* Crucial for submenu positioning */
    display: inline-block;
}

.tgmenu__navbar-wrap ul.navigation>li>a {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-heading-color);
    padding: 15px 0;
    display: block;
    line-height: 1;
    text-decoration: none;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

/* Global Font Standardization */
* {
    font-family: 'Poppins', sans-serif !important;
}

.tgmenu__navbar-wrap ul.navigation>li:hover>a,
.tgmenu__navbar-wrap ul.navigation>li.active>a {
    color: var(--tg-primary-color);
}

/* Dropdown Menu */
.tgmenu__navbar-wrap ul.navigation li .sub-menu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 230px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease-in-out;
    z-index: 99;
    border-top: 3px solid var(--tg-primary-color);
    display: block;
    text-align: left;
}

.tgmenu__navbar-wrap ul.navigation li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Submenu Item Animation */
@keyframes fadeInUpItem {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu li {
    display: block;
    width: 100%;
    margin: 0;
    opacity: 0;
    /* Hidden initially */
    transform: translateY(15px);
    /* Start slightly down */
}

/* Mega Menu (Two Columns) */
.tgmenu__navbar-wrap ul.navigation li .sub-menu.mega-menu {
    min-width: 550px;
    display: flex;
    flex-wrap: wrap;
    padding: 20px 10px;
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu.mega-menu li {
    width: 50%;
    display: inline-block;
}

/* Trigger animation on hover */
.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li {
    animation: fadeInUpItem 0.4s ease forwards;
}

/* Staggered Delays for both regular and mega menu */
.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(1) {
    animation-delay: 0.05s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(2) {
    animation-delay: 0.1s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(3) {
    animation-delay: 0.15s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(4) {
    animation-delay: 0.2s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(5) {
    animation-delay: 0.25s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(6) {
    animation-delay: 0.3s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(7) {
    animation-delay: 0.35s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(8) {
    animation-delay: 0.4s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(9) {
    animation-delay: 0.45s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(10) {
    animation-delay: 0.5s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(11) {
    animation-delay: 0.55s;
}

.tgmenu__navbar-wrap ul.navigation li:hover .sub-menu li:nth-child(12) {
    animation-delay: 0.6s;
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu li a {
    display: block;
    padding: 10px 20px;
    /* Comfortable padding */
    font-size: 15px;
    color: var(--tg-heading-color);
    transition: all 0.3s ease;
    text-decoration: none;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    /* Subtle separator */
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu.mega-menu li a {
    border-bottom: none;
    /* Cleaner look in grid */
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu li:last-child a {
    border-bottom: none;
}

.tgmenu__navbar-wrap ul.navigation li .sub-menu li a:hover {
    color: var(--tg-primary-color);
    background: rgba(255, 168, 0, 0.05);
    /* Very light orange bg on hover */
    padding-left: 25px;
    /* Slide effect */
}

/* Action Button */
.tgmenu__action-two .btn {
    background: var(--tg-primary-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    border: none;
}

.tgmenu__action-two .btn:hover {
    background: var(--tg-heading-color);
}

/* Mobile Toggle */
.mobile-nav-toggler {
    font-size: 24px;
    color: var(--tg-heading-color);
    cursor: pointer;
    display: none;
    margin-left: auto;
    padding-right: 20px;
}

/* Mobile Layout Adjustments */
@media (max-width: 991px) {

    /* Solid white background on mobile - both normal and sticky */
    .tg-header__style-two,
    .tg-header__style-two.sticky-active {
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }

    .padding-reset {
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding-left: 5px;
        /* Reduced from 15px */
        padding-right: 5px;
        /* Reduced from 15px */
    }

    .header-custom-row {
        align-items: center;
        justify-content: space-between;
        padding: 5px 0;
        /* Reduced vertical padding */
        width: 100%;
    }

    .custom-logo-area,
    .custom-logo-area.border-end {
        width: auto;
        flex: 0 0 auto;
        border-right: none !important;
        border: none !important;
        min-height: auto;
        height: 60px;
        justify-content: flex-start;
        padding: 0 !important;
        margin-left: 0 !important;
        /* Removed 10px margin */
    }

    .custom-logo-area img {
        max-height: 70px !important;
        /* Slightly smaller to fit better if needed */
    }

    .custom-content-area {
        flex: 0 0 auto;
        justify-content: center;
    }

    .tg-header__top-two {
        display: none;
        /* Hide topbar on mobile */
    }

    .tgmenu__navbar-wrap,
    .tgmenu__action-two {
        display: none !important;
    }

    /* Hamburger Menu Button - Left aligned with small padding */
    .mobile-nav-toggler {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        color: #0A1526 !important;
        cursor: pointer;
        padding: 0;
        /* Remove padding to push to edge */
        margin-left: auto;
        /* Push to right */
        margin-right: 0;
        /* Remove right margin */
        background: transparent;
        border: none;
        order: 2;
        /* Ensure it's on the right if flex order matters */
    }

    .mobile-nav-toggler:hover {
        color: #14176c !important;
    }
}

/* Mobile Menu Overlay Styles - Keep these for the hidden menu */
.tgmobile__menu {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    padding-right: 30px;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.tgmobile__menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.tgmobile__menu .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 28px;
    color: #14176c;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 16, 75, 0.05);
    border-radius: 50%;
}

.tgmobile__menu .close-btn:hover {
    color: #ffa800;
    background: rgba(255, 168, 0, 0.1);
}

/* Hide logo in mobile menu */
.tgmobile__menu .nav-logo {
    display: none;
}

.tgmobile__menu-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    transition: all 0.3s ease-out;
    opacity: 0;
    visibility: hidden;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.tgmobile__menu-backdrop.active {

    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Visible - when hamburger is clicked */
body.mobile-menu-visible .tgmobile__menu {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

body.mobile-menu-visible .tgmobile__menu-backdrop {
    opacity: 1;
    visibility: visible;
}

body.mobile-menu-visible {
    overflow: hidden;
}

/* Mobile Menu Navigation Styles */
.tgmobile__menu-outer {
    padding: 70px 20px 30px 20px;
    overflow-y: auto;
    max-height: 100%;
    height: calc(100vh - 30px);
    padding-bottom: 50px;
}

.tgmobile__menu .navigation {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tgmobile__menu .navigation li {
    position: relative;
    border-bottom: 1px solid rgba(14, 16, 75, 0.1);
}

.tgmobile__menu .navigation li:last-child {
    border-bottom: none;
}

.tgmobile__menu .navigation li>a {
    display: block;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #14176c;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Hide the duplicate dropdown-btn that main.js appends */
.tgmobile__menu .navigation .dropdown-btn {
    display: none !important;
}

/* Hide the duplicated desktop menu content that main.js appends */
.tgmobile__menu .tgmenu__navbar-wrap {
    display: none !important;
}



.tgmobile__menu .navigation li>a:hover {
    color: #ffa800;
}

.tgmobile__menu .navigation li.open>a {
    color: #ffa800;
}

/* Dropdown Toggle Arrow */
.tgmobile__menu .dropdown-toggle {
    position: absolute;
    right: 0;
    top: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #14176c;
    transition: all 0.3s ease;
}

.tgmobile__menu .dropdown-toggle:hover {
    color: #ffa800;
}

.tgmobile__menu .dropdown-toggle i {
    transition: transform 0.3s ease;
}

.tgmobile__menu .dropdown-toggle.open i {
    transform: rotate(180deg);
}

/* Fix for double arrow (Bootstrap adds ::after caret) */
.tgmobile__menu .dropdown-toggle::after {
    display: none !important;
}

/* Submenu Styles */
.tgmobile__menu .navigation .sub-menu {
    display: none;
    list-style: none;
    padding: 0 0 10px 15px;
    margin: 0;
    background: transparent;
}

.tgmobile__menu .navigation .sub-menu li {
    border-bottom: none;
}

.tgmobile__menu .navigation .sub-menu li>a {
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #14176c;
}

.tgmobile__menu .navigation .sub-menu li>a:hover {
    color: #ffa800;
}