﻿/* ==========================================================================
      FamzaH Soft – Global Layout Styles
      File: /wwwroot/css/layout.css
   ========================================================================== */


/* ---------------------------------------------------------
    🌐 General Reset
--------------------------------------------------------- */
body {
    font-family: 'Droid', sans-serif;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tufuli', serif;
}


/* ---------------------------------------------------------
    🌟 Navbar Styling
--------------------------------------------------------- */
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.navbar-brand span {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Light Mode */
html[data-bs-theme="light"] .navbar {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e5e5e5;
}

    html[data-bs-theme="light"] .navbar .nav-link,
    html[data-bs-theme="light"] .navbar .navbar-brand {
        color: #1a1a1a !important;
    }

        html[data-bs-theme="light"] .navbar .nav-link:hover {
            color: #0d6efd !important;
        }

/* Dark Mode */
html[data-bs-theme="dark"] .navbar {
    background-color: rgba(20, 20, 20, 0.75) !important;
    border-bottom: 1px solid #333;
}

    html[data-bs-theme="dark"] .navbar .nav-link,
    html[data-bs-theme="dark"] .navbar .navbar-brand {
        color: #ffffff !important;
    }

/* Active link */
.nav-link.active {
    font-weight: bold;
}

/* Navbar button styling */
.navbar .btn {
    border-radius: 6px !important;
    font-weight: 600;
}


/* ---------------------------------------------------------
    🌙 Theme Toggle Button
--------------------------------------------------------- */
#themeToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
}

    #themeToggle i {
        font-size: 1.1rem;
    }


/* ---------------------------------------------------------
    🔤 Language Button
--------------------------------------------------------- */
.btn-outline-secondary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
}

    .btn-outline-secondary:hover {
        background-color: #0d6efd !important;
        color: #fff !important;
    }


/* ---------------------------------------------------------
    📱 Mobile Fixes
--------------------------------------------------------- */

@media (max-width: 991px) {
    .navbar .btn {
        margin-bottom: 6px;
    }

    .navbar-brand img {
        height: 28px !important;
    }
}


/* ---------------------------------------------------------
    🦶 Footer Styling
--------------------------------------------------------- */
footer {
    background-color: var(--bs-secondary-bg);
}

    footer .small {
        opacity: 0.9;
    }

    footer a {
        font-weight: 600;
    }

    footer img {
        height: 30px;
        border-radius: 4px;
    }


/* ---------------------------------------------------------
    📊 Visitor Counter Box
--------------------------------------------------------- */
.visitor-kpi-container {
    background: var(--bs-tertiary-bg);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 200px;
}

.visitor-kpi-item span:first-child {
    font-size: 1.2rem;
}


/* ---------------------------------------------------------
    🧩 Cards General Styling
--------------------------------------------------------- */

.card {
    border-radius: 12px;
}

.card-header {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

.card-body {
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}


/* ---------------------------------------------------------
    ✨ Glass Effect (optional — used if nav-glass class exists)
--------------------------------------------------------- */
.nav-glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
}

html[data-bs-theme="dark"] .nav-glass {
    background: rgba(20, 20, 20, 0.55);
}


/* ---------------------------------------------------------
    🎨 Buttons Fix (Dark mode readability)
--------------------------------------------------------- */

html[data-bs-theme="dark"] .btn-outline-dark,
html[data-bs-theme="dark"] .btn-outline-secondary {
    color: #fff !important;
    border-color: #ccc !important;
}

    html[data-bs-theme="dark"] .btn-outline-dark:hover,
    html[data-bs-theme="dark"] .btn-outline-secondary:hover {
        background-color: #fff !important;
        color: #000 !important;
    }


/* ---------------------------------------------------------
    🔔 Toast Fix
--------------------------------------------------------- */
.toast {
    border-radius: 12px !important;
}


/* ---------------------------------------------------------
    🧷 Modal Fix (Dark)
--------------------------------------------------------- */
/* حل شامل لزر الإغلاق */
.modal-header .btn-close {
    opacity: 0.7;
    transition: all 0.2s ease;
}

html[data-bs-theme="light"] .modal-header .btn-close {
    filter: none !important; /* يفضل داكن في الثيم الفاتح */
}

html[data-bs-theme="dark"] .modal-header .btn-close {
    filter: invert(1) brightness(2) !important; /* يفضل فاتح في الثيم الداكن */
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* حل سريع لزر الـ navbar toggler */
.navbar-toggler i {
    transition: all 0.2s ease;
}

html[data-bs-theme="light"] .navbar-toggler i {
    color: #000 !important;
}

html[data-bs-theme="dark"] .navbar-toggler i {
    color: #fff !important;
    filter: brightness(2) !important;
}