/****************************************
 * Author => Cheribet Cherif Chouaib
 * Enhanced Design for Algeria Cultural Website
 * Version 2.0 - Modern & Beautiful
 ********************************************/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');
@import "animation.css";
@import "variables.css";

/* ========== إعدادات عامة ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2e7d32;
    --light-green: #4caf50;
    --accent-green: #8bc34a;
    --gold: #ffd700;
    --red-accent: #d32f2f;
    --dark-bg: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-bg));
    position: relative;
    direction: rtl;
}

/* خلفية الجسيمات المتحركة */
#particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ========== الحاوي الرئيسي ========== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ========== Header محسن ========== */
#header {
    height: 100vh;
    background: linear-gradient(135deg, 
        rgba(46, 125, 50, 0.9) 0%, 
        rgba(139, 195, 74, 0.8) 50%, 
        rgba(76, 175, 80, 0.9) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

#header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(images/flag.png) center/cover no-repeat;
    opacity: 0.15;
    z-index: -1;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.3));
    z-index: 1;
}

/* شريط التنقل العلوي */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    z-index: 10;
    position: relative;
}

.social-links #sign {
    font-size: 24px;
    color: white;
    text-shadow: var(--text-shadow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.current-date {
    color: var(--gold);
    font-weight: 600;
    text-shadow: var(--text-shadow);
    font-size: 1.1rem;
}

/* محتوى البطل */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    position: relative;
}

.logo-container {
    position: relative;
    margin-bottom: 30px;
}

#logo {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: white;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        2px 2px 4px rgba(0,0,0,0.8);
    margin: 0;
    letter-spacing: 2px;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.5),
            0 0 40px rgba(255, 215, 0, 0.3),
            2px 2px 4px rgba(0,0,0,0.8);
    }
    to {
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.5),
            2px 2px 4px rgba(0,0,0,0.8);
    }
}

.logo-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none;
}

.star {
    position: absolute;
    color: var(--gold);
    font-size: 2rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

.star-1 {
    top: -20px;
    right: -20px;
    animation-delay: 0s;
}

.star-2 {
    bottom: -20px;
    left: -20px;
    animation-delay: 0.7s;
}

.star-3 {
    top: 50%;
    right: -40px;
    animation-delay: 1.4s;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.hero-subtitle {
    margin-bottom: 40px;
}

.hero-subtitle p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: var(--text-shadow);
    letter-spacing: 1px;
}

/* مؤشر التمرير */
.header-bottom {
    padding: 30px;
    z-index: 10;
    position: relative;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(-5px);
}

.scroll-indicator span {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.scroll-arrow {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

#copyrights {
    position: absolute;
    bottom: 10px;
    left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    z-index: 10;
}

/* ========== المحتوى الرئيسي ========== */
.main-content {
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(46, 125, 50, 0.1) 100%);
    padding: 60px 0;
    position: relative;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* قسم النص التفاعلي */
.text-section {
    margin-bottom: 80px;
    text-align: center;
}

#text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--accent-green);
    text-shadow: var(--text-shadow);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* قسم التنقل */
.navigation-section {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: var(--text-shadow);
}

.title-decoration {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--accent-green));
    margin: 0 auto;
    border-radius: 2px;
}

/* شبكة التنقل */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.nav-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

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

.nav-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-green);
}

.card-icon {
    font-size: 3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(139, 195, 74, 0.5));
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--gold);
}

.card-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--accent-green);
    transition: transform 0.3s ease;
}

.nav-card:hover .card-arrow {
    transform: translateX(-10px);
}

/* تخصيص ألوان البطاقات */
.history-card:hover {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.2), var(--glass-bg));
}

.heroes-card:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), var(--glass-bg));
}

.ilyadha-card:hover {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.2), var(--glass-bg));
}

/* قسم الإحصائيات */
.stats-section {
    margin-top: 60px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 195, 74, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: var(--text-shadow);
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ========== استجابة للشاشات المختلفة ========== */
@media screen and (max-width: 768px) {
    .top-nav {
        padding: 15px 20px;
    }
    
    .hero-subtitle p {
        font-size: 1.1rem;
    }
    
    .content-wrapper {
        padding: 0 20px;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-card {
        padding: 25px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .card-content h3 {
        font-size: 1.3rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .content-wrapper {
        padding: 0 15px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .nav-card {
        padding: 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* ========== تحسينات إضافية ========== */
::selection {
    background: var(--accent-green);
    color: white;
}

/* تأثير التمرير السلس */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}
