/* Öğrenci mega menü — index.php dashboard ile aynı görünüm */

.sp-mega-bar {
    position: sticky;
    top: 0;
    z-index: 300;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sp-mega-bar__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px 18px;
}

.sp-mega-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.sp-mega-brand {
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sp-mega-brand i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #4ade80, #15803d);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

/* ——— Öğrenci paneli + dashboard: adaptive tek/çift satır ——— */
.mega-nav--adaptive .mega-nav__shell {
    width: 100%;
}

.mega-nav--adaptive.is-stacked .mega-nav__shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-nav--adaptive.is-stacked .mega-row--main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    overflow: visible;
}

.mega-nav--adaptive.is-stacked .mega-row--public {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 0;
}

.mega-nav--adaptive.is-single .mega-nav__shell {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mega-nav--adaptive.is-single .mega-row--main,
.mega-nav--adaptive.is-single .mega-row--public {
    display: contents;
}

.sp-student-mega-bar .mega-nav--adaptive .mega-row--main .mega-trigger,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--public .mega-trigger,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--main .mega-trigger--link,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--public .mega-trigger--link {
    padding: 7px 10px;
    font-size: 12px;
    gap: 8px;
    white-space: nowrap;
}

.sp-student-mega-bar .mega-nav--adaptive .mega-row--main .mega-trigger i,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--public .mega-trigger i,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--main .mega-trigger--link i,
.sp-student-mega-bar .mega-nav--adaptive .mega-row--public .mega-trigger--link i {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 12px;
}

/* ——— Öğrenci paneli menüsü (ana sayfa portal menüsünden bağımsız) ——— */
.sp-student-mega-bar .sp-student-mega-nav {
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Eski tek satır scroll stilleri kaldırıldı — mega-nav--adaptive kullanılır */

/* ——— Mega nav (index ile aynı) ——— */
.sp-mega-bar .mega-nav { width: 100%; position: relative; z-index: 1; overflow: visible; }
.sp-mega-bar .mega-row { display: flex; flex-wrap: nowrap; gap: 10px; align-items: center; overflow: visible; }
.sp-mega-bar .mega-item { flex: 0 0 auto; }
.sp-mega-bar .mega-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1;
}
.sp-mega-bar .mega-item:hover,
.sp-mega-bar .mega-item:has(.mega-panel.is-open) {
    z-index: 600;
}

.sp-mega-bar .mega-trigger {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    padding: 8px 10px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', Poppins, system-ui, sans-serif;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
    transition: transform 0.15s, filter 0.15s, background 0.15s;
    user-select: none;
    --mt-ic1: #60a5fa;
    --mt-ic2: #1d4ed8;
}

.sp-mega-bar .mega-trigger:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
    background: rgba(255, 255, 255, 0.14);
}

.sp-mega-bar .mega-trigger i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--mt-ic1), var(--mt-ic2));
    color: #fff;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.sp-mega-bar .mega-trigger--link i,
.home-portal-nav .mega-trigger--link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--mt-ic1), var(--mt-ic2));
    color: #fff;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mega-trigger--forum { --mt-ic1: #2dd4bf; --mt-ic2: #0f766e; }
