﻿/* =================================================================
   2. NAVBAR STİLLERİ
   ================================================================= */
.navbar-red {
    background-color: #fff;
    color: #fff;
    position: relative;
    overflow: visible;
    font-family: 'Montserrat', sans-serif;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1030;
}

    .navbar-red .wrapper-effect {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        background: linear-gradient(to right, var(--brand-gradient-end), var(--brand-gradient-start));
        clip-path: polygon(81% 0, 100% 0, 100% 50%, 100% 100%, 75% 100%);
        transition: clip-path 1s ease;
        z-index: 1;
    }

@media (hover: hover) and (pointer: fine) {
    .navbar-red:hover .wrapper-effect {
        clip-path: polygon(81% 0, 100% 0, 100% 50%, 100% 100%, 1% 100%);
    }
}

.custom-brand {
    max-width: calc(100% - 70px);
}

.navbar-brand {
    color: #fff;
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.navbar-logo {
    height: 45px;
    width: auto;
    margin-right: 10px;
}

.brand-text {
    border-left: 2px solid var(--brand-color);
    padding-left: 10px;
    margin-left: 5px;
    min-width: 0;
}

    .brand-text h3 {
        font-size: 1.1rem;
        color: var(--brand-color);
        font-weight: 800;
        line-height: 1;
        margin-bottom: 0;
    }

.navbar-nav .nav-item .nav-link {
    color: #fff !important;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 15px;
    position: relative;
    transition: color 0.3s ease-in-out;
    z-index: 2;
}

.navbar-toggler {
    background-color: var(--brand-color) !important;
    border: none !important;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 10;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(158, 11, 15, 0.25) !important;
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* =================================================================
   3. PROFİL & TEMA KARTI
   ================================================================= */
.header-profile-wrapper {
    position: relative;
    margin-left: 20px;
    z-index: 100;
}

.user-profile-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 15px !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .user-profile-card:hover, .user-profile-card[aria-expanded="true"] {
        background-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: 0.3px;
}

.user-role {
    font-size: 0.7rem;
    color: #ccc;
    font-weight: 300;
}

.profile-dropdown-menu {
    position: absolute;
    top: 65px;
    right: 0;
    width: 240px;
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 0;
    border: 1px solid var(--border-color);
    margin-top: 10px !important;
    min-width: 220px;
    z-index: 1050;
    display: none;
}

    .profile-dropdown-menu.show {
        display: flex !important;
        flex-direction: column;
        animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

.dropdown-link-item {
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    background-color: transparent;
    text-decoration: none;
}

    .dropdown-link-item:hover, .dropdown-link-item:focus {
        background-color: rgba(158, 11, 15, 0.04);
        color: var(--brand-color);
        border-left-color: var(--brand-color);
        padding-left: 25px;
    }

    .dropdown-link-item i {
        width: 20px;
        text-align: center;
        color: #6c757d;
    }

    .dropdown-link-item:hover i {
        color: var(--brand-color);
    }

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
    opacity: 0.5;
}

.theme-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 10px;
}

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   4. FOOTER (Masaüstünde Hep Kilitli)
   ================================================================= */
.footer-custom {
    background: #ffffff;
    color: #333333;
    padding: 10px 0;
    width: 100%;
    position: fixed; /* Masaüstünde kilitli kalmasını sağlar */
    bottom: 0;
    left: 0;
    z-index: 1000;
    border-top: 4px solid var(--brand-color);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

    .footer-custom a {
        color: #555;
        margin-left: 20px;
        font-size: 1.2rem;
        transition: all 0.3s;
        background: #f0f0f0;
        width: 35px;
        height: 35px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        border-radius: 5px;
        text-decoration: none;
    }

        .footer-custom a:hover {
            background: var(--brand-color);
            color: #fff;
        }

.footer-address {
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .footer-address i {
        color: var(--brand-color);
        font-size: 1.1rem;
    }

.footer-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #ddd;
    height: 40px;
}

    .footer-logos img {
        height: 100%;
        width: auto;
        transition: all 0.3s ease;
        display: block;
    }

    .footer-logos a {
        background: transparent !important;
        width: auto !important;
        padding: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

        .footer-logos a:hover img {
            opacity: 1;
            transform: scale(1.05);
        }


/* =================================================================
   MOBİL EKRANLAR (992px altı - PREMIUM OFF-CANVAS MENÜ)
   ================================================================= */
@media (max-width: 991.98px) {

    /* 1. MOBİL NAVBAR BEYAZ VE ŞIK (Kırmızı Boğulmayı Çözer) */
    .navbar-red {
        background-color: rgba(255, 255, 255, 0.98) !important; /* Neredeyse tam beyaz, çok hafif cam efekti */
        backdrop-filter: blur(10px); /* Arkaplanı hafif buğular */
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0,0,0,0.05) !important; /* Çok şık, ince bir alt çizgi */
    }

        /* Masaüstündeki kırmızı perdeyi mobilde tamamen yok ediyoruz */
        .navbar-red .wrapper-effect {
            display: none !important;
        }

    .navbar-logo {
        height: 35px;
    }

    .brand-text h3 {
        font-size: 1rem;
    }

    /* Sağ Üstteki Hamburger Butonu (Beyaz zeminde kırmızı patlayacak) */
    .custom-toggler {
        background-color: rgba(158, 11, 15, 0.05) !important; /* İkonun arkasına çok hafif kırmızı yuvarlak zemin */
        color: var(--brand-color) !important;
        border: none !important;
        font-size: 1.4rem;
        padding: 6px 12px;
        border-radius: 10px;
    }

        .custom-toggler:focus {
            outline: none;
        }

    /* Arkaplan Blur Perdesi */
    .overlay-blur {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1020;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
    }

        .overlay-blur.active {
            opacity: 1;
            visibility: visible;
        }

    /* Yandan Kayan Premium Çekmece */
    .offcanvas-menu {
        position: fixed;
        top: 0;
        right: -320px; /* Ekran dışında gizli */
        width: 320px; /* Geniş ve ferah bir menü */
        height: 100dvh;
        background-color: #ffffff;
        z-index: 1050;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: -15px 0 40px rgba(0,0,0,0.15);
        border-radius: 30px 0 0 30px; /* Sol tarafa modern iPhone kıvrımı */
        overflow-y: auto;
    }

        .offcanvas-menu.active {
            right: 0;
        }

    /* Yuvarlak Kapatma Çarpısı */
    .close-menu-btn {
        position: absolute;
        top: 25px;
        right: 25px;
        background: #f1f3f5;
        border: none;
        color: #495057;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        transition: all 0.3s;
        z-index: 10;
    }

        .close-menu-btn:active {
            background: var(--brand-color);
            color: #fff;
            transform: scale(0.9);
        }

    /* Dev Profil Avatarı ve Karşılama Alanı */
    .mobile-profile-widget {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 25px;
    }

        .mobile-profile-widget .avatar-circle {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--brand-color), var(--brand-gradient-end));
            color: #fff;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 2.2rem;
            margin-bottom: 15px;
            box-shadow: 0 10px 20px rgba(158, 11, 15, 0.2);
        }

        .mobile-profile-widget .greeting {
            font-size: 0.85rem;
            color: #6c757d;
            margin-bottom: 2px;
            display: block;
        }

        .mobile-profile-widget .user-fullname {
            font-weight: 800;
            color: #212529;
            margin-bottom: 8px;
            font-size: 1.25rem;
        }

        .mobile-profile-widget .user-badge {
            background-color: rgba(158, 11, 15, 0.08);
            color: var(--brand-color);
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }

    /* iOS Tarzı Yuvarlak Hatlı Menü Linkleri */
    .mobile-nav-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-app-link {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        background: #fff;
        border-radius: 16px;
        text-decoration: none;
        color: #343a40 !important;
        transition: all 0.2s;
    }

        .mobile-app-link:active {
            background-color: #f8f9fa;
            transform: scale(0.98);
        }

        /* İkonlar İçin Özel Gri Kutular */
        .mobile-app-link .icon-box {
            width: 40px;
            height: 40px;
            background-color: #f1f3f5;
            border-radius: 12px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #495057;
            font-size: 1.1rem;
            margin-right: 15px;
            transition: all 0.2s;
        }

        .mobile-app-link .link-text {
            font-weight: 600;
            font-size: 1.05rem;
        }

        .mobile-app-link .chevron {
            margin-left: auto;
            color: #adb5bd;
            font-size: 0.9rem;
        }

        /* Dokunulduğunda ikon kutusu Kırmızı olsun */
        .mobile-app-link:active .icon-box {
            background-color: var(--brand-color);
            color: #fff;
        }

    /* Araya ince çizgi */
    .mobile-divider {
        height: 1px;
        background-color: rgba(0,0,0,0.05);
        margin: 15px 0;
    }

    /* Çıkış Yap Butonu Özel Renklendirmesi */
    .logout-btn .icon-box {
        background-color: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }

    .logout-btn:active .icon-box {
        background-color: #dc3545;
        color: #fff;
    }
}
/* =================================================================
   MOBİL EKRANLAR (768px altı - Akıllı Footer ve Serbest Scroll)
   ================================================================= */
