:root {
  --primary-color: #12492F;
  --secondary-color: #1a6343;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --bg-light: #f5f5f5;
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-circle:hover {
  transform: rotate(360deg) scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-name {
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: relative;
}

.mobile-menu-btn span {
  width: 28px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.section {
  display: none;
  animation: fadeIn 0.5s ease;
  scroll-margin-top: 100px; /* altura del header */
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Hero Section */ 
.hero { 
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); color: var(--text-light); 
  padding: 3rem 2rem;
  border-radius: 12px; 
  margin-bottom: 2rem; 
  box-shadow: 0 4px 20px var(--shadow); 
} 

.hero-content { 
  text-align: center; 
} 

.hero-title { 
  font-size: 2.5rem; 
  margin-bottom: 1rem; 
  font-weight: bold; 
  animation: slideInFromLeft 0.8s ease forwards; 
} 
  
.hero-subtitle { 
  font-size: 1.2rem; 
  margin-bottom: 2rem; 
  opacity: 0.9; 
  animation: slideInFromRight 0.8s ease forwards; 
} 
  
.hero-stats { 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
  gap: 1.5rem; 
  max-width: 600px;
  margin: 0 auto; 
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  animation: scaleIn 0.5s ease forwards;
  transition: all 0.3s ease;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.stat-card:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.stat-card:nth-child(3) { animation-delay: 0.3s; opacity: 0; }

.stat-card:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Titles */
.page-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: bold;
  animation: slideInFromLeft 0.6s ease forwards;
  position: relative;
  padding-bottom: 0.5rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 2px;
  animation: slideInFromLeft 0.8s ease forwards;
}

.section-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  animation: fadeIn 0.6s ease forwards;
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  animation: fadeIn 0.5s ease forwards;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
}

.tab-btn::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.tab-btn:hover::before {
  width: 50%;
}

.tab-btn.active {
  color: var(--primary-color);
  font-weight: 600;
}

.tab-btn.active::before {
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Stats Tabs */
.stats-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.stats-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
}

.stats-tab-btn::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-tab-btn:hover {
  color: var(--secondary-color);
  transform: translateY(-1px);
}

.stats-tab-btn:hover::before {
  width: 50%;
}

.stats-tab-btn.active {
  color: var(--primary-color);
  font-weight: 600;
}

.stats-tab-btn.active::before {
  width: 100%;
}

/* Jornada Selector */
.jornada-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  justify-content: flex-start;
}

.jornada-selector::-webkit-scrollbar {
  height: 6px;
}

.jornada-selector::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.jornada-selector::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.jornada-selector::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.jornada-btn {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border: 2px solid var(--border-color);
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 45px;
  text-align: center;
  flex-shrink: 0;
}

.jornada-btn:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(18, 73, 47, 0.3);
}

.jornada-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(18, 73, 47, 0.4);
  font-weight: 700;
}

/* Match Cards */
.match-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 1rem;
  animation: slideInFromLeft 0.5s ease forwards;
  transition: all 0.3s ease;
}

.match-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px var(--shadow);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.match-date {
  font-size: 0.9rem;
  color: #666;
}

