/* --- Estilos Generales y Reseteo Básico (Aplicables a todo el sitio) --- */
body {
    margin: 0;
    font-family: sans-serif; /* Puedes cambiar a una fuente como 'Poppins', 'Montserrat', etc. de Google Fonts */
    background-color: #000; /* Fondo negro */
    color: #fff; /* Texto blanco por defecto */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Para un texto más suave */
    text-align: center;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* --- Secciones Comunes (Footer, Disclaimer, Info Boxes - usados en ambos archivos) --- */

.disclaimer-section {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.disclaimer-section p {
    font-size: 0.9em;
    color: #aaa;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid #333;
    margin-top: 30px;
}

.footer-link {
    font-size: 1em;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #00FF00;
}

.footer {
    padding: 20px;
    background-color: #000;
    color: #777;
    font-size: 0.85em;
    border-top: 1px solid #333;
}

.super-digitalizados-link {
    color: #00FF00;
    font-weight: bold;
}

.super-digitalizados-link:hover {
    text-decoration: underline;
}

.info-boxes-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.info-box {
    background-color: #00FF00; /* Verde brillante */
    color: #000;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    flex: 1; /* Permite que las cajas se expandan */
    min-width: 200px; /* Ancho mínimo para que no se compriman demasiado */
    max-width: 30%; /* Para pantallas más grandes */
    box-sizing: border-box; /* Incluye padding en el ancho */
}

.info-box .value {
    display: block;
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-box .label {
    display: block;
    font-size: 1em;
    text-transform: uppercase;
}


/* --- Estilos Específicos para index.php (Página Principal) --- */
.header {
    background-color: #000;
    padding: 20px 0;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-image {
    max-width: 100%; /* Asegura que la imagen sea responsiva */
    height: auto;
    display: block; /* Elimina espacio extra debajo de la imagen */
    margin: 0 auto; /* Centra la imagen */
}

.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.raffle-info-section {
    background-color: #000;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.raffle-details h1 {
    color: #00FF00; /* Verde brillante */
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

.raffle-details p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.progress-bar-container {
    background-color: #333;
    border-radius: 5px;
    margin: 30px 0;
    height: 50px; /* Altura de la barra de progreso */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000; /* Color del texto dentro de la barra */
    font-weight: bold;
    font-size: 1.2em;
    background-image: linear-gradient(to right, #00FF00 50%, #333 50%); /* Simula 50% vendido */
    background-size: 200% 100%; /* Permite mover el gradiente */
    background-position: right; /* Inicialmente "vendido" a la izquierda */
    transition: background-position 0.5s ease; /* Para animar si cambias el porcentaje */
}

.progress-bar-text {
    color: #000; /* Texto negro sobre el 50% verde */
    z-index: 1; /* Asegura que el texto esté sobre el fondo */
}

.buy-tickets-button {
    background-color: #00FF00; /* Verde brillante */
    color: #000; /* Texto negro */
    border: none;
    padding: 15px 30px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%; /* Ocupa todo el ancho */
    margin-top: 20px;
}

.buy-tickets-button:hover {
    background-color: #00e000; /* Un verde un poco más oscuro al pasar el ratón */
}

.more-details-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.more-details-section h2 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacio entre los botones */
    flex-wrap: wrap; /* Para que los botones bajen en pantallas pequeñas */
    margin-bottom: 30px;
}

.detail-button {
    background-color: #00FF00; /* Verde brillante */
    color: #000; /* Texto negro */
    border: none;
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-grow: 1; /* Permite que los botones crezcan */
    max-width: 300px; /* Limita el ancho en pantallas grandes */
}

.detail-button:hover {
    background-color: #00e000;
}


/* --- Estilos Específicos para comprar.php (Página de Selección de Tickets) --- */

.comprar-header {
    background-color: #000;
    padding: 30px 20px 20px;
    text-align: center;
}

.comprar-logo {
    max-width: 150px; /* Ajusta el tamaño del logo */
    height: auto;
    margin-bottom: 20px;
}

.comprar-title {
    color: #fff;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.comprar-main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Leyenda de Colores */
.comprar-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.comprar-legend-item {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    color: #fff;
}

.comprar-legend-color {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    margin-right: 10px;
    border: 2px solid transparent; /* Borde por defecto para evitar salto al hovered */
}

.comprar-legend-color.comprado {
    background-color: #f00; /* Rojo */
}

.comprar-legend-color.pendiente {
    background-color: #FFD700; /* Dorado/Amarillo */
}

.comprar-legend-color.disponible {
    background-color: #00FF00; /* Verde brillante */
}

/* Botones de Rango de Tickets */
.comprar-ranges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 10px;
    background-color: #1a1a1a; /* Fondo más oscuro para los rangos */
    border-radius: 8px;
}

.comprar-range-button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.comprar-range-button:hover,
.comprar-range-button.active {
    background-color: #00FF00;
    color: #000;
}

/* Cuadrícula de Tickets */
.comprar-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); /* 60px mínimo por ticket */
    gap: 10px;
    margin-bottom: 40px;
}

.comprar-ticket-item {
    background-color: #333; /* Color por defecto */
    color: #fff;
    padding: 15px 5px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent; /* Para el borde al seleccionar */
    transition: background-color 0.3s ease, border-color 0.3s ease;
    user-select: none; /* Evita selección de texto */
}

/* Colores de estado de los tickets */
.comprar-ticket-item.comprado {
    background-color: #f00; /* Rojo */
    cursor: not-allowed;
    opacity: 0.7;
}

.comprar-ticket-item.pendiente {
    background-color: #FFD700; /* Dorado/Amarillo */
    color: #000; /* Texto oscuro para contraste */
    cursor: not-allowed;
    opacity: 0.8;
}

.comprar-ticket-item.disponible {
    background-color: #00FF00; /* Verde brillante */
    color: #000; /* Texto oscuro para contraste */
}

/* Efecto al pasar el ratón o seleccionar tickets disponibles */
.comprar-ticket-item.disponible:hover {
    filter: brightness(1.2); /* Un poco más brillante */
}

/* ESTILO PARA TICKETS SELECCIONADOS (como en la imagen con un borde blanco más grueso) */
.comprar-ticket-item.disponible.selected {
    border-color: #fff; /* Borde blanco para indicar selección */
    border-width: 3px; /* Borde un poco más grueso para resaltar */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7); /* Sombra para resaltarlo */
    background-color: #00CC00; /* Un verde ligeramente diferente para la selección si lo deseas, o mantener el mismo #00FF00 */
}

/* Botón Siguiente */
.comprar-next-button {
    background-color: #00FF00; /* Verde brillante */
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 40px;
}

.comprar-next-button:hover {
    background-color: #00e000;
}

.comprar-summary-section .info-boxes-container {
    display: flex; /* Asegura que se aplica el flexbox */
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 40px; /* Ajuste para espacio inferior */
}

/* --- Media Queries para Responsividad (Aplicables a todo el sitio) --- */
@media (max-width: 768px) {
    .raffle-details h1 {
        font-size: 2em;
    }

    .buy-tickets-button {
        font-size: 1.3em;
        padding: 12px 25px;
    }

    .detail-button {
        padding: 12px 20px;
        font-size: 1em;
    }

    .info-box {
        min-width: 45%; /* Dos columnas en pantallas medianas */
        max-width: 45%;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* Comprar.php specific responsive */
    .comprar-title {
        font-size: 1.6em;
    }

    .comprar-ranges {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .comprar-tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .comprar-ticket-item {
        font-size: 1em;
        padding: 12px 3px;
    }

    .comprar-next-button {
        font-size: 1.3em;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .raffle-details h1 {
        font-size: 1.8em;
    }

    .raffle-details p {
        font-size: 1em;
    }

    .progress-bar-container {
        height: 40px;
        font-size: 1em;
    }

    .buy-tickets-button {
        font-size: 1.1em;
        padding: 10px 20px;
    }

    .buttons-container {
        flex-direction: column;
        gap: 15px;
    }

    .detail-button {
        width: 90%; /* Casi todo el ancho */
        max-width: unset;
    }

    .info-box {
        width: 90%;
        max-width: unset;
    }

    .footer-link {
        font-size: 0.9em;
    }

    /* Comprar.php specific responsive */
    .comprar-title {
        font-size: 1.4em;
    }

    .comprar-legend {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .comprar-ranges {
        flex-direction: column;
        align-items: center;
    }

    .comprar-range-button {
        width: 90%;
    }

    .comprar-tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 8px;
    }

    .comprar-ticket-item {
        font-size: 0.9em;
        padding: 10px 2px;
    }

    .comprar-next-button {
        font-size: 1.1em;
        padding: 10px 20px;
    }
}