:root {
    --color-rojo: #fe1919;
    --color-azul: #020d55;
    --color-naranja: #f78221;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --radius-lg: 16px;
    --transition-fast: 0.25s ease;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #fff;
    color: #111;
}

/* Preloader */
.no-js #loader { display: none;  }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.se-pre-con {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: url(../images/loading.gif) center no-repeat #ffffff;
  background-size: 200px 150px;
}
.se-pre-con #mensajeCargador{
    z-index:10000;
    top: 60%;
    left: 45%;
    position: relative;
}
/* Preloader */

/* HEADER */
header {
    border-bottom: 2px solid var(--color-azul);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
}

.container {
    max-width: 1180px;
    margin: auto;
    padding: 0 1.25rem;
}

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

.logo-area a{
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: unset;
}

.logo-area img{
    height: 100px;
}

.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--color-azul);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-azul);
}

.nav-links {
    display: flex;
    gap: 1.2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-azul);
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    border-color: var(--color-naranja);
    color: var(--color-naranja);
}

/* MENU HAMBURGUESA (MÓVIL) */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-azul);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    border-top: 1px solid var(--color-border);
    background: #fff;
}

.mobile-menu a {
    display: block;
    padding: 0.7rem 0;
    text-decoration: none;
    color: var(--color-azul);
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

/* SLIDER */
.slider {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-bottom: 4px solid var(--color-naranja);
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    display: none;
    background-size: cover;
    background-position: center;
}

.slide.active {
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.75);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: var(--color-azul);
    transition: var(--transition-fast);
}

.slider-arrow:hover {
    background: #fff;
}

.arrow-left { left: 10px; }
.arrow-right { right: 10px; }

/* TITULOS */
h2.section-title {
    font-size: 1.4rem;
    margin: 1.8rem 0 0.4rem;
    color: var(--color-azul);
}

.section-subtitle {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* CATEGORÍAS */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.category-card {
    border: 2px solid var(--color-border);
    background: #fafafa;
    padding: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-card:hover {
    background: #fff3e6;
    border-color: var(--color-naranja);
    transform: translateY(-3px);
}

.category-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-azul);
}

.category-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* EQUIPOS DESTACADOS */
.teams-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.teams-row::-webkit-scrollbar {
    height: 4px; 
}

.teams-row::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 10px;
}

.teams-row::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        var(--color-azul),
        var(--color-naranja)
    );
    border-radius: 10px;
}

.teams-row::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        90deg,
        var(--color-naranja),
        var(--color-rojo)
    );
}

.team-card {
    min-width: 210px;
    border: 2px solid var(--color-border);
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: #fff;
    transition: var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-naranja);
    background: #fff9f1;
}

.team-logo {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--color-rojo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.team-logo img{
    max-width: 38px;
    max-height: 38px;
}

.team-name {
    font-weight: 700;
    margin-top: 0.6rem;
    color: var(--color-azul);
}

.team-stats {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* TABLA DE RESULTADOS */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.8rem;
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

th {
    background: #fafafa;
    color: var(--color-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

tr:hover {
    background: #fff1e2;
}

.cs-footer {
  background: #020617; /* casi negro */
  border-top: 3px solid var(--color-azul);
  color: #e5e7eb;
  margin-top: 60px;
}

.cs-footer-logo img{
    max-width: 60px;
    max-height: 60px;
}

.cs-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.85rem;
}

/* Logo y texto */
.cs-footer-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.cs-footer-logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-rojo), var(--color-naranja));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.cs-footer-logo-text {
  display: flex;
  flex-direction: column;
}

.cs-footer-title {
  font-weight: 600;
  color: #f9fafb;
}

.cs-footer-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Links centro */
.cs-footer-middle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.cs-footer-middle a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.8rem;
  position: relative;
  padding-bottom: 2px;
}

.cs-footer-middle a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-naranja), var(--color-rojo));
  transition: width 0.2s ease-out;
}

.cs-footer-middle a:hover::after {
  width: 100%;
}

/* Derecha */
.cs-footer-right {
  text-align: right;
}

.cs-footer-copy {
  color: #9ca3af;
  font-size: 0.78rem;
}

.results-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  background: #fafafa;
}

.results-filters select{
    cursor:pointer;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-azul);
  text-transform: uppercase;
}

.filter-group select {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.btn-filter {
  background: linear-gradient(
    135deg,
    var(--color-naranja),
    var(--color-rojo)
  );
  border: none;
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.btn-filter:hover {
  opacity: 0.9;
}

/* ===== TABLA RESULTADOS ===== */
.results-table-section {
  margin-bottom: 2rem;
}

.results-table-wrapper {
  overflow-x: auto;
}


.results-table-wrapper::-webkit-scrollbar {
    height: 4px; 
}

.results-table-wrapper::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 10px;
}

.results-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        var(--color-azul),
        var(--color-naranja)
    );
    border-radius: 10px;
}

.results-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        90deg,
        var(--color-naranja),
        var(--color-rojo)
    );
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.results-table th {
  background: #f9fafb;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.75rem;
  border-bottom: 2px solid var(--color-border);
}

.results-table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.results-table tr:hover {
  background: #fff4ea;
}

/* Equipos */
.match-teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.match-teams .team {
  font-weight: 600;
  color: var(--color-azul);
}

.match-teams .vs {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Marcador */
.match-score {
  font-size: 1rem;
  text-align: center;
  color: var(--color-azul);
}

/* ===== CONTACTO ===== */
.contacto-section {
  margin: 2.5rem 0;
}

/* Info cards */
.contacto-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.contacto-card {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: #fafafa;
}

.contacto-icon {
  font-size: 1.6rem;
}

.contacto-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-azul);
}

