/* ====== إعدادات عامة ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ألوان الفراعنة */
    --pharaoh-red: #CE1126;
    --pharaoh-white: #FFFFFF;
    --pharaoh-black: #000000;
    --pharaoh-gold: #D4AF37;
    
    /* ألوان إضافية */
    --bg-dark: #1a1a1a;
    --bg-light: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Cairo', sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== الهيدر ====== */
.main-header {
    background: linear-gradient(135deg, var(--pharaoh-black) 0%, var(--pharaoh-red) 100%);
    color: var(--pharaoh-white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--pharaoh-white);
}

.logo img {
    height: 50px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--pharaoh-gold);
}

/* القائمة */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--pharaoh-white);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--pharaoh-gold);
    color: var(--pharaoh-black);
}

/* زر القائمة للموبايل */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--pharaoh-white);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ====== المحتوى الرئيسي ====== */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--pharaoh-gold);
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Grid للبطاقات */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* بطاقة */
.card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    border: 2px solid #333;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--pharaoh-gold);
}

.card-description {
    color: #b0b0b0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* بطاقة مباراة - تصميم أفقي بسيط */
.match-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #3a3a3a;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.match-card:hover {
    border-color: var(--pharaoh-gold);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* تنسيقات قديمة للتوافق */
.match-header {
    display: flex;
    justify-content: space-between;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team {
    display: flex;
    align-items: center;
}

.team-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.team-name {
    font-weight: 600;
    color: #e0e0e0;
}

.match-score {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--pharaoh-red);
}

.match-vs {
    text-align: center;
}

/* حذف match-status لأنها inline الآن */

.match-status.upcoming {
    background: var(--pharaoh-gold);
    color: var(--pharaoh-black);
}

/* جدول الترتيب */
.standings-table {
    background: var(--pharaoh-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.standings-table table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table th {
    background: var(--pharaoh-red);
    color: var(--pharaoh-white);
    padding: 1rem;
    text-align: right;
    font-weight: 700;
}

.standings-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.standings-table tr:hover {
    background: var(--bg-light);
}

.team-logo-small {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 10px;
}

/* ====== الفوتر ====== */
.main-footer {
    background: var(--pharaoh-black);
    color: var(--pharaoh-white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--pharaoh-gold);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--pharaoh-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--pharaoh-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pharaoh-white);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--pharaoh-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: #999;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-bottom .developer a {
    color: var(--pharaoh-gold);
    font-weight: 600;
}

/* زر العودة للأعلى */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--pharaoh-red);
    color: var(--pharaoh-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top:hover {
    background: var(--pharaoh-gold);
    color: var(--pharaoh-black);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--pharaoh-black);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }
    
    .main-nav.active {
        max-height: 300px;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #333;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}