/* تحميل خطوط احترافية للمواقع الحكومية */
@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;600;700;800&family=Cairo:wght@200;300;400;500;600;700;800&display=swap");

/* نظام الألوان الحكومي المتطور */
:root {
    --default-font: "Cairo", "Tajawal", serif;

    /* الألوان الحكومية الرسمية */
    --government-primary: #0d47a1;
    --government-secondary: #1565c0;
    --government-accent: #1976d2;
    --government-light: #e3f2fd;
    --government-dark: #0a3472;
    --government-gold: #ffd700;
    --government-silver: #c0c0c0;

    /* تدرجات احترافية */
    --gradient-primary: linear-gradient(135deg, #052e6a 0%, #042d5b 50%, #042b53 100%);
    --gradient-hero: linear-gradient(135deg, #062554 0%, #062d67 25%, #103662 75%, #0a2d4f 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    --gradient-overlay: linear-gradient(45deg, rgba(13, 71, 161, 0.95), rgba(21, 101, 192, 0.85));

    /* الظلال الاحترافية */
    --shadow-light: 0 2px 10px rgba(13, 71, 161, 0.08);
    --shadow-medium: 0 4px 20px rgba(13, 71, 161, 0.12);
    --shadow-heavy: 0 8px 30px rgba(13, 71, 161, 0.16);
    --shadow-dramatic: 0 12px 40px rgba(13, 71, 161, 0.20);

    /* المقاسات المعيارية */
    --border-radius: 12px;
    --border-radius-large: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* التصميم الأساسي للصفحة */
body {
    font-family: var(--default-font);
    background:
        radial-gradient(circle at 20% 80%, rgba(13, 71, 161, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(25, 118, 210, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 25%, #e8f4fd 75%, #ffffff 100%);
    min-height: 100vh;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* تحسين الطباعة */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--default-font);
    font-weight: 700;
    line-height: 1.3;
    color: var(--government-dark);
}

h1 {
    font-size: clamp(1rem, 2vw, 0.5rem) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* تحسين النصوص العامة */
p {
    line-height: 1.7;
    font-weight: 400;
}

/* رأس الصفحة الحكومي المتطور */
.government-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-heavy);
    border-bottom: 3px solid var(--government-gold);
    position: relative;
    overflow: hidden;
}

.government-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.05) 50%, transparent 52%);
    pointer-events: none;
}

.government-header .container {
    position: relative;
    z-index: 2;
}

/* القسم الرئيسي المتطور */
.hero-section {
    background: var(--gradient-hero);
    color: white;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* تأثيرات بصرية متقدمة */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="hexagons" width="60" height="60" patternUnits="userSpaceOnUse"><polygon points="30,5 50,20 50,40 30,55 10,40 10,20" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="200" height="200" fill="url(%23hexagons)"/></svg>');
    animation: subtleFloat 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.02) 50%, transparent 52%);
    animation: slowSweep 25s linear infinite;
}

/* حركات متقدمة */
@keyframes subtleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes slowSweep {
    0% { transform: translateX(-120%) rotate(45deg); }
    100% { transform: translateX(120%) rotate(45deg); }
}

/* بطاقات الإحصائيات المتطورة */
.stats-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    border: 2px solid rgba(13, 71, 161, 0.08);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 71, 161, 0.05), transparent);
    transition: left 0.6s ease;
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-dramatic);
    border-color: var(--government-accent);
}

.stats-card:hover::before {
    left: 100%;
}

.stats-card .display-6 {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.stats-card:hover .display-6 {
    transform: scale(1.1);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* أزرار حكومية متطورة */
.btn-government {
    background: var(--gradient-primary);
    border: 2px solid transparent;
    color: white;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.btn-government::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-government:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-dramatic);
    color: white;
    border-color: var(--government-gold);
}

.btn-government:hover::before {
    left: 100%;
}

.btn-government:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

/* زر ثانوي محسن */
.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: white;
    color: var(--government-primary);
    border-color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* حاوي الشعار المتطور */
.logo-container {
    width: 280px;
    height: 280px;
    background:
        radial-gradient(circle at center, white 0%, #f8fbff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        var(--shadow-dramatic),
        inset 0 2px 10px rgba(255, 255, 255, 0.8),
        0 0 0 3px rgba(255, 215, 0, 0.3);
    margin: 0 auto 2rem;
    position: relative;
    transition: var(--transition-smooth);
    animation: gentleGlow 3s ease-in-out infinite alternate;
}

.logo-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(from 0deg, var(--government-primary), var(--government-accent), var(--government-gold), var(--government-primary));
    border-radius: 50%;
    z-index: -1;
    animation: rotate 20s linear infinite;
}

.logo-container:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow:
        var(--shadow-dramatic),
        inset 0 2px 15px rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(255, 215, 0, 0.5);
}