.contacto-card p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.contacto-card a {
  color: var(--color-naranja);
  text-decoration: none;
  font-weight: 600;
}

/* Form */
.contacto-form-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.7rem;
  border-radius: 18px;
  border: 2px solid var(--color-border);
  background: #fff;
}

.contacto-form-wrapper h2 {
  margin-top: 0;
  color: var(--color-azul);
}

.contacto-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1.2rem;
}

.contacto-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.contacto-form label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-azul);
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}

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

#ultimos-resultados, #tabla-de-posiciones, #tabla-de-jugadores{
    margin-top: 20px;
    display: inline-block;
}

.dataTable tbody td{
  text-align: center;
}

/* ===== CONTACTO FULL WIDTH ===== */
.contacto-bg {
  width: 100%;
  padding: 4rem 0;
  position: relative;
  background-image: url('../images/contacto.png');
  background-size: cover;
  background-position: center;
}

/* Overlay oscuro/deportivo */
.contacto-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 13, 85, 0), rgba(0, 0, 0, 0.5));
  z-index: 0;
}

/* Contenido encima */
.contacto-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Texto superior */
.contacto-header {
  text-align: center;
  color: #fff;
  margin-bottom: 2rem;
  max-width: 600px;
}

.contacto-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.contacto-header p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* FORMULARIO SOBRE IMAGEN */
.contacto-form-wrapper {
  background: #fff;
  border-radius: 18px;
  padding: 1.8rem;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}

.contacto-form label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-azul);
  text-transform: uppercase;
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  width: 100%;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.btn-enviar {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--color-naranja),
    var(--color-rojo)
  );
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.email-console{
    color:red;
    text-align: center;
}

.playerLink{
  text-decoration: none;
}

@media (max-width: 600px) {
  .contacto-bg {
    padding: 3rem 0;
  }

  .contacto-header h2 {
    font-size: 1.4rem;
  }
}

/* Botón */
.btn-enviar {
  width: 100%;
  border: none;
  margin-top: 0.5rem;
  padding: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--color-naranja),
    var(--color-rojo)
  );
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-enviar:hover {
  opacity: 0.92;
}

.contacto-legal {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: var(--color-muted);
  text-align: center;
}

.contacto-section h2{
    text-align: center;
    font-weight: bold;
    font-size: 24px;
    margin-top: 40px;
}

#table-load-more{
    display:block;
    margin: 0 auto;
    background-color: var(--color-naranja);
    color: var(--color-border);
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    width: 150px;
    border: 1px solid var(--color-naranja);
    letter-spacing: 0.5px;
    text-transform: capitalize;
    line-height: 25px;
    transition: .5s;
    cursor: pointer;
}
#table-load-more:hover {
    background-color: var(--color-red);
    color: var(--color-border);
    outline: 0;
    box-shadow: 0 5px 11px 0 rgb(0 0 0 / 18%), 0 4px 15px 0 rgb(0 0 0 / 15%);
}

.dt-more-container{
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ===== PERFIL JUGADOR ===== */
.player-profile {
  margin: 2rem 0;
}

/* HEADER */
.player-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    var(--color-azul),
    var(--color-naranja)
  );
  color: #fff;
}

.player-avatar {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-azul);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/default-avatar.jpg');
  background-position: center;
  background-size: cover;
}

#share-profile{
    border: none;
    cursor: pointer;
    background: #fff;
    color: var(--color-naranja);
    font-weight: bold;
}

.player-info h1 {
  margin: 0;
  font-size: 1.6rem;
}

.player-meta {
  font-size: 0.95rem;
  opacity: 0.95;
}

.player-season {
  font-size: 0.8rem;
  opacity: 0.85;
}

.player-actions {
  margin-left: auto;
}

.btn-share {
  background: #fff;
  color: var(--color-azul);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-share:hover {
  background: rgba(255,255,255,0.9);
}

/* STATS CARDS */
.player-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.2rem;
  border: 2px solid var(--color-border);
  text-align: center;
}

.stat-card.highlight {
  border-color: var(--color-naranja);
  background: #fff5eb;
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-azul);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* SECTIONS */
.player-section {
  margin-top: 2rem;
}

.player-section h2 {
  margin-bottom: 0.7rem;
  font-size: 1.25rem;
  color: var(--color-azul);
}

/* TABLES */
.player-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.player-table th,
.player-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.player-table th {
  text-align: left;
  background: #fafafa;
  color: var(--color-muted);
  font-weight: 700;
  width: 55%;
}

.player-table.small th {
  text-transform: uppercase;
  font-size: 0.75rem;
}

.player-table tr:hover {
  background: #fff3e6;
}

.table-wrapper {
  overflow-x: auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .player-header {
    flex-direction: column;
    text-align: center;
  }

  .player-actions {
    margin-left: 0;
  }

  .player-avatar {
    width: 75px;
    height: 75px;
    font-size: 1.6rem;
  }
}


/* Responsive */
@media (max-width: 600px) {
  .contacto-form-wrapper {
    padding: 1.2rem;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .results-filters {
    grid-template-columns: 1fr;
  }

  .match-teams {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-score {
    text-align: left;
  }
}

/* Responsive footer */
@media (max-width: 820px) {
  .cs-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-footer-middle {
    justify-content: flex-start;
  }

  .cs-footer-right {
    text-align: left;
  }
}

/* RESPONSIVE */
@media (max-width: 820px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: block;
    }
}