/* ══════════════════════════════════════════════════════════════
   منصة إحصائيات الحدود الشمالية - الأنماط المخصصة
   Northern Borders Statistics Platform - Custom Styles
   ══════════════════════════════════════════════════════════════ */

/* ── المتغيرات ── */
:root {
    --saudi-green: #006C35;
    --saudi-green-light: #00A651;
    --saudi-gold: #FFD700;
    --dark-900: #0F172A;
    --dark-800: #1E293B;
    --dark-700: #334155;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ── الأنماط الأساسية ── */
body {
    background: linear-gradient(135deg, #0F172A 0%, #1a1f3a 50%, #0F172A 100%);
    scrollbar-width: thin;
    scrollbar-color: var(--saudi-green) transparent;
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-thumb {
    background: var(--saudi-green);
    border-radius: 4px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

/* ── نمط الخلفية ── */
.bg-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 108, 53, 0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFD700' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── عنوان القسم ── */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

/* ── بطاقة الإحصائية ── */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--saudi-green), var(--saudi-gold));
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ── بطاقة المحافظة ── */
.gov-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gov-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--accent, var(--saudi-green));
}

.gov-card-header {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gov-card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10%, 10%); }
}

.gov-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gov-card-body {
    padding: 1rem 1.25rem;
}

.gov-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

.gov-stat:last-child {
    border-bottom: none;
}

/* ── بطاقة الرسم البياني ── */
.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.chart-card:hover {
    border-color: rgba(255, 215, 0, 0.2);
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    direction: ltr;
}

/* ── بطاقة المشروع ── */
.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 215, 0, 0.03) 100%);
    pointer-events: none;
}

.project-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ── شريط التقدم ── */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--saudi-green), var(--saudi-gold));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── تأثير الجدول ── */
.table-row-hover {
    transition: background 0.2s ease;
}

.table-row-hover:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ── حركات متنوعة ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
}

/* ── التجاوب ── */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .chart-wrapper {
        height: 250px;
    }
}

/* ── طباعة ── */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .stat-card, .gov-card, .chart-card, .project-card {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
}