.logo-container img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition-smooth);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.logo-container:hover img {
    transform: scale(1.02);
}

@keyframes gentleGlow {
    0% { box-shadow: var(--shadow-dramatic), inset 0 2px 10px rgba(255, 255, 255, 0.8), 0 0 0 3px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: var(--shadow-dramatic), inset 0 2px 15px rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(255, 215, 0, 0.5); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(13, 71, 161, 0.15);
    border: 1px solid rgba(13, 71, 161, 0.1);
    overflow: hidden;
    max-width: 900px;
    margin: 2rem auto;
}

.login-form-section {
    padding: 3rem;
    background: linear-gradient(135deg, white 0%, #f8fbff 100%);
}

.login-info-section {
    background: linear-gradient(
        135deg,
        var(--government-primary) 0%,
        var(--government-secondary) 50%,
        var(--government-accent) 100%
    );
    color: white;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-info-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--government-accent);
    box-shadow: 0 0 0 0.2rem rgba(66, 165, 245, 0.25);
}



.form-label {
    font-weight: 600;
    color: var(--government-dark);
    margin-bottom: 8px;
}

.logo-container {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
    margin: 0 auto 2rem;
}

.logo-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-top: 5px;
}

.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease-out;
}

@media (max-width: 768px) {
    .login-form-section,
    .login-info-section {
        padding: 2rem;
    }

    .login-container {
        margin: 1rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-delay-1 {
    animation-delay: 0.2s;
}
.animate-delay-2 {
    animation-delay: 0.4s;
}
.animate-delay-3 {
    animation-delay: 0.6s;
}

/* تذييل الصفحة المتطور */
.footer-section {
   background: linear-gradient(135deg, var(--government-dark) 0%, #061c3d 50%, #052140 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--government-gold) 0%, var(--government-silver) 50%, var(--government-gold) 100%);
}

.footer-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.footer-section .container {
    position: relative;
    z-index: 2;
}

/* تأثيرات الحركة المتقدمة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* فئات الحركة */
.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-left {
    animation: slideInFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-right {
    animation: slideInFromRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-scale {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* تأخيرات الحركة */
.animate-delay-1 { animation-delay: 0.2s; }
.animate-delay-2 { animation-delay: 0.4s; }
.animate-delay-3 { animation-delay: 0.6s; }
.animate-delay-4 { animation-delay: 0.8s; }

/* تحسينات إضافية للواجهة */
.government-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.text-highlight {
    font-weight: 700;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(13, 71, 161, 0.1);
}

/* فئات مساعدة إضافية */
.min-vh-75 {
    min-height: 75vh;
}

.text-government-dark {
    color: var(--government-dark) !important;
}

/* تحسين التمرير السلس */
html {
    scroll-behavior: smooth;
}

/* تأثيرات تحميل الصفحة */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* تحسينات للشاشات المختلفة */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 2rem 0;
    }

    .logo-container {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;
    }

    .logo-container img {
        width: 180px;
        height: 180px;
    }

    h1 {
        font-size: 0.6rem !important;
        line-height: 1.4;
        margin-bottom: 2rem;
    }

    .stats-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .btn-government,
    .btn-outline-light {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 1rem;
    }

    .government-header {
        padding: 1rem 0;
    }

    .footer-section {
        padding: 3rem 0 2rem;
        margin-top: 4rem;
    }
}

@media (min-width: 1200px) {
    .hero-section {
        min-height: 700px;
    }

    .container {
        max-width: 1200px;
    }
}

/* تأثيرات التفاعل المتقدمة */
.interactive-hover {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.interactive-hover:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}
