/**
 * YallaScore - Extra CSS
 * Additional styling, RTL fixes, custom components
 */

/* ============================================
   RTL SPECIFIC
============================================ */
[dir="rtl"] .ticker-content { animation-direction: reverse; }
[dir="rtl"] .header-search { flex-direction: row-reverse; }
[dir="rtl"] .team-cell { flex-direction: row-reverse; }
[dir="rtl"] .match-card .match-time { margin-left: 0; margin-right: auto; }
[dir="rtl"] .news-card-body { text-align: right; }
[dir="rtl"] .social-links { flex-direction: row-reverse; }
[dir="rtl"] .breadcrumb { flex-direction: row-reverse; }
[dir="rtl"] .section-header { flex-direction: row-reverse; }
[dir="rtl"] .league-filter { flex-direction: row; }
[dir="rtl"] .footer-col ul li a:hover { padding-left: 0; padding-right: 6px; }

/* ============================================
   SINGLE MATCH PAGE
============================================ */
.single-match-page { padding: 24px 0; }
.match-tabs { margin-top: 24px; }
.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.lineup-team h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lineup-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.lineup-player:hover { background: rgba(0,200,83,0.06); }
.lineup-player .shirt-num {
  width: 24px; height: 24px;
  background: var(--darker);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lineup-player .player-name { font-size: 0.83rem; font-weight: 600; }
.lineup-player .player-role { font-size: 0.68rem; color: var(--text-muted); }
.lineup-player .events { margin-left: auto; font-size: 0.85rem; }
[dir="rtl"] .lineup-player .events { margin-left: 0; margin-right: auto; }

/* Football Pitch Visual */
.pitch-container {
  background: linear-gradient(180deg, #1a5c2e 0%, #1e6e35 50%, #1a5c2e 100%);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  min-height: 420px;
}
.pitch-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 49%, rgba(255,255,255,0.15) 49%, rgba(255,255,255,0.15) 51%, transparent 51%),
    repeating-linear-gradient(180deg, transparent, transparent 48px, rgba(255,255,255,0.05) 48px, rgba(255,255,255,0.05) 50px);
}
.pitch-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}
.player-dot {
  position: absolute;
  transform: translate(-50%, -50%);
}
.player-dot .dot-inner {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid rgba(255,255,255,0.3);
}
.player-dot .dot-inner:hover { transform: scale(1.2); }
.player-dot .player-dot-name {
  font-size: 0.6rem;
  color: #fff;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.team-home .dot-inner { background: var(--primary); color: #fff; }
.team-away .dot-inner { background: var(--accent-red); color: #fff; }

/* ============================================
   PLAYER PROFILE PAGE
============================================ */
.player-profile-hero {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 24px;
}
.player-profile-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  flex-shrink: 0;
}
.player-profile-info h1 { margin-bottom: 6px; }
.player-profile-info .player-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.player-profile-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.profile-stat { text-align: center; }
.profile-stat .val { font-size: 1.6rem; font-weight: 900; color: var(--text-primary); }
.profile-stat .lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.profile-stat .sub { font-size: 0.75rem; color: var(--text-muted); }

/* Rating Radar */
.rating-bars { display: flex; flex-direction: column; gap: 10px; }
.rating-row { display: flex; align-items: center; gap: 12px; }
.rating-label { font-size: 0.78rem; color: var(--text-muted); min-width: 100px; }
.rating-bar-wrap { flex: 1; height: 8px; background: var(--darker); border-radius: 4px; overflow: hidden; }
.rating-bar-fill { height: 100%; border-radius: 4px; background: var(--gradient-green); transition: width 1s ease; }
.rating-val { font-size: 0.82rem; font-weight: 700; min-width: 30px; }

/* ============================================
   NEWS SINGLE POST
============================================ */
.single-post-header { margin-bottom: 24px; }
.single-post-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 12px 0; }
.single-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.single-post-meta .author { display: flex; align-items: center; gap: 6px; }
.single-post-meta .author img { width: 28px; height: 28px; border-radius: 50%; }
.post-featured-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.post-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}
.post-content h2, .post-content h3, .post-content h4 { color: var(--text-primary); margin: 24px 0 12px; }
.post-content p { margin-bottom: 16px; }
.post-content a { color: var(--primary); }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  background: rgba(0,200,83,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-secondary);
}
[dir="rtl"] .post-content blockquote { border-left: none; border-right: 4px solid var(--primary); }
.post-content ul, .post-content ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}
[dir="rtl"] .post-content ul, [dir="rtl"] .post-content ol { padding-left: 0; padding-right: 24px; }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-content table th, .post-content table td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}
.post-content table th { background: rgba(0,200,83,0.08); color: var(--text-primary); }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.post-tag {
  padding: 4px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.post-tag:hover { border-color: var(--primary); color: var(--primary); }

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 32px 0;
}
.author-box img {
  width: 70px; height: 70px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  flex-shrink: 0;
  object-fit: cover;
}
.author-box h4 { font-size: 0.95rem; margin-bottom: 6px; }
.author-box p { font-size: 0.82rem; margin: 0; }

