:root {
    --primary-dark: #2c3e50;
    --primary-red: #dc2626;
    --primary-white: #ffffff;
    --primary-red-dark: #b91c1c;
    --surface: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-light: #e2e8f0;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
    padding-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-section {
    background: url('../img/fondo_tarjeta.jpg') no-repeat center center;
    background-size: cover;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(3px);
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #ffffff;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlight-kit {
    color: var(--primary-red);
    font-weight: 700;
    animation: pulse-highlight 2s infinite ease-in-out;
    display: inline-block;
    padding: 0 5px;
}

.highlight-discount {
    color: var(--primary-red);
    font-weight: 700;
    animation: glow-highlight 3s infinite alternate;
    display: inline-block;
    padding: 0 5px;
}

@keyframes pulse-highlight {
    0% { transform: scale(1); text-shadow: 0 0 0 rgba(220, 38, 38, 0.7); }
    50% { transform: scale(1.03); text-shadow: 0 0 10px rgba(220, 38, 38, 0.9); }
    100% { transform: scale(1); text-shadow: 0 0 0 rgba(220, 38, 38, 0.7); }
}

@keyframes glow-highlight {
    0% { text-shadow: 0 0 5px rgba(220, 38, 38, 0.7); }
    100% { text-shadow: 0 0 15px rgba(220, 38, 38, 1), 0 0 20px rgba(220, 38, 38, 0.8); }
}

@media (prefers-reduced-motion: reduce) {
    .highlight-kit, .highlight-discount {
        animation: none !important;
        color: var(--primary-red) !important;
        text-shadow: none !important;
    }
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-red);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 3rem;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.hero-cta:hover::before {
    left: 100%;
}

.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
    padding: 20px;
}

.success-message.show {
    display: flex;
    opacity: 1;
}

.success-content {
    max-width: 500px;
    padding: 40px;
    background: var(--primary-white);
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
    color: #28a745;
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounceIn 0.8s;
}

.success-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.success-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.card-animation {
    margin: 20px auto;
    width: 80%;
    max-width: 250px;
    perspective: 1000px;
}

.card-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: rotateY(0deg) scale(1);
    animation: cardFlip 3s infinite ease-in-out;
}