@media (max-width: 768px) {

    /* 1. TÜM EKRAN KİLİTLERİNİ AÇIYORUZ (Doğal akışa dönüş) */
    html, body {
        height: auto !important; /* Ekranı kilitleme */
        min-height: 100vh;
        overflow-y: auto !important; /* Normal kaydırma açık */
        overflow-x: hidden !important;
    }

    /* Orta içeriğin kendi içinde kaymasını (sabit kilitlenmesini) iptal et */
    .main-content-spacing, main {
        height: auto !important;
        overflow-y: visible !important; /* Sadece sayfa kayar, orta alan değil */
    }

    /* 2. STANDART SAYFALARDA FOOTER'I SERBEST BIRAK (Aşağı insin) */
    .footer-custom {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: auto !important;
        flex-shrink: 0;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 15px 0 !important;
    }

    /* 3. SADECE ANASAYFADA (home-page) KİLİTLE (TikTok gibi) */
    body.home-page {
        overflow: hidden !important; /* Anasayfa için kilit açık */
        height: 100dvh !important;
    }

        body.home-page .footer-custom {
            position: fixed !important;
            bottom: 0 !important;
            left: 0 !important;
            width: 100% !important;
        }

    /* Footer Logo hizalaması */
    .footer-logos {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        gap: 10px;
        height: 35px;
        margin-top: 10px;
        width: 100%;
    }

        .footer-logos img {
            display: block !important;
            max-height: 100%;
            width: auto;
        }
}