.mega-trigger--blog { --mt-ic1: #818cf8; --mt-ic2: #4338ca; }
.mega-trigger--market { --mt-ic1: #fb923c; --mt-ic2: #c2410c; }

.mega-row--public {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
    width: 100%;
}

.sp-mega-bar .mega-trigger[data-menu="m-general"] { --mt-ic1: #22d3ee; --mt-ic2: #0e7490; }
.sp-mega-bar .mega-trigger[data-menu="m-eng"] { --mt-ic1: #f472b6; --mt-ic2: #be185d; }
.sp-mega-bar .mega-trigger[data-menu="m-tools"] { --mt-ic1: #a78bfa; --mt-ic2: #5b21b6; }
.sp-mega-bar .mega-trigger[data-menu="m-market"] { --mt-ic1: #fb923c; --mt-ic2: #c2410c; }
.sp-mega-bar .mega-trigger[data-menu="m-archive"] { --mt-ic1: #c084fc; --mt-ic2: #6d28d9; }
.sp-mega-bar .mega-trigger[data-menu="m-edu"] { --mt-ic1: #4ade80; --mt-ic2: #15803d; }
.sp-mega-bar .mega-trigger[data-menu="m-ai"] { --mt-ic1: #60a5fa; --mt-ic2: #1d4ed8; }

.sp-mega-bar .mega-trigger .mini {
    font-size: 11px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Rozet yazıları (Hızlı/Araçlar/...) kaldır */
.sp-mega-bar .mega-trigger .mini { display: none !important; }

.sp-mega-bar .mega-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    bottom: auto;
    min-width: 320px;
    max-width: min(420px, 95vw);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 16px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.26);
    padding: 10px;
    color: #0f172a;
    z-index: 10000;
    backdrop-filter: blur(10px);
    margin-top: 8px;
}

.sp-mega-bar .mega-panel.is-open { display: block; }
.sp-mega-bar .mega-panel.mega-panel--floating {
    position: fixed !important;
    z-index: 10050 !important;
    margin-top: 0;
    pointer-events: auto !important;
}

@media (hover: hover) and (pointer: fine) {
    .mega-nav--panel-float .mega-item:hover > .mega-panel {
        display: none;
    }
    .mega-nav--panel-float .mega-panel.is-open {
        display: block !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   Mobil hamburger menü (tüm mega barlar)
   - Mobilde tüm menüler tek hamburger içinde
   - Başlığa tıklayınca alt menüsü akordeon açılır
   ───────────────────────────────────────────────────────────── */
.sp-mega-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.88) 100%);
    color: #1e293b;
    border-radius: 16px;
    padding: 10px 12px;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.10);
    backdrop-filter: blur(10px);
}
.sp-mega-mobile-toggle .left { display: inline-flex; align-items: center; gap: 10px; }
.sp-mega-mobile-toggle .left i {
    width: 30px; height: 30px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 18px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.25);
}

.sp-mega-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99, 102, 241, 0.22), transparent 55%),
                radial-gradient(ellipse 80% 60% at 90% 20%, rgba(14, 165, 233, 0.18), transparent 55%),
                rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(8px);
    z-index: 200000;
}
.sp-mega-mobile-drawer {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(372px, 92vw);
    border-radius: 0 26px 26px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,255,0.94) 60%, rgba(255,255,255,0.96) 100%);
    border: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: 0 36px 120px rgba(15, 23, 42, 0.42);
    z-index: 200010;
    overflow: hidden;
    transform: translateX(-28px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.sp-mega-mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.98), rgba(52, 73, 94, 0.98));
    position: relative;
}
.sp-mega-mobile-drawer__head::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(14,165,233,0.65), rgba(79,70,229,0.65), rgba(124,58,237,0.55));
    opacity: 0.65;
}
.sp-mega-mobile-drawer__head strong { font-size: 13px; color: #fff; letter-spacing: 0.02em; font-weight: 900; }
.sp-mega-mobile-drawer__head strong { padding-left: 6px; }
.sp-mega-mobile-close {
    width: 38px; height: 38px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    color: rgba(255,255,255,0.92);
    font-size: 16px;
    transition: transform 0.15s ease, background 0.15s ease;
}
.sp-mega-mobile-close:hover { background: rgba(255,255,255,0.2); }
.sp-mega-mobile-drawer__body {
    padding: 12px 12px 16px;
    height: calc(100% - 66px);
    overflow: auto;
}
/* iOS hissi: scroll bar yumuşak */
.sp-mega-mobile-drawer__body { -webkit-overflow-scrolling: touch; }

/* Mobil drawer içindeki ana menü listesi */
.sp-mega-mobile-drawer .mega-row { display: flex; flex-direction: column; gap: 12px; }
.sp-mega-mobile-drawer .mega-item { width: 100% !important; }
.sp-mega-mobile-drawer .mega-panel {
    position: static;
    width: 100%;
    margin-top: 10px;
    display: none !important; /* mobilde varsayılan kapalı */
}
.sp-mega-mobile-drawer .mega-panel.is-open { display: block !important; }

/* Drawer: mobilde tree + 3D renkli ikonlar (PC ile aynı his) */
.sp-mega-mobile-drawer .mega-trigger,
.sp-mega-mobile-drawer .mega-trigger--link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    padding: 12px 12px 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 900;
    border: 1px solid rgba(99, 102, 241, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-align: left;
}
.sp-mega-mobile-drawer .mega-trigger .mini { display: none !important; }

/* İlk satır: ikon + başlık (kesin sola hizalı) */
.sp-mega-mobile-drawer .mega-trigger > span:first-child,
.sp-mega-mobile-drawer .mega-trigger--link > span:first-child {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
}

.sp-mega-mobile-drawer .mega-trigger span,
.sp-mega-mobile-drawer .mega-trigger--link span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
}

