/* estilos.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 14px 0 0 0;
    padding: 20px;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    position: relative;
}

h1 {
    color: #5a0201;
    margin: 0;
}

.fecha-hoy {
    font-size: 1.2em;
    color: #555;
}

/* Contenedor de Resultados */
.resultados-container {
    background: linear-gradient(135deg, #590001, #7a0002);
    border-radius: 8px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.resultados-info {
    text-align: center;
}

.resultados-info h2 {
    font-size: 2em;
    margin: 0;
    font-weight: bold;
    text-transform: uppercase;
}

.resultados-info p {
    margin: 5px 0;
    font-size: 1.2em;
}

.resultados-info p:nth-child(2) {
    color: #eec469;
    font-family: cursive;
    font-size: 1.8em;
}

.resultados-info p:nth-child(3) {
    font-size: 1.8em;
    font-weight: bold;
}

.peru-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
    margin: 0 20px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.resultados-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.sorteo-headers {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 10px;
}

.sorteo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sorteo-text {
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.resultados-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.resultado-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hora {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

.imagen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.img-resultado {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.no-resultado {
    color: #ccc;
    font-style: italic;
    font-size: 0.9em;
}

.resultados-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Panel de Administración */
.form-admin {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-admin label {
    font-weight: bold;
}

.form-admin input, .form-admin select, .form-admin button {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 1.2em;
    user-select: none;
}

.form-admin button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-admin button:hover {
    background-color: #218838;
}

.mensaje {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.logout-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 600px) {
    .tabla-resultados th, .tabla-resultados td {
        padding: 8px;
    }
    .img-resultado {
        width: 90px;
        height: 90px;
    }
    h1 {
        font-size: 1.5em;
    }
}

/* Elementor Styles from Selva Paraíso */
.elementor-widget-container {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
}

.elementor-element {
    text-align: center;
}

.elementor-heading-title {
    color: #000000;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 30px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: underline;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Tabla Semanal */
.tabla-semanal {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-bottom: 40px;
}

.tabla-semanal th, .tabla-semanal td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.tabla-semanal th {
    background: linear-gradient(135deg, #5a0201, #7a0302);
    color: white;
    font-size: 0.9em;
}

.tabla-semanal tbody {
    background: linear-gradient(135deg, #590001, #7a0002);
}

.tabla-semanal td {
    background: rgba(255, 255, 255, 0.1);
    color: white; /* Para que el guion '–' sea visible */
}

.img-resultado-semanal {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0;
    vertical-align: middle;
}

.hora-columna {
    background-color: #fdfdfd !important; /* Asegura que la columna de hora permanezca clara */
    color: #333; /* Restablece el color del texto para la columna de hora */
}

.sorteo-headers-semanal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    padding: 5px 0;
}

.sorteo-text-semanal {
    font-size: 0.8em;
    font-weight: bold;
    color: #333; /* Color oscuro para que sea legible en fondo claro */
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, #5a0201, #7a0302);
    height: 60px;
    box-shadow: 0 4px 8px rgba(90, 2, 1, 0.3);
}

.navbar-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    position: relative;
    top: -30px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(179, 7, 6, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.navbar-menu {
    list-style: none;
    margin: -60px 0 0 0;
    padding: 0;
    display: flex;
    gap: 20px;
    z-index: 20;
    position: relative;
}

.navbar-menu li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.navbar-menu li a:hover, .navbar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

#navbar-toggle {
    display: none;
}

.navbar-toggle-label {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.navbar-toggle-label span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        height: auto; /* Altura automática para contener el logo y el menú */
        padding-bottom: 10px;
    }
    .navbar-container {
        position: relative; /* Para posicionar el menú desplegable correctamente */
        flex-wrap: wrap; /* Permite que el menú se coloque debajo */
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
        display: none;
        gap: 0;
        margin-top: 10px; /* Espacio entre la barra y el menú desplegado */
        order: 3; /* Asegura que el menú aparezca al final */
    }

    .navbar-menu li {
        width: 100%;
    }

    .navbar-menu li a {
        display: block;
        padding: 12px 16px;
        border-radius: 0;
    }

    .navbar-toggle-label {
        display: flex;
        position: absolute;
        top: 15px; /* Alinea verticalmente con la barra */
        right: 20px; /* Lo pega a la derecha */
    }

    #navbar-toggle:checked ~ .navbar-menu {
        display: flex;
    }

    .resultados-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .resultados-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .resultado-item {
        padding: 10px;
    }

    .img-resultado {
        width: 80px;
        height: 80px;
    }

    .imagen {
        height: 100px;
    }
}

@media (max-width: 600px) {
    .resultados-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resultados-info h2 {
        font-size: 1.5em;
    }

    .resultados-info p {
        font-size: 1em;
    }

    .resultados-logo {
        width: 80px;
        height: 80px;
    }
}