.match-status {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.match-status.finalizado {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.match-status.proximo {
  background-color: #e3f2fd;
  color: #1565c0;
}

.match-teams {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 1rem;
}

.team-clasificacion{
  text-align: left !important;
}


.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.team-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name-match {
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
}

.score {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 80px;
  text-align: center;
}

.score-separator {
  color: #999;
  margin: 0 0.5rem;
}

.match-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.match-details-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.match-details-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.match-details-btn:hover::before {
  width: 300px;
  height: 300px;
}

.match-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.match-details-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.details-content {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 8px;
}

.details-content.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.period {
  margin-bottom: 1.5rem;
}

.period-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.period-score {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.goal-event {
  padding: 0.5rem;
  margin: 0.3rem 0;
  background-color: var(--bg-card);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  animation: slideInFromLeft 0.4s ease forwards;
}

.goal-event:hover {
  transform: translateX(8px);
  box-shadow: 0 2px 8px var(--shadow);
}

.goal-event.er-cavesa {
  border-left: 4px solid var(--primary-color);
}

.goal-event.er-cavesa:hover {
  background: linear-gradient(90deg, rgba(26, 99, 67, 0.1) 0%, var(--bg-card) 100%);
  border-left-width: 6px;
}

.goal-event.opponent {
  border-left: 4px solid #999;
}

.goal-event.opponent:hover {
  background: linear-gradient(90deg, rgba(153, 153, 153, 0.1) 0%, var(--bg-card) 100%);
  border-left-width: 6px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  background-color: var(--bg-card);
  border-radius: 12px;
  color: #666;
}

/* Classification Grid */
.classification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.classification-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  animation: scaleIn 0.6s ease forwards;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.classification-card:nth-child(1) { animation-delay: 0.1s; }
.classification-card:nth-child(2) { 
  animation-delay: 0.2s;
  overflow-y: auto;
  max-height: 800px;
}


.classification-card:hover {
  box-shadow: 0 4px 20px var(--shadow);
  transform: translateY(-3px);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 0.8rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.standings-table th {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
}

.standings-table tbody tr {
  transition: all 0.3s ease;
}

.standings-table tr:hover {
  background-color: var(--bg-light);
  box-shadow: 0 2px 8px var(--shadow);
}

.team-name {
  font-weight: 600;
  color: var(--primary-color);
}

.standings-table .points {
  font-weight: bold;
  color: var(--primary-color);
}

/* Scorers List */
.scorers-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.scorer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInFromRight 0.5s ease forwards;
  opacity: 0;
}

.scorer-item:nth-child(1) { animation-delay: 0.1s; }
.scorer-item:nth-child(2) { animation-delay: 0.15s; }
.scorer-item:nth-child(3) { animation-delay: 0.2s; }
.scorer-item:nth-child(4) { animation-delay: 0.25s; }
.scorer-item:nth-child(5) { animation-delay: 0.3s; }

.scorer-item:hover {
  transform: translateX(8px) scale(1.03);
  background: linear-gradient(90deg, #e8f5e9 0%, #f1f8e9 100%);
  box-shadow: 0 4px 12px var(--shadow);
}

.scorer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scorer-position {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 30px;
}

.scorer-name {
  font-weight: 600;
}

.scorer-goals {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Squad Section */
.squad-section {
  margin-bottom: 3rem;
}

.squad-category {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.staff-grid,
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.player-card,
.staff-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 4px solid var(--primary-color);
  animation: scaleIn 0.5s ease forwards;
  opacity: 0;
}

.player-card:nth-child(1) { animation-delay: 0.05s; }
.player-card:nth-child(2) { animation-delay: 0.1s; }
.player-card:nth-child(3) { animation-delay: 0.15s; }
.player-card:nth-child(4) { animation-delay: 0.2s; }
.player-card:nth-child(5) { animation-delay: 0.25s; }
.player-card:nth-child(6) { animation-delay: 0.3s; }
.player-card:nth-child(7) { animation-delay: 0.35s; }
.player-card:nth-child(8) { animation-delay: 0.4s; }

.staff-card:nth-child(1) { animation-delay: 0.05s; }

.player-card:hover,
.staff-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 30px var(--shadow);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.player-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  background-color: var(--bg-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.player-card:hover .player-number {
  transform: rotate(360deg) scale(1.1);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
}

.player-info {
  flex: 1;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.player-position {
  font-size: 0.9rem;
  color: #666;
}

.staff-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.staff-role {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.stats-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  animation: scaleIn 0.6s ease forwards;
  opacity: 0;
  transition: all 0.3s ease;
}

.stats-card:nth-child(1) { animation-delay: 0.1s; }
.stats-card:nth-child(2) { animation-delay: 0.2s; }

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px var(--shadow);
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem;
  background-color: var(--bg-light);
  border-radius: 6px;
}

.stat-value {
  font-weight: bold;
  color: var(--primary-color);
}

.streak-container {
  text-align: center;
  padding: 2rem;
}

.streak-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-light);
  margin: 0 auto 1rem;
  animation: bounce 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.streak-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.streak-badge.victory {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.streak-badge.draw {
  background: linear-gradient(135deg, var(--warning) 0%, #ea580c 100%);
}

.streak-badge.defeat {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.streak-text {
  font-weight: 600;
  color: var(--text-dark);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .container {
    padding: 0 10px;
  }

  .header {
    padding: 0.8rem 0;
  }

  .nav {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    flex-direction: column;
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow);
    opacity: 0;
  }

  .nav.active {
    max-height: 400px;
    opacity: 1;
    padding: 1rem;
  }

  .nav-link {
    padding: 1rem;
    margin: 0.2rem 0;
    border-radius: 8px;
    text-align: center;
    animation: slideInFromLeft 0.3s ease forwards;
    font-size: 1.1rem;
  }

  .nav-link:nth-child(1) { animation-delay: 0.05s; }
  .nav-link:nth-child(2) { animation-delay: 0.1s; }
  .nav-link:nth-child(3) { animation-delay: 0.15s; }
  .nav-link:nth-child(4) { animation-delay: 0.2s; }
  .nav-link:nth-child(5) { animation-delay: 0.25s; }

  .club-name {
    font-size: 1.3rem;
  }

  .hero {
    padding: 2rem 1.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-card {
    padding: 1.2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .match-card {
    padding: 1.2rem;
  }

  .match-teams {
    flex-direction: row; /* Mantener horizontal */
    gap: 0.5rem; /* Menor espacio entre equipos */
    align-items: center;
    justify-content: space-between;
  }

  .score {
    font-size: 1.5rem; /* Reducir tamaño del score */
    min-width: 50px;
  }

  .score-separator {
    margin: 0 0.3rem; /* Reducir margen del separador */
  }

  .team {
    flex: 1;
    text-align: center;
  }

  .score {
    font-size: 2rem;
    margin: 1rem 0;
  }

  .team-logo {
    width: 50px;
    height: 50px;
  }

  .classification-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .standings-table {
    font-size: 0.85rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.5rem 0.3rem;
  }

  .main-content {
    padding: 1.5rem 0;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .card-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .logo-circle {
    width: 40px;
    height: 40px;
  }

  .club-name {
    font-size: 1.1rem;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .match-card {
    padding: 1rem;
  }

  .team-name-match {
    font-size: 0.9rem;
  }

  .score {
    font-size: 1.8rem;
  }

  .staff-grid,
  .players-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .player-card,
  .staff-card {
    padding: 1rem;
  }

  .classification-card,
  .stats-card {
    padding: 0.8rem;
  }

  .footer {
    padding: 1rem 0;
    font-size: 0.9rem;
  }

  .history-card{
    padding: 0.8rem !important;
  }

  /* Hide columns on mobile */
  .standings-table th:nth-child(7),
  .standings-table td:nth-child(7),
  .standings-table th:nth-child(8),
  .standings-table td:nth-child(8),
  .standings-table th:nth-child(6),
  .standings-table td:nth-child(6),
  .standings-table th:nth-child(5),
  .standings-table td:nth-child(5),
  .standings-table th:nth-child(4),
  .standings-table td:nth-child(4) {
    display: none;
  }

  .standings-table th:nth-child(1),
  .standings-table td:nth-child(1),
  .standings-table th:nth-child(3),
  .standings-table td:nth-child(3),
  .standings-table th:nth-child(9),
  .standings-table td:nth-child(9){
    width: 90px;
  }

}

/* History Section Styles */
.season-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease forwards;
}

.season-selector label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.season-select {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-card);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  box-shadow: 0 2px 8px var(--shadow);
}

.season-select:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}

.season-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(18, 73, 47, 0.1);
}

.competition-name {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(18, 73, 47, 0.1) 0%, rgba(26, 99, 67, 0.05) 100%);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  animation: slideInFromLeft 0.6s ease forwards;
}

.phase-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  animation: fadeIn 0.6s ease forwards;
}

.phase-btn {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  background-color: var(--bg-card);
  color: var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.phase-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--primary-color);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.phase-btn:hover::before {
  width: 300px;
  height: 300px;
}

.phase-btn:hover {
  color: var(--text-light);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}

.phase-btn span {
  position: relative;
  z-index: 1;
}

.phase-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(18, 73, 47, 0.3);
}

.season-content {
  display: grid;
  gap: 2rem;
}

.history-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  animation: scaleIn 0.6s ease forwards;
  opacity: 0;
  transition: all 0.3s ease;
  border-top: 4px solid var(--primary-color);
}

.history-card:nth-child(1) { animation-delay: 0.1s; }
.history-card:nth-child(2) { animation-delay: 0.2s; }
.history-card:nth-child(3) { animation-delay: 0.3s; }

.history-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px var(--shadow);
  border-top-width: 6px;
}

.matches-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.matches-history-grid::-webkit-scrollbar {
  width: 8px;
}

.matches-history-grid::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.matches-history-grid::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.matches-history-grid::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.history-match-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
  border-radius: 10px;
  padding: 1rem;
  border: 2px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: scaleIn 0.5s ease forwards;
  opacity: 0;
  margin-bottom: 20px;
}

.history-match-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px var(--shadow);
  border-color: var(--primary-color);
}

