/* 
===================================
HOJA DE ESTILOS - FEDERACIÓN ESPAÑOLA DE BALONMANO
===================================
Proyecto: Web de la Federación Española de Balonmano
Versión: 2.0
Fecha: Octubre 2025
Grupo: 1
Descripción: Estilos principales para todas las páginas del sitio web
===================================
*/

/* Importación de fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

/* ================================= */
/* RESET Y CONFIGURACIÓN BASE */
/* ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS para colores del tema */
:root {
    --primary: #c41e3a;        /* Rojo principal */
    --secondary: #ffc400;      /* Amarillo/dorado */
    --dark: #1a1a2e;           /* Azul oscuro casi negro */
    --light: #f8f9fa;          /* Gris claro de fondo */
    --accent: #0f3460;         /* Azul de acento */
}

/*Estilo del html (Principalmente para el scroll)*/
html{
    scroll-behavior: smooth;
}

/* Estilos base del body */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

/* ================================= */
/* CABECERA (HEADER) */
/* ================================= */
header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 100%);
    position: relative;
    overflow: hidden;
}

/* Efecto decorativo de fondo en la cabecera */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 50%;
}

/* Contenedor del contenido de la cabecera */
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Sección del logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Estilos del logo */
.logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(8, 8, 8, 0.3);
    transform: rotate(-5deg);
    transition: all 0.3s ease;
}

/* Efecto hover en el logo */
.logo:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Título de la cabecera */
.header-title h1 {
    font-size: 2rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Subtítulo de la cabecera */
.header-title p {
    color: var(--secondary);
    font-weight: 300;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* ================================= */
/* NAVEGACIÓN (NAV) */
/* ================================= */
nav {
    background: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

/* Lista del menú de navegación */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Enlaces del menú */
nav ul li a {
    display: block;
    color: var(--dark);
    text-decoration: none;
    padding: 1.2rem 2rem;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

/* Línea inferior animada en los enlaces */
nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Efecto hover y activo en enlaces */
nav ul li a:hover::before,
nav ul li a.active::before {
    width: 80%;
}

nav ul li a.active {
    color: var(--primary);
}

/* ================================= */
/* CONTENIDO PRINCIPAL (MAIN) */
/* ================================= */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem;
    min-height: 70vh;
}

/* ================================= */
/* SECCIÓN HERO */
/* ================================= */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 50%, var(--primary) 100%);
    border-radius: 30px;
    padding: 5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Contenido del hero */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Título principal del hero */
.hero h2 {
    font-size: 3.5rem;
    color: white;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Párrafo descriptivo del hero */
.hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

/* Botón interno para navegación por marcadores */
.btn-interno {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--secondary), #ffb700);
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 196, 0, 0.3);
    margin: 15px;
}

.btn-interno:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 196, 0, 0.5);
}

/* Estadísticas del hero */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

/* Elemento estadística individual */
.stat {
    text-align: center;
}

/* Número de la estadística */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    display: block;
}

/* Etiqueta de la estadística */
.stat-label {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
}

/* ================================= */
/* CARDS (TARJETAS) */
/* ================================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Tarjeta individual */
.card {
    background: white;
    border-radius: 25px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Borde superior decorativo de las cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Efecto hover en cards */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Icono de la card */
.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), #e63946);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.3);
}

/* Título de la card */
.card h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Texto de la card */
.card p {
    color: #666;
    line-height: 1.8;
    font-weight: 300;
}

/* ================================= */
/* GALERÍA DE IMÁGENES */
/* ================================= */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Elemento individual de la galería */
.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Imágenes dentro de la galería */
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Pie de imagen */
.gallery-item figcaption {
    padding: 1.5rem;
    text-align: center;
    color: var(--dark);
    font-weight: 600;
}

