.block-formulario-footer {
    padding: 80px 0;
}

.block-formulario-footer--oscuro {
    background-color: #1f2937;
}

.block-formulario-footer--claro {
    background-color: #f9fafb;
}

.block-formulario-footer__container {
    width: 100%;
    max-width: 896px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.block-formulario-footer__title {
    margin: 0 0 24px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.block-formulario-footer--oscuro .block-formulario-footer__title {
    color: #ffffff;
}

.block-formulario-footer--claro .block-formulario-footer__title {
    color: #111827;
}

.block-formulario-footer__text {
    max-width: 672px;
    margin: 0 auto 32px;
    font-size: 20px;
    line-height: 1.6;
}

.block-formulario-footer--oscuro .block-formulario-footer__text {
    color: rgba(255, 255, 255, 0.9);
}

.block-formulario-footer--claro .block-formulario-footer__text {
    color: #111827;
}

/* Botones */
.block-formulario-footer__buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.block-formulario-footer__button,
.block-formulario-footer__button-secondary {
    width: auto;
    flex: 0 0 auto;
}

.block-formulario-footer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 16px 32px;
    border: 0;
    border-radius: 8px;
    background-color: #61A229;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.block-formulario-footer__button:hover {
    background-color: #4f8821;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
    transform: translateY(-2px);
}

a.block-formulario-footer__button,
a.block-formulario-footer__button:hover {
    text-decoration: none;
}

.block-formulario-footer__button-icon {
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.25s ease;
}

.block-formulario-footer__button:hover .block-formulario-footer__button-icon {
    transform: translateX(4px);
}

.block-formulario-footer__button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.block-formulario-footer--oscuro .block-formulario-footer__button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.block-formulario-footer--oscuro .block-formulario-footer__button-secondary:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.block-formulario-footer--claro .block-formulario-footer__button-secondary {
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
}

.block-formulario-footer--claro .block-formulario-footer__button-secondary:hover {
    border-color: #61A229;
    background-color: rgba(97, 162, 41, 0.08);
    color: #61A229;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Contadores */
.block-formulario-footer__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 64px;
}

.block-formulario-footer__stat {
    text-align: center;
}

.block-formulario-footer__stat-number {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
}

.block-formulario-footer--oscuro .block-formulario-footer__stat-number {
    color: #ffffff;
}

.block-formulario-footer--claro .block-formulario-footer__stat-number {
    color: #61A229;
}

.block-formulario-footer__stat-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.block-formulario-footer--oscuro .block-formulario-footer__stat-text {
    color: rgba(255, 255, 255, 0.8);
}

.block-formulario-footer--claro .block-formulario-footer__stat-text {
    color: #111827;
}

/* Modal */
.block-formulario-footer__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.block-formulario-footer__modal.is-open {
    display: flex;
}

.block-formulario-footer__modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(4px);
}

.block-formulario-footer__modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 40px;
    border-radius: 18px;
    background-color: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.block-formulario-footer__modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.block-formulario-footer__modal-close:hover {
    background-color: #61A229;
    color: #ffffff;
}

body.block-formulario-footer-modal-open {
    overflow: hidden;
}

/* Gravity Forms dentro del modal */
.block-formulario-footer__form {
    text-align: left;
}

.block-formulario-footer__form .gform_wrapper {
    margin: 0;
}

.block-formulario-footer__form .gform_heading {
    display: none;
}

.block-formulario-footer__form .gform_fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.block-formulario-footer__form .gfield {
    margin: 0;
}

.block-formulario-footer__form .gfield_label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.block-formulario-footer__form input[type="text"],
.block-formulario-footer__form input[type="email"],
.block-formulario-footer__form input[type="tel"],
.block-formulario-footer__form input[type="url"],
.block-formulario-footer__form input[type="number"],
.block-formulario-footer__form textarea,
.block-formulario-footer__form select {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.block-formulario-footer__form textarea {
    min-height: 130px;
    resize: vertical;
}

.block-formulario-footer__form input:focus,
.block-formulario-footer__form textarea:focus,
.block-formulario-footer__form select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px #61A229;
}

.block-formulario-footer__form .gform_footer,
.block-formulario-footer__form .gform_page_footer {
    margin: 28px 0 0;
    padding: 0;
}

