/* ============================================================
   nav_style.css
   index_style.css faylından yalnız header (üst naviqasiya) və
   mobil alt naviqasiya ilə bağlı hissə ayrılıb. Böyük faylın
   tamamını çağırmaq əvəzinə, yalnız bu kiçik fayl istifadə oluna bilər.
   ============================================================ */

header a,
.mobile-nav a {
    text-decoration: none;
    color: inherit;
}

/* ===== Header (üst naviqasiya) ===== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: 10px 80px;
    color: black;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    font-weight: 700;
    font-size: 24px;
    color: #0d6efd;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.logo img {
    width: auto;
    height: 25px;
    display: block;
    max-width: 100%;
    vertical-align: middle;
    margin-top: -6px;
}

/* ===== Layihə menyusu (dropdown) ===== */
.dropdown-menu {
    position: relative;
}

.dropdown-menu button {
    background: none;
    border: none;
    color: black;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    border-radius: 3px;
    min-width: 180px;
    z-index: 1001;
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content li a {
    display: block;
    padding: 8px 15px;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-content li a:hover {
    background: #555;
}

.dropdown-menu.show .dropdown-content {
    display: block;
}

/* ===== Sol naviqasiya ===== */
nav.left-nav {
    display: flex;
    gap: 15px;
}

nav.left-nav a {
    color: rgba(0,0,0, 0.65);
    font-weight: 400;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

nav.left-nav a:hover {
    color: rgba(0, 0, 0, 0.82);
}

/* ===== Sağ naviqasiya ===== */
nav.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav.main-nav a {
    color: rgba(0,0,0, 0.65);
    font-weight: 400;
    font-size: 16px;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav.main-nav a:hover {
    color: rgba(0, 0, 0, 0.82);
}

/* ===== İstifadəçi dropdown-u ===== */
.user-dropdown {
    position: relative;
    margin-left: 10px;
}

.user-dropdown-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.user-dropdown-btn:hover {
    background: #f0f0f0;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    background: #444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-radius: 8px;
    min-width: 170px;
    z-index: 1002;
    list-style: none;
    padding: 6px 0;
    margin: 0;
}

.user-dropdown-content li a {
    display: block;
    padding: 10px 16px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s;
}

.user-dropdown-content li a:hover {
    background: #555;
}

.user-dropdown.show .user-dropdown-content {
    display: block;
}

/* ===== Mobil alt naviqasiya (bottom nav) ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 90;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666666;
    font-size: 0.8rem;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: #0d6efd;
}

.add-btn-circle {
    width: 32px;
    height: 32px;
    background-color: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 3px;
}

.mobile-nav-item .add-btn-circle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    background-color: #22c55e !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    margin-bottom: 3px !important;
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

/* ===== Responsiv (header) ===== */
@media (max-width: 768px) {
    header {
        padding: 10px 20px !important;
    }
}

@media screen and (max-width: 767px) {
    .left-nav,
    .main-nav {
        display: none !important;
    }
    .dropdown-content {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
    }
    .logo-dropdown {
        width: 100%;
    }
    .header-left {
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    header {
        padding: 8px 15px !important;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .header-left {
        flex-shrink: 1;
        min-width: 0;
    }

    nav.left-nav {
        gap: 6px;
        flex-shrink: 1;
        min-width: 0;
    }

    nav.left-nav a {
        font-size: 12px;
        white-space: nowrap;
    }

    nav.main-nav {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 4px;
        white-space: nowrap;
    }
    nav.main-nav a {
        font-size: 12px;
        margin-left: 8px !important;
    }

    nav.main-nav a[href*="new_listing"],
    nav.main-nav a[href*="guest_new"] {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 1100px) {
    nav.left-nav a:last-child { display: none; } /* Tez-tez verilən suallar */
}

@media (max-width: 980px) {
    nav.left-nav a:nth-last-child(2) { display: none; } /* Xəbərlər */
}

@media (max-width: 870px) {
    nav.left-nav a:nth-last-child(3) { display: none; } /* Komplekslər */
}

@media (max-width: 780px) {
    nav.left-nav a:nth-last-child(4) { display: none; } /* Agentliklər */
}
/* ===== Bootstrap uyğunluğu =====
   Bootstrap yüklənən səhifələrdə (məs. xeberler.php) Bootstrap-ın öz
   .dropdown-menu sinfi bu bloku gizlədir (display:none; position:absolute).
   Aşağıdakı qayda ☰ düyməsini hər səhifədə görünən saxlayır.
   Bootstrap olmayan səhifələrdə (index.php) heç nəyi dəyişmir. */
header #projectMenu.dropdown-menu {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    font-size: inherit;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
}