/* ============================================================
   FOOTARAB.COM — MAIN STYLESHEET
   Warm white + football green + premium Arabic sports feel
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Tajawal:wght@300;400;500;700;900&display=swap');

/* --- CSS VARIABLES --- */
:root {
  --green:        #1a7a3c;
  --green-light:  #25a352;
  --green-dark:   #0f4f26;
  --green-glow:   rgba(26, 122, 60, 0.12);
  --gold:         #c9952a;
  --gold-light:   #f0b429;
  --red:          #d13030;
  --bg:           #f7f5f0;
  --bg-card:      #ffffff;
  --bg-soft:      #f0ede6;
  --bg-header:    #0f1f14;
  --text:         #1a1a1a;
  --text-muted:   #6b7280;
  --text-light:   #9ca3af;
  --border:       #e5e0d8;
  --border-green: rgba(26, 122, 60, 0.25);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --font-main:    'Cairo', 'Tajawal', sans-serif;
  --transition:   all 0.2s ease;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--green);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.site-logo span.accent { color: var(--gold-light); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: rgba(255,255,255,0.8);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--green);
  color: #fff;
}

.main-nav a.nav-live {
  background: var(--red);
  color: #fff;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209,48,48,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(209,48,48,0); }
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 12px;
  gap: 8px;
  min-width: 180px;
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  width: 100%;
}

.header-search input::placeholder { color: rgba(255,255,255,0.4); }
.header-search svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ============================================================
   TICKER (Breaking news scroll)
   ============================================================ */
.news-ticker {
  background: var(--green);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.ticker-label {
  background: var(--gold);
  color: #000;
  padding: 2px 16px;
  font-weight: 900;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  padding: 0 40px;
  font-size: 0.85rem;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.3);
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding: 28px 0;
}

.main-content { min-width: 0; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--green);
  border-radius: 2px;
}

.section-link {
  font-size: 0.82rem;
  color: var(--green);
  font-weight: 600;
}

.section-link:hover { text-decoration: underline; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-green);
  transform: translateY(-2px);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ============================================================
   LIVE SCORES
   ============================================================ */
.live-section { margin-bottom: 32px; }

.live-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.live-tab {
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.83rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.live-tab:hover,
.live-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.live-tab.tab-live {
  border-color: var(--red);
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-tab.tab-live.active {
  background: var(--red);
  color: #fff;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.matches-list { display: flex; flex-direction: column; gap: 10px; }

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.match-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  background: var(--bg-soft);
}

.match-card.is-live {
  border-right: 4px solid var(--red);
  background: linear-gradient(135deg, #fff8f8, #fff);
}

.match-card.is-finished {
  border-right: 4px solid var(--green);
}

.team-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-side.away {
  flex-direction: row-reverse;
  text-align: left;
}

.team-flag {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.team-flag img {
  width: 40px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.team-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.team-short {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.match-center { text-align: center; flex-shrink: 0; min-width: 90px; }

.match-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: 2px;
}

.match-score.live-score { color: var(--red); }

.match-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.match-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
  margin-top: 4px;
}

.match-league {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============================================================
   NEWS ARTICLES GRID
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-green);
}

.news-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-soft), var(--border));
}

.news-card-img-placeholder {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, #1a7a3c15, #1a7a3c08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.news-card-body { padding: 14px 16px; }

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--green-glow);
  color: var(--green);
  margin-bottom: 8px;
}

.news-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.news-card-meta span { display: flex; align-items: center; gap: 3px; }

/* Hero news card (big one) */
.news-card.hero {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.news-card.hero .news-card-img {
  height: 100%;
  min-height: 240px;
}

.news-card.hero .news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-card.hero .news-card-title {
  font-size: 1.2rem;
  -webkit-line-clamp: 3;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-card-header {
  padding: 14px 18px;
  background: var(--bg-header);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* WC2026 Countdown */
.wc-countdown {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
}

.wc-flag { font-size: 3rem; margin-bottom: 8px; }

.wc-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.wc-subtitle {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-bottom: 16px;
}

.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.countdown-box {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 56px;
  backdrop-filter: blur(4px);
}

.countdown-num {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.countdown-label {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Standings table */
.standings-table { width: 100%; border-collapse: collapse; }

.standings-table th {
  background: var(--bg-soft);
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.standings-table th:first-child { text-align: right; }

.standings-table td {
  padding: 10px 12px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.standings-table td:first-child { text-align: right; }

.standings-table tr:last-child td { border-bottom: none; }

.standings-table tr:hover td { background: var(--bg-soft); }

.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.rank-badge {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--bg-soft);
  color: var(--text-muted);
  flex-shrink: 0;
}

.rank-badge.top3 { background: var(--green); color: #fff; }
.rank-badge.top1 { background: var(--gold); color: #000; }

/* Top players sidebar */
.player-list { padding: 4px 0; }

.player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.player-item:last-child { border-bottom: none; }
.player-item:hover { background: var(--bg-soft); }

.player-rank {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
}

.player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.player-info { flex: 1; min-width: 0; }

.player-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.player-flag { font-size: 1.1rem; flex-shrink: 0; }

/* AdSense slots */
.ad-slot {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ad-slot-banner { width: 100%; height: 90px; margin: 20px 0; }
.ad-slot-sidebar { width: 100%; height: 250px; }
.ad-slot-in-article { width: 100%; height: 120px; margin: 24px 0; }

/* ============================================================
   WC2026 SECTION
   ============================================================ */
.wc-section {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.wc-section::after {
  content: '⚽';
  position: absolute;
  font-size: 8rem;
  opacity: 0.05;
  left: -20px;
  bottom: -20px;
  transform: rotate(-15deg);
}

.wc-teams-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.wc-team-card {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
}

.wc-team-card:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}

.wc-team-flag { font-size: 2.2rem; margin-bottom: 6px; }
.wc-team-name { font-size: 0.78rem; font-weight: 700; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-header);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .site-logo { margin-bottom: 12px; }

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold-light); padding-right: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,122,60,0.3);
}

.btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,122,60,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn-outline:hover { background: var(--green); color: #fff; }

/* Load more */
.load-more-wrap { text-align: center; margin: 24px 0; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-green  { background: var(--green-glow); color: var(--green); }
.badge-gold   { background: rgba(201,149,42,0.12); color: var(--gold); }
.badge-red    { background: rgba(209,48,48,0.1); color: var(--red); }
.badge-gray   { background: var(--bg-soft); color: var(--text-muted); }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 40px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card.hero { grid-column: span 2; }
  .wc-teams-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .header-search { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.hero {
    grid-column: span 1;
    display: block;
  }
  .news-card.hero .news-card-img { height: 200px; min-height: auto; }
  .sidebar { grid-template-columns: 1fr; }
  .wc-teams-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .match-card { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 12px; }
  .team-name { font-size: 0.82rem; }
  .match-score { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .site-logo { font-size: 1.3rem; }
  .wc-teams-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}

.article-header { margin-bottom: 24px; }

.article-title {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.article-body {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
}

.article-body p { margin-bottom: 18px; }

.article-body h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 28px 0 14px;
  color: var(--green-dark);
}

/* ============================================================
   LIVE PAGE SPECIFIC
   ============================================================ */
.live-header-banner {
  background: linear-gradient(135deg, #0f1f14, #1a7a3c);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #fff;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-title {
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-info {
  font-size: 0.8rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.hidden { display: none; }
