/* Premium Layout Styles - Kurumsal Tema (Siyah, Kırmızı, Beyaz) */
:root {
    --primary-color: #b52525; /* KTUN Kırmızı */
    --secondary-color: #000000; /* Saf Siyah */
    --ktun-navy: #111111; /* Koyu Gri/Siyah Alternatifi */
    --ktun-red: #b52525;
    --ktun-gray: #f4f4f4; /* Çok Açık Gri */
    --text-main: #222222; /* Siyaha yakın metin */
    --text-muted: #666666; /* Gri metin */
    --premium-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Sert ve kurumsal gölge */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* --- NAVBAR --- */
.navbar-ktun {
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--primary-color);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    transition: box-shadow 0.4s ease;
    z-index: 1030;
}

    .navbar-ktun.scrolled {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-bottom: 3px solid var(--secondary-color);
    }

/* --- LOGO --- */
.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    height: 100%;
}

.brand-logo-img {
    height: 95px;
    width: auto;
    object-fit: contain;
    transition: height 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: height;
}

.navbar-ktun.scrolled .brand-logo-img {
    height: 65px;
}

/* --- YAZI STİLLERİ --- */
.ktun-title-main, .ktun-title-sub, .system-title-main, .system-title-sub, .brand-divider {
    transition: all 0.65s ease;
}

.ktun-title-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.ktun-title-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.system-title-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
}

.system-title-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.brand-divider {
    height: 40px;
    border-right: 2px solid #e0e0e0;
    margin: 0 1.25rem;
}

.navbar-ktun.scrolled .ktun-title-main {
    font-size: 0.95rem;
}

.navbar-ktun.scrolled .ktun-title-sub {
    font-size: 0.65rem;
}

.navbar-ktun.scrolled .system-title-main {
    font-size: 0.85rem;
}

.navbar-ktun.scrolled .system-title-sub {
    font-size: 0.65rem;
}

.navbar-ktun.scrolled .brand-divider {
    height: 28px;
}

