:root {
    --primary-color: #2c5530;
    --primary-dark: #1e3a23;
    --primary-light: #3d7245;
    --secondary-color: #d4af37;
    --secondary-dark: #b8941f;
    --secondary-light: #e6c158;
    --accent-color: #8b4513;
    --light-bg: #f9f7f2;
    --dark-text: #2d2d2d;
    --light-text: #f9f7f2;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Tajawal", sans-serif;
    background: linear-gradient(135deg, #f9f7f2 0%, #f0ede4 100%);
    color: var(--dark-text);
    line-height: 1.8;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(44, 85, 48, 0.05) 0%, transparent 20%);
    z-index: -2;
    pointer-events: none;
}

/* ====== شريط تقدم الصفحة ====== */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* ====== خلفية النقاط المتحركة ====== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* ====== تحسينات عامة ====== */
.container {
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

/* ====== تخصيصات Bootstrap ====== */
.row {
    margin-left: -10px;
    margin-right: -10px;
}

.row > * {
    padding-left: 10px;
    padding-right: 10px;
}

/* ====== التنسيقات النصية ====== */
.highlight-yellow {
    color: var(--secondary-color);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding: 0 5px;
    background: linear-gradient(120deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    border-radius: 4px;
}

.highlight-primary {
    color: var(--primary-color);
    font-weight: 800;
    position: relative;
}

.highlight-primary::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--primary-dark);
    text-align: center;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: rgba(44, 85, 48, 0.2);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* ====== الهيرو سيكشن المحسن ====== */
.hero-section {
    background: linear-gradient(135deg, 
        var(--primary-dark) 0%, 
        var(--primary-color) 50%, 
        #2a4f2d 100%);
    color: white;
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: -50px;
}

.hero-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" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.03)"/></svg>'),
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 1;
    animation: floatBackground 20s ease-in-out infinite alternate;
}

@keyframes floatBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, 
        white 0%, 
        var(--secondary-light) 50%, 
        white 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShine 8s linear infinite;
    background-size: 200% auto;
}

@keyframes titleShine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-highlight {
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 2rem;
    min-height: 60px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite linear;
}

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

.typed-cursor {
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    color: var(--secondary-color);
    opacity: 1;
    animation: typedjsBlink 0.7s infinite;
}

@keyframes typedjsBlink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.hero-buttons {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====== زر CTA محسن ====== */
.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 2px solid transparent;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cta-button:hover::after {
    transform: translateX(100%);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, 
        var(--secondary-color) 0%, 
        var(--secondary-light) 100%);
    border: none;
    color: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        var(--secondary-light) 0%, 
        var(--secondary-color) 100%);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-3px) scale(1.05);
    color: var(--primary-dark);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
    backdrop-filter: blur(5px);
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.btn-outline-warning {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    backdrop-filter: blur(5px);
}

.btn-outline-warning:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

/* ====== قسم الرسالة المحسن ====== */
.message-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 4rem 3rem;
    box-shadow: var(--shadow);
    margin: 4rem auto;
    position: relative;
    overflow: hidden;
    max-width: 1000px;
    border: 1px solid rgba(44, 85, 48, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

.message-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.message-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.message-section p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    position: relative;
    padding: 0 1rem;
    text-align: center;
    z-index: 1;
}

.message-section .highlight-text {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 2rem 0;
    text-align: center;
    position: relative;
    display: inline-block;
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    border-right: 4px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ====== الإحصائيات المحسنة ====== */
.stats-section {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--primary-dark) 100%);
    padding: 6rem 0;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: floatBackground 15s ease-in-out infinite alternate;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 1rem;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem;
    height: 100%;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    line-height: 1;
    transition: transform 0.3s ease;
}

.stat-number::after {
    content: '+';
    position: absolute;
    top: 0;
    <?= ($lang == 'ar' ? 'left: -25px' : 'right: -25px') ?>;
    font-size: 2rem;
    color: rgba(212, 175, 55, 0.5);
}

