/* styles.css */

/* Reseteo de márgenes y paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #000;
}

/* Banner Superior */
.banner {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px 10px;
}

.banner {
    position: relative;
    padding: 20px;
    text-align: center;
}

.facebook-link {
    position: absolute;
    top: 20px;
    right: 20px;
    margin-right: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.facebook-link a {
    text-decoration: none;
    color: #ffffff;  /* Cambia esto si prefieres otro color para el texto */
    font-weight: bold;
    display: flex;
    align-items: center;
}

.facebook-link img.facebook-icon {
    margin-left: 10px;
    width: 24px;
    height: 24px;
}


.banner .logo {
    width: 120px;
    display: block;
    margin: 0 auto;
}

.banner h1 {
    margin-top: 10px;
    font-size: 2em;
}

/* Menú de navegación */
nav {
    background-color: #f0f0f0;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 10px;
}

nav ul li.separador {
    margin: 0;
    color: #000;
    font-size: 1em;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-size: 1em;
}

nav ul li strong {
    font-weight: bold;
    font-size: 1em;
}

/* Contenido Principal */
.contenido {
    flex: 1;
    padding: 20px 10px;
}

.contenido h2 {
    margin-bottom: 20px;
    font-size: 1.8em;
}

.contenido h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.contenido h4 {
    margin-bottom: 0px;
    font-size: 1.3em;
}

/* Estilo para las cajas grises */
.box {
    background-color: #f0f0f0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estilo para los títulos con icono */
.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.section-title img.icono-titulo {
    width: 30px;
    height: auto;
    margin-right: 10px;
}

/* Contenedor para formularios arriba y abajo */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Formularios dentro del contenedor */
.form-container .form-box {
    width: 100%;
}

/* Estilo para formularios */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    flex: 1 1 45%; /* Dos campos por fila */
}

.form-row label {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row select,
.form-row input[type="checkbox"] {
    padding: 8px;
    font-size: 0.9em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Botones */
form button {
    padding: 8px 16px;
    font-size: 0.9em;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}

form button:hover {
    background-color: #333;
}

/* Mensajes */
.mensaje-error {
    background-color: #ffe6e6;
    color: #cc0000;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.mensaje-exito {
    background-color: #e6ffe6;
    color: #009900;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Botones de edición y actualización */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.action-buttons button.save-button {
    background-color: #4CAF50;
    color: white;
}

.action-buttons button.save-button:hover {
    background-color: #45a049;
}

/* Tabla para el Calendario y Clasificaciones */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    font-size: 0.9em;
}

table th {
    background-color: #000;
    color: #fff;
    font-size: 1em;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

/* Footer */
footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 1em;
    width: 100%;
    position: relative;
}

/* Responsive */
@media (max-width: 600px) {

    .contact-link {
        position: static;
        margin: 10px auto;
        text-align: center;
        font-size: 16px; /* Reduce el tamaño en móviles */
        flex-direction: column; /* Alinea verticalmente */
        gap: 5px; /* Añade separación entre el texto y el icono */
    }

    .contact-link img.gmail-icon {
        width: 20px; /* Ajusta el tamaño del icono */
        height: 20px;
        margin-left: 0; /* Elimina margen lateral */
    }

    .facebook-link {
        position: static;
        margin: 10px auto;
        text-align: center;
    }

    .facebook-link img.facebook-icon {
        width: 20px;
        height: 20px;
    }
    
    .no-print {
        display: none;
    }


    .form-row {
        flex: 1 1 100%; /* Un campo por fila en pantallas pequeñas */
    }

    .section-title {
        font-size: 1.3em;
    }

    .section-title img.icono-titulo {
        width: 25px;
        margin-right: 5px;
    }

    table th, table td {
        padding: 8px;
        font-size: 0.8em;
    }

    .banner h1 {
        font-size: 1.5em;
    }

    nav ul li a, nav ul li strong {
        font-size: 0.9em;
    }

    .contenido h2 {
        font-size: 1.5em;
    }

    .contenido h3 {
        font-size: 1.1em;
    }

    form button {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .action-buttons button.save-button {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Ajustes en el contenedor de los meses */
.calendario-meses {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* Reducir espacio entre meses */
    justify-content: space-between; /* Distribuir meses equitativamente */
}

/* Estilo para cada mes */
.mes {
    flex: 1 1 23%; /* Intentar 4 meses por fila */
    min-width: 230px; /* Ajuste según necesidades */
    background-color: #ffffff; 
    padding: 5px; /* Reducir el padding de cada mes */
    border-radius: 3px;
}

/* Título del mes */
.mes h3 {
    text-align: center;
    margin-bottom: 5px; /* Reducir el espacio debajo del título */
    font-size: 1.1em; /* Hacer el texto un poco más pequeño */
}

/* Encabezados de la tabla */
.mes th {
    background-color: #000;
    color: #fff;
    padding: 5px; /* Reducir el padding */
    font-size: 0.8em; /* Reducir tamaño de fuente */
    border: 1px solid #ddd;
}

/* Celdas de la tabla */
.mes td {
    border: 1px solid #ddd;
    padding: 5px; /* Reducir el padding de las celdas */
    text-align: center;
    font-size: 0.8em; /* Reducir tamaño de la fuente */
}

/* Estilo para los días sábados y domingos */
.mes .sabado,
.mes .domingo {
    background-color: #ccc; /* Gris oscuro */
    color: #000; 
}

/* Leyenda de Campeonatos */
.leyenda-campeonatos {
    list-style: none;
    padding-left: 0;
}

.leyenda-campeonatos li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.8em; 
    padding: 10px;
}

.color-box {
    display: inline-block;
    width: 15px;
    height: 15px; 
    margin-right: 10px;
    border: 1px solid #000;
    border-radius: 3px;
    padding: 10px;
}

/* Modal para imprimir */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); 
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 900px) {

    .no-print {
        display: none;
    }


    .mes {
        flex: 1 1 45%; /* 2 meses por fila en pantallas medianas */
    }
}

/* General adjustments for printing */
@media print {

    .no-print {
        display: none;
    }

    body {
        font-size: 14px;
        color: black;
    }

    header, footer, .no-print {
        display: none;
    }

    .contenido {
        margin: 20px;
    }

    .calendario-meses {
        flex-wrap: wrap;
        gap: 5px;
    }

    .mes {
        flex: 1 1 30%; /* Ajustar para intentar que 3 meses entren por fila */
        min-width: 230px;
        padding: 5px;
        margin-bottom: 10px; /* Añadir espacio entre el nombre del mes y la tabla */
    }

    /* Días de la semana en color negro */
    .mes th {
        background-color: black ;
        color: white;
        padding: 4px;
        font-size: 0.9em;
    }

    .mes td {
        padding: 4px;
        font-size: 0.7em;
    }

    /* Fines de semana destacados */
    .mes .sabado,
    .mes .domingo {
        background-color: #a9a9a9; /* Gris oscuro */
        color: #fff;
    }

    /* Leyenda de Campeonatos */
    .leyenda-campeonatos {
        list-style: none;
        padding-left: 0;
    }

    .leyenda-campeonatos li {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        font-size: 0.8em; /* Reducir el tamaño de la fuente */
    }

    .color-box {
        display: inline-block;
        width: 15px; /* Reducir el tamaño del cuadro de color */
        height: 15px; 
        margin-right: 10px;
    }
}

/* Estilo para mensajes de error */
.mensaje-error {
    background-color: #ffe6e6;
    color: #cc0000;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Estilo para mensajes de éxito */
.mensaje-exito {
    background-color: #e6ffe6;
    color: #009900;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.temporadas-anteriores {
    margin-top: 10px;
    font-size: 0.9em;
    text-align: center;
}

.temporadas-anteriores a {
    color: #007BFF;
    text-decoration: none;
}

.temporadas-anteriores a:hover {
    text-decoration: underline;
}

.contenido h2 {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    margin-bottom: 0px;
    
}

.icono-titulo {
    margin-right: 10px;
}

.reglamento-actual a {
    text-decoration: none;
    color: #ff6200;
    font-size: 1.1em;
    padding: 5px;
}

.reglamento-actual a:hover {
    text-decoration: underline;
}

.section-title-reglamentos {
    display: flex;
    align-items: center;
    font-size: 1.3em;
    margin-bottom: 0px;
}

.section-title-reglamentos img.icono-titulo {
    width: 30px;
    height: auto;
    margin-right: 10px;
}

.reglamentos-anteriores summary {
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.reglamentos-anteriores ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-top: 5px;
}

.reglamentos-anteriores a {
    text-decoration: none;
    color: #555;
}

.reglamentos-anteriores a:hover {
    text-decoration: underline;
}


.temporadas-anteriores-box {
    background-color: #f9f9f9; 
    border: 1px solid #ccc; 
    padding: 10px 15px;
    margin: 20px 0;
    border-radius: 5px; 
    text-align: center; 
}

.temporadas-anteriores-box a {
    color: #007bff;       
    text-decoration: none;  
}

.temporadas-anteriores-box a:hover {
    text-decoration: underline; 
}

header nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

header nav ul li {
    display: inline-block;
    margin: 0 10px; 
}

header nav ul li a {
    font-size: 18px;
    text-transform: uppercase; 
    color: #333; 
    text-decoration: none; 
    font-weight: bold; 
}

header nav ul li a:hover {
    color: #007bff;
}

header nav ul li.separador {
    color: #333; 
}

.boton-reglamento {
    display: inline-block;
    background-color: white;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border: 1px solid black;
    border-radius: 2px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.boton-reglamento:hover {
    background-color: #f3f0d0;
}

/* Posicionamos el contenedor de la imagen y el número */
.posicion-contenedor {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 25px;
    text-align: center;
}

/* Estilo para el número de posición */
.numero-posicion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.7);
    z-index: 1; 
}

/* Estilo para la imagen de la copa o medalla */
.imagen-posicion {
    width: 100%; 
    height: auto;
    z-index: 0; 
}


@media print {
    body {
        font-size: 14px;
        color: black;
    }

    header, footer, h1.titulo-temporada {
        display: none;
    }

    .clasificacion-campeonato {
        page-break-before: always;
        margin-top: 40px;
    }

    h2 {
        text-align: center;
        font-size: 22px;
        margin-bottom: 20px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    table th {
        border: 1px solid black;
        padding: 8px;
        color: white;
    }

    table td {
        border: 1px solid black;
        padding: 8px;
        color: black;
    }

    table th {
        background-color: #272727;
        font-weight: bold;
    }

    table td {
        text-align: center;
        font-size: 16px;
    }

    .name-column {
        font-size: 18px;
        font-weight: bold;
    }

    .posicion-contenedor {
        width: 20px;
        height: 20px;
        position: relative;
    }

    .numero-posicion {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 16px;
        font-weight: bold;
    }

    .imagen-posicion {
        width: 100%; 
        height: auto; 
    }

    .contenido {
        margin: 20px;
    }

    .no-print {
        display: none;
    }
}

/* Estilos para el modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); 
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Leyenda de Campeonatos */
.leyenda-campeonatos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start; 
}

.leyenda-fila {
    display: flex;
    justify-content: flex-start; 
    width: 100%;
}

.leyenda-item {
    display: flex;
    align-items: center;
    flex: 1 1 calc(25% - 10px);
    min-width: 200px;
    margin-bottom: 10px;
}

.color-box {
    display: inline-block;
    width: 25px;
    height: 25px;
    margin-right: 10px;
}

@media print {
    .box {
        margin-top: 20px; 
    }

    .leyenda-campeonatos {
        margin-top: 10px; 
    }

    .leyenda-item {
        margin-bottom: 15px;
    }
}

.peor-resultado {
    color: red;
    text-decoration: line-through;
    font-style: italic;
}


.galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
}

.galeria .foto {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    height: auto;
}

.galeria .foto img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria .foto img:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}


.contact-link {
    position: absolute;
    top: 30px;
    right: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.contact-link a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.contact-link img.gmail-icon {
    margin-left: 10px;
    width: 24px;
    height: 24px;
}

.vuelta-rapida {
    background-color: yellow;
    font-weight: bold;
}
