/* Header Container */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    padding: 10px 0;
    color: white;
    font-size: 14px;
}

.top-links {
    display: flex;
    gap: 25px;
}

.top-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.top-link:hover {
    transform: translateY(-2px);
}

.top-link.sikayet-formu-link {
    background-color: white;
    color: #333;
    padding: 5px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-link.sikayet-formu-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: white;
    color: #1e3c72;
    transform: translateY(-3px);
}

#sicaklik {
    font-size: 1.1rem;
    font-weight: 500;
}

.sicaklik-baslik {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Container-1 */
.container-1 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 50px;
}

/* Navbar */
.navbar {
    padding: 20px 0;
}

.navbar-brand {
    flex-shrink: 0;
}

.logo {
    height: 133px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.navbar-collapse {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    gap: 5px;
    flex-grow: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white !important;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 18px !important;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #41e2ad;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #e6e6e6 !important;
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link i {
    font-size: 10px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dropdown */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    display: block;
}

/* Nested dropdown for Müdürlüklerimiz */
.dropdown-menu .nav-item.dropdown {
    position: relative;
}

.dropdown-menu .nav-item.dropdown .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
    transform: translateX(-10px);
}

/* Desktop hover effect */
@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item.dropdown:hover > .nav-link i {
        transform: rotate(180deg);
    }
    
    .dropdown-menu .nav-item.dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

.dropdown-item {
    color: #333;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    display: block;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #1e3c72;
    transition: height 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(30, 60, 114, 0.05);
    color: #1e3c72;
    padding-left: 25px;
}

.dropdown-item:hover::before {
    height: 70%;
}

.search-btn {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-left: auto;
}

.search-btn:hover {
    transform: scale(1.1);
    background: white;
    color: #1e3c72;
}

.search-btn i {
    font-size: 18px;
}

.mobile-top-links {
    display: none;
}

.mobile-weather-info {
    display: none;
}

.mobile-social-icons {
    display: none;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 991px) {

    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }

    /* When menu is active, move hamburger to menu's top-right */
    .hamburger-menu.active {
        position: fixed !important;
        top: 25px !important;
        right: 25px !important;
        z-index: 1003 !important;
    }

    /* Top bar responsive */
    .top-bar {
        padding: 8px 0;
        font-size: 12px;
    }

    .top-links {
        gap: 15px;
    }

    .top-link {
        font-size: 12px;
    }

    .social-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Logo bigger on mobile */
    .logo {
        height: 152px;
    }

    /* Container adjustments - Logo left, Hamburger right */
    .container-1 {
        justify-content: space-between;
        gap: 27rem;
    }

    /* Mobile Top Links */
    .mobile-weather-info {
        display: block;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    }

    #mobile-sicaklik {
        color: white;
        font-size: 16px;
        font-weight: 500;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-top-links {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
        background-color: transparent !important;
    }

    .mobile-top-link {
        color: white !important;
        text-decoration: none;
        padding: 12px 0;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background-color: transparent !important;
    }

    .mobile-top-link:visited {
        color: white !important;
    }

    .mobile-top-link:last-child {
        border-bottom: none;
    }

    .mobile-top-link i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
        color: white !important;
    }

    .mobile-top-link:hover {
        padding-left: 10px;
        color: #41e2ad !important;
    }

    /* Mobile Social Icons */
    .mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 15px;
        padding: 20px 0;
        margin-top: 20px;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
    }

    .mobile-social-icon {
        color: white !important;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        text-decoration: none;
        font-size: 16px;
    }

    .mobile-social-icon:visited {
        color: white !important;
    }

    .mobile-social-icon:hover {
        background: white;
        color: #1e3c72 !important;
        transform: scale(1.1);
    }

    /* Navbar collapse - Smooth slide from right */
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
        padding: 80px 30px 30px;
        overflow-y: auto;
        transition: right 0.4s ease;
        z-index: 1001;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        display: block;
    }

    .navbar-collapse.active {
        right: 0;
    }

    /* Navbar items */
    .navbar-nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        padding: 15px 0 !important;
        font-size: 16px;
        text-shadow: none;
        cursor: pointer;
    }

    .nav-item.dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile dropdown */
    .dropdown-menu {
        position: static !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(5px) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: 100% !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: block !important;
    }

    .nav-item.dropdown.active > .dropdown-menu {
        max-height: 1000px !important;
        padding: 10px 0 !important;
    }

    /* Nested dropdown in mobile */
    .dropdown-menu .nav-item.dropdown > .dropdown-menu {
        background: rgba(255, 255, 255, 0.05) !important;
        padding-left: 15px !important;
    }

    .dropdown-menu .nav-item.dropdown.active > .dropdown-menu {
        max-height: 800px !important;
        padding: 10px 0 10px 15px !important;
    }

    .nav-item.dropdown.active .nav-link i {
        transform: rotate(180deg);
    }

    .dropdown-item {
        color: white;
        padding: 12px 20px;
        font-size: 14px;
    }

    .dropdown-item::before {
        background: #41e2ad;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* Search button in mobile menu */
    .search-btn {
        margin: 20px auto 0;
        width: 50px;
        height: 50px;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .logo {
        height: 85px;
    }

    .navbar {
        padding: 15px 0;
    }

    .navbar-collapse {
        width: 85%;
        padding: 70px 25px 25px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .logo {
        height: 85px;
    }

    .navbar-collapse {
        width: 90%;
        padding: 60px 20px 20px;
    }

    .nav-link {
        font-size: 15px;
        padding: 12px 0 !important;
    }

    .dropdown-item {
        font-size: 13px;
        padding: 10px 15px;
    }

    .container-1 {
        justify-content: space-between;
        gap: 10rem;
    }
}

/* Small mobile */
@media (max-width: 375px) {
    .logo {
        height: 80px;
    }

    .navbar-collapse {
        width: 90%;
        padding: 60px 20px 20px;
    }

    .nav-link {
        font-size: 15px;
        padding: 12px 0 !important;
    }

    .dropdown-item {
        font-size: 13px;
        padding: 10px 15px;
    }

    .container-1 {
        justify-content: space-between;
        gap: 7rem;
    }
}

/* Header Search Bar */
.header-search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.header-search-wrapper.active {
    opacity: 1;
    visibility: visible;
}

.header-search-container {
    width: 90%;
    max-width: 700px;
    position: relative;
}

.header-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 250ms ease;
}

.header-search-wrapper.active .header-search-box {
    transform: translateY(0);
}

.header-search-icon {
    color: rgba(2, 132, 199, 0.6);
    font-size: 18px;
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    color: #0f172a;
    background: transparent;
    padding: 16px 0;
}

.header-search-input::placeholder {
    color: rgba(15, 23, 42, 0.45);
}

.header-search-close {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.6);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease;
}

