@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;600;700&display=swap');

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

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    background-attachment: fixed;
}

/* Textura tipo pizarra */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.03) 2px, rgba(255,255,255,.03) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.02) 2px, rgba(255,255,255,.02) 4px);
    pointer-events: none;
    z-index: 0;
}

/* ==================== HEADER ==================== */
.top-banner {
    width: 100%;
    height: 12%;
    background: linear-gradient(135deg, #048625 0%, #036b1f 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid #00cc44;
    position: relative;
    z-index: 10;
}

.top-banner::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, #00cc44, #00cc44 20px, #048625 20px, #048625 40px);
}

.top-banner img {
    height: 85px;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.top-banner img:hover {
    transform: scale(1.05);
}

.top-banner .logo-left {
    flex: 0 0 15%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-banner .banner-text {
    flex: 1;
    text-align: center;
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

.top-banner .logo-right {
    flex: 0 0 15%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==================== CONTENIDO PRINCIPAL ==================== */
.content {
    display: flex;
    width: 100%;
    height: calc(100vh - 12%);
    gap: 20px;
    padding: 20px;
    align-items: center;       /* 🔹 centra verticalmente */
    justify-content: center;   /* 🔹 centra horizontalmente */
}


/* ==================== CLASES (IZQUIERDA) ==================== */
.buttons-container {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.filter-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 15px;
    border-radius: 12px;
    border: 2px solid rgba(4, 134, 37, 0.3);
    backdrop-filter: blur(10px);
}

.filter-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #00cc44;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-section select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(30, 30, 30, 0.8);
    color: white;
    border: 2px solid #048625;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-section select:hover {
    border-color: #00cc44;
    box-shadow: 0 0 10px rgba(0, 204, 68, 0.3);
}

.filter-section select:focus {
    outline: none;
    border-color: #00cc44;
    box-shadow: 0 0 15px rgba(0, 204, 68, 0.5);
}

.filter-section option {
    background: #1a1a1a;
    color: white;
    padding: 8px;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* ==================== TARJETAS ==================== */
.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #262626 0%, #1a1a1a 100%);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 3px solid rgba(4, 134, 37, 0.4);
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    will-change: transform;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 204, 68, 0) 0%, rgba(0, 204, 68, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 10px 28px rgba(4, 134, 37, 0.35);
    border-color: #00cc44;
}

.card:hover::before {
    opacity: 1;
}

.card img {
    width: 100%;
    height: 65%;
    object-fit: cover;
    flex-shrink: 0;
    filter: brightness(0.85) contrast(1.1);
    transition: filter 0.3s ease;
}

.card:hover img {
    filter: brightness(1) contrast(1.2);
}

.card p {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #00cc44;
    padding: 10px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.schedule-container {
    flex: 0 0 55%;
    max-height: 70vh;

    display: flex;
    align-items: center;       /* 🔹 centra verticalmente la imagen */
    justify-content: center;   /* 🔹 centra horizontalmente */
}



#imgho {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Para que llene visualmente el área */
    border-radius: 12px;
}


/* ==================== FORMULARIO ==================== */
.formulario {
    position: fixed;
    left: 30px;
    bottom: 30px;
    width: 340px;
    max-height: 75vh;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #048625;
    display: none;
    z-index: 2000;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #ff4444;
    transform: scale(1.1);
}

.formulario h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #00cc44;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.formulario h3 {
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #00cc44;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formulario h4 {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 500;
}

.formulario label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    margin-top: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.formulario input,
.formulario select {
    width: 100%;
    padding: 11px 12px;
    margin-bottom: 10px;
    background: rgba(50, 50, 50, 0.8);
    color: white;
    border: 2px solid rgba(4, 134, 37, 0.5);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.formulario input:focus,
.formulario select:focus {
    outline: none;
    border-color: #00cc44;
    box-shadow: 0 0 12px rgba(0, 204, 68, 0.3);
    background: rgba(50, 50, 50, 0.95);
}

.select-container {
    position: relative;
    width: 100%;
}

.select-container::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #00cc44;
    pointer-events: none;
    font-size: 12px;
}

#estado-cola {
    padding: 10px;
    background: rgba(255, 152, 0, 0.15);
    border-left: 4px solid #ff9800;
    border-radius: 6px;
    font-size: 12px;
    color: #ffb74d;
    margin: 10px 0;
    line-height: 1.4;
}

.formulario button {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#submit {
    background: linear-gradient(135deg, #048625 0%, #036b1f 100%);
    color: white;
    margin-top: 15px;
    border: 2px solid transparent;
}

#submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(4, 134, 37, 0.4);
    border-color: #00cc44;
}

#submit:active {
    transform: translateY(0);
}

.formulario button[type="button"] {
    background: rgba(200, 0, 0, 0.7);
    color: white;
}

.formulario button[type="button"]:hover {
    background: rgba(220, 0, 0, 0.9);
    box-shadow: 0 4px 12px rgba(220, 0, 0, 0.4);
}

/* ==================== MODAL CON QR ==================== */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1999;
    backdrop-filter: blur(4px);
}

.modal-inscripcion {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 2001;
    text-align: center;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 360px;
    border: 2px solid #048625;
    backdrop-filter: blur(10px);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-content {
    position: relative;
}

.modal-inscripcion h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #00cc44;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#textoModal {
    font-size: 16px;
    font-weight: 600;
    color: #aaa;
    margin: 0;
    line-height: 1.5;
}

#qrContainer {
    animation: fadeIn 0.4s ease;
}

#qrCode {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(50, 50, 50, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #048625, #036b1f);
    border-radius: 10px;
    box-shadow: 0 0 6px rgba(0, 204, 68, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00cc44, #048625);
    box-shadow: 0 0 10px rgba(0, 204, 68, 0.5);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
    .buttons-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 1024px) {
    .content {
        flex-direction: column;
    }
    

.buttons-container {
    flex: 0 0 40%;
    margin-bottom: 10px; /* un poco de aire entre clases y borde inferior */
}
    
.schedule-container {
    flex: 0 0 68%;
    height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,1);
    border-radius: 16px;
    padding: 0;
    overflow: visible;         /* ✅ permite que la imagen no se recorte */
    position: relative;
}

#imgho {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;       /* ✅ muestra toda la imagen */
    object-position: center;   /* ✅ centrada horizontalmente */
    transform: scale(1.08);    /* ✅ ligeramente más grande sin cortar */
    transform-origin: center;
    border-radius: 12px;
    filter: brightness(1.05) contrast(1.15);
}

    
    .formulario {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    .buttons-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
    
    .formulario {
        width: 95%;
        max-width: 320px;
        padding: 20px;
    }
}
/* Oculta el texto y el recuadro visible del QR sin eliminar su funcionalidad */
#qrContainer p,
#qrContainer canvas {
    display: none !important;
}
/* Ocultar únicamente el bloque visual del QR dentro del modal */
#qrContainer,
#qrContainer canvas,
#qrContainer p {
    display: none !important;
}
