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

:root {
    --gold:    #d4a843;
    --gold2:   #f0c050;
    --green:   #16a34a;
    --green2:  #22c55e;
    --dark:    #0a1628;
    --dark2:   #0f1f38;
    --dark3:   #152844;
    --card:    rgba(255,255,255,0.05);
    --border:  rgba(255,255,255,0.08);
    --text:    #e2e8f0;
    --muted:   #94a3b8;
    --red:     #ef4444;
    --max:     1400px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--dark);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── Top Bar ── */
.top-bar {
    background: var(--green);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    padding: 6px 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-bar span { margin: 0 8px; opacity: 0.9; }

/* ── Header ── */
.site-header {
    background: var(--dark2);
    border-bottom: 2px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 20px rgba(0,0,0,0.5);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: var(--max);
    margin: 0 auto;
    gap: 16px;
}
.site-logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 3px 12px rgba(212,168,67,0.4);
}
.logo-text strong { display: block; font-size: 1.3rem; font-weight: 900; color: var(--gold); line-height: 1.2; }
.logo-text small  { font-size: 0.72rem; color: var(--muted); font-weight: 600; }

.site-nav { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.site-nav li a {
    display: block;
    padding: 7px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.site-nav li a:hover { background: rgba(212,168,67,0.15); color: var(--gold); }

.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--gold); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(1.5)} }

/* ── Hero ── */
.hero {
    background: linear-gradient(160deg, var(--dark2) 0%, var(--dark3) 60%, rgba(212,168,67,0.08) 100%);
    border-bottom: 1px solid var(--border);
    padding: 44px 20px 36px;
    text-align: center;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(22,163,74,0.15);
    border: 1px solid rgba(22,163,74,0.35);
    color: var(--green2);
    font-size: 0.83rem; font-weight: 800;
    padding: 6px 16px; border-radius: 20px; margin-bottom: 20px;
}
.hero-badge::before { content: ''; width: 7px; height: 7px; background: var(--green2); border-radius: 50%; animation: blink 1.5s infinite; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.8rem); font-weight: 900; line-height: 1.3; margin-bottom: 16px; color: #fff; }
.hero h1 .g  { color: var(--gold); }
.hero h1 .gr { color: var(--green2); }
.hero-sub { font-size: clamp(0.9rem, 2vw, 1.1rem); color: var(--muted); max-width: 860px; margin: 0 auto 26px; line-height: 1.85; }
.hero-stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; font-weight: 900; color: var(--gold); }
.stat span   { font-size: 0.75rem; color: var(--muted); font-weight: 600; }

/* ── Day tabs (our fetch method) ── */
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.day-tab {
    flex: 1; min-width: 120px;
    background: var(--dark3);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit; font-size: 0.9rem; font-weight: 800;
    padding: 11px 14px; border-radius: 10px; cursor: pointer;
    transition: all 0.2s;
}
.day-tab:hover { border-color: var(--gold); color: var(--gold); }
.day-tab.active { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--dark); border-color: var(--gold); }

/* ── Matches section ── */
.matches-section { padding: 32px 0 24px; }
.section-hd {
    display: flex; align-items: center; gap: 12px;
    font-size: clamp(1.05rem, 3vw, 1.4rem);
    font-weight: 900; color: #fff;
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 2px solid var(--gold);
}
.section-hd .date-tag {
    margin-right: auto; font-size: 0.76rem; font-weight: 700;
    background: rgba(212,168,67,0.12); border: 1px solid rgba(212,168,67,0.3);
    color: var(--gold); padding: 4px 12px; border-radius: 6px; white-space: nowrap;
}
.matches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-bottom: 22px; }

.match-card {
    background: var(--dark3); border: 1px solid var(--border); border-radius: 14px;
    padding: 18px; position: relative;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    text-decoration: none; color: var(--text); display: block;
}
.match-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 12px 32px rgba(212,168,67,0.2); }
.match-card.finished { opacity: 0.62; }
.match-card.finished:hover { transform: translateY(-2px); border-color: var(--border); box-shadow: none; }

.league-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.league-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.league-name { font-size: 12px; font-weight: 700; color: var(--gold); }

.teams-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 12px 0; }
.team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.team-logo  { width: 52px; height: 52px; object-fit: contain; }
.team-name  { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.3; color: var(--text); }
.logo-fb { width: 52px; height: 52px; border-radius: 50%; background: var(--dark2); display:flex; align-items:center; justify-content:center; font-size: 22px; font-weight:900; color: var(--gold); }

.vs-block    { font-size: 13px; font-weight: 800; color: var(--muted); padding: 0 6px; white-space: nowrap; text-align: center; }
.score-block { font-size: 24px; font-weight: 900; color: var(--gold2); padding: 0 8px; white-space: nowrap; }
.mt-extra { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--muted); text-align:center; }
.mt-extra b { color: var(--text); font-weight: 700; }