/* Başlık metni: ikon sonrası sola hizalı, sağda ok için boşluk */
.sp-mega-mobile-drawer .mega-trigger span,
.sp-mega-mobile-drawer .mega-trigger--link span {
    flex: 1;
    justify-content: flex-start !important;
    min-width: 0;
}
.sp-mega-mobile-drawer .mega-trigger::after {
    content: '\f054';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    opacity: 0.9;
}
.sp-mega-mobile-drawer .mega-trigger.is-open::after {
    content: '\f078';
    color: #64748b;
}
.sp-mega-mobile-drawer .mega-trigger--link::after { display: none; }
.sp-mega-mobile-drawer .mega-trigger:hover,
.sp-mega-mobile-drawer .mega-trigger--link:hover {
    border-color: rgba(124, 58, 237, 0.28);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}
.sp-mega-mobile-drawer .mega-trigger:active,
.sp-mega-mobile-drawer .mega-trigger--link:active { transform: translateY(0); filter: saturate(1.04); }

.sp-mega-mobile-drawer .mega-trigger span,
.sp-mega-mobile-drawer .mega-trigger--link span { padding-right: 22px; }

/* Drawer: açılan alt menüleri “içeride kart” gibi */
.sp-mega-mobile-drawer .mega-panel {
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 65%, rgba(245, 243, 255, 0.94) 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}
.sp-mega-mobile-drawer .mega-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sp-mega-mobile-drawer .mega-list .button {
    width: 100%;
    padding: 11px 14px;
    font-size: 13.5px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.10), 0 3px 0 rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.20);
}
.sp-mega-mobile-drawer .mega-list .button i {
    width: 26px;
    height: 26px;
    border-radius: 999px;
}

/* Mobil drawer: PC'deki 3D renkli ikon/btn stillerini aynen uygula */
.sp-mega-mobile-drawer .mega-trigger i,
.sp-mega-mobile-drawer .mega-trigger--link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--mt-ic1, #60a5fa), var(--mt-ic2, #1d4ed8));
    color: #fff;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    flex: 0 0 30px;
    margin-left: 0;
}

/* İkonlar her satırda aynı hizada dursun */
.sp-mega-mobile-drawer .mega-trigger,
.sp-mega-mobile-drawer .mega-trigger--link {
    align-items: center;
}
.sp-mega-mobile-drawer .mega-trigger i,
.sp-mega-mobile-drawer .mega-trigger--link i {
    flex: 0 0 30px;
}

