/* ============================================================
   KOORATY.COM — Global Stylesheet
   Mobile-first + Full Desktop Responsive
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --green:       #00c853;
  --green-dark:  #009624;
  --green-light: #69f0ae;
  --dark:        #080c16;
  --dark2:       #0f1623;
  --dark3:       #162030;
  --card:        #1a2840;
  --card2:       #111d2e;
  --text:        #edf2fa;
  --text-muted:  #7a8fa8;
  --accent:      #ff6b35;
  --accent2:     #ffd700;
  --live:        #ff3d3d;
  --border:      rgba(255,255,255,0.07);
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --font:        'Cairo', 'Tajawal', sans-serif;
  /* Layout */
  --sidebar-w:   240px;
  --content-max: 680px;
  --page-max:    1280px;
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}
a     { color: inherit; }
img   { display: block; max-width: 100%; }
button{ font-family: var(--font); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: rgba(0,200,83,0.3); border-radius: 3px; }

/* ============================================================
   PAGE LAYOUT  —  Mobile: single column  |  Desktop: sidebar
   ============================================================ */

/* Outer wrapper */
.page-wrapper {
  display: block;
  min-height: 100vh;
  width: 100%;
}

/* Desktop left sidebar */
.desktop-sidebar {
  display: none;
}

/* Desktop right sidebar */
.desktop-sidebar-right {
  display: none;
}

/* The phone-like shell */
.app-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--dark2);
  /* No max-width — fills available grid column */
}

/* ===== DESKTOP LAYOUT (≥900px) ===== */
@media (min-width: 900px) {

  body {
    background: var(--dark);
  }
  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse at 8%  40%, rgba(0,200,83,0.05)  0%, transparent 55%),
      radial-gradient(ellipse at 92% 15%, rgba(255,107,53,0.03) 0%, transparent 50%);
    pointer-events: none;
  }

  /* Two-column grid: sidebar + content */
  .page-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: 1fr;
    max-width: var(--page-max);
    margin: 0 auto;
    min-height: 100vh;
    align-items: start;
    width: 100%;
  }
  /* Ensure app-shell gets all remaining space */
  .app-shell {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }

  /* Left sidebar */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--dark3);
    border-left: 1px solid var(--border);
    scrollbar-width: none;
  }
  .desktop-sidebar::-webkit-scrollbar { display: none; }

  /* App shell = center column */
  .app-shell {
    min-width: 0;
    background: var(--dark2);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  /* Right sidebar hidden at 900px */
  .desktop-sidebar-right { display: none; }

  /* Hide mobile-only elements */
  .status-bar { display: none !important; }
  .menu-btn   { display: none !important; }
  .bottom-nav { display: none !important; }
  .side-menu  { display: none !important; }
  .overlay    { display: none !important; }
}

/* Wide desktop: three-column grid */
@media (min-width: 1200px) {
  .page-wrapper {
    grid-template-columns: var(--sidebar-w) 1fr 260px;
  }
  .desktop-sidebar-right {
    display: block;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    background: var(--dark3);
    border-right: 1px solid var(--border);
  }
  .desktop-sidebar-right::-webkit-scrollbar { display: none; }
}

@media (min-width: 1400px) {
  .page-wrapper {
    grid-template-columns: var(--sidebar-w) 1fr 300px;
  }
}

/* ============================================================
   DESKTOP SIDEBAR
   ============================================================ */
.ds-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,200,83,0.04);
}
.ds-nav { padding: 16px 12px; flex: 1; }
.ds-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  margin-bottom: 3px;
}
.ds-link:hover, .ds-link.active {
  background: rgba(0,200,83,0.1);
  color: var(--green);
  padding-right: 18px;
}
.ds-link i { width: 18px; text-align: center; font-size: 15px; }
.ds-divider {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 14px 6px;
  opacity: .6;
}
.ds-social {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  justify-content: center;
}
.ds-social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all .2s;
}
.ds-social a:hover { background: var(--green); color: white; transform: translateY(-2px); }