.match-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 800; color: #fff; }
.badge-live     { background: var(--red); animation: blink-bg 2s infinite; }
.badge-upcoming { background: var(--green); }
.badge-finished { background: #475569; }
@keyframes blink-bg { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ── Loading / Error states ── */
.state-box { text-align: center; padding: 50px 20px; background: var(--dark3); border: 1px solid var(--border); border-radius: 14px; color: var(--muted); font-size: 1.05rem; }
.state-box .icon { font-size: 3rem; display: block; margin-bottom: 14px; }
.error-box { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); color: #fca5a5; }
.spinner { width: 42px; height: 42px; margin: 0 auto 16px; border: 4px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Info cards ── */
.info-section { padding: 40px 0; border-top: 1px solid var(--border); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.info-card { background: var(--dark3); border: 1px solid var(--border); border-radius: 14px; padding: 26px; transition: border-color 0.25s, transform 0.25s; }
.info-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.info-card .ic  { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.info-card h3   { font-size: 1.05rem; font-weight: 800; color: #fff; margin-bottom: 7px; }
.info-card p    { font-size: 0.9rem; color: var(--muted); line-height: 1.75; }

/* ── Articles ── */
.articles-section { padding: 40px 0; border-top: 1px solid var(--border); }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.article-card { background: var(--dark3); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.25s, transform 0.25s; display: flex; flex-direction: column; }
.article-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.article-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.article-card .ac-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card h3 { font-size: 1.02rem; font-weight: 800; color: #fff; line-height: 1.5; }
.article-card p  { font-size: 0.86rem; color: var(--muted); line-height: 1.7; flex: 1; }
.article-card .ac-more { color: var(--gold); font-weight: 800; font-size: 0.85rem; }

/* ── Features pills ── */
.feature-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill { display: flex; align-items: center; gap: 7px; background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.25); border-radius: 8px; padding: 8px 14px; font-size: 0.88rem; font-weight: 700; color: var(--green2); }

/* ── CTA ── */
.cta-banner { background: linear-gradient(135deg, var(--dark3), rgba(212,168,67,0.1)); border: 1px solid rgba(212,168,67,0.28); border-radius: 18px; padding: 44px 32px; text-align: center; margin: 40px 0; }
.cta-banner h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 900; color: #fff; margin-bottom: 12px; }
.cta-banner p  { font-size: 1rem; color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.btn-gold { display: inline-block; padding: 13px 38px; background: var(--gold); color: var(--dark); border-radius: 50px; font-size: 1rem; font-weight: 800; text-decoration: none; box-shadow: 0 6px 22px rgba(212,168,67,0.4); transition: all 0.25s; }
.btn-gold:hover { background: var(--gold2); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(212,168,67,0.55); color: var(--dark); }

/* ── Contact ── */
.contact-section { background: var(--dark3); border: 1px solid var(--border); border-radius: 14px; padding: 32px; text-align: center; margin: 0 0 32px; }
.contact-section h2 { font-size: 1.2rem; font-weight: 800; color: var(--gold); margin-bottom: 10px; }
.contact-section p  { font-size: 0.93rem; color: var(--muted); margin-bottom: 14px; }
.contact-email { display: inline-block; background: rgba(212,168,67,0.1); color: var(--gold); padding: 11px 28px; border-radius: 30px; font-size: 0.93rem; font-weight: 700; border: 1px solid rgba(212,168,67,0.3); transition: transform 0.2s, box-shadow 0.2s; }
.contact-email:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(212,168,67,0.2); color: var(--gold2); }

/* ── Tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag { background: rgba(15,31,56,1); border: 1px solid var(--border); color: var(--muted); padding: 5px 13px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

/* ── Footer ── */
.site-footer { background: var(--dark2); border-top: 2px solid var(--gold); padding: 44px 20px 24px; margin-top: 56px; }
.footer-logo  { font-size: 1.5rem; font-weight: 900; color: var(--gold); margin-bottom: 8px; font-family: 'Cairo', sans-serif; }
.footer-sub   { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.footer-links { display:flex; flex-wrap:wrap; gap: 6px 18px; margin-bottom: 18px; }
.footer-links a { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.footer-links a:hover { color: var(--gold); }
.footer-copy  { padding-top: 20px; border-top: 1px solid var(--border); text-align: center; font-size: 0.83rem; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .site-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; background: var(--dark2); flex-direction: column; padding: 14px 18px; gap: 4px; border-bottom: 2px solid var(--gold); }
    .site-nav.open { display: flex; }
    .menu-btn { display: block; }
    .hero { padding: 32px 14px 28px; }
    .hero-stats { gap: 18px; }
    .matches-grid, .info-grid, .articles-grid { grid-template-columns: 1fr; }
    .cta-banner { padding: 30px 18px; }
}
@media (max-width: 480px) {
    .header-inner  { padding: 10px 12px; }
    .logo-text strong { font-size: 1.1rem; }
    .hero h1 { font-size: 1.45rem; }
    .team-logo { width: 44px; height: 44px; }
    .team-name { font-size: 11px; }
    .score-block { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* Article page */
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin: 18px 0 6px; }
.breadcrumb a { color: var(--gold); font-weight: 700; }
.article-hero { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); margin: 14px 0 22px; box-shadow: 0 18px 50px rgba(0,0,0,0.5); }
.article-hero img { width: 100%; height: auto; display: block; }
.article-body { background: var(--dark2); border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin-bottom: 32px; }
.article-body h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 900; color: #fff; line-height: 1.4; margin-bottom: 8px; }
.article-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 20px; display:flex; gap:14px; flex-wrap:wrap; }
.article-body h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 800; color: var(--gold); margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.article-body h3 { font-size: 1.1rem; font-weight: 800; color: #fff; margin: 20px 0 8px; }
.article-body p  { color: var(--text); font-size: 1rem; line-height: 2; margin-bottom: 14px; }
.article-body ul { margin: 8px 24px 18px; color: var(--text); line-height: 2; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--gold2); }
.embed-note { background: rgba(212,168,67,0.08); border: 1px solid rgba(212,168,67,0.25); border-radius: 12px; padding: 14px 18px; color: var(--gold); font-weight: 700; font-size: 0.92rem; margin: 8px 0 20px; }
.related { display:flex; flex-wrap:wrap; gap: 10px; margin-top: 14px; }
.related a { background: var(--dark3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; font-size: 0.88rem; font-weight: 700; color: var(--text); }
.related a:hover { border-color: var(--gold); color: var(--gold); }