.sp-mega-mobile-drawer .mega-list .button {
    justify-content: flex-start;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    background: linear-gradient(135deg, #3498db, #2980b9);
}
.sp-mega-mobile-drawer .mega-list .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14), 0 4px 0 rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.sp-mega-mobile-drawer .mega-list .button:active { transform: translateY(0); }
.sp-mega-mobile-drawer .mega-list .button i {
    margin-right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(180deg, var(--icon-c1, #64748b), var(--icon-c2, #334155));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-size: 14px;
    flex: 0 0 26px;
}

.sp-mega-mobile-drawer .button-primary { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #38bdf8; --icon-c2: #075985; }
.sp-mega-mobile-drawer .button-success { background: linear-gradient(135deg, #2ecc71, #27ae60); --icon-c1: #4ade80; --icon-c2: #15803d; }
.sp-mega-mobile-drawer .forum-button { background: linear-gradient(135deg, #1abc9c, #16a085); --icon-c1: #2dd4bf; --icon-c2: #0f766e; }
.sp-mega-mobile-drawer .message-button { background: linear-gradient(135deg, #9b59b6, #8e44ad); --icon-c1: #c084fc; --icon-c2: #6d28d9; }
.sp-mega-mobile-drawer .manage-button { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #60a5fa; --icon-c2: #1d4ed8; }
.sp-mega-mobile-drawer .profile-button { background: linear-gradient(135deg, #f39c12, #e67e22); --icon-c1: #fdba74; --icon-c2: #c2410c; }
.sp-mega-mobile-drawer .logout-button { background: linear-gradient(135deg, #34495e, #2c3e50); }
.sp-mega-mobile-drawer .ofisim-button { background: linear-gradient(135deg, #0ea5e9, #2563eb); --icon-c1: #38bdf8; --icon-c2: #075985; }
.sp-mega-mobile-drawer .muhasebe-button { background: linear-gradient(135deg, #10b981, #047857); --icon-c1: #34d399; --icon-c2: #065f46; }
.sp-mega-mobile-drawer .stock-button { background: linear-gradient(135deg, #f1c40f, #f39c12); --icon-c1: #facc15; --icon-c2: #a16207; }
.sp-mega-mobile-drawer .service-button { background: linear-gradient(135deg, #e91e63, #c2185b); --icon-c1: #fb7185; --icon-c2: #9f1239; }
.sp-mega-mobile-drawer .market-button { background: linear-gradient(135deg, #e67e22, #d35400); --icon-c1: #fb923c; --icon-c2: #c2410c; }
.sp-mega-mobile-drawer .archive-button { background: linear-gradient(135deg, #9b59b6, #8e44ad); --icon-c1: #c084fc; --icon-c2: #6d28d9; }
.sp-mega-mobile-drawer .education-button { background: linear-gradient(135deg, #2ecc71, #27ae60); --icon-c1: #4ade80; --icon-c2: #15803d; }
.sp-mega-mobile-drawer .workshop-button { background: linear-gradient(135deg, #27ae60, #219653); --icon-c1: #34d399; --icon-c2: #047857; }
.sp-mega-mobile-drawer .ai-button { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #60a5fa; --icon-c2: #1d4ed8; }

@media (max-width: 720px) {
    /* Mobilde üst satır tek hamburger buton olsun (öğrenci + home portal + genel) */
    .sp-student-mega-bar #studentMegaNav > .mega-nav__shell { display: none; }
    .sp-mega-bar:not(.sp-student-mega-bar) .sp-mega-bar__inner .mega-nav > .mega-nav__shell { display: none; }
    .home-portal-nav .mega-nav > .mega-row { display: none; }
    .home-portal-nav .mega-nav > .mega-nav__shell { display: none; }
    .sp-mega-mobile-drawer .mega-nav__shell,
    .sp-mega-mobile-drawer .mega-row { display: flex !important; flex-direction: column; gap: 12px; }
    .sp-mega-mobile-drawer .mega-row,
    .sp-mega-mobile-drawer .sp-student-mega-nav__row { display: flex !important; flex-direction: column; }
    .sp-mega-mobile-toggle { display: inline-flex; }

    /* JS artık overlay/drawer'ı body'ye ekler; is-open ile görünür */
    .sp-mega-mobile-overlay.is-open { display: block; }
    .sp-mega-mobile-drawer.is-open { display: block; transform: none; opacity: 1; }
}

.sp-mega-bar .mega-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-mega-bar .mega-theme-form { margin: 0; }

/* ——— Dropdown butonları (index 3D stil) ——— */
.sp-mega-bar .mega-list .button {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12), 0 3px 0 rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.sp-mega-bar .mega-list .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14), 0 4px 0 rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.sp-mega-bar .mega-list .button:active {
    transform: translateY(0);
}

.sp-mega-bar .mega-list .button i {
    margin-right: 7px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, var(--icon-c1, #64748b), var(--icon-c2, #334155));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

.sp-mega-bar .button-primary { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #38bdf8; --icon-c2: #075985; }
.sp-mega-bar .button-success { background: linear-gradient(135deg, #2ecc71, #27ae60); --icon-c1: #4ade80; --icon-c2: #15803d; }
.sp-mega-bar .forum-button { background: linear-gradient(135deg, #1abc9c, #16a085); --icon-c1: #2dd4bf; --icon-c2: #0f766e; }
.sp-mega-bar .message-button { background: linear-gradient(135deg, #9b59b6, #8e44ad); --icon-c1: #c084fc; --icon-c2: #6d28d9; }
.sp-mega-bar .manage-button { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #60a5fa; --icon-c2: #1d4ed8; }
.sp-mega-bar .profile-button { background: linear-gradient(135deg, #f39c12, #e67e22); --icon-c1: #fdba74; --icon-c2: #c2410c; }
.sp-mega-bar .logout-button { background: linear-gradient(135deg, #34495e, #2c3e50); }
.sp-mega-bar .ofisim-button { background: linear-gradient(135deg, #0ea5e9, #2563eb); --icon-c1: #38bdf8; --icon-c2: #075985; }
.sp-mega-bar .muhasebe-button { background: linear-gradient(135deg, #10b981, #047857); --icon-c1: #34d399; --icon-c2: #065f46; }
.sp-mega-bar .stock-button { background: linear-gradient(135deg, #f1c40f, #f39c12); --icon-c1: #facc15; --icon-c2: #a16207; }
.sp-mega-bar .service-button { background: linear-gradient(135deg, #e91e63, #c2185b); --icon-c1: #fb7185; --icon-c2: #9f1239; }
.sp-mega-bar .market-button { background: linear-gradient(135deg, #e67e22, #d35400); --icon-c1: #fb923c; --icon-c2: #c2410c; }
.sp-mega-bar .archive-button { background: linear-gradient(135deg, #9b59b6, #8e44ad); --icon-c1: #c084fc; --icon-c2: #6d28d9; }
.sp-mega-bar .education-button { background: linear-gradient(135deg, #2ecc71, #27ae60); --icon-c1: #4ade80; --icon-c2: #15803d; }
.sp-mega-bar .workshop-button { background: linear-gradient(135deg, #27ae60, #219653); --icon-c1: #34d399; --icon-c2: #047857; }
.sp-mega-bar .ai-button { background: linear-gradient(135deg, #3498db, #2980b9); --icon-c1: #60a5fa; --icon-c2: #1d4ed8; }

.sp-mega-bar .badge {
    margin-left: 8px;
    background: #e74c3c;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
}

.sp-mega-bar .button-select {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 35px;
}

.sp-mega-bar .btn-sm {
    padding: 8px 14px !important;
    font-size: 13px !important;
}

@media (hover: hover) and (pointer: fine) {
    .sp-mega-bar .mega-item:hover > .mega-panel { display: block; }
}

@media (max-width: 980px) {
    /* Tablet: home/genel mega-nav 2 sütun; 720'de hamburger alır */
    .sp-mega-bar:not(.sp-student-mega-bar):not(.home-portal-nav) .mega-row { flex-wrap: wrap; gap: 10px; }
    .sp-mega-bar:not(.sp-student-mega-bar):not(.home-portal-nav) .mega-item { width: calc(50% - 5px); }
    .sp-mega-bar:not(.sp-student-mega-bar):not(.home-portal-nav) .mega-trigger { width: 100%; justify-content: flex-start; }
    .sp-mega-bar:not(.sp-student-mega-bar):not(.home-portal-nav) .mega-panel {
        position: static;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        margin-top: 10px;
    }
    /* Home portal: 980'de de hamburger (JS toggle) */
    .home-portal-nav .sp-mega-mobile-toggle { display: inline-flex; }
    .home-portal-nav .mega-nav > .mega-row { display: none; }
}

/* Ana sayfa portal menüsü: dar ekranda hamburger (yukarıdaki 980/720 kuralları) */
@media (max-width: 560px) {
    .sp-mega-bar__inner { padding: 10px 12px 12px; }
    .sp-mega-bar .mega-trigger i { width: 28px; height: 28px; border-radius: 12px; }
    .sp-mega-bar .mega-panel { padding: 8px; border-radius: 16px; }
    .sp-mega-bar .mega-list { gap: 8px; }
    .sp-mega-bar .mega-list .button { padding: 10px 14px; font-size: 13.5px; }
    .sp-mega-bar .mega-list .button i { width: 24px; height: 24px; font-size: 13px; }
}

.mega-trigger--link {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.10);
    padding: 10px 12px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', Poppins, system-ui, sans-serif;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
    transition: transform 0.15s, filter 0.15s, background 0.15s;
    user-select: none;
    text-decoration: none;
    color: #fff;
}
.mega-trigger--link:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
.home-portal-nav .mega-trigger--eng,
.sp-mega-bar .mega-trigger[data-menu="hm-eng"] { --mt-ic1: #f472b6; --mt-ic2: #be185d; }
.home-portal-nav .mega-trigger--tools,
.sp-mega-bar .mega-trigger[data-menu="hm-tools"] { --mt-ic1: #a78bfa; --mt-ic2: #5b21b6; }
.home-portal-nav .mega-trigger--market { --mt-ic1: #fb923c; --mt-ic2: #c2410c; }
.home-portal-nav .mega-trigger--archive,
.sp-mega-bar .mega-trigger[data-menu="hm-archive"] { --mt-ic1: #c084fc; --mt-ic2: #6d28d9; }
.home-portal-nav .mega-trigger--edu,
.sp-mega-bar .mega-trigger[data-menu="hm-edu"] { --mt-ic1: #4ade80; --mt-ic2: #15803d; }
.home-portal-nav .mega-trigger--ai { --mt-ic1: #60a5fa; --mt-ic2: #1d4ed8; }

/* Ana sayfa portal menü — dropdown kesilmesin */
.home-portal-nav {
    overflow: visible !important;
    position: relative;
    z-index: 2510;
}
.home-portal-nav .sp-mega-bar,
.home-portal-nav .sp-mega-bar__inner,
.home-portal-nav .mega-nav,
.home-portal-nav .mega-row {
    overflow: visible;
}
.home-portal-nav .mega-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Ana sayfa — dropdown her zaman aşağı açılsın (üste değil) */
.home-portal-nav.sp-mega-bar {
    position: relative;
    top: auto;
}
.home-portal-nav .mega-item {
    align-items: flex-start;
}
.home-portal-nav .mega-panel {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 8px;
    margin-bottom: 0;
    transform: none !important;
}

/* Ana sayfa — açık cam menü (sol mavi / sağ mor raylarla uyumlu) */
.home-portal-nav.sp-mega-bar {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
}

.home-portal-nav .mega-trigger,
.home-portal-nav .mega-trigger--link {
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.88) 100%);
    color: #1e293b;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.home-portal-nav .mega-trigger:hover,
.home-portal-nav .mega-trigger--link:hover,
.home-portal-nav .mega-item:has(.mega-panel.is-open) .mega-trigger {
    background: linear-gradient(145deg, #fff 0%, rgba(239, 246, 255, 0.95) 100%);
    border-color: rgba(124, 58, 237, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.16);
    color: #312e81;
    filter: none;
}

.home-portal-nav .mega-panel {
    z-index: 2530 !important;
    border: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.14), 0 8px 20px rgba(14, 165, 233, 0.08);
}

.home-portal-nav .mega-item:hover,
.home-portal-nav .mega-item:has(.mega-panel.is-open) {
    z-index: 2520 !important;
}