/* ============================================================
   DESKTOP RIGHT SIDEBAR
   ============================================================ */
.dsr-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.dsr-title {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  background: rgba(0,200,83,0.05);
  color: var(--green-light);
}
.dsr-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  text-decoration: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  transition: all .2s;
}
.dsr-cta:hover { background: rgba(0,200,83,0.06); }

/* ============================================================
   STATUS BAR (mobile)
   ============================================================ */
.status-bar {
  background: rgba(0,0,0,0.4);
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,22,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
}

/* Logo */
.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  font-size: 22px;
  display: inline-block;
  animation: ballspin 8s linear infinite;
}
@keyframes ballspin { to { transform: rotate(360deg); } }
.logo-text {
  font-family: 'Tajawal', sans-serif;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
}

/* Header buttons */
.menu-btn, .search-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; color: var(--text);
  transition: all .2s;
}
.menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.menu-btn:hover, .search-btn:hover {
  background: rgba(0,200,83,0.12);
  border-color: var(--green);
  color: var(--green);
}

/* Search bar */
.search-bar {
  display: none;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.search-bar.open { display: flex; animation: slideDown .2s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.search-bar input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.search-bar input:focus { border-color: var(--green); }
.search-bar button {
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Desktop header adjustments */
@media (min-width: 900px) {
  .app-header {
    background: rgba(8,12,22,0.98);
  }
  .header-inner { padding: 14px 24px; }
  .logo-text { font-size: 24px; }
  .search-btn { display: flex; }
}

/* ============================================================
   SIDE MENU (mobile only)
   ============================================================ */
.side-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--dark3);
  z-index: 1000;
  transition: right .3s cubic-bezier(.25,.46,.45,.94);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.side-menu.open { right: 0; }
.menu-header {
  padding: 22px 20px 18px;
  font-family: 'Tajawal', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,200,83,0.06);
}
.close-menu {
  margin-right: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}
.menu-nav { padding: 14px 12px; flex: 1; }
.menu-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  transition: all .2s;
  margin-bottom: 3px;
}
.menu-nav a:hover, .menu-nav a.active {
  background: rgba(0,200,83,0.1);
  color: var(--green);
  padding-right: 18px;
}
.menu-nav a i { width: 18px; text-align: center; }
.menu-social {
  padding: 16px 20px;
  display: flex; gap: 10px;
  border-top: 1px solid var(--border);
  justify-content: center;
}
.menu-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none; font-size: 15px;
  transition: all .2s;
}
.menu-social a:hover { background: var(--green); color: white; }
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  backdrop-filter: blur(3px);
}
.overlay.open { display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  padding: 14px 14px 80px;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .main-content { padding: 24px 28px 60px; }
}

/* Page title */
.page-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.page-title-bar h1 {
  font-size: 20px;
  font-weight: 900;
}
@media (min-width: 900px) {
  .page-title-bar h1 { font-size: 24px; }
}

/* ============================================================
   TAB NAVIGATION (index only)
   ============================================================ */
.tab-nav {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  background: var(--dark3);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 57px; z-index: 90;
}
.tab-btn {
  background: none; border: none;
  color: var(--text-muted);
  padding: 13px 6px 11px;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
  border-bottom: 2px solid transparent;
}
.tab-btn i { font-size: 16px; }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); background: rgba(0,200,83,0.05); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   HOME FEED SECTIONS
   ============================================================ */
.home-feed { padding: 0 14px 80px; }
@media (min-width: 900px) { .home-feed { padding: 0 24px 60px; } }

.home-section { margin-bottom: 32px; }

.section-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-bar-icon { font-size: 18px; }
.section-bar-title { font-size: 16px; font-weight: 900; flex: 1; }
@media (min-width: 900px) { .section-bar-title { font-size: 18px; } }

.section-bar-more {
  font-size: 12px; font-weight: 700;
  color: var(--green); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  transition: opacity .2s;
}
.section-bar-more:hover { opacity: .7; }

