/* ===== 360kora | كورة 360 ===== */
:root {
  --primary: #000000;
  --bg: #eef7f2;
  --white: #ffffff;
  --black: #000000;
  --green: #16a34a;
  --green-d: #0f7a37;
  --red: #e11d2a;
  --muted: #6b7280;
  --card: #f4f6f8;
  --line: #e5e7eb;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: #111;
  font-family: "Noto Kufi Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container { width: 92%; max-width: 1100px; margin-inline: auto; }

/* ===== Header ===== */
header { position: sticky; top: 0; z-index: 50; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 72px;
  background: var(--primary);
  color: #fff;
  padding: 6px 14px;
}

#menuicon {
  background: var(--white);
  color: var(--primary);
  border: none;
  border-radius: 6px;
  width: 38px;
  height: 38px;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

#logo img { height: 54px; width: auto; }
#logo a { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1; text-decoration: none; }
#logo .logo-ar { font-family: 'Noto Kufi Arabic', Tahoma, sans-serif; font-weight: 800; font-size: 26px; color: #fff; letter-spacing: .3px; direction: rtl; unicode-bidi: isolate; white-space: nowrap; }
#logo .logo-en { font-weight: 800; font-size: 12px; letter-spacing: 4px; color: #22c55e; margin-top: 3px; direction: ltr; }
#logo h1 {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#menu { margin-inline-start: auto; }
#menu ul { display: flex; gap: 6px; list-style: none; }
#menu ul a { position: relative; text-decoration: none; color: #fff; padding: 6px 12px; font-size: 15px; }
#menu ul a::after {
  content: ""; position: absolute; right: 12px; left: 12px; bottom: 2px;
  height: 2px; background: var(--green); transform: scaleX(0); transform-origin: right;
  transition: transform .35s ease;
}
#menu ul a:hover::after { transform: scaleX(1); }

#social ul { display: flex; gap: 10px; list-style: none; }
#social a { color: #fff; font-size: 22px; transition: color .25s; }
#social a:hover { color: var(--green); }

#backmenu #phonemenu {
  position: absolute;
  inset-block-start: 0;
  width: 72%;
  max-width: 320px;
  height: 100vh;
  background: var(--primary);
  padding: 26px 14px;
  display: none;
}
#phonemenu ul { list-style: none; }
#phonemenu ul a { text-decoration: none; color: var(--primary); }
#phonemenu ul li {
  background: var(--white);
  padding: 12px 18px;
  margin-top: 14px;
  border-radius: 8px;
  font-weight: 600;
}

/* ===== Favorite / SMS banner ===== */
#sms {
  background: var(--white);
  border-radius: var(--radius);
  text-align: center;
  padding: 10px;
  margin: 14px auto;
  box-shadow: var(--shadow);
}
#sms p { font-weight: 600; }
#sms span { color: var(--green-d); font-weight: 700; }

/* ===== Section box ===== */
.section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 14px auto; }

.box-title {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  background: var(--primary); color: #fff;
  border-radius: 10px; padding: 14px 16px;
}
.box-title h2 { font-size: 19px; margin: 0; }
.box-title .toma { font-size: 13px; background: var(--green); padding: 4px 12px; border-radius: 20px; }

/* ===== Date nav ===== */
.date-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.date-tab {
  border: 1px solid var(--line); background: var(--card); color: #111;
  padding: 8px 22px; border-radius: 30px; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 600; transition: .2s;
}
.date-tab:hover { border-color: var(--green); }
.date-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== League filter ===== */
.league-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.league-btn {
  border: 1px solid var(--line); background: #fff; color: #333;
  padding: 6px 14px; border-radius: 20px; cursor: pointer; font-family: inherit;
  font-size: 13px; transition: .2s;
}
.league-btn:hover { border-color: var(--green); color: var(--green-d); }
.league-btn.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== Matches ===== */
#matches-container { display: flex; flex-direction: column; gap: 12px; }

.match-card-link { text-decoration: none; color: inherit; }

.match-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  color: #000;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.match-card-link:hover .match-card { transform: translateY(-3px); box-shadow: var(--shadow); }

.match-card::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.35); opacity: 0; transition: .3s; pointer-events: none; z-index: 1;
}
.match-card::before {
  content: "\25B6"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.5); font-size: 50px; color: #fff;
  opacity: 0; transition: .3s; pointer-events: none; z-index: 2;
  filter: drop-shadow(0 0 4px #000);
}
.match-card-link:hover .match-card::after { opacity: 1; }
.match-card-link:hover .match-card::before { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.match-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.match-team { width: 30%; text-align: center; }
.team-logo img, .logo-placeholder {
  width: 66px; height: 66px; border-radius: 50%; object-fit: cover;
  margin: 0 auto; background: #fff; border: 1px solid var(--line);
}
.logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: var(--green-d);
}
.team-name { margin-top: 8px; font-weight: 700; font-size: 14px; }