.stat-label {
    font-size: 1.2rem;
    color: white;
    font-weight: 500;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stat-item:hover .stat-label {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ====== قسم العناوين المتحركة ====== */
.dynamic-title-section {
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(44, 85, 48, 0.1);
}

.dynamic-title-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" opacity="0.05"><path d="M0,0 L100,0 L100,100 Z" fill="%232c5530"/></svg>');
}

.dynamic-title {
    font-size: 1.8rem;
    text-align: center;
    color: var(--primary-color);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(5px);
}

/* ====== البطاقات المحسنة ====== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
    background: white;
    position: relative;
    border: 1px solid rgba(44, 85, 48, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(212, 175, 55, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.8rem 1.5rem;
    border-bottom: none;
    font-weight: 600;
    position: relative;
    font-size: 1.1rem;
    text-align: center;
}

.card-header i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.card:hover .card-header i {
    transform: scale(1.2) rotate(5deg);
}

.card-body {
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 2;
}

.card-footer {
    background: rgba(44, 85, 48, 0.03);
    border-top: 1px solid rgba(44, 85, 48, 0.1);
    padding: 1.5rem;
    text-align: center;
}

/* ====== قسم الميزات ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(44, 85, 48, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.1), rgba(212, 175, 55, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* ====== الأخبار المحسنة ====== */
.news-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.news-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(44, 85, 48, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    background: white;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: linear-gradient(to right, rgba(212, 175, 55, 0.05), rgba(44, 85, 48, 0.05));
    padding-<?= ($lang == 'ar' ? 'right' : 'left') ?>: 2rem;
}

.news-item:hover .news-date {
    transform: scale(1.1);
}

.news-date {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-<?= ($lang == 'ar' ? 'left' : 'right') ?>: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    transition: transform 0.3s ease;
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.news-date .month {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 5px;
}

.news-content {
    flex: 1;
}

.news-content h5 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.news-item:hover .news-content h5 {
    color: var(--secondary-color);
}

.news-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.news-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.news-item:hover i {
    transform: translateX(<?= ($lang == 'ar' ? '-5px' : '5px') ?>);
}

/* ====== فريق العمل ====== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.team-member {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.team-member:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.member-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.team-member:hover .member-image img {
    transform: scale(1.1);
}

.member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(44, 85, 48, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.team-member:hover .member-overlay {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.team-member:hover .social-links {
    opacity: 1;
    transform: translateY(0);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.member-info {
    padding: 1.5rem;
    text-align: center;
}

.member-info h4 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.member-info p {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0;
}

/* ====== زر التمرير للأعلى ====== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    <?= ($lang == 'ar' ? 'left: 30px' : 'right: 30px') ?>;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    border: 2px solid white;
    transform: scale(0.8);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-top:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

/* ====== تأثيرات دخول العناصر ====== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== موجات في الفوتر ====== */
.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.waves svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

/* ====== تذييل الصفحة ====== */
.site-footer {
    background: linear-gradient(135deg, 
        var(--primary-dark) 0%, 
        var(--primary-color) 100%);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
    margin-top: 6rem;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="white"/></svg>');
    transform: translateY(-100%);
    opacity: 0.1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.footer-section ul li:hover {
    transform: translateX(<?= ($lang == 'ar' ? '-5px' : '5px') ?>);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(<?= ($lang == 'ar' ? '-10px' : '10px') ?>);
}

.footer-section .contact-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section .contact-info i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ====== السلايدر المحسن ====== */
.slider-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    margin: 3rem 0;
}

.slider-container .swiper {
    width: 100%;
    height: 600px;
    border-radius: var(--border-radius);
}

.slider-container .swiper-slide {
    position: relative;
    overflow: hidden;
}

.slider-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.slider-container .swiper-slide:hover img {
    transform: scale(1.05);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: white;
    z-index: 2;
}

.slide-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.slide-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

/* ====== قسم الشهادات ====== */
.testimonials-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin: 1rem;
    position: relative;
    border: 1px solid rgba(44, 85, 48, 0.1);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    <?= ($lang == 'ar' ? 'right: 20px' : 'left: 20px') ?>;
    font-size: 5rem;
    color: var(--secondary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h5 {
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.author-info p {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0;
}

/* ====== تحسينات للهواتف ====== */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
        min-height: auto;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
        margin-bottom: -30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-section {
        clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
        padding: 3rem 0;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .message-section {
        padding: 2rem;
        margin: 2rem 1rem;
    }
    
    .slider-container .swiper {
        height: 400px;
    }
    
    .slide-content {
        padding: 1.5rem;
    }
    
    .slide-content h3 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .news-date {
        width: 60px;
        height: 60px;
        margin-<?= ($lang == 'ar' ? 'left' : 'right') ?>: 10px;
    }
    
    .scroll-top {
        bottom: 20px;
        <?= ($lang == 'ar' ? 'left: 20px' : 'right: 20px') ?>;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* ====== تحسينات الأداء ====== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====== تحسينات الوصول ====== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ====== تحسينات التحميل ====== */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
}

/* ====== تأثيرات خاصة ====== */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}
.slide-content {
    position: absolute;
    bottom: 20%;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}

.slide-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

html[dir="rtl"] .slide-title {
    text-align: right;
}

html[dir="ltr"] .slide-title {
    text-align: left;
}
/* تحسينات إضافية للمقالات */

/* تأثيرات الظهور للمحتوى الجديد */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* تحسينات للشبكة */
.articles-grid {
    transition: all 0.3s ease;
}

/* تأثيرات عند التمرير */
.article-card.visible {
    animation: slideUp 0.6s ease forwards;
}

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

/* تحسينات للهواتف */
@media (max-width: 768px) {
    .article-card {
        margin-bottom: 20px;
    }
    
    .sidebar-card {
        margin-bottom: 20px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-toggle {
        align-self: flex-end;
    }
}

/* تحسينات للطباعة */
@media print {
    .sidebar-card,
    .control-panel,
    .advanced-filter,
    .load-more-btn,
    .pagination,
    header,
    footer {
        display: none !important;
    }
    
    .article-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .articles-grid {
        display: block !important;
    }
}