/* --- DROPDOWN MENU STİLLERİ --- */
#moreMenu {
    position: relative;
    overflow: visible !important;
}

#moreMenuDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 99999999;
    overflow: visible;
    display: none;
}

#moreMenuDropdown.hidden {
    display: none !important;
}

#moreMenuDropdown:not(.hidden) {
    display: block !important;
}

#moreMenuDropdown a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

#moreMenuDropdown a:hover {
    background-color: #f3f4f6;
}

#moreMenuDropdown a:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

#moreMenuDropdown a:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Dark mode support */
.dark #moreMenuDropdown {
    background-color: #1f2937;
    border-color: #4b5563;
}

.dark #moreMenuDropdown a {
    color: #d1d5db;
}

.dark #moreMenuDropdown a:hover {
    background-color: #374151;
}

/* --- TEMA RENK DEĞİŞKENLERİ --- */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB; /* gray-50 */
    --bg-input: #FFFFFF;
    --text-primary: #1F2937; /* gray-800 */
    --text-secondary: #4B5563; /* gray-600 */
    --text-placeholder: #9CA3AF; /* gray-400 */
    --border-primary: #D1D5DB; /* gray-300 */
    --gold: #D4AF37;
    --gold-hover: #e6c35c;
    --shadow-color: rgba(24, 28, 36, 0.08);
}

.dark {
    --bg-primary: #111827; /* gray-900 */
    --bg-secondary: #1F2937; /* gray-800 */
    --bg-input: #374151; /* gray-700 */
    --text-primary: #F9FAFB; /* gray-50 */
    --text-secondary: #9CA3AF; /* gray-400 */
    --text-placeholder: #6B7280; /* gray-500 */
    --border-primary: #4B5563; /* gray-600 */
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* --- GENEL STİLLER --- */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

.bg-primary {
    background-color: var(--bg-primary);
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.border-primary {
    border-color: var(--border-primary);
}

.gold-text {
    color: var(--gold);
}

.gold-bg {
    background-color: var(--gold);
}

/* --- ADMİN PANELİ KART STİLLERİ (DÜZELTİLDİ) --- */
.filter-card {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-radius: 18px;
    box-shadow: 0 6px 32px 0 var(--shadow-color);
    border: 1px solid var(--border-primary);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s, background-color 0.3s, border-color 0.3s, color 0.3s;
}

    .filter-card i,
    .filter-card svg,
    .filter-card h2,
    .filter-card h3,
    .filter-card h4,
    .filter-card h5 {
        color: var(--text-primary) !important;
        fill: var(--text-primary) !important;
        transition: color 0.3s, fill 0.3s;
    }

    /* Daha küçük yazılar (örneğin açıklamalar) için isteğe bağlı: */
    .filter-card small,
    .filter-card .desc,
    .filter-card p {
        color: var(--text-secondary) !important;
    }

    /* --- FİLTRE PANELİ STİLLERİ (TEMA UYUMLU) --- */
    .filter-card label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
        letter-spacing: 0.01em;
        display: block;
    }

.form-control, .tagify {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border-primary);
    border-radius: 12px !important;
    padding: 0.85rem 1.2rem;
    font-size: 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s;
    width: 100%;
}

    .form-control:focus, .tagify--focus {
        border-color: var(--gold);
        outline: none;
        box-shadow: 0 0 0 3px hsla(45, 74%, 55%, 0.2);
    }

    .form-control::placeholder, .tagify__input::placeholder {
        color: var(--text-placeholder);
        opacity: 1;
    }

.tagify__tag {
    background-color: var(--gold) !important;
    color: #111827 !important;
    font-weight: 600;
    border-radius: 8px !important;
}

.tagify__tag__removeBtn {
    color: #111827 !important;
}

.tagify__dropdown {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-primary);
    border-radius: 12px;
}

/* Checkbox stilleri */
.filter-card input[type="checkbox"] {
    accent-color: var(--gold);
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.5em;
    vertical-align: middle;
    background-color: var(--bg-input);
    border-color: var(--border-primary);
}

/* Buton stilleri */
#resetBtn {
    background: var(--gold);
    color: #111827;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    transition: background-color 0.2s, box-shadow 0.2s;
}

    #resetBtn:hover {
        background: var(--gold-hover);
        box-shadow: 0 4px 16px 0 rgba(212,175,55,0.2);
    }