.match-center { width: 40%; text-align: center; }
.match-time { font-size: 17px; font-weight: 700; }
.match-score { font-size: 26px; font-weight: 800; display: flex; gap: 10px; justify-content: center; }
.score-sep { color: var(--muted); }
.match-league { margin-top: 6px; font-size: 12px; color: var(--muted); }

.match-status {
  display: inline-block; margin-top: 6px; padding: 3px 14px;
  border-radius: 6px; font-size: 13px; font-weight: 600; color: #fff; background: var(--muted);
}
.match-card.not-started .match-status { background: #777; }
.match-card.comming-soon .match-status { background: var(--green); }
.match-card.live .match-status { background: var(--red); animation: blink 1.3s infinite; }
.match-card.finished .match-status { background: #000; }
@keyframes blink { 50% { opacity: .55; } }

.match-info-bar {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted);
}

/* ===== Loader / empty ===== */
.matches-loading, .no-matches { text-align: center; padding: 40px 10px; color: var(--muted); }
.loading-spinner {
  width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--green);
  border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.no-matches-icon { font-size: 40px; margin-bottom: 8px; }

/* ===== Description / SEO text ===== */
.description h2 { font-size: 21px; margin-bottom: 6px; }
.description h3 { font-size: 17px; margin: 14px 0 4px; color: var(--green-d); }
.description p { margin-bottom: 8px; color: #333; }

/* ===== Articles ===== */
.articles h2 { font-size: 20px; margin-bottom: 12px; }
#article { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
#article .empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 16px; }

/* ===== Important links ===== */
.pages-section h2 { font-size: 21px; margin-bottom: 16px; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 18px; }
.page-link {
  display: block; font-size: 12.5px; text-decoration: none; color: #1f2937;
  font-weight: 500; padding: 8px 10px; border: 1px solid #000; border-radius: 8px; transition: .2s;
}
.page-link:hover { border-color: var(--green); color: var(--green-d); background: #f3fbf6; }

/* ===== Footer ===== */
footer { margin-top: auto; background: var(--primary); color: #fff; padding: 26px 14px; }
#copyrighttext { text-align: center; margin-bottom: 14px; font-size: 14px; }
#btnpage { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#btnpage a { text-decoration: none; }
#btnpage button {
  background: transparent; color: #fff; border: 1px solid #444;
  padding: 8px 18px; border-radius: 8px; cursor: pointer; font-family: inherit; transition: .2s;
}
#btnpage button:hover { background: var(--green); border-color: var(--green); }

/* ===== Telegram float ===== */
.telegram-float { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 1000; }
.telegram-icon {
  width: 58px; height: 58px; border-radius: 50%; background: #0088cc;
  display: flex; align-items: center; justify-content: center;
  animation: pulse 1.6s ease-out infinite;
}
.telegram-icon svg { fill: #fff; width: 30px; height: 30px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,136,204,.5); }
  80% { box-shadow: 0 0 0 14px rgba(0,136,204,0); }
}

/* ===== Static page container ===== */
.page-content h1 { font-size: 26px; margin-bottom: 14px; }
.page-content h2 { font-size: 19px; margin: 18px 0 6px; color: var(--green-d); }
.page-content p { margin-bottom: 10px; color: #333; }
.page-content a { color: var(--green-d); }
.contact-list { list-style: none; margin: 10px 0; }
.contact-list li { padding: 6px 0; }

/* ===== Responsive ===== */
@media (max-width: 924px) {
  #menuicon { display: flex; }
  #menu { display: none; }
}
@media (max-width: 768px) {
  .box-title { flex-direction: column; text-align: center; }
  #article { grid-template-columns: repeat(2, 1fr); }
  #logo img { height: 46px; }
  #logo .logo-ar { font-size: 22px; }
  #logo .logo-en { font-size: 11px; letter-spacing: 3px; }
  #social a { font-size: 19px; }
}
@media (max-width: 600px) {
  #sms { display: none; }
  .match-team { width: 32%; }
  .team-logo img, .logo-placeholder { width: 56px; height: 56px; }
  .team-name { font-size: 13px; }
}
@media (max-width: 500px) {
  #article { grid-template-columns: 1fr; }
  .pages-grid { grid-template-columns: 1fr; }
}
