/* ===============================
   Basketball Site - Main Styles
   =============================== */

:root {
  --primary: #f97316;        /* Orange */
  --primary-dark: #ea580c;
  --secondary: #1a2744;      /* روشن‌تر از قبل */
  --secondary-light: #243556;
  --accent: #fbbf24;         /* Gold */
  --text: #f8fafc;
  --text-muted: #a8b8d0;
  --card-bg: #243556;
  --border: #3d4f6f;
  --success: #22c55e;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #1a2744 0%, #2a4a7a 45%, #2a4a7a 100%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  background: var(--secondary);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
}

/* فونت فانتزی جومهریا برای تیترها و عنوان‌ها */
h1, h2, h3,
.logo,
.section-title h2,
.page-hero h1,
.slide-content h1,
.player-card h3,
.card-body h3,
.footer-col h4,
.news-item-content h4 {
  font-family: 'Jomhuria', cursive;
  letter-spacing: 0.5px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER & NAV ========== */
.header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo i {
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: rgba(249, 115, 22, 0.1);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 14px;
  left: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ========== HERO SLIDER ========== */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--gradient);
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.7) 60%, rgba(15, 23, 42, 0.4) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 20px;
}

.slide-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.slide-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

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

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

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ========== SECTION STYLES ========== */
.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 20px auto 0;
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.card-img {
  height: 180px;
  background-color: #1a2744;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
  position: relative;
  overflow: hidden;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55), transparent 70%);
  pointer-events: none;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

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

.card-meta i {
  color: var(--primary);
}

/* ========== NEWS SECTION ========== */
.news-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
}

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

.news-main .card-img {
  height: 280px;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.news-item:hover {
  border-color: var(--primary);
  transform: translateX(-4px);
}

.news-item-img {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2a4a7a, #1a2744);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.news-item-content h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.news-item-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== PLAYERS SECTION ========== */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.player-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  text-align: center;
  padding: 30px 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.player-card:hover::before {
  transform: scaleX(1);
}

.player-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.player-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  border: 4px solid var(--secondary-light);
}

.player-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.player-card .position {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.player-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== TABLE ========== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
}

th, td {
  padding: 16px 20px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--secondary-light);
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

td {
  color: #ffffff;
  font-weight: 500;
}

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

tr:hover td {
  background: rgba(249, 115, 22, 0.08);
  color: #fff;
}

/* جدول داخل بخش روشن هم خوانا بماند */
.section-light table td {
  color: #ffffff !important;
}
.section-light table th {
  color: var(--primary) !important;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-upcoming {
  background: rgba(249, 115, 22, 0.15);
  color: var(--primary);
}

.hot-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}

/* ========== PAGE HERO ========== */
.page-hero {
  background: var(--gradient);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '🏀';
  position: absolute;
  font-size: 20rem;
  opacity: 0.03;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* ========== CONTENT PAGES ========== */
.content-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
}

.content-box h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-box h3 {
  font-size: 1.25rem;
  margin: 28px 0 12px;
  color: var(--accent);
}

.content-box p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.content-box ul, .content-box ol {
  margin: 16px 0 16px 20px;
  color: var(--text-muted);
}

.content-box li {
  margin-bottom: 8px;
  position: relative;
  padding-right: 18px;
}

.content-box ul li::before {
  content: '●';
  color: var(--primary);
  position: absolute;
  right: 0;
  font-size: 0.6rem;
  top: 6px;
}

/* ========== GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #2a4a7a, #1a2744);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  position: relative;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.gallery-item span {
  position: absolute;
  bottom: 12px;
  right: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  padding: 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover span {
  opacity: 1;
}

/* ========== CONTACT FORM ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 4px;
}

.info-item h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.info-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--card-bg);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ========== FOOTER ========== */
.footer {
  background: #152238;
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

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

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: var(--primary);
  padding-right: 6px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--secondary);
    flex-direction: column;
    align-items: stretch;
    padding: 30px 20px;
    gap: 4px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .slide-content h1 {
    font-size: 2.1rem;
  }

  .hero {
    height: 420px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: 1.9rem;
  }

  .section-title h2 {
    font-size: 1.7rem;
  }

  .content-box {
    padding: 24px;
  }

  .slide-content h1 {
    font-size: 1.7rem;
  }
}

/* Utility */
.text-primary { color: var(--primary); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }

/* ========== WHITE ACCENTS ========== */
.section-light {
  background: #f1f5f9 !important;
  color: #1e293b;
}
.section-light .section-title h2 { color: #0f172a; }
.section-light .section-title p,
.section-light .card-body p,
.section-light .text-muted { color: #475569 !important; }
.section-light .card {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
}
.section-light .card-body h3 { color: #0f172a; }
.section-light .card:hover { border-color: var(--primary); }

.white-box {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}
.white-box h2, .white-box h3 { color: #0f172a; }
.white-box p, .white-box li { color: #334155; }

/* ========== SLIDER ARROWS ========== */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #0f172a;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.slider-arrow:hover {
  background: var(--primary);
  color: #fff;
}
.slider-arrow.prev { right: 20px; }
.slider-arrow.next { left: 20px; }

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: #fff;
  text-align: center;
  max-width: 700px;
  margin-top: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
}
.lightbox-caption h3 {
  font-family: 'Jomhuria', cursive;
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--primary);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10000;
}
.lightbox-close:hover { background: var(--primary); color: #fff; }

/* Gallery clickable */
.gallery-item { cursor: pointer; }
.gallery-section-title {
  font-size: 1.6rem;
  margin: 40px 0 20px;
  color: var(--primary);
  text-align: center;
}

/* Equipment grid denser */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.equip-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}
.equip-item:hover { transform: scale(1.04); border-color: var(--primary); }
.equip-item span {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(15,23,42,0.85);
  color: #fff;
  font-size: 0.7rem;
  padding: 6px 4px;
  text-align: center;
}

/* Content richer */
.content-box p { line-height: 1.85; }
.content-box .detail-list li { margin-bottom: 12px; }

@media (max-width: 576px) {
  .slider-arrow { width: 40px; height: 40px; font-size: 1rem; }
  .slider-arrow.prev { right: 10px; }
  .slider-arrow.next { left: 10px; }
}
