@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

/* RESET BOTONES */
button {
    font-family: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
}

/* GENERAL / BODY */
body {
    background-color: rgb(8, 31, 92);
    background-image: url(ADN.png);
    background-repeat: repeat;
    background-size: 380px;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
}

/* CARTAS — ESTILO TRANSPARENTE */
.carta {
    width: 88%;
    max-width: 760px;
    margin: 12px auto;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 22px 26px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    color: #ffffff;
    box-sizing: border-box;
}

.box-titulo {
    text-align: center;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.logo-cibiogen {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.titulo-cibiogen {
    font-family: 'Noto Serif', serif;
    font-weight: 900;
    font-size: clamp(26px, 6vw, 44px);
    line-height: 1.1;
    letter-spacing: .04em;
    color: #ffffff;
    display: block;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

/* TITULO DEL FORMULARIO */
.form-titulo {
    text-align: center;
    margin-bottom: 4px;
}

.form-titulo h1 {
    color: #ffffff;
    font-family: 'Noto Serif', serif;
    font-weight: 900;
    font-size: 1.5rem;
    margin: 0 0 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.form-titulo p {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Noto Serif', serif;
    font-size: 0.9rem;
    margin: 0 auto;
    max-width: 480px;
}

/* SECCIONES DEL FORMULARIO */
.seccion-form, .seccion-form *, .fila-form, .fila-form * {
    box-sizing: border-box;
}

.seccion-form {
    text-align: left;
    width: 100%;
    margin-top: 22px;
}

.seccion-form:first-of-type {
    margin-top: 12px;
}

.seccion-form h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.campo-form {
    margin-bottom: 14px;
}

.campo-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    font-family: 'Noto Serif', serif;
}

.campo-form .ayuda-form {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.campo-form input[type="text"],
.campo-form input[type="tel"],
.campo-form select {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.campo-form select option {
    color: #000;
}

.campo-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.campo-form input:focus,
.campo-form select:focus {
    outline: none;
    border-color: #9db8e8;
    background: rgba(255, 255, 255, 0.16);
}

.campo-form.corto input {
    max-width: 200px;
}

.fila-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px 16px;
}

.oculto-form {
    display: none !important;
}

/* AVISO DE POSTULACIONES CERRADAS */
.aviso-cerrado-form {
    display: none;
    text-align: center;
    padding: 20px 18px;
    margin-top: 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 179, 71, 0.5);
    background: rgba(255, 179, 71, 0.12);
}

.aviso-cerrado-form p {
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-family: 'Noto Serif', serif;
}

/* SUBIDA DE PDF */
.archivo-input-form {
    border: 1.5px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.05);
}

.archivo-input-form input {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
}

/* BOTON DE ENVIO */
.btn-enviar-form {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: rgb(8, 31, 92);
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}

.btn-enviar-form:hover {
    background: #ffffff;
}

.btn-enviar-form:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ESTADOS Y EXITO */
#mensaje-form {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: none;
    box-sizing: border-box;
}

#mensaje-form.ok {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    color: #c8e6c9;
    border: 1px solid rgba(165, 214, 167, 0.4);
}

#mensaje-form.error {
    display: block;
    background: rgba(185, 39, 14, 0.2);
    color: #ffcdc0;
    border: 1px solid rgba(255, 138, 101, 0.4);
}

.campo-invalido-form {
    border-color: #ff8a65 !important;
    box-shadow: 0 0 0 1px #ff8a65;
    background: rgba(185, 39, 14, 0.18) !important;
}

.pantalla-exito-form {
    display: none;
    text-align: center;
}

.pantalla-exito-form.visible {
    display: block;
}

.pantalla-exito-form .icono-exito {
    font-size: 2.6rem;
    margin-bottom: 10px;
}

.pantalla-exito-form h2 {
    color: #ffffff;
    font-family: 'Noto Serif', serif;
    font-size: 1.2rem;
    margin: 0 0 8px;
}

.pantalla-exito-form p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
}

.btn-reiniciar-form {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}

.btn-reiniciar-form:hover {
    background: rgba(255, 255, 255, 0.24);
}

/* SCROLLBAR */
html {
    scrollbar-width: thin;
    scrollbar-color: #2a52ad rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9db8e8, #1e3f8f);
    border-radius: 20px;
    border: 2px solid rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b9c4de, #2a52ad);
}

/* RESPONSIVE */
@media (min-width: 640px) {
    .fila-form.tres { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 768px) {
    .carta {
        width: 70%;
    }
}

@media (max-width: 520px) {
    .carta {
        padding: 18px 16px;
    }

    .box-titulo {
        flex-direction: column;
        gap: 8px;
    }

    .logo-cibiogen {
        width: 96px;
        height: 96px;
    }

    .campo-form input[type="text"],
    .campo-form input[type="tel"],
    .campo-form select,
    .campo-form.corto input {
        max-width: none;
        font-size: 16px;
        padding: 12px;
    }

    .campo-form label {
        font-size: 0.9rem;
    }

    .btn-enviar-form {
        font-size: 1.05rem;
        padding: 14px 16px;
    }
}