/* ===== VARIABLES CSS - COLORES PRINCIPALES ===== */
:root {
	/* Colores principales del sitio */
	--primary-color: #1e3c72;
	--primary-light: #2a5298;
	--secondary-color: #3498db;
	--accent-color: #e74c3c;

	/* Colores de fondo */
	--bg-gradient-start: #667eea;
	--bg-gradient-end: #764ba2;
	--bg-white: #ffffff;
	--bg-light: #f8f9fa;
	--bg-dark: #34495e;
	--bg-darker: #2c3e50;
	--bg-darkest: #1e2832;

	/* Colores de estado */
	--success-color: #27ae60;
	--warning-color: #f39c12;
	--info-color: #3498db;
	--danger-color: #e74c3c;
	--muted-color: #95a5a6;

	/* Colores de texto */
	--text-primary: #2c3e50;
	--text-secondary: #7f8c8d;
	--text-light: #bdc3c7;
	--text-white: #ffffff;

	/* Colores de borde */
	--border-light: #ecf0f1;
	--border-medium: #bdc3c7;
	--border-dark: #95a5a6;

	/* Colores de sombra */
	--shadow-light: rgba(0, 0, 0, 0.1);
	--shadow-medium: rgba(0, 0, 0, 0.15);
	--shadow-dark: rgba(0, 0, 0, 0.2);
	--shadow-darker: rgba(0, 0, 0, 0.3);

	/* ===== COLORES ESPECÍFICOS POR DEPORTE ===== */
	--futbol-masc-color: #e74c3c;
	--futbol-fem-color: #e91e63;
	--basketball-color: #e67e22;
	--volley-masc-color: #2196f3;
	--volley-fem-color: #9c27b0;
	--handball-color: #4caf50;

	/* Colores específicos de componentes */
	--nav-bg: var(--bg-dark);
	--nav-border: var(--bg-darker);
	--table-header: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
	--winner-bg: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

/* ===== ESTILOS GENERALES ===== */

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

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
	min-height: 100vh;
	color: #333;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	background: var(--bg-white);
	min-height: 100vh;
	box-shadow: 0 0 20px var(--shadow-light);
}

/* ===== HEADER ===== */
.header {
	color: var(--text-white);
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 10px var(--shadow-light);
}

.logo-left {
	display: block;
}

.logo-left img {
	max-width: 100px;
}

.sponsors {
	display: flex;
	gap: 20px;
}

.sponsor img {
	max-width: 150px;
}

/* ===== NAVIGATION ===== */
.nav {
	background: var(--nav-bg);
	padding: 0;
	box-shadow: 0 2px 5px var(--shadow-light);
}

.nav-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
}

.nav-item {
	flex: 1;
}

.nav-item a {
	display: block;
	color: var(--text-white);
	text-decoration: none;
	padding: 15px 10px;
	text-align: center;
	transition: all 0.3s ease;
	font-weight: 500;
	border-right: 1px solid var(--nav-border);
}

.nav-item:last-child a {
	border-right: none;
}

.nav-item a:hover,
.nav-item.active a {
	background: var(--secondary-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px var(--shadow-dark);
}

/* ===== CONTENT ===== */
.content {
	padding: 30px;
	min-height: calc(100vh - 200px);
}

/* ===== PAGE TITLES ===== */
.page-title {
	text-align: center;
	margin-bottom: 30px;
	color: var(--text-primary);
	font-size: 2.5em;
	text-shadow: 1px 1px 2px var(--shadow-light);
}

.section-title {
	text-align: center;
	margin-bottom: 30px;
	color: var(--text-primary);
	font-size: 2em;
	text-shadow: 1px 1px 2px var(--shadow-light);
}

/* ===== FASES CONTAINER (GENERAL) ===== */
.main-container {
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin-top: 30px;
}

/* ===== FASE HEADERS (GENERAL) ===== */
.fase-container {
	background: var(--bg-white);
	border-radius: 15px;
	padding: 25px;
	box-shadow: 0 5px 15px var(--shadow-light);
	border-left: 5px solid var(--secondary-color);
}

.fase-header {
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 2px solid var(--border-light);
}

.fase-title {
	color: var(--text-primary);
	font-size: 1.8em;
	margin-bottom: 10px;
	font-weight: bold;
}

.fase-info {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.fase-estado {
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: bold;
	text-transform: uppercase;
}

.estado-completado {
	background: var(--success-color);
	color: var(--text-white);
}

.estado-progreso {
	background: var(--warning-color);
	color: var(--text-white);
}

.estado-programado {
	background: var(--info-color);
	color: var(--text-white);
}

.estado-pendiente {
	background: var(--muted-color);
	color: var(--text-white);
}

.fase-descripcion {
	color: var(--text-secondary);
	font-style: italic;
}

/* ===== TABLES CONTAINER (GENERAL) ===== */
.tables-container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 25px;
}

.group {
	background: var(--bg-light);
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 3px 10px var(--shadow-light);
	border-top: 4px solid var(--accent-color);
}

.group h3 {
	text-align: center;
	margin-bottom: 20px;
	color: var(--text-primary);
	font-size: 1.3em;
	background: var(--border-light);
	padding: 10px;
	border-radius: 8px;
}

/* ===== MATCHES CONTAINER (GENERAL) ===== */
.matches-container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.match {
	background: var(--bg-light);
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 3px 10px var(--shadow-light);
	border-left: 4px solid var(--muted-color);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.match:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px var(--shadow-medium);
}

.match.estado-completado {
	border-left-color: var(--success-color);
}

.match.estado-progreso {
	border-left-color: var(--warning-color);
}

.match.estado-programado {
	border-left-color: var(--info-color);
}

.match-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-light);
}