/* Login sayfası container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

/* Login kartı */
.login-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2.5rem 2rem;
    border-radius: 18px;
    box-shadow: 0 6px 32px 0 var(--shadow-color);
    border: 1px solid var(--border-primary);
    min-width: 340px;
    max-width: 95vw;
    transition: background-color 0.3s, color 0.3s;
}

    .login-card h2 {
        font-family: 'Playfair Display', serif;
        margin-bottom: 1.5rem;
        color: var(--text-primary);
        font-size: 2rem;
        text-align: center;
    }

    .login-card label {
        display: block;
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 0.35rem;
        margin-top: 1rem;
        letter-spacing: 0.01em;
    }

    .login-card .form-control {
        background: var(--bg-input);
        color: var(--text-primary);
        border: 1.5px solid var(--border-primary);
        border-radius: 12px;
        padding: 0.8rem 1.1rem;
        font-size: 1.07rem;
        margin-bottom: 0.4rem;
        margin-top: 0.2rem;
        width: 100%;
        transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s;
    }

        .login-card .form-control:focus {
            border-color: var(--gold);
            box-shadow: 0 0 0 3px hsla(45, 74%, 55%, 0.18);
            outline: none;
        }

/* Giriş butonu */
#loginBtn {
    background: var(--gold);
    color: #111827;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    margin-top: 1.3rem;
    width: 100%;
    transition: background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 16px 0 rgba(212,175,55,0.08);
}

    #loginBtn:hover {
        background: var(--gold-hover);
        box-shadow: 0 4px 16px 0 rgba(212,175,55,0.16);
    }


.admin-small-card {
    border-radius: 14px;
    padding: 2rem 1rem;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Gölge ve geçişler opsiyonel */
    box-shadow: 0 2px 16px 0 var(--shadow-color);
    transition: background-color 0.3s, color 0.3s;
}

.admin-dashboard-card {
    color: var(--text-primary) !important;
    transition: color 0.3s, background-color 0.3s;
}
.admin-dashboard-card span,
.admin-dashboard-card svg {
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
    transition: color 0.3s, fill 0.3s;
}
.admin-dashboard-card .text-gold {
    color: var(--gold) !important;
}
.admin-dashboard-card .dark .text-gold {
    color: var(--gold) !important;
}
@media (prefers-color-scheme: dark) {
    .admin-dashboard-card {
        color: #fff !important;
    }
    .admin-dashboard-card span,
    .admin-dashboard-card svg {
        color: #fff !important;
        fill: #fff !important;
    }
    .admin-dashboard-card .text-gold {
        color: var(--gold) !important;
    }
}

/* --- PERFORMANS OPTİMİZASYONU STİLLERİ --- */

/* Critical CSS - Above the fold */
.critical {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Image optimization */
.lazy {
    opacity: 1;
    transition: opacity 0.3s;
    content-visibility: auto;
}

.lazy.loaded {
    opacity: 1;
}

/* Performance optimizations */
img {
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

 

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    /* Force hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize large images */
img[src*="Analiz_Entegrasyonu.png"],
img[src*="Aydınlatma_Kontrolü.png"],
img[src*="projealani.jpg"],
img[src*="Güvenlik_Entegrasyonu.png"],
img[src*="Projenizde_KNX_Sistem_Entegrasyonu.png"],
img[src*="Perde_ve_Panjur_Kontrolü.jpg"],
img[src*="Slide_16.jpg"],
img[src*="Slide_9.png"],
img[src*="Intercom.png"],
img[src*="Slide_1_2.png"],
img[src*="Kapı_Geçiş_Sistemi.png"],
img[src*="Multimedya_Yönetimi.png"],
img[src*="Güvenlik_Kamerası_Entegrasyonu.png"] {
    max-width: 600px;
    width: 100%;
    height: auto;
    /* Force hardware acceleration for better performance */
    transform: translateZ(0);
    will-change: transform;
    /* Reduce quality for better performance */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile optimization */
@media (max-width: 768px) {
    img[src*="Analiz_Entegrasyonu.png"],
    img[src*="Aydınlatma_Kontrolü.png"],
    img[src*="projealani.jpg"],
    img[src*="Güvenlik_Entegrasyonu.png"] {
        max-width: 100%;
        height: auto;
    }
}

/* Responsive images */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Image placeholder */
.img-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    min-height: 200px;
}

/* Progressive image loading */
.progressive-img {
    position: relative;
    overflow: hidden;
}

.progressive-img img {
    transition: filter 0.3s ease;
}

.progressive-img.loading img {
    filter: blur(10px);
}

.progressive-img.loaded img {
    filter: blur(0);
}

