* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}
  .background-section {
    background-image: url('photo/1/cover_3.jpeg');
    background-size: cover;
    background-position: center;
    position: relative;
    height: 600px;
    color: white;
  }
  .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
  }
body {
    background-color: #f5f7fa;
    /* padding: 40px; */
    color: #333;
}

section.org-structure {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 600;
}

.country {
    display: block;
    /* span-ı blok elementi kimi göstər */
    text-align: center;
    /* mətni ortala */
    font-size: 0.9em;
    /* istəyə görə ölçü kiçildə bilərsən */
    margin-top: 4px;
    /* əsas mətnlə arasına bir az boşluq */
}

.country {
    display: block;
    /* span-ı blok elementi kimi göstər */
    text-align: center;
    /* mətni ortala */
    font-size: 0.9em;
    /* istəyə görə ölçü kiçildə bilərsən */
    margin-top: 4px;
    /* əsas mətnlə arasına bir az boşluq */
}

.tree {
    display: block;
    /* span-ı blok elementi kimi göstər */
    text-align: center;
    /* mətni ortala */
    /* font-size: 0.9em;
    /* istəyə görə ölçü kiçildə bilərsən */
    /* margin-top: 4px; */
    /* əsas mətnlə arasına bir az boşluq */
}

.country {
    display: block;
    /* span-ı blok elementi kimi göstər */
    text-align: center;
    /* mətni ortala */
    font-size: 0.9em;
    /* istəyə görə ölçü kiçildə bilərsən */
    margin-top: 4px;
    /* əsas mətnlə arasına bir az boşluq */
}

/* Ağac strukturu */
.scroll-target {
    scroll-margin-top: 85px;
}

/* yuxarıdan boşluq */
.tree {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

/* Top-node */
.top-node {
    background-color: #3498db;
    color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    position: relative;
    z-index: 2;
}

.top-node .country {
    display: block;
    font-size: 14px;
    margin-top: 5px;
    font-weight: normal;
    opacity: 0.9;
}

/* Ana şaquli xətt */
.tree::before {
    content: '';
    position: absolute;
    top: calc(20px + 2em);
    /* padding-top + top-node hündürlüyünə yaxın */
    height: 40px;
    width: 2px;
    background: #bdc3c7;
    z-index: 1;
}

.branches {
    display: flex;
    justify-content: center;
    gap: 50px;
    position: relative;
    margin-top: 60px;
    width: 100%;
}

/* Üfüqi xətt */
.branches::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #bdc3c7;
    margin: 0 auto;
    z-index: 1;
}

.branch {
    background-color: #f8f9fa;
    padding: 18px 25px;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    min-width: 200px;
    z-index: 2;
    cursor: default;
}

.branch::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    height: 20px;
    width: 2px;
    background: #bdc3c7;
    z-index: 1;
}

.branch .country {
    display: block;
    font-size: 14px;
    margin-top: 5px;
    font-weight: normal;
    opacity: 0.9;
}

.branch:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Rəngli şaxələr */
.branch.azerbaijan {
    background-color: #2ecc71;
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    cursor: pointer;
}

