/* Mega Menu Styles */
.mega-menu {
    background: #f8f9fa;
    border-bottom: 0; /* Alt çizgiyi kaldır, dip dibe olsun */
    width: 100%;
    position: relative; /* Dropdown'ı bu bara sabitle */
}

.mega-menu .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.menu-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: flex-start; /* Öğeleri yan yana topla */
    gap: 20px; /* Aralarına makul boşluk ver */
}

.menu-items > li {
    position: static; /* Dropdown artık nav'a göre hizalanacak */
}

.menu-items > li > a {
    display: block;
    padding: 12px 10px;
    color: #2a395a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.menu-items > li > a:hover {
    color: #ff5722;
}

.has-dropdown:hover .mega-dropdown {
    display: block;
}

.mega-dropdown {
    display: none;
    position: absolute;
    left: 0;           /* Her zaman aynı hizadan başla */
    right: 0;          /* Tam genişlik */
    top: calc(100% - 1px); /* Menünün alt sınırına bindir, boşluğu yok et */
    transform: none;   /* Ortalamayı kaldır */
    width: 100%;
    background: #fff;
    border-top: 0; /* Üst çizgiyi kaldır */
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0 0 12px; /* Üst boşluğu tamamen kaldır */
    max-height: 80vh;
    overflow-y: auto;
}

.dropdown-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px; /* Yatay iç boşluğu biraz daralt */
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Yeni menu yapısı - yan yana sütunlar */
.row-menu {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    justify-content: flex-start;
    width: 100%;
}

.menu-column {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    padding: 0 12px;  /* Sütunlar arasında dengeli boşluk */
    margin-bottom: 10px;
    box-sizing: border-box;
}

.menu-column h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #2a395a;
    line-height: 1.2;
}

/* Altındaki çizgiyi kaldır */
.menu-column h4.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.menu-column h4 a {
    color: #2a395a;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 3px 0;
}

.menu-column h4 a:hover {
    color: #ff5722;
}

.menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-links {
    padding: 0;
    margin: 0;
    list-style: none;
}

.menu-links li {
    margin-bottom: 3px;
    line-height: 1.2;
}

.menu-links li a {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-links li a:hover {
    color: #ff5722;
}

/* Mega dropdown genişliği için stil ekle */
.mega-dropdown {
    max-height: 80vh; /* En fazla ekranın %80'i kadar yüksek olsun */
    overflow-y: auto; /* Gerekirse dikey kaydırma çubuğu ekle */
}

/* Mega Dropdown'ın hızlı görünmesi için */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.has-dropdown:hover .mega-dropdown {
    animation: fadeIn 0.2s forwards;
}

/* Responsive Styles */
@media (min-width: 1400px) {
    .menu-column {
        flex: 0 0 14.285%;
        max-width: 14.285%;
    }
}

@media (max-width: 1200px) {
    .menu-column {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (max-width: 991px) {
    .menu-column {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 767px) {
    .menu-column {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 575px) {
    .menu-column {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Mobile accordion for nested menus */
.mobile-main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-main-menu li {
    position: relative;
}
.mobile-main-menu li > a {
    display: block;
    padding-right: 36px; /* Toggle için yer aç */
}
.mobile-main-menu .sub-menu {
    display: none; /* Varsayılan kapalı */
    list-style: none;
    margin: 0;
    padding: 6px 0 6px 14px; /* İçerik girintisi */
    border-left: 2px solid #e9ecef;
}
.mobile-main-menu li.open > .sub-menu {
    display: block; /* Açık olduğunda göster */
}
.submenu-toggle {
    background: none;
    border: 0;
    color: #2a395a;
    font-size: 16px;
    line-height: 1;
    padding: 6px;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 14px; /* title satırı hizası */
    transform: none;
    width: 28px; /* sabit alan, kayma olmasın */
    text-align: center;
}
/* Icons are handled by button text via JS (avoid duplicating with ::after) */
.submenu-toggle:focus { outline: none; }