.block-formulario-footer__form .gform_button,
.block-formulario-footer__form input[type="submit"],
.block-formulario-footer__form button[type="submit"] {
    width: 100%;
    min-height: 56px;
    padding: 16px 32px;
    border: 0;
    border-radius: 8px;
    background-color: #61A229;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(97, 162, 41, 0.25);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.block-formulario-footer__form .gform_button:hover,
.block-formulario-footer__form input[type="submit"]:hover,
.block-formulario-footer__form button[type="submit"]:hover {
    background-color: #4f8821;
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(97, 162, 41, 0.32);
    transform: translateY(-1px);
}

.block-formulario-footer__form .gform_validation_errors,
.block-formulario-footer__form .validation_error {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #b91c1c;
}

.block-formulario-footer__form .gfield_validation_message,
.block-formulario-footer__form .validation_message {
    margin-top: 8px;
    color: #dc2626;
    font-size: 14px;
}

.block-formulario-footer__form .gform_confirmation_message {
    padding: 18px 20px;
    border-radius: 8px;
    background-color: #f0fdf4;
    color: #166534;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
    text-align: center;
}

/* Estilos extra para Gravity Forms dentro del modal */
.block-formulario-footer__form .gform_wrapper.gravity-theme {
    font-family: inherit;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_label {
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_required {
    color: #61A229;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="text"],
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="email"],
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="tel"],
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="url"],
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="number"],
.block-formulario-footer__form .gform_wrapper.gravity-theme textarea,
.block-formulario-footer__form .gform_wrapper.gravity-theme select {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
    font-family: inherit;
    outline: none;
    box-shadow: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme textarea {
    min-height: 130px;
    resize: vertical;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme input:focus,
.block-formulario-footer__form .gform_wrapper.gravity-theme textarea:focus,
.block-formulario-footer__form .gform_wrapper.gravity-theme select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px #61A229;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme input::placeholder,
.block-formulario-footer__form .gform_wrapper.gravity-theme textarea::placeholder {
    color: #9ca3af;
}

/* Botón Gravity Forms con estilo EIA21 */
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_footer,
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_page_footer {
    position: relative;
    margin: 28px 0 0;
    padding: 0;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_button,
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="submit"],
.block-formulario-footer__form .gform_wrapper.gravity-theme button[type="submit"] {
    width: 100%;
    min-height: 56px;
    padding: 16px 56px 16px 32px;
    border: 0;
    border-radius: 8px;
    background-color: #61A229;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 10px 24px rgba(97, 162, 41, 0.25);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_button:hover,
.block-formulario-footer__form .gform_wrapper.gravity-theme input[type="submit"]:hover,
.block-formulario-footer__form .gform_wrapper.gravity-theme button[type="submit"]:hover {
    background-color: #4f8821;
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(97, 162, 41, 0.32);
    transform: translateY(-1px);
}

/* Icono SVG visual al final del botón */
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_footer::after,
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_page_footer::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 32px;
    width: 20px;
    height: 20px;
    pointer-events: none;
    transform: translateY(-50%);
    background-color: #ffffff;
    transition: transform 0.25s ease;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12H19'%3E%3C/path%3E%3Cpath d='M12 5L19 12L12 19'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12H19'%3E%3C/path%3E%3Cpath d='M12 5L19 12L12 19'%3E%3C/path%3E%3C/svg%3E");
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_footer:hover::after,
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_page_footer:hover::after {
    transform: translate(4px, -50%);
}

/* Validaciones */
.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_validation_errors {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background-color: #fef2f2;
    color: #b91c1c;
    box-shadow: none;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gform_validation_errors h2 {
    margin: 0;
    color: #b91c1c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_error input,
.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_error textarea,
.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_error select {
    border-color: #ef4444;
}

.block-formulario-footer__form .gform_wrapper.gravity-theme .gfield_validation_message,
.block-formulario-footer__form .gform_wrapper.gravity-theme .validation_message {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.4;
}

/* Mensaje de confirmación */
.block-formulario-footer__form .gform_confirmation_wrapper {
    margin: 0;
}

.block-formulario-footer__form .gform_confirmation_message {
    padding: 20px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background-color: #f0fdf4;
    color: #166534;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
    text-align: center;
}

/* Forzar variantes */
.block-formulario-footer.block-formulario-footer--claro {
    background: #f9fafb !important;
    background-color: #f9fafb !important;
}

.block-formulario-footer.block-formulario-footer--claro .block-formulario-footer__title,
.block-formulario-footer.block-formulario-footer--claro .block-formulario-footer__text,
.block-formulario-footer.block-formulario-footer--claro .block-formulario-footer__stat-text {
    color: #111827 !important;
}

.block-formulario-footer.block-formulario-footer--claro .block-formulario-footer__stat-number {
    color: #61A229 !important;
}

.block-formulario-footer.block-formulario-footer--oscuro {
    background: #1f2937 !important;
    background-color: #1f2937 !important;
}

.block-formulario-footer.block-formulario-footer--oscuro .block-formulario-footer__title {
    color: #ffffff !important;
}

.block-formulario-footer.block-formulario-footer--oscuro .block-formulario-footer__text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.block-formulario-footer.block-formulario-footer--oscuro .block-formulario-footer__stat-number {
    color: #ffffff !important;
}

.block-formulario-footer.block-formulario-footer--oscuro .block-formulario-footer__stat-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Responsive */
@media (min-width: 640px) {
    .block-formulario-footer__container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .block-formulario-footer__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .block-formulario-footer__title {
        font-size: 36px;
    }
}

@media (min-width: 1024px) {
    .block-formulario-footer__container {
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media (max-width: 767px) {
    .block-formulario-footer {
        padding: 64px 0;
    }

    .block-formulario-footer__title {
        font-size: 28px;
    }

    .block-formulario-footer__text {
        font-size: 18px;
        margin-bottom: 28px;
    }

    .block-formulario-footer__buttons {
        gap: 12px;
    }

    .block-formulario-footer__button,
    .block-formulario-footer__button-secondary {
        max-width: 100%;
    }

    .block-formulario-footer__stats {
        margin-top: 48px;
    }

    .block-formulario-footer__modal {
        padding: 16px;
    }

    .block-formulario-footer__modal-dialog {
        padding: 56px 24px 28px;
        border-radius: 14px;
    }

    .block-formulario-footer__form .gform_wrapper.gravity-theme .gform_button,
    .block-formulario-footer__form .gform_wrapper.gravity-theme input[type="submit"],
    .block-formulario-footer__form .gform_wrapper.gravity-theme button[type="submit"] {
        font-size: 16px;
        padding-left: 24px;
        padding-right: 52px;
    }

    .block-formulario-footer__form .gform_wrapper.gravity-theme .gform_footer::after,
    .block-formulario-footer__form .gform_wrapper.gravity-theme .gform_page_footer::after {
        right: 24px;
    }
}