.live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800;
  color: var(--live);
  background: rgba(255,61,61,0.1);
  border: 1px solid rgba(255,61,61,0.15);
  padding: 3px 8px; border-radius: 20px;
}

.see-all-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; margin-top: 12px;
  padding: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none; font-size: 13px; font-weight: 700;
  transition: all .2s;
}
.see-all-btn:hover {
  background: rgba(0,200,83,0.07);
  border-color: rgba(0,200,83,0.2);
  color: var(--green);
}

/* ============================================================
   DAY SELECTOR (matches)
   ============================================================ */
.day-selector {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 14px;
}
.day-btn {
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 11px 14px;
  color: var(--text-muted); cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
}
.day-label { font-size: 14px; font-weight: 800; }
.day-date  { font-size: 11px; color: var(--text-muted); }
.day-btn.active {
  background: rgba(0,200,83,0.1);
  border-color: var(--green); color: var(--green);
}

/* Live indicator */
.live-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--live);
  margin-bottom: 12px; padding: 8px 12px;
  background: rgba(255,61,61,0.06);
  border: 1px solid rgba(255,61,61,0.12);
  border-radius: var(--radius-sm);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--live); border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

/* ============================================================
   MATCH CARDS
   ============================================================ */
.league-section { margin-bottom: 18px; }
.league-header {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; margin-bottom: 7px;
  background: rgba(0,200,83,0.06);
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--green);
  font-size: 13px; font-weight: 800; color: var(--green-light);
}
.league-header img { width: 20px; height: 20px; object-fit: contain; }

.match-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px;
  margin-bottom: 8px; cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden;
}
.match-card::before {
  content: ''; position: absolute;
  top: 0; right: 0; width: 3px; height: 100%;
  background: var(--green); opacity: 0; transition: opacity .2s;
}
.match-card:hover { border-color: rgba(0,200,83,0.28); transform: translateY(-1px); box-shadow: var(--shadow); }
.match-card:hover::before { opacity: 1; }
.match-card.live { border-color: rgba(255,61,61,0.25); }
.match-card.live::before { background: var(--live); opacity: 1; }

.match-teams {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
}
.team {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px; text-align: center;
}
.team-logo {
  width: 38px; height: 38px;
  object-fit: contain; border-radius: 50%;
  background: rgba(255,255,255,0.05); padding: 3px;
}
.team-logo-placeholder {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: white;
}
.team-name { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; }

.match-center { text-align: center; }
.match-score {
  font-size: 22px; font-weight: 900;
  font-family: 'Tajawal', monospace;
  letter-spacing: 2px; color: var(--accent2); line-height: 1;
}
.match-time   { font-size: 11px; color: var(--text-muted); display: block; margin-top: 4px; }
.match-status {
  font-size: 10px; padding: 2px 8px;
  border-radius: 20px; font-weight: 700;
  margin-top: 4px; display: inline-block;
}
.status-live     { background: rgba(255,61,61,0.18); color: var(--live); animation: pulse 2s infinite; }
.status-upcoming { background: rgba(0,200,83,0.12); color: var(--green); }
.status-finished { background: rgba(255,255,255,0.05); color: var(--text-muted); }

@media (min-width: 900px) {
  .match-card { padding: 16px 20px; }
  .team-logo, .team-logo-placeholder { width: 44px; height: 44px; }
  .team-name  { font-size: 13px; }
  .match-score { font-size: 26px; }
}

/* ============================================================
   CONTINENT FILTER (academies)
   ============================================================ */
