/*
Theme Name: قالب رياضي - Sports Theme
Theme URI: https://example.com
Author: Sports Theme Developer
Author URI: https://example.com
Description: قالب ووردبريس رياضي احترافي لعرض المباريات والأخبار الرياضية مع جدول مباريات ديناميكي ووضع ليلي
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sports-theme
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.2
*/

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

:root {
  /* Sports theme colors - Orange/Bronze primary */
  --primary: #ff8800;
  --primary-light: #ffb366;
  --primary-dark: #cc6600;
  --background: #f5f5f5;
  --foreground: #222222;
  --card: #ffffff;
  --border: #e0e4ea;
  --muted: #888888;
  --success: #28a745;
  --danger: #dc3545;
}

.dark {
  --background: #1c2733;
  --foreground: #f2f2f2;
  --card: #263545;
  --border: #2b3b4d;
  --muted: #9d9fa4;
}

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

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

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.header-logo:hover {
  opacity: 0.8;
}

.header-logo img {
  height: 2.5rem;
  width: 2.5rem;
  object-fit: contain;
}

.header-logo span {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
}

/* Navigation */
nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

@media (max-width: 768px) {
  nav {
    display: none;
  }
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--border);
  color: var(--foreground);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.theme-toggle:hover {
  color: var(--primary);
}

/* Main Content */
main {
  flex: 1;
}

/* Matches Section */
.matches-section {
  padding: 2rem 0;
}

.timezone-info {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
}

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

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Match Cards Grid */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Match Card */
.match-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

.match-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.match-team img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.match-team-name {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
}

.match-score-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.match-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.match-status.live {
  background-color: #dc3545;
  color: white;
  animation: pulse 1s infinite;
}

.match-status.upcoming {
  background-color: #28a745;
  color: white;
}

.match-status.finished {
  background-color: #6c757d;
  color: white;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.match-info {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  font-size: 0.875rem;
}

.match-info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

/* News Section */
.news-section {
  padding: 2rem 0;
  background-color: rgba(0, 0, 0, 0.02);
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.news-title {
  font-size: 1.5rem;
  font-weight: bold;
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* News Card */
.news-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.news-card-image {
  position: relative;
  width: 100%;
  height: 12rem;
  overflow: hidden;
  background-color: var(--border);
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.news-card-content {
  padding: 1rem;
}

.news-card-title {
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
footer {
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .matches-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .match-teams {
    gap: 0.5rem;
  }

  .match-score {
    padding: 0 0.5rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.py-12 {
  padding: 3rem 0;
}

.text-muted {
  color: var(--muted);
}

.loading {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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