.header-search-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: rgb(220, 38, 38);
}

/* Autocomplete Dropdown */
.header-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    max-height: 420px;
    overflow-y: auto;
    z-index: 2001;
    animation: acSlideIn 200ms ease;
}

@keyframes acSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.header-autocomplete::-webkit-scrollbar-track {
    background: transparent;
}

.header-autocomplete::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 3px;
}

/* Category Label */
.ac-category-label {
    padding: 10px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ac-category-label i {
    font-size: 12px;
    color: rgba(2, 132, 199, 0.6);
}

/* Autocomplete Item */
.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: #0f172a;
    transition: background 120ms ease;
    cursor: pointer;
}

.ac-item:hover,
.ac-item.ac-active {
    background: rgba(2, 132, 199, 0.06);
}

.ac-item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e293b;
}

.ac-item:hover .ac-item-title,
.ac-item.ac-active .ac-item-title {
    color: #0284c7;
}

.ac-item-arrow {
    font-size: 11px;
    color: rgba(15, 23, 42, 0.25);
    flex-shrink: 0;
    transition: transform 150ms ease, color 150ms ease;
}

.ac-item:hover .ac-item-arrow,
.ac-item.ac-active .ac-item-arrow {
    color: #0284c7;
    transform: translateX(3px);
}

/* View All Link */
.ac-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    text-decoration: none;
    color: #0284c7;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    transition: background 120ms ease;
    border-radius: 0 0 16px 16px;
}

.ac-view-all:hover,
.ac-view-all.ac-active {
    background: rgba(2, 132, 199, 0.06);
    color: #0369a1;
}

/* Empty state */
.ac-empty {
    padding: 24px 20px;
    text-align: center;
    color: rgba(15, 23, 42, 0.5);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ac-empty i {
    font-size: 16px;
    color: rgba(15, 23, 42, 0.3);
}

/* Loading */
.ac-loading {
    padding: 20px;
    text-align: center;
    color: rgba(15, 23, 42, 0.55);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ac-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(2, 132, 199, 0.2);
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: acSpin 600ms linear infinite;
}

@keyframes acSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 575.98px) {
    .header-search-wrapper {
        padding-top: 80px;
    }

    .header-search-box {
        padding: 6px 6px 6px 16px;
    }

    .header-search-input {
        font-size: 16px;
        padding: 12px 0;
    }

    .header-search-close {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .header-autocomplete {
        max-height: 350px;
    }

    .ac-item {
        padding: 9px 16px;
    }

    .ac-category-label {
        padding: 8px 16px 4px;
    }
}