@keyframes slideUp {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% { opacity: 0; transform: scale3d(.3, .3, .3); }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(.9, .9, .9); }
    60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
    80% { opacity: 1; transform: scale3d(.97, .97, .97); }
    100% { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes cardFlip {
    0% { transform: rotateY(0deg) scale(1); }
    25% { transform: rotateY(10deg) scale(1.05); }
    50% { transform: rotateY(0deg) scale(1); }
    75% { transform: rotateY(-10deg) scale(1.05); }
    100% { transform: rotateY(0deg) scale(1); }
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 3rem auto;
    max-width: 600px;
}

.countdown-item {
    background: white;
    border-radius: 12px;
    padding: 15px 10px;
    min-width: 80px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
    transition: transform 0.3s;
}

.countdown-item:hover {
    transform: translateY(-5px);
}

.countdown-item span {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-item small {
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.registration {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.registration .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.registration .section-badge {
    background-color: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.registration .section-title {
    color: #003366;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.registration .section-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.registration-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.registration-form-container {
    width: 100%;
    padding: 0;
}

.form-wrapper {
    width: 100%;
    padding: 0;
}

.form-card {
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-title {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.form-subtitle {
    color: #666;
    font-size: 1rem;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.required {
    color: #dc2626;
}

.form-input, .form-textarea, .form-grid-date select, .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    text-transform: uppercase;
}

#email {
    text-transform: none !important;
}

.form-input:focus, .form-textarea:focus, .form-grid-date select:focus, .form-select:focus {
    border-color: #D90000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 0, 0, 0.2);
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* NUEVO: Grid de 3 columnas para Terminal, Hora Preferida y Horario Regreso */
.form-grid-3-horarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-date {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rfc-normal {
    font-size: 1rem;
}

.rfc-normal .form-input {
    font-size: 1rem;
    padding: 10px 15px;
    height: auto;
}

.rfc-help-link {
    font-size: 0.8rem;
    color: #0066cc;
    text-decoration: none;
    margin-left: 5px;
}

.rfc-help-link:hover {
    text-decoration: underline;
}

.rfc-normal .form-text-muted {
    font-size: 0.8rem;
    margin-top: 5px;
    color: #666;
}

.birthdate-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.birthdate-fields {
    flex: 1;
}

.age-display-side {
    font-size: 0.9rem;
    color: #0066cc;
    font-weight: 500;
    text-align: center;
    background-color: #f0f8ff;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #cce5ff;
    min-width: 80px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
}

.birthdate-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.birthdate-label {
    font-weight: 500;
    color: #333;
}

.age-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc;
    color: #666666;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background-color: #D90000;
    color: white;
}

.btn-primary:not(:disabled):hover {
    background-color: #b91c1c;
}

.btn-full {
    width: 100%;
    font-size: 1.2rem;
    padding: 15px;
}

.footer-note {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

.form-group.invalid .form-input,
.form-group.invalid .form-select,
.form-group.invalid .form-textarea {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-group.invalid .form-label {
    color: #dc2626;
}

.minor-age-message {
    color: #dc2626;
    font-size: 1rem;
    margin-top: 10px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background-color: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

/* Estilos para campos bloqueados por edad */
.form-group.disabled-field {
    opacity: 0.6;
    position: relative;
}

.form-group.disabled-field::after {
    content: "🔒 Campo bloqueado para menores";
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.7rem;
    color: #dc2626;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

.form-group.disabled-field .form-input,
.form-group.disabled-field .form-select {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.radio-option-card.disabled {
    opacity: 0.6;
}

.radio-option-card.disabled label {
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Estilo para el mensaje de menor de edad */
.minor-age-message {
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
    font-weight: 600;
    color: #dc2626;
}

.age-warning {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
}

/* Estilos para botón de envío bloqueado */
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Overlay para indicar formulario completamente bloqueado */
.form-blocked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.form-group-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.radio-option-card {
    flex: 1;
    position: relative;
}

.radio-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option-card label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.radio-option-card input[type="radio"]:checked + label {
    border-color: #D90000;
    background-color: #fff5f5;
    color: #D90000;
}

.radio-option-card label:hover {
    border-color: #D90000;
}

.form-input:disabled, 
.form-select:disabled, 
.form-textarea:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.radio-option-card input[type="radio"]:disabled + label {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #e2e8f0;
}

.age-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    display: block;
}

.age-warning i {
    color: #856404;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.age-warning h4 {
    color: #856404;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-text-muted {
    font-size: 0.8rem;
    margin-top: 5px;
    color: #666;
}

.cp-help {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Estilos para modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: var(--primary-dark);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.close-modal:hover {
    color: #ffeb3b;
}

.modal-body {
    padding: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.modal-section p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-section ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.modal-section li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.btn-modal {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-modal:hover {
    background-color: var(--primary-red-dark);
}

/* Mejoras específicas para Preferencias de Viaje */
.radio-option-card.active label {
    border-color: var(--primary-red);
    background-color: #fff5f5;
    color: var(--primary-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    transform: translateY(-2px);
}

.section-header h3 i {
    color: var(--primary-red);
    font-size: 1.2em;
}

/* Mejora visual para los selects */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Estados de hover mejorados */
.radio-option-card label:hover {
    border-color: var(--primary-red);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}
#ageDisplaySide {
    min-width: 70px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #6b7280;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Mejoras responsive para móviles */
@media (max-width: 768px) {
    .form-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .section-header { margin: 2rem 0 1.5rem; }
    .form-grid-2, .form-grid-3, .form-group-options, .form-grid-3-horarios { 
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .btn { padding: 1.25rem 1.5rem; font-size: 1.1rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .registration .section-title { font-size: 2rem; }
    .birthdate-container { flex-direction: column; gap: 10px; }
    .age-display-side { margin-top: 0; align-self: flex-start; }
    
    .form-group-options {
        gap: 10px;
    }
    
    .radio-option-card label {
        padding: 15px 10px;
        font-size: 0.9rem;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .radio-option-card label i {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .form-card { padding: 1.5rem 1rem; }
    .hero-section { padding: 60px 15px; }
    .countdown-container { gap: 10px; }
    .countdown-item { min-width: 60px; padding: 10px 5px; }
    .modal-body { padding: 15px; }
}