.formula {
    display: grid;
    width: 90%;
    margin: auto;
    margin-top: 10px;
}

.encabezado {
    width: 80%;
    margin: auto;
    background: linear-gradient(135deg, #003399 0%, #1559a4 100%);
    color: #FC0;
    padding: 10px;
    padding-top: 1px;
    text-align: center;
    border-radius: 10px;
}

.encabezado h1 {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: 600;
}

.encabezado p {
    opacity: 0.9;
    font-size: 16px;
}

.form-container {
    width: 80%;
    margin: auto;
    padding: 40px 30px;
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.required::after {
    content: " *";
    color: #f1412d;
}

input, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

input.error, textarea.error {
    border-color: #f1412d;
}

input.success, textarea.success {
    border-color: #27ae60;
}

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

.error-message {
    color: #e74c3c;
    font-size: 14   px;
    margin-top: 7px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

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

.submit-btn {
    display: block;
    text-align: right;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;

    margin-left: auto;
    width: fit-content;
}

.submit-btn:hover {
    background: #667eea;
    color: #FC0;
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.success-message {
    display: none;
    background: #27ae60;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    animation: slideDown 0.5s;
}

.success-message.show {
    display: block;
}

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

.icon {
    position: absolute;
    right: 15px;
    top: 42px;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s;
}

.icon.show {
    opacity: 1;
}

.icon.success {
    color: #27ae60;
}

.icon.error {
    color: #e74c3c;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.submit-btn.loading .spinner {
    display: inline-block;
}

.submit-btn.loading .btn-text {
    display: none;
}

@media screen and (max-width: 700px) {
    .formula {
        width: 100%;
    }

    .encabezado {
        width: 90%;
    }

    .encabezado p {
        font-size: 14px;
    }

}

@media screen and (max-width: 480px) {
    .form-container {
        width: 100%;
        padding: 20px 10px;
    }

    .encabezado {
        width: 100%;
    }
}

@media screen and (max-width: 375px) {
   .encabezado p {
        font-size: 12px;
    }
}

@media screen and (max-width: 320px) {
    .encabezado {
        width: 100%;
        padding: 10px;
    }

    .encabezado h1 {
        font-size: 40px;
        margin-bottom: 5px;
    }

    .encabezado p {
        font-size: 11px;
    }

    .submit-btn {
        text-align: center;
        margin: auto;
    }
}