/* Related Posts */
.related-posts { margin-top: 32px; }

/* ============================================
   SEARCH RESULTS
============================================ */
.search-results-grid { display: flex; flex-direction: column; gap: 16px; }
.search-result-item {
  display: flex;
  gap: 16px;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}
.search-result-item:hover { border-color: var(--primary); }
.search-result-item img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.search-result-body h3 { font-size: 1rem; margin-bottom: 6px; }
.search-result-body h3 a { color: var(--text-primary); }
.search-result-body h3 a:hover { color: var(--primary); }
.search-result-body p { font-size: 0.82rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden; }

/* ============================================
   404 PAGE
============================================ */
.error-page {
  text-align: center;
  padding: 80px 20px;
}
.error-page .error-icon { font-size: 6rem; margin-bottom: 20px; }
.error-page h1 { font-size: 4rem; font-weight: 900; background: var(--gradient-green); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 16px; }
.error-page p { max-width: 500px; margin: 0 auto 24px; }

/* ============================================
   NOTIFICATION BANNER
============================================ */
.notification-bar {
  background: rgba(0,200,83,0.1);
  border: 1px solid rgba(0,200,83,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.notification-bar .close-btn { margin-left: auto; cursor: pointer; font-size: 1.1rem; color: var(--text-muted); }
[dir="rtl"] .notification-bar .close-btn { margin-left: 0; margin-right: auto; }

/* ============================================
   COOKIE NOTICE
============================================ */
.cookie-notice {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--secondary);
  border-top: 2px solid var(--primary);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  font-size: 0.82rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  flex-wrap: wrap;
}
.cookie-notice.show { transform: translateY(0); }
.cookie-notice p { margin: 0; color: var(--text-secondary); }
.cookie-btns { display: flex; gap: 8px; }

/* ============================================
   DARK OVERLAY (mobile menu)
============================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  display: none;
}
.nav-overlay.active { display: block; }

/* ============================================
   MATCH CARD HOVER DETAILS
============================================ */
.match-card .hover-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.match-card:hover .hover-details {
  max-height: 100px;
}
.hover-scorers {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.scorer-item { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }

/* ============================================
   COMPETITION PAGE
============================================ */
.competition-header {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.competition-logo {
  width: 90px; height: 90px;
  object-fit: contain;
  background: var(--darker);
  border-radius: var(--radius-md);
  padding: 10px;
}
.competition-info h1 { margin-bottom: 6px; }
.competition-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.competition-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   SMOOTH ANIMATIONS
============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.4s ease; }
.fade-in-up { animation: fadeInUp 0.5s ease; }

/* Apply to main sections */
.home-section { animation: fadeInUp 0.5s ease; }
.match-card { animation: fadeIn 0.3s ease; }
