﻿/*************************/
/******* General ********/
/***********************/
html, body {
    height: 100%;
    font-size: 14px;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

.main-header {
    padding: 0.5rem;
}

.kt-nav-item, a {
    color: white;
    text-decoration: none;
}

.kt-nav-item:hover a,
.kt-nav-item:hover i {
    color: #ffd966;
}

footer {
    flex-shrink: 0;
}

@media (max-width: 1075px) {
    .only-desktop {
        display: none !important;
    }
}

@media (min-width: 1075px) {
    .only-desktop {
        display: flex !important;
    }
}

@media (max-width: 1075px) {
    .not-desktop {
        display: flex !important;
    }
}

@media (min-width: 1075px) {
    .not-desktop {
        display: none !important;
    }
}

/*************************/
/**** Navigation ********/
/***********************/
.header-inner {
    height: 70px;
}

.main-nav {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-hover {
    position: relative;
}

.submenu {
    border-radius: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    background: #25354a;
    min-width: 180px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    display: none;
    z-index: 1000;
    background: linear-gradient( 180deg, #2f4863 0%, #3a5875 100% );
    border-radius: 8px;
    padding: 6px 0;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.submenu li a {
    display: block;
    padding: 8px 15px;
    color: white;
    text-decoration: none;
}

.submenu li a:hover {
    background: rgba(255,255,255,0.1);
}

.dropdown-hover:hover .submenu {
    display: block;
}

.header-dropdown-bg {
    background: linear-gradient( 180deg, #2f4863 0%, #3a5875 100% );
}

/*************************/
/**** Global Search ******/
/*************************/

.global-search {
    position: relative;
    overflow: visible;
}

#global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    /* viewport-safe */
    width: calc(100vw - 24px);
    max-width: 640px;
    box-sizing: border-box;
    z-index: 1050;
    border-radius: 8px;
    padding: 0;
    overflow-x: hidden;
}

/* Responsive sizing */
@media (min-width: 1200px) {
    #global-search-dropdown {
        max-width: 700px;
        min-width: 380px;
    }
}

@media (max-width: 1199px) {
    #global-search-dropdown {
        max-width: 640px;
        min-width: 280px;
    }
}

@media (max-width: 947px) {
    #global-search-dropdown {
        max-width: 520px;
        min-width: 180px;
    }
}

@media (max-width: 519px) {
    #global-search-dropdown {
        max-width: calc(100vw - 24px);
        min-width: 0;
    }
}

/* Group header */
#global-search-dropdown .dropdown-header {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: 8px 14px;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Result items */
#global-search-dropdown .dropdown-item {
    padding: 10px 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    #global-search-dropdown .dropdown-item:hover {
        background-color: #f9fafb;
    }

#global-search-dropdown .fw-semibold {
    font-size: 0.95rem;
}

#global-search-dropdown .small {
    font-size: 0.8rem;
}

/* Empty state */
#global-search-dropdown .no-results {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}