.match-date-header {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.nothistory{
  margin-bottom: 0.3rem !important;
}

.match-teams-history {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.team-history {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.team-history.er-cavesa {
  color: var(--primary-color);
  font-weight: 700;
}

.score-history {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  min-width: 60px;
  text-align: center;
}

.match-venue {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.transfers-card {
  border-top-color: var(--secondary-color);
}

.transfers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.transfers-column {
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.transfers-column:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px var(--shadow);
}

.transfers-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.transfers-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.transfers-list li {
  padding: 0.8rem 1rem;
  background-color: var(--bg-card);
  border-radius: 6px;
  border-left: 3px solid var(--success);
  transition: all 0.3s ease;
  font-weight: 500;
  animation: slideInFromRight 0.4s ease forwards;
  opacity: 0;
  list-style: none;
}

.transfers-list li:nth-child(1) { animation-delay: 0.05s; }
.transfers-list li:nth-child(2) { animation-delay: 0.1s; }
.transfers-list li:nth-child(3) { animation-delay: 0.15s; }
.transfers-list li:nth-child(4) { animation-delay: 0.2s; }
.transfers-list li:nth-child(5) { animation-delay: 0.25s; }

#bajasList li {
  border-left-color: var(--danger);
}

.transfers-list li:hover {
  transform: translateX(8px);
  box-shadow: 0 3px 10px var(--shadow);
  background: linear-gradient(90deg, rgba(18, 73, 47, 0.05) 0%, var(--bg-card) 100%);
}

.no-data-message {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

@media (max-width: 768px) {
    .matches-history-grid {
    grid-template-columns: 1fr;
    max-height: 500px;
    }

    .phase-selector {
    gap: 0.5rem;
    }

    .phase-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    .matches-history-grid {
    grid-template-columns: 1fr;
    max-height: 500px;
    }

    .phase-selector {
    gap: 0.5rem;
    }

    .phase-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    }

}
