/* =================================================================== */
/*                     FOSSBilling Custom Theme CSS                    */
/* =================================================================== */

/* 1. Imports & Root Variables
/* ------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://rsms.me/inter/inter.css');

:root {
    /* Colors */
    --primary: #2C3E50;
    --secondary: #3498DB;
    --accent: #E74C3C;
    --success: #2ECC71;
    --warning: #F1C40F;
    --danger: #E74C3C;
    --light: #ECF0F1;
    --dark: #2C3E50;
    
    /* Typography */
    --tblr-font-sans-serif: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    /* Effects & Layout */
    --section-padding: 4rem;
    --transition-base: all 0.3s ease;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
    --border-radius: 12px;

    /* Light Mode Variables (Default) */
    --body-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2C3E50;
    --text-muted-color: #6c757d;
    --border-color: rgba(0,0,0,0.08);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --topbar-bg: #ffffff;
    --hero-text-color: #ffffff;
}

[data-bs-theme="dark"] {
    /* Dark Mode Variables */
    --body-bg: #1a1d21;
    --card-bg: #22262a;
    --text-color: rgba(255, 255, 255, 0.9);
    --text-muted-color: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.15);
    --navbar-bg: rgba(26, 29, 33, 0.9);
    --topbar-bg: #1a1d21;
    --hero-text-color: rgba(255, 255, 255, 0.95);
}

/* 2. Base & Typography Styles
/* ------------------------------------------------------------------- */
body {
    font-family: var(--tblr-font-sans-serif);
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    font-feature-settings: "cv03", "cv04", "cv11";
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
}

/* 3. Navigation & Header
/* ------------------------------------------------------------------- */
.top-bar {
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.datetime {
    font-size: 0.875rem;
    color: var(--text-muted-color);
}

.navbar-modern {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar {
    background-color: var(--navbar-bg) !important; /* !important to override inline styles if any */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 1rem 0;
    transition: var(--transition-base);
}

.navbar-brand img {
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

[data-bs-theme="dark"] .navbar-brand img {
    /* Smart invert for dark logos, good for monochrome logos */
    filter: brightness(0) invert(1);
}

/* Theme Toggle Button */
#theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

[data-bs-theme="light"] .hide-theme-light {
    display: none;
}

[data-bs-theme="dark"] .hide-theme-dark {
    display: none;
}

/* Language Dropdown Scroll */
.nav-item.dropdown .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.nav-item.dropdown .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-item.dropdown .dropdown-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* ====================== */
/* Hero Section - Minimal */
/* ====================== */
.hero-minimal {
    background: var(--hero-bg);
    padding: var(--section-padding) 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-minimal h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.hero-minimal .lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}


/* إصلاح شامل للعناصر المخفية */
.hero-compact,
.services-section {
    position: relative;
    z-index: 50 !important;
}

/* إصلاح النصوص */
.hero-compact *:not(.btn),
.services-section *:not(.btn) {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* إصلاح البطاقات */
.stats-card,
.service-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

/* إصلاح الوضع المظلم */
[data-bs-theme="dark"] {
    --hero-text-color: rgba(255,255,255,0.9);
    
    .hero-compact h1,
    .hero-compact h2,
    .hero-compact h3,
    .hero-compact p {
        color: var(--hero-text-color) !important;
    }
    
    .stats-card,
    .service-card {
        --card-bg: rgba(30,34,38,0.9);
        --border-color: rgba(255,255,255,0.1);
    }
}
.hero-compact {
    border: 1px solid var(--border-color);
    border-radius: 12px; /* تنعيم الحواف اختياري */
    background: var(--body-bg); /* يضمن التوافق مع الوضعين */
  
}


/* 5. Services Section & Cards
/* ------------------------------------------------------------------- */
.services-section {
    padding: var(--section-padding) 0;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: var(--card-bg);
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.card-body {
    padding: 2rem;
}

.service-card {
    overflow: hidden;
    height: 100%;
}

.service-category .category-line {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary);
}
.services-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--section-padding) 0;
    background: var(--body-bg);
}

/* 6. Buttons & Footer
/* ------------------------------------------------------------------- */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition-base);
    font-weight: 500;
}

.btn-primary {
    background: var(--primary); /* Fallback */
    background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    color: white !important; /* To override default link colors */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.footer.footer-transparent {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1.5rem 0;
    font-size: 0.875rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    transition: var(--transition-base);
}

/* 7. Responsive Design
/* ------------------------------------------------------------------- */
@media (max-width: 992px) {
    :root { --section-padding: 3rem; }
}

@media (max-width: 768px) {
    :root { --section-padding: 2.5rem; }
    .navbar-brand img { height: 35px; }
}
/* تخصيص ألوان الأزرار في الوضع الليلي */
[data-bs-theme="dark"] .btn-outline-primary {
    color: #ffffff;
    border-color: #ffffff;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #ffffff;
    color: #000000;
}

/* تخصيص ألوان روابط الأزرار في الوضع الليلي */
[data-bs-theme="dark"] .btn-link {
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-link:hover {
    color: #cccccc;
    text-decoration: underline;
}