.branch.azerbaijan:hover {
    background-color: #27ae60;
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

.branch.europe {
    background-color: #9b59b6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.branch.middle-east {
    background-color: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* .bg-projects {
            background-image: url('photo/1/cover_2.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            min-height: 100vh;
        } */

/* Mobil optimallaşdırma */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    section.org-structure {
        padding: 25px;
    }

    .branches {
        flex-direction: column;
        gap: 80px;
    }

    .branches::before {
        display: none;
    }

    .branch::before {
        top: -40px;
        height: 40px;
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f4f4f4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    display: flex;
    /* Oxu ilə birlikdə ortalamaq üçün */
    align-items: center;
    justify-content: center;
    /* Mərkəzləşdirmək üçün */
    transition: background-color 0.3s ease;
}

.nav-links li a:hover {
    background-color: #ddd;
    border-radius: 4px;
}

/* Alt menyu stili */
.dropdown-content {
    display: none;
    /* Başlanğıcda gizli */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 250px;
    text-align: left;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 4px;
    left: -50%;
    transform: translateX(-50%);
    transform: translateY(10px);
    /* top: 100%; */

    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Yumşaq keçid */
    opacity: 0;
    /* transform: translateY(10px); */
    pointer-events: none;
    /* Gizli olduqda klikləmə olmasın */

    /* min-width: 200px; */
    /* text-align: left; */
    /* left: 50%; */
    /* transform: translateX(-50%); */
    /* Transition xüsusiyyətləri */
    /* transition: opacity 0.3s ease, transform 0.3s ease; */
    /* opacity: 0; */
    transform: translateY(10px);
    /* pointer-events: none; */
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    justify-content: flex-start;
    /* Alt menyu linklərini sola düzləndir */

}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    border-radius: 0;
}

/* Masaüstü hover effekti və açılma animasiyası */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    /* Görünəndə klikləmə olsun */
}

/* Ox işarəsi stili */
.dropdown .arrow {
    margin-left: 8px;
    /* Mətnlə ox arasında boşluq */
    display: inline-block;
    transition: transform 0.3s ease;
    /* Animasiya üçün */
}

/* Ox işarəsinin fırlanması (həm geniş, həm də yığcam) */
.dropdown.active .arrow,
.dropdown:hover .arrow {
    /* Masaüstü hover üçün də */
    transform: rotate(180deg);
    /* Yuxarıya baxsın */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: rgb(255, 255, 255);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Tam eni tutur */
    position: fixed;
    /* Səhifəni sürüşdürəndə yuxarıda sabit qalır */
    top: 0;
    /* Ən yuxarıda yerləşir */
    left: 0;
    z-index: 1000;
    /* Digər elementlərin üstündə görünmək üçün */
}

/* Hamburger menyunu başlanğıcda gizlədirik */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Hamburger ikonunun animasiyası */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobil görünüş üçün media sorğusu */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: #f4f4f4;
        z-index: 1000;
        padding: 5px 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        max-height: calc(100vh - 80px);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        width: 100%;
        overflow: hidden;
    }

    .nav-links li a {
        padding: 5px 0;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        /* Mətn və oxu kənarlara itələyir */
        align-items: center;
        width: 100%;
    }

    .nav-links li:last-child {
        border-bottom: none;
        /* Son elementdə xətt olmasın */
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .hamburger-menu {
        display: block;
    }

    /* Mobil görünüşdə alt menyu stili */
    .dropdown-content {
        position: static;
        display: none;
        /* Başlanğıcda yenə gizli */
        width: auto;
        min-width: 100%;
        text-align: left;
        box-shadow: none;

        background-color: #e0e0e000;
        border-top: 1px solid #ccc;
        opacity: 1;
        /* Mobil görünüşdə animasiya üçün opacity: 1 */
        transform: translateY(0);
        /* Mobil görünüşdə animasiya üçün transform: translateY(0) */

        margin-top: 5px;
        /* Üst tərəfdən boşluq */
        margin-bottom: 5px;
        /* Alt tərəfdən boşluq */
        border-radius: 0;
        /* Kənar radiuslarını sıfırlayırıq */
        padding: 0;
        margin: 0;
        /* İçəridən yuxarı və aşağı boşluq */
    }

    .dropdown-content a {
        padding: 0px;
        /* padding: 15px 20px; */
        /* padding: 10px 20px 10px 40px; */
        border-bottom: 1px solid #ddd;
        text-align: left;
        /* Mobil alt menyu linklərini sola düzləndir */
    }

    .dropdown-content a:last-child {
        border-bottom: none;
    }

    /* Mobil görünüşdə alt menyunu aktiv etmək üçün */
    .dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column;
    }
}