/* móvil: apila imagen -> texto */
@media (max-width: 640px) {
    .acenvi-hero {
        display: grid;
        grid-template-columns: 1fr;
        /* una sola columna */
    }

    .hero-img {
        order: 1;
        /* primero */
        min-height: 220px;
        /* alto mínimo para que luzca */
    }

    .hero-text {
        order: 2;
        /* después */
        padding: 1.25rem 1rem 1.75rem;
        /* un poco menos de padding */
    }
}

.acenvi-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 360px;
    background: #fff;
}

.hero-img {
    background-image: url('/uploads/acenvi-footer.png');
    /* 🔁 reemplaza por tu imagen */
    background-size: cover;
    background-position: center;
}

.hero-text {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2.5rem 2rem;
    background: #f6f6f6;
}

.hero-text h2 {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0;
    font-weight: 800;
    letter-spacing: .2px;
}

.hero-text .blue {
    color: var(--blue);
}

.hero-text .gold {
    color: var(--gold);
}

/* Footer bar */
.acenvi-footer {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 1.25rem 1rem 1.75rem;
}

.acenvi-footer .address {
    margin: .2rem auto 1rem;
    max-width: 980px;
    font-weight: 600;
}

.contact-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 980px;
    margin: 0 auto;
}

.contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-decoration: none;
    color: #fff;
    padding: .35rem .75rem;
}

.contact .ico {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
    flex: 0 0 34px;
}

.contact svg {
    width: 18px;
    height: 18px;
    fill: #ffd27a;
}

.contact .text {
    font-weight: 700;
}

body {
    background: var(--brand-primary);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-container {
    padding: 2rem 0;
}

.form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header-section {
    color: white;
}

.header-section h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.header-section .event-dates {
    font-size: 1.1rem;
    opacity: 0.9;
}

.price-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.form-section {
    background: white;
    padding: 2rem;
    margin: 0rem;
    position: relative;
}

.form-section__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 2px solid var(--brand-accent);
    padding-left: 1rem;
    border-left: 2px solid var(--brand-accent);
}

.form-section__title i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.form-section__title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
    outline: none;
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-select {
    border: 1px solid var(--brand-primary);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-light) 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") right 1rem center/16px 12px no-repeat;
    appearance: none;
    height: auto;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") right 1rem center/16px 12px no-repeat;
    outline: none;
}

/* Estilos para labels */
.form-label {
    font-weight: 600;
    color: var(--brand-primary);
    margin-left: 0.75rem;
    margin-top: 0.75rem;
    display: block;
    font-size: 0.95rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

/* Checkboxes mejorados */
.form-check {
    padding-left: 2.5rem;
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.3em;
    height: 1.3em;
    margin-top: 0.15em;
    margin-left: -2.5rem;
    border: 2px solid var(--gray-border);
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check-label {
    color: white;
    font-weight: 500;
    line-height: 1.5;
}

/* Botones mejorados */
.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--brand-primary));
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--brand-accent), #10b981);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-info {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-info:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Área de subida de archivos mejorada */
.file-upload-area {
    border: 2px dashed var(--gray-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--gray-light);
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

/* Alertas mejoradas */
.alert {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
    margin: 1.5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Mejoras para grupos de formularios */
.form-row {
    margin: -0.75rem;
}

.form-row>[class*="col-"] {
    padding: 0.75rem;
}

/* Estilos para el campo de archivo */
input[type="file"] {
    border: none;
    background: transparent;
    width: 100%;
}

input[type="file"]::file-selector-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-right: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Texto muted mejorado */
.text-muted {
    color: var(--gray-text) !important;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Focus states mejorados */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mejoras para los inputs */
.form-control {
    border-bottom: 1px solid var(--brand-primary);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-light);
    height: auto;
}

/* Responsive design mejorado */
@media (max-width: 1200px) {
    .header-section h1 {
        font-size: 2.2rem;
    }

    .form-section {
        padding: 1.75rem;
        margin: 1.25rem;
    }
}

@media (max-width: 992px) {
    .header-section {
        padding: 1.5rem;
    }

    .header-section h1 {
        font-size: 2rem;
    }

    .price-display {
        font-size: 1.3rem;
        padding: 0.875rem 1.5rem;
    }

    .form-section__title {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem 0;
    }

    .form-container {
        border-radius: 16px;
        margin: 0 1rem;
    }

    .header-section {
        padding: 1.25rem;
    }

    .header-section h1 {
        font-size: 1.75rem;
    }

    .form-section {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 14px;
    }

    .form-section__title {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }

    .form-control,
    .form-select {
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }

    .price-display {
        font-size: 1.2rem;
        padding: 0.75rem 1.25rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        width: 100%;
    }

    .form-row {
        margin: -0.5rem;
    }

    .form-row>[class*="col-"] {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 1rem;
    }

    .header-section h1 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 1.25rem;
        margin: 0.75rem;
        border-radius: 12px;
    }

    .form-section__title {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .form-control,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .price-display {
        font-size: 1.1rem;
        padding: 0.625rem 1rem;
    }

    .alert {
        margin: 0.75rem;
        padding: 1rem 1.25rem;
        border-radius: 10px;
    }

    .file-upload-area {
        padding: 1.5rem;
    }

    input[type="file"]::file-selector-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .header-section h1 {
        font-size: 1.3rem;
    }

    .form-section {
        padding: 1rem;
        margin: 0.5rem;
    }

    .form-section__title {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Animaciones y transiciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de validación */
.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--danger-color);
}

.form-control:valid:not(:focus):not(:placeholder-shown) {
    border-color: var(--success-color);
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .form-control,
    .form-select {
        border-width: 3px;
    }

    .btn {
        border-width: 2px;
    }
}

#formLoader .loader-backdrop {
    position: fixed;
    inset: 0;
    background: #0b0f1a80;
    backdrop-filter: blur(2px);
    z-index: 1040;
}

#formLoader .loader-box {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    flex-direction: column;
    gap: .75rem;
    color: #e6eefc;
}

#formLoader .spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid #2b3a5c;
    border-top-color: #42a5ff;
    animation: spin 1s linear infinite;
}

#formLoader .loader-text {
    margin: 0;
    font-weight: 600;
    letter-spacing: .2px
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* opcional: desactiva interacción del formulario mientras carga */
.form-is-loading {
    pointer-events: none;
    opacity: .96;
}