.continent-filter {
  display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 16px; scrollbar-width: none;
}
.continent-filter::-webkit-scrollbar { display: none; }
.cont-btn {
  flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 14px;
  color: var(--text-muted); font-family: var(--font);
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cont-btn.active, .cont-btn:hover {
  background: rgba(0,200,83,0.12);
  border-color: var(--green); color: var(--green);
}

@media (min-width: 900px) {
  .continent-filter { flex-wrap: wrap; overflow: visible; }
  .cont-btn { font-size: 13px; padding: 8px 18px; }
}

/* ============================================================
   ACADEMY CARDS
   ============================================================ */
.academy-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 14px; transition: all .2s;
}
.academy-card:hover {
  border-color: rgba(0,200,83,0.28);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.academy-banner {
  height: 100px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--dark3), var(--card2));
  display: flex; align-items: center; justify-content: center;
}
.academy-banner img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.academy-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--card) 100%);
}
.academy-banner-emoji { font-size: 38px; z-index: 1; }
.academy-body { padding: 14px; }
.academy-top {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.academy-logo {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  object-fit: cover; background: rgba(255,255,255,0.05);
  flex-shrink: 0; border: 1.5px solid var(--border);
}
.academy-info h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.academy-location {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.academy-location i { color: var(--green); }
.academy-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  font-size: 11px; padding: 3px 10px;
  border-radius: 20px; font-weight: 600;
  background: rgba(0,200,83,0.1); color: var(--green);
  border: 1px solid rgba(0,200,83,0.2);
}
.tag.age     { background: rgba(255,107,53,0.1); color: var(--accent); border-color: rgba(255,107,53,0.2); }
.tag.continent { background: rgba(255,215,0,0.08); color: var(--accent2); border-color: rgba(255,215,0,0.18); }
.academy-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.academy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.btn-register {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border: none; border-radius: var(--radius-sm); padding: 10px;
  color: white; font-family: var(--font); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.btn-register:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,200,83,0.4); }
.btn-details {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px;
  color: var(--text-muted); font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.btn-details:hover { color: var(--text); border-color: rgba(255,255,255,0.14); }

/* Academies container — full width block */
#academiesContainer {
  width: 100%;
  display: block;
}

/* ============================================================
   NEWS — FEATURED CARD
   ============================================================ */
