:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Poppins', sans-serif;
}

.hidden {
    display: none !important;
}

/* --- LOGOS & IMAGES --- */
.top-nav {
    width: 100%;
    margin-bottom: 40px; /* Espacio para separar del contenido siguiente */
    text-align: center;
}

.logo {
    max-height: 90px;
    width: auto;
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-header {
    display: flex;
    flex-direction: column; /* Apilado para centrar */
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.logo-small {
    max-height: 60px; /* Más grande */
    width: auto;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
}

.event-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Detrás del contenido */
    overflow: hidden;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que se vea TODA la imagen sin recortes */
    object-position: center center;
    filter: brightness(0.4) blur(3px); /* Oscurecida y ligeramente difuminada */
    display: block;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh; /* Altura mínima para que crezca si hay mucho contenido */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    text-align: center;
    padding: 60px 20px; /* Más espacio arriba y abajo */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.event-details {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    text-decoration: none; /* Para enlaces */
    color: inherit;
}

.detail-item.clickable:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.2);
}

.detail-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.date-row {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: block;
}

.time-row {
    font-size: 0.95rem;
    color: var(--text-light);
    opacity: 0.9;
    display: block;
}

.hint-btn {
    display: none; /* Oculto por defecto en ordenadores */
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(6, 182, 212, 0.1);
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    text-decoration: none;
    transition: all 0.3s;
}

@media (max-width: 1024px) {
    .hint-btn {
        display: inline-block; /* Solo visible en tabletas y móviles */
    }
}

.hint-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* --- BUTTONS --- */
.btn {
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.2);
}

.btn-submit {
    background: var(--primary);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 5px 20px rgba(79, 70, 229, 0.4);
}

/* --- FORM SECTION --- */
.form-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease-out;
}

.back-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: white;
}

.form-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-container p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* --- RADIOS --- */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.radio-container:hover {
    color: white;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
}

.radio-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .checkmark:after {
    display: block;
}

.radio-container .checkmark:after {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* --- LEGAL TEXT & CHECKBOX --- */
.mg-t-20 { margin-top: 20px; }

.legal-text {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark-box {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
}

.checkbox-container:hover input ~ .checkmark-box {
    background-color: rgba(255, 255, 255, 0.2);
}

.checkbox-container input:checked ~ .checkmark-box {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark-box:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark-box:after {
    display: block;
}

.checkbox-container .checkmark-box:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- ESTILO DE ERROR PARA CHECKBOX --- */
input[type="checkbox"].invalid + .checkmark-box {
    border-color: #ff4d4d !important;
    background: rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.checkbox-container:has(input.invalid) {
    color: #ff4d4d !important;
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.error-msg {
    color: #ff4d4d;
    font-size: 0.75rem;
    font-weight: 600;
    display: none;
    margin-top: 4px;
    animation: fadeInError 0.3s ease-out;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

input.invalid,
textarea.invalid,
select.invalid {
    border-color: var(--error) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* --- SELECT STYLES --- */
select {
    background: #1e293b !important; /* Fondo sólido oscuro para legibilidad */
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

select option {
    background-color: #1e293b;
    color: white;
    padding: 10px;
}

/* --- TOAST --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 30px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.toast.success { background-color: var(--success); }
.toast.error { background-color: var(--error); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
    }

    .logo {
        max-height: 70px; /* Logo más moderado en tablets */
        padding: 10px 20px;
    }

    .hero h1 {
        font-size: 3rem; /* Título más contenido */
    }

    .event-details {
        gap: 15px;
    }

    .glass-card {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 0 15px;
        margin-bottom: 25px;
    }

    .logo {
        max-height: 70px; 
        max-width: 98%; /* Logo al máximo ancho en móvil */
        padding: 5px 10px;
    }

    .detail-text {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrado total */
        text-align: center;   /* Texto centrado */
        gap: 4px;
        width: 100%;
    }

    .date-row {
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
    }

    .time-row {
        font-size: 0.95rem;
        color: var(--text-light);
        opacity: 0.9;
    }

    .hint-btn {
        margin-top: 8px;
        font-size: 0.75rem;
        color: var(--accent);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: rgba(6, 182, 212, 0.1);
        padding: 5px 12px;
        border-radius: 6px;
        border: 1px solid rgba(6, 182, 212, 0.3);
        text-decoration: none; /* Sin subrayado de enlace */
        display: inline-block;
        transition: all 0.3s;
    }

    .hint-btn:hover {
        background: var(--accent);
        color: #fff;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .event-details {
        flex-direction: column; /* Apilamos los detalles en móvil */
        align-items: center;
        width: 100%;
        gap: 20px;
    }

    .detail-item {
        width: 100%; /* Ocupan todo el ancho */
        justify-content: center;
    }

    .glass-card {
        padding: 25px 15px;
        border-radius: 16px;
    }

    .form-container h2 {
        font-size: 1.6rem;
    }

    .logo-small {
        max-height: 45px;
    }
}

/* --- SISTEMA DE CITAS (PASTILLAS) --- */
.pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    flex: 1 1 calc(33.333% - 12px);
    min-width: 90px;
}

.pill strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.pill small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pill:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.pill.selected {
    background: var(--primary);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.pill.selected small {
    color: rgba(255, 255, 255, 0.8);
}

.pill.disabled {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.pill.disabled small {
    color: rgba(255, 255, 255, 0.3);
}

/* --- ESTILOS DE FORMULARIO PREMIUM (OFERTAS) --- */
input[type="number"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    width: 100%;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.file-upload-container {
    width: 100%;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.file-upload-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: white;
}

.file-upload-label .icon {
    font-size: 1.5rem;
}

.file-upload-label.has-file {
    border-style: solid;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.invalid-container {
    border: 2px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    border-radius: 12px;
    padding: 10px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