/* ================================= */
/* TABLAS */
/* ================================= */
.table-container {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Tabla general */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Cabecera de la tabla */
table thead {
    background: linear-gradient(135deg, var(--dark), var(--accent));
}

/* Celdas de cabecera */
table th {
    padding: 1.5rem 1rem;
    text-align: left;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Celdas de datos */
table td {
    padding: 1.5rem 1rem;
    color: var(--dark);
    border-bottom: 1px solid #f0f0f0;
}

/* Filas del cuerpo de la tabla */
table tbody tr {
    transition: all 0.3s ease;
}

/* Efecto hover en filas */
table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

/* Primera fila (líder) con fondo especial */
table tbody tr:nth-child(1) {
    background: linear-gradient(90deg, rgba(196, 30, 58, 0.1), transparent);
    font-weight: 600;
}

/* Segunda y tercera fila (podio) */
table tbody tr:nth-child(2),
table tbody tr:nth-child(3) {
    background: linear-gradient(90deg, rgba(255, 196, 0, 0.1), transparent);
}

/* ================================= */
/* TARJETAS DE PARTIDOS (MATCH CARDS) */
/* ================================= */
.match-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Borde lateral decorativo */
.match-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* Efecto hover en match cards */
.match-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

/* Contenedor de equipos en partido */
.match-teams {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

/* Equipo individual */
.team {
    text-align: center;
    flex: 1;
}

/* Nombre del equipo */
.team-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

/* Badge pequeño del equipo */
.team-badge-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 12px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Marcador del partido */
.match-score {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Texto VS entre equipos */
.match-vs {
    color: #999;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Información del partido */
.match-info {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
}

/* Fecha del partido */
.match-date {
    font-weight: 600;
    color: var(--dark);
}

/* ================================= */
/* GRID DE EQUIPOS */
/* ================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Tarjeta de equipo */
.team-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Overlay de fondo en team cards */
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover::before {
    opacity: 0.05;
}

/* Efecto hover en team cards */
.team-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Badge del equipo */
.team-badge {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), #e63946);
    border-radius: 25px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 15px 40px rgba(196, 30, 58, 0.3);
    position: relative;
    z-index: 2;
}

/* Título de la tarjeta de equipo */
.team-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

/* Texto de la tarjeta de equipo */
.team-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
}

/* ================================= */
/* ARTÍCULOS DE NOTICIAS */
/* ================================= */
.news-article {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* Efecto hover en artículos */
.news-article:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

/* Imagen del artículo */
.news-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

/* Contenido del artículo */
.news-content {
    padding: 2.5rem;
}

/* Metadatos del artículo */
.news-meta {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Título del artículo */
.news-article h3 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Párrafos del artículo */
.news-article p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ================================= */
/* CONTENEDORES MULTIMEDIA */
/* ================================= */

/* Contenedor de video */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Aspecto 16:9 */
    height: 0;
    overflow: hidden;
    background: var(--dark);
    border-radius: 25px;
    margin: 3rem 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Video o iframe dentro del contenedor */
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 25px;
}

/* Contenedor de audio */
.audio-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
}

/* Elemento de audio */
.audio-container audio {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================= */
/* LISTAS DE ENLACES */
/* ================================= */
.links-externos {
    list-style: none;
    padding: 0;
}

.links-externos li {
    margin-bottom: 1rem;
}

.links-externos a {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    font-weight: 600;
}

.links-externos a:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: var(--primary);
}

/* ================================= */
/* PIE DE PÁGINA (FOOTER) */
/* ================================= */
footer {
    background: linear-gradient(135deg, var(--dark) 0%, #0d0d1a 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

/* Borde superior decorativo del footer */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Contenido del footer */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

/* Sección individual del footer */
.footer-section h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Texto del footer */
.footer-section p,
.footer-section li {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.8rem;
    font-weight: 300;
}

/* Listas del footer */
.footer-section ul {
    list-style: none;
}

/* Enlaces del footer */
.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Enlaces de redes sociales */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #e63946);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.social-links a:hover {
    background: linear-gradient(135deg, #e63946, var(--secondary));
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.4);
}

/* Parte inferior del footer */
.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-weight: 300;
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--secondary);
}

/* ================================= */
/* TÍTULOS Y SECCIONES */
/* ================================= */

/* Título principal de página */
.page-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
}

/* Línea decorativa bajo el título */
.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

/* Sección general */
.section {
    margin-bottom: 4rem;
}

/* Título de sección */
.section h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* ================================= */
/* CAJA DE CRITERIOS */
/* ================================= */
.criterios-box {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.05), rgba(255, 196, 0, 0.05));
    border-radius: 20px;
    padding: 2.5rem;
    border-left: 5px solid var(--primary);
}

/* Lista ordenada en criterios */
.criterios-box ol {
    margin-left: 2rem;
    margin-top: 1.5rem;
}

/* Items de la lista de criterios */
.criterios-box li {
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.8;
}

/* Texto en negrita de criterios */
.criterios-box strong {
    color: var(--primary);
}

/* Párrafos adicionales en criterios */
.criterios-box p {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-style: italic;
    color: #666;
}

/* ================================= */
/* RESPONSIVE DESIGN */
/* ================================= */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li a {
        padding: 1rem 1.5rem;
    }
}

/* Móviles y pantallas pequeñas */
@media (max-width: 768px) {
    /* Contenido principal en móvil */
    main {
        padding: 2rem 1.5rem;
    }
    
    /* Cabecera en móvil */
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    /* Hero en móvil */
    .hero {
        padding: 3rem 2rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    /* Título de página en móvil */
    .page-title {
        font-size: 2rem;
    }
    
    /* Navegación en móvil */
    nav ul li a {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    /* Match cards en móvil */
    .match-card {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .match-info {
        text-align: center;
    }
    
    /* Cards en columna en móvil */
    .cards {
        grid-template-columns: 1fr;
    }
    
    /* Footer en móvil */
    .footer-content {
        padding: 0 1.5rem;
    }
}

/* ================================= */
/* FIN DE ESTILOS */
/* ================================= */