/* --- LİNKLER VE BUTONLAR --- */
.nav-link-premium {
    font-weight: 600;
    color: var(--text-main) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .nav-link-premium:hover, .nav-link-premium.active {
        color: var(--primary-color) !important;
        background-color: var(--ktun-gray);
    }

.btn-nav-login {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.4rem 1.1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .btn-nav-login:hover {
        background-color: var(--secondary-color);
        color: #ffffff;
    }

.btn-nav-register {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn-nav-register:hover {
        background-color: #990000;
        color: white;
    }

/* --- İKONLAR VE PROFİL --- */
.bell-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

    .bell-btn:hover {
        background-color: var(--ktun-gray);
        color: var(--primary-color);
    }

.bell-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.6rem;
    padding: 0.3em 0.5em;
    border: 2px solid #fff;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 0.35rem 1rem 0.35rem 0.35rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

    .profile-btn:hover {
        border-color: var(--text-muted);
        background: var(--ktun-gray);
    }

.profile-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.lang-switcher-modern {
    background: #f8fafc;
    padding: 4px;
    border-radius: 50px !important; /* Tam yuvarlak yapar */
    display: inline-flex;
    border: 1px solid #e2e8f0;
}

    .lang-switcher-modern a {
        padding: 4px 16px;
        font-size: 0.85rem;
        font-weight: 700;
        border-radius: 50px !important; /* İç butonları tam yuvarlak yapar */
        color: #64748b;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .lang-switcher-modern a.active {
            background: #ffffff;
            color: #b52525;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

/* --- DROPDOWN MENÜ --- */
.dropdown-hover {
    position: relative;
}

@media (min-width: 992px) {
    .dropdown-hover:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu {
        display: block !important;
        position: absolute !important; /* Sayfa genişliğini bozmasını ve diğer öğeleri itmesini engeller */
        top: 100%;
        left: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(10px);
        transition: all 0.3s ease;
        margin-top: 0;
        border-radius: 4px !important;
        border: 1px solid #e0e0e0 !important;
        background: #ffffff !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
        padding: 0.5rem 0 !important;
    }

    /* Farenin boşluğa düşüp menüyü kapatmasını engelleyen görünmez köprü */
    .dropdown-hover > .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
    }

    /* Sağ taraftaki (Bildirim/Profil) menülerinin ekrandan dışarı taşmasını engeller ve sola açar */
    .dropdown-menu.dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }
}

/* --- KAYAN EKRAN (CAROUSEL) --- */
.hero-carousel-section {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
}

.carousel-item img {
    height: 60vh;
    object-fit: cover;
    filter: brightness(0.75);
}

.carousel-caption-custom {
    position: absolute;
    bottom: 15%;
    left: 8%;
    background: rgba(0, 0, 0, 0.75);
    padding: 2rem;
    border-left: 5px solid var(--primary-color);
    color: white;
    max-width: 550px;
}

    .carousel-caption-custom h2 {
        font-size: 2.2rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }

/* --- RESPONSIVE AYARLAR --- */
@media (max-width: 1199.98px) {
    .brand-logo-img {
        height: 80px;
    }

    .navbar-ktun.scrolled .brand-logo-img {
        height: 60px;
    }

    .brand-divider, .system-title-sub {
        display: none !important;
    }

    .ktun-title-main {
        font-size: 1rem;
    }
}

@media (max-width: 991.98px) {
    .brand-logo-img {
        height: 70px;
    }

    .navbar-ktun.scrolled .brand-logo-img {
        height: 55px;
    }

    .offcanvas-ktun {
        width: 300px !important;
        background-color: #ffffff !important;
        border-left: 1px solid #e0e0e0 !important;
    }
}

@media (max-width: 575.98px) {
    .brand-logo-img {
        height: 60px;
    }

    .navbar-ktun.scrolled .brand-logo-img {
        height: 45px;
    }

    .ktun-title-main {
        font-size: 0.9rem;
    }

    .carousel-item img {
        height: 40vh;
    }

    .carousel-caption-custom {
        left: 5%;
        bottom: 10%;
        padding: 1.5rem;
    }

        .carousel-caption-custom h2 {
            font-size: 1.5rem;
        }
}

/* Footer */

footer, .footer-section {
    background-color: #000000 !important; /* Kurumsal Siyah */
    background-image: none !important; /* Grid çizgilerini yok eder */
    border-top: 4px solid #b52525; /* Üste şık kırmızı bir çizgi atar */
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .social-icon:hover {
        background: #b52525;
        border-color: #b52525;
        color: white;
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 5px 15px rgba(190,0,0,0.3);
    }

/* Footer link hover */
.footer-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

    .footer-link:hover {
        color: #fbbf24;
        padding-left: 4px;
    }

    .footer-link::before {
        content: '›';
        color: #b52525;
        font-weight: 700;
    }

.btn-nav-login {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #1e293b !important;
    padding: 0.45rem 1.25rem;
    border-radius: 50px !important; /* Yuvarlak köşeler */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn-nav-login:hover {
        background: #f8fafc !important; /* Siyah yerine hafif gri */
        border-color: #b52525 !important; /* Kenarlığı kırmızı yap */
        color: #b52525 !important; /* Yazıyı kırmızı yap */
    }

/* Kayıt Ol Butonu (O da tam yuvarlak) */
.btn-nav-register {
    background: #b52525 !important;
    color: white !important;
    border: none;
    padding: 0.45rem 1.25rem;
    border-radius: 50px !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(190,0,0,0.2);
    transition: all 0.3s ease;
}

    .btn-nav-register:hover {
        background: #990000 !important;
        transform: translateY(-1px);
    }

/* Card Premium */
.card-premium {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
}

/* Editor Content / Rich Text Styles */
.editor-content {
    line-height: 1.7;
    color: #334155;
    font-size: 1.1rem;
    word-break: break-word;
}

    .editor-content p {
        margin-bottom: 1.8rem;
    }

    .editor-content h1, .editor-content h2, .editor-content h3,
    .editor-content h4, .editor-content h5, .editor-content h6 {
        color: #0f172a;
        margin-top: 2.8rem;
        margin-bottom: 1.2rem;
        font-weight: 700;
    }

    .editor-content img {
        max-width: 100%;
        height: auto;
        border-radius: 12px;
        margin: 2rem 0;
        box-shadow: 0 15px 35px rgba(0,0,0,0.08);
        display: block;
    }

    .editor-content a {
        color: #b52525;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1.5px solid rgba(190, 0, 0, 0.2);
        transition: all 0.2s ease;
    }

        .editor-content a:hover {
            border-bottom-color: #b52525;
            background-color: rgba(190, 0, 0, 0.03);
        }

    .editor-content ul, .editor-content ol {
        margin-bottom: 2rem;
        padding-left: 2rem;
    }

    .editor-content li {
        margin-bottom: 0.8rem;
    }

    .editor-content table:not(.sp-tablo) {
        width: 100% !important;
        margin: 2.5rem 0;
        border-collapse: collapse;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0,0,0,0.04);
        border: 1px solid #e2e8f0;
    }

        .editor-content table:not(.sp-tablo) th,
        .editor-content table:not(.sp-tablo) td {
            padding: 1.2rem;
            border: 1px solid #e2e8f0;
        }

        .editor-content table:not(.sp-tablo) th {
            background-color: #f8fafc;
            color: #1e293b;
            font-weight: 700;
        }

    .editor-content blockquote {
        margin: 2.5rem 0;
        padding: 2rem 2.5rem;
        border-left: 6px solid #b52525;
        background-color: #f8fafc;
        border-radius: 0 16px 16px 0;
        font-style: italic;
        color: #475569;
        font-size: 1.2rem;
    }

    .editor-content iframe {
        max-width: 100%;
        border-radius: 12px;
        margin: 2rem 0;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    }
.badge.bg-warning {
    color: #1e293b !important;
}