.match-date {
	font-size: 0.9em;
	color: var(--text-secondary);
	font-weight: bold;
}

.match-status {
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: bold;
	text-transform: uppercase;
}

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

.team {
	flex: 1;
	text-align: center;
	padding: 10px;
}

.team-name {
	font-weight: bold;
	color: var(--text-primary);
	font-size: 1.1em;
}

.team.winner .team-name {
	color: var(--success-color);
	font-weight: 900;
}

.match-vs {
	flex: 0 0 auto;
	margin: 0 15px;
	text-align: center;
}

.vs-text {
	font-weight: bold;
	color: var(--muted-color);
	font-size: 1.2em;
}

.score {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: bold;
	font-size: 1.4em;
	color: var(--text-primary);
}

.score-separator {
	color: var(--muted-color);
}

.penalties {
	margin-top: 5px;
	font-size: 0.9em;
	color: var(--danger-color);
	font-weight: bold;
}

.sets-detail {
	margin-top: 5px;
	font-size: 0.85em;
	color: #9c27b0;
	font-weight: bold;
}

.sets-score {
	font-style: italic;
}

.match-notes {
	margin-top: 10px;
	padding: 8px 12px;
	background: #e8f4fd;
	border-radius: 8px;
	font-size: 0.9em;
	color: #2980b9;
	font-style: italic;
	border-left: 3px solid var(--info-color);
}

/* ===== TABLES (GENERAL) ===== */
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th {
	background: var(--table-header);
	color: var(--text-white);
	padding: 12px 8px;
	text-align: center;
	font-weight: bold;
	font-size: 12px;
}

.table th:first-child {
	border-top-left-radius: 8px;
}

.table th:last-child {
	border-top-right-radius: 8px;
}

.table td {
	padding: 10px 8px;
	text-align: center;
	border-bottom: 1px solid var(--border-light);
}

.table tr:nth-child(even) {
	background: var(--bg-light);
}

.table tr:hover {
	background: #e8f4fd;
	transform: scale(1.01);
	transition: all 0.2s ease;
}

.position-1 {
	background: var(--winner-bg) !important;
	color: var(--text-white);
	font-weight: bold;
}

/* ===== UTILIDADES (GENERAL) ===== */
.no-data {
	text-align: center;
	color: var(--muted-color);
	font-style: italic;
	padding: 20px;
}

.error-message {
	background: var(--danger-color);
	color: var(--text-white);
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	margin: 20px 0;
}

.loading-message {
	background: var(--info-color);
	color: var(--text-white);
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	margin: 20px 0;
}

/* ===== FOOTER ===== */
.footer {
	background: var(--bg-darker);
	color: var(--text-white);
	padding-top: 20px;
}

.banner-section {
	text-align: center;
	border-radius: 10px;
}

.banner-section img {
	max-height: 150px;
	max-width: 100%;
}

.footer-bottom {
	background: var(--bg-darkest);
	padding: 15px;
	text-align: center;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
}

.dev-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dev-logo {
	display: block;
}

.dev-logo img {
	max-width: 120px;
}

/* ===== BANNER CAROUSEL ===== */
.banner-section {
	width: 100%;
	height: auto;
	margin-bottom: 1rem;
}

.banner-carousel {
	width: 100%;
	height: 120px;
	/* Ajustar según altura de tus banners */
	overflow: hidden;
	border-radius: 8px;
}

.banner-carousel .swiper {
	width: 100%;
	height: 100%;
}

.banner-carousel .swiper-wrapper {
	height: 100%;
}

.banner-carousel .swiper-slide {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
}

.banner-carousel .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	/* Mantiene proporciones sin cortar */
	object-position: center;
	max-height: 120px;
}

/* Responsive para banners */
@media (max-width: 768px) {
	.banner-carousel {
		height: 80px;
	}

	.banner-carousel .swiper-slide img {
		max-height: 80px;
	}
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 1024px) {
	.tables-container {
		grid-template-columns: 1fr;
	}

	.matches-container {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.header {
		flex-direction: column;
		gap: 15px;
		text-align: center;
	}

	.sponsors {
		justify-content: center;
	}

	.nav-list {
		flex-direction: column;
	}

	.nav-item {
		flex: none;
	}

	.page-title {
		font-size: 2em;
	}

	.section-title {
		font-size: 1.5em;
	}

	.footer-bottom {
		flex-direction: column;
		gap: 10px;
	}

	.fase-info {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.match-teams {
		flex-direction: column;
		gap: 10px;
	}

	.match-vs {
		margin: 0;
	}

	.table {
		font-size: 12px;
	}

	.table th,
	.table td {
		padding: 8px 4px;
	}

	.fase-title {
		font-size: 1.5em;
	}
}