/* Hero Container (Parent) */
.program-hero-creditos {
    min-height: 150px;
    /* Reducimos el alto mínimo para no forzar recorte en móvil */
    background-color: #F5F5F5;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

@media (min-width: 576px) {
    .program-hero-creditos {
        min-height: 250px;
    }
}

@media (min-width: 768px) {
    .program-hero-creditos {
        min-height: 380px;
        padding: 60px 0;
    }
}

@media (min-width: 1200px) {
    .program-hero-creditos {
        min-height: 480px;
        padding: 60px 0;
    }
}

@media (min-width: 1600px) {
    .program-hero-creditos {
        min-height: 550px;
    }
}

@media (min-width: 1920px) {
    .program-hero-creditos {
        min-height: 600px;
    }
}

@media (min-width: 2560px) {
    .program-hero-creditos {
        min-height: 700px;
    }
}

/* Background Image Element (Separated for Zoom Effect) */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;

    /* "Entrada Lenta" Effect */
    opacity: 0;
    transform: scale(1);
    animation: heroSlowEntry 7s ease-out forwards;
}

@media (max-width: 767px) {
    .hero-bg-image {
        /* En móvil, ajustamos el encuadre horizontal hacia la izquierda y lo mantenemos anclado arriba */
        background-position: 40% top;
    }
}


@keyframes heroSlowEntry {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Typography Updates */
.program-hero-creditos h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-text-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpText 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.3s;
}

.delay-300 {
    animation-delay: 0.5s;
}

.delay-500 {
    animation-delay: 0.7s;
}

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

.logo-responsive {
    height: 30px;
    width: auto;
    transition: height 0.3s ease;
}

@media (min-width: 768px) {
    .logo-responsive {
        height: 50px;
    }
}

/* Explicit Validation Styles */
.form-control.is-valid {
    border-color: #198754 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* =========================================
   BLINDAJE DE VALIDACIÓN (MONTO SOLICITADO)
   ========================================= */

/* Evita que Bootstrap pinte de verde campos ignorados o sin "required" cuando ocurre un submit general (.was-validated) */
.was-validated .form-control.ignore-validator-css:valid,
.was-validated .form-control.ignore-validator-css:not(.is-invalid) {
    border-color: #dee2e6 !important;
    background-image: none !important;
    padding-right: 0.75rem !important;
}

/* Permitir explícitamente el verde si nuestro JS decide que es válido con is-valid */
.form-control.ignore-validator-css.is-valid {
    border-color: #198754 !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

/* Sobrescribir validación nativa de Bootstrap con alta especificidad para errores */

.was-validated .form-control.is-invalid,
.form-control.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}


/* Estilos para que el borde de validación cubra todo el input-group */
.was-validated .input-group:has(.is-invalid) .input-group-text,
.input-group:has(.is-invalid) .input-group-text {
    border-color: #dc3545 !important;
}

.input-group:has(.is-valid) .input-group-text {
    border-color: #198754 !important;
}

/* Evitar que el icono de validación de Bootstrap se encime con el texto en el grupo */
.was-validated .input-group .form-control.is-invalid,
.input-group .form-control.is-invalid,
.input-group .form-control.is-valid {
    background-position: right 0.75rem center !important;
}

/* Custom Range Slider (Minimal) */
.monto-range-minimal {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
}

.monto-range-minimal::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--coa-green);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.monto-range-minimal::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.fw-600 {
    font-weight: 600;
}