.news-featured-card, .news-featured {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 12px; transition: all .2s;
  cursor: pointer;
}
.news-featured-card:hover, .news-featured:hover {
  border-color: rgba(0,200,83,0.28);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.nfc-img, .news-featured-img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  background: var(--dark3);
}
.nfc-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, var(--dark3), var(--card2));
}
.nfc-body, .news-featured-body { padding: 14px 16px; }
.nfc-badge, .news-cat-badge {
  font-size: 10px; padding: 2px 9px; border-radius: 20px;
  background: rgba(255,107,53,0.15); color: var(--accent);
  font-weight: 800; display: inline-block; margin-bottom: 7px;
}
.nfc-title, .news-featured-title {
  font-size: 15px; font-weight: 800; line-height: 1.55;
  margin-bottom: 8px; color: var(--text); text-decoration: none; display: block;
}
.nfc-meta, .news-meta {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.nfc-meta i, .news-meta i { color: var(--green); }

@media (min-width: 900px) {
  .nfc-img, .news-featured-img { height: 240px; }
  .nfc-title, .news-featured-title { font-size: 18px; }
}

/* ============================================================
   NEWS — MINI LIST / GRID
   ============================================================ */
.news-mini-list { display: flex; flex-direction: column; gap: 8px; }

.news-mini-item, .news-item {
  display: flex; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px;
  text-decoration: none; color: var(--text); transition: all .2s;
  align-items: center;
  cursor: pointer;
}
.news-mini-item:hover, .news-item:hover {
  border-color: rgba(0,200,83,0.22);
  background: rgba(0,200,83,0.03);
  transform: translateX(-2px);
}
.nmi-img, .news-item-img {
  width: 76px; height: 64px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; background: var(--dark3);
}
.nmi-placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.nmi-body, .news-item-body {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
}
.nmi-title, .news-item-title {
  font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nmi-meta, .news-item-meta {
  font-size: 10px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: center; margin-top: 5px;
}
.nmi-cat {
  background: rgba(0,200,83,0.1); color: var(--green);
  padding: 1px 7px; border-radius: 10px; font-weight: 700;
}
.nmi-meta i, .news-item-meta i { color: var(--green); }

/* Desktop: news grid */
.news-grid {
  display: grid; gap: 10px;
}
@media (min-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .news-mini-list { gap: 10px; }
  .news-item, .news-mini-item { padding: 12px; }
  .nmi-img, .news-item-img { width: 90px; height: 75px; }
  .nmi-title, .news-item-title { font-size: 14px; }
}
@media (min-width: 1100px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* News filter */
.news-filter {
  display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
  margin-bottom: 14px;
}
.news-filter::-webkit-scrollbar { display: none; }
.news-cat {
  flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  color: var(--text-muted); font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.news-cat.active, .news-cat:hover {
  background: rgba(0,200,83,0.12); border-color: var(--green); color: var(--green);
}
@media (min-width: 900px) {
  .news-filter { flex-wrap: wrap; overflow: visible; }
  .news-cat { font-size: 13px; }
}

/* News header */
.news-header { margin-bottom: 16px; }
.news-title  { font-size: 18px; font-weight: 900; margin-bottom: 12px; }
@media (min-width: 900px) { .news-title { font-size: 22px; } }

/* ============================================================
   ACADEMIES MINI (homepage)
   ============================================================ */
.academies-mini-grid { display: flex; flex-direction: column; gap: 9px; }
@media (min-width: 900px) {
  .academies-mini-grid { flex-direction: row; gap: 14px; }
  .academy-mini-card   { flex: 1; }
}

.academy-mini-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  text-decoration: none; color: var(--text); transition: all .2s;
}
.academy-mini-card:hover {
  border-color: rgba(0,200,83,0.3);
  background: rgba(0,200,83,0.04); transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.amc-logo {
  width: 46px; height: 46px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  border: 1.5px solid rgba(0,200,83,0.25); overflow: hidden;
}
.amc-logo img { width: 100%; height: 100%; object-fit: cover; }
.amc-body { flex: 1; min-width: 0; }
.amc-name {
  font-size: 13px; font-weight: 800; color: var(--text);
  margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.amc-loc {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-bottom: 3px;
}
.amc-loc i { color: var(--green); font-size: 10px; }
.amc-age   { font-size: 10px; color: var(--accent); font-weight: 700; }
.amc-arrow { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* ============================================================
   AD BANNER
   ============================================================ */
.ad-banner {
  margin: 14px 0;
  min-height: 90px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.05);
  border-radius: var(--radius-sm); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted);
}

/* ============================================================
   BOTTOM NAVIGATION (mobile only)
   ============================================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(8,12,22,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4,1fr);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 9px 6px 8px;
  text-decoration: none; color: var(--text-muted);
  font-size: 10px; font-weight: 700; transition: all .2s;
  position: relative;
}
.nav-item i { font-size: 19px; transition: transform .2s; }
.nav-item.active { color: var(--green); }
.nav-item.active i { transform: scale(1.1); }
.nav-item::before {
  content: ''; position: absolute;
  top: 0; left: 18%; right: 18%; height: 2px;
  background: var(--green); border-radius: 0 0 3px 3px;
  transform: scaleX(0); transition: transform .2s;
}
.nav-item.active::before { transform: scaleX(1); }

/* ============================================================
   SECTION HERO
   ============================================================ */
.section-hero {
  text-align: center; padding: 20px 16px 14px; margin-bottom: 16px;
}
.section-hero h1 { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.section-hero p  { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
@media (min-width: 900px) {
  .section-hero h1 { font-size: 26px; }
  .section-hero p  { font-size: 15px; }
}

/* ============================================================
   EMPTY STATE / LOADER
   ============================================================ */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text-muted);
}
.empty-state .emoji { font-size: 52px; margin-bottom: 14px; display: block; }
.empty-state p { font-size: 14px; line-height: 1.8; }
.loader { display: flex; align-items: center; justify-content: center; padding: 32px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(0,200,83,0.18);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 24px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 8px;
  text-decoration: none; font-size: 13px; font-weight: 700;
  background: var(--card); color: var(--text-muted);
  border: 1px solid var(--border); transition: all .2s;
}
.pagination a:hover    { background: rgba(0,200,83,0.1); color: var(--green); border-color: var(--green); }
.pagination span.active{ background: var(--green); color: white; border-color: var(--green); }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }


/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-hero-wrap {
  width: 100%;
  max-height: 360px;
  overflow: hidden;
  background: var(--dark3);
}
.article-hero {
  width: 100%; max-height: 360px;
  object-fit: cover; display: block;
}
.article-body { padding: 18px 16px; }
.article-title {
  font-size: 20px; font-weight: 900;
  line-height: 1.55; margin: 10px 0 10px; color: var(--text);
}
.article-meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 14px; align-items: center;
  flex-wrap: wrap; margin-bottom: 16px;
}
.article-meta i { color: var(--green); }
.article-content {
  font-size: 14px; line-height: 1.9; color: #cdd6e8;
}
.article-content p  { margin-bottom: 14px; }
.article-content h2, .article-content h3 {
  font-size: 17px; font-weight: 800;
  margin: 20px 0 10px; color: var(--text);
}
.article-content img { max-width: 100%; border-radius: var(--radius); margin: 12px 0; }
.article-content a   { color: var(--green); }

/* Share row */
.share-row {
  display: flex; gap: 9px; margin-top: 22px; flex-wrap: wrap;
}
.share-btn {
  flex: 1; min-width: 90px; padding: 10px;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .2s;
}
.share-tw { background: rgba(29,161,242,.14); color:#1da1f2; border:1px solid rgba(29,161,242,.2); }
.share-wa { background: rgba(37,211,102,.14); color:#25d366; border:1px solid rgba(37,211,102,.2); }
.share-cp { background: rgba(255,255,255,.05); color:var(--text-muted); border:1px solid var(--border); }
.share-btn:hover { transform: translateY(-1px); }

/* Related section */
.related-section {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 20px;
}

@media (min-width: 900px) {
  .article-hero-wrap { max-height: 420px; }
  .article-hero      { max-height: 420px; }
  .article-body      { padding: 24px 28px; max-width: 780px; }
  .article-title     { font-size: 26px; }
  .article-content   { font-size: 15px; }
  .related-section   { padding: 24px 28px; }
}

/* ============================================================
   ACADEMY DETAIL PAGE
   ============================================================ */
.academy-detail-hero { width:100%; overflow:hidden; background:var(--dark3); }
.academy-hero-img {
  width:100%; height:200px; object-fit:cover; display:block;
}
.academy-hero-placeholder {
  height:200px; display:flex; align-items:center; justify-content:center;
  font-size:60px; background:linear-gradient(135deg,var(--dark3),var(--card2));
}
.academy-detail-profile {
  display:flex; gap:14px; align-items:flex-start;
  padding:18px 16px 14px; border-bottom:1px solid var(--border);
}
.academy-detail-logo {
  width:64px; height:64px; border-radius:var(--radius); flex-shrink:0;
  object-fit:cover; background:linear-gradient(135deg,var(--green-dark),var(--green));
  border:2px solid rgba(0,200,83,.3);
}
.academy-detail-name { font-size:18px; font-weight:900; margin-bottom:5px; }
.academy-detail-grid { padding:16px; }

/* Desktop: two-column */
@media (min-width: 900px) {
  .academy-hero-img       { height:300px; }
  .academy-hero-placeholder { height:300px; }
  .academy-detail-profile { padding:24px 28px 18px; }
  .academy-detail-logo    { width:80px; height:80px; }
  .academy-detail-name    { font-size:24px; }
  .academy-detail-grid {
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: flex-start;
  }
}
@media (min-width: 1100px) {
  .academy-detail-grid { grid-template-columns: 1fr 460px; }
}

/* Detail cards */
.detail-card {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px; margin-bottom:16px;
}
.detail-card-title {
  font-size:14px; font-weight:800; color:var(--green-light);
  margin-bottom:12px; padding-bottom:9px; border-bottom:1px solid var(--border);
}
.detail-text {
  font-size:13px; color:var(--text-muted); line-height:1.8;
}
.contact-link {
  display:flex; align-items:center; gap:9px;
  color:var(--green); text-decoration:none;
  font-size:13px; font-weight:600;
  padding:8px 0; border-bottom:1px solid var(--border);
  transition:opacity .2s;
}
.contact-link:last-child { border-bottom:none; }
.contact-link:hover { opacity:.75; }
.contact-link i { width:18px; text-align:center; }

/* Registration form inside card */
.reg-form-inner .form-group { margin-bottom:12px; }
.reg-form-inner .form-group label {
  display:block; font-size:12px; font-weight:700;
  color:var(--text-muted); margin-bottom:5px;
}
.form-row {
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
@media (max-width:500px) {
  .form-row { grid-template-columns:1fr; }
}
.form-control {
  width:100%; padding:10px 13px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  color:var(--text); font-family:var(--font);
  font-size:13px; outline:none;
  transition:border-color .2s;
}
.form-control:focus { border-color:var(--green); }
textarea.form-control { resize:vertical; min-height:80px; }
select.form-control   { cursor:pointer; }

.alert-ok  { background:rgba(0,200,83,.1); border:1px solid rgba(0,200,83,.25); color:var(--green); padding:12px 14px; border-radius:var(--radius-sm); margin-bottom:14px; font-size:13px; font-weight:700; }
.alert-err { background:rgba(255,71,87,.1); border:1px solid rgba(255,71,87,.25); color:#ff4757; padding:12px 14px; border-radius:var(--radius-sm); margin-bottom:14px; font-size:13px; font-weight:700; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
}
.error-page .error-num  { font-size:80px; font-weight:900; color:var(--green); line-height:1; }
.error-page h1          { font-size:22px; font-weight:900; margin:12px 0 8px; }
.error-page p           { font-size:14px; color:var(--text-muted); margin-bottom:24px; }


/* ===== CLICKABLE MATCH CARD ===== */
a.match-card {
  color: var(--text);
  cursor: pointer;
}
a.match-card:hover {
  border-color: rgba(0,200,83,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
a.match-card:hover::before { opacity: 1; }

.match-card-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  transition: color .2s;
}
.match-card-hint i { font-size: 11px; }
a.match-card:hover .match-card-hint {
  color: var(--green);
}


/* Mobile landscape / small tablet */
@media (min-width: 600px) {
  .academies-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
/* Desktop — sidebar takes 240px, remaining space gets 2 cols */
@media (min-width: 900px) {
  .academies-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
/* Wide desktop — 3 cols */
@media (min-width: 1200px) {
  .academies-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* Academy card fills its grid cell */
.academies-grid .academy-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.academies-grid .academy-card .academy-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.academies-grid .academy-card .academy-actions {
  margin-top: auto;
}

/* Desktop: main-content padding increase */
@media (min-width: 900px) {
  .main-content { padding: 28px 32px 60px; }
  .home-feed    { padding: 0 32px 60px; }
  .section-hero { padding: 24px 0 18px; }
  .section-hero h1 { font-size: 28px; }
}

/* ============================================================
   ACADEMIES PAGE — DESKTOP GRID FIX
   ============================================================ */
/* Force full-width content area on academies page */
.app-shell { min-width: 0; overflow-x: hidden; }

#academiesContainer {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.academies-grid {
  display: grid !important;
  width: 100% !important;
  box-sizing: border-box;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .academies-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (min-width: 900px) {
  .academies-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 18px !important; }
}

@media (min-width: 1200px) {
  .academies-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 20px !important; }
}

.academy-card {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* ===== SITE FOOTER LINKS ===== */
.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 14px 16px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
  /* Push above fixed bottom-nav on mobile (bottom-nav ~60px) */
  margin-bottom: 70px;
}
.site-footer-links a {
  color: var(--text-muted, #8899aa);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color .2s;
}
.site-footer-links a:hover { color: var(--green, #00c853); }

/* On desktop, bottom-nav is hidden so no margin needed */
@media (min-width: 769px) {
  .site-footer-links {
    margin-bottom: 4px;
  }
}
