:root {
    --azul: #003497;
    --rojo: #fb0200d4;
}

body {
    font-family: Arial, sans-serif;
    background-image: url("images/familia.jpg");
    margin: 0;
    padding: 16px;
    min-height: 100dvh;
    display: flex;
    justify-content: start;
    align-items: center;
}

.form-container {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-title {
    font-size: 22px;
    text-align: center;
    font-weight: bold;
    color: var(--azul);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-weight: bold;
    color: var(--azul);
}

input,
select {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid var(--azul);
    font-size: 16px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

/*
input:focus,
select:focus {
    border-color: var(--rojo);
}
*/

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .form-container {
        max-width: 520px;
    }
}

.btn-submit {
    padding: 14px;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: var(--azul);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s;
}

.btn-submit:hover {
    background: var(--rojo);
}

.input-error {
    border-color: #fb0200d4 !important;
    background: #ffe9e9;
}

.error-text {
    color: #fb0200d4;
    font-size: 14px;
}

.form-message {
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    opacity: 0;
    transition: 0.3s ease;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.form-message.success {
    opacity: 1;
    background: #e6f9ec;
    color: #0a7a2a;
    border: 1px solid #8ae2a7;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.form-message .msg-titulo {
    font-size: 15px;
}

.form-message .msg-cuerpo {
    font-size: 14px;
    opacity: 0.9;
}

.form-message .btn-pdf {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 14px;
    background: var(--azul);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background .2s;
}

.form-message .btn-pdf:hover {
    background: var(--rojo);
}

.form-message.error {
    opacity: 1;
    background: #fde7e7;
    color: #b30000;
    border: 1px solid #ff9b9b;
}

.form-message .btn-limpiar {
    background: #0a7a2a;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.form-message .btn-limpiar:hover {
    background: #086422;
}