main > section:first-child {
    background: var(--gris-impulsar);
    border: 1px solid var(--gris-impulsar);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    color: var(--texto-principal);
    padding: 60px 40px;
    text-align: center;
}

main > section:first-child h1 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    font-weight: bold;
}

main > section:first-child p {
    font-size: 1.1rem;
    margin: 0;
    color: var(--texto-principal);
    max-width: 700px;
    margin: 0 auto;
}

/* === CONTENEDOR MAIN === */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === FORMULARIO === */
form {
    background: var(--gris-impulsar);
    border: 1px solid var(--gris-impulsar);
    border-radius: 16px;
    backdrop-filter: blur(10px);          
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

form > h2 {
    width: 100%;
    color: var(--texto-principal);
    font-size: 1.3rem;
    margin: 15px 0 5px 0;
    border-bottom: 2px solid var(--violeta-primario);
    padding-bottom: 10px;
}

form > div {
    width: calc(50% - 10px);
    display: flex;
    flex-direction: column;
}

/* === FECHA ESTIMADA CENTRADA === */
form > div:nth-child(8) {
    width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align-last: center;
}

/* === CAMPOS QUE OCUPAN TODO EL ANCHO === */
form > fieldset {
    width: 100%;
}

form > div:nth-child(11),
form > div:nth-child(12) {
    width: 100%;
}

/* === LABEL === */
label {
    color: var(--texto-principal);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* === INPUTS, SELECT, TEXTAREA === */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--gris-impulsar);
    background: var(--gris-impulsar);
    color: var(--texto-principal);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;    
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--violeta-brillante);
    background-color: var(--gris-impulsar);
    box-shadow: 0 0 10px var(--violeta-dark);
}

/* === ICONO CALENDARIO === */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

select {
    background-color: var(--gris-impulsar);
    color: var(--texto-principal);
    cursor: pointer;
}

select option {
    background-color: var(--texto-principal);
    color: var(--texto-terciario);
}

select option:checked {
    background: linear-gradient(var(--violeta-primario), var(--violeta-primario));
    background-color: var(--violeta-primario);
}

textarea {
    resize: none;
    min-height: 150px;
    max-height: 150px;
}

/* === FIELDSET === */
fieldset {
    border: 2px solid var(--violeta-primario);
    padding: 25px;
    border-radius: 5px;
    margin: 0;
    width: 100%;
}

legend {
    color: var(--texto-principal);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 10px;
}

/* === RADIO BUTTONS Y CHECKBOXES === */
input[type="radio"],
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--violeta-primario);
    flex-shrink: 0;
}

fieldset > div {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

fieldset > div:hover {
    background-color: var(--gris-impulsar);
}

fieldset label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
}

/* === BOTONES === */
button {
  width: 85%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--gris-impulsar);
  cursor: pointer;
  color: var(--texto-principal);
  background: var(--gris-impulsar);
  transition: all 0.25s ease;
}

button:hover {
    background: linear-gradient(90deg, var(--rosa-impulsar), var(--violeta-impulsar));
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

form > button {
    width: 100%;
    text-align: center;
    display: inline-block;
}

form > button:last-of-type {
    margin-right: 0;
}

/* === PÁRRAFO DE CAMPOS OBLIGATORIOS === */
form > p {
    font-size: 0.85rem;
    color: var(--texto-secundario);
    margin: 0;
    width: 100%;
}

/* === SECCIÓN DE INSTRUCCIONES === */
main > section:last-child {
    margin-top: 50px;
    padding: 40px;
    background-color: var(--azul-profundo);
    border-radius: 8px;
}

main > section:last-child h2 {
    color: var(--texto-principal);
    font-size: 1.8rem;
    margin-top: -10px;
    margin-bottom: 30px;
}

main > section:last-child ol {
    color: var(--texto-secundario);
    padding-left: 25px;
}

main > section:last-child li {
    margin-bottom: 15px;
    line-height: 1.6;
}

main > section:last-child li::marker {
    color: var(--violeta-primario);
    font-weight: 600;
}

/* ------- Tablets ------- */
@media (max-width: 1024px) {

    main{
        width:100%;
    }
    header{
        /* necesito que los elementos de la navbar se adapten al espacio disponible*/
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        
    }
    .navbar{
        width: 100%;
        gap: 15px;
        padding: 10px 20px;
        justify-content: space-between; 
    }
    .nav-right {
        display: none;
    }
    .navbar ul{
        gap: 28px;
    }
    .logo{
        width: 160px;
        
        
    }

    section{
        width: 100%;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
    }
    form {
        width: 100%;
    }

}

/* ------- Celulares (Mobile) ------- */
@media (max-width: 768px) {
    /* Layout General */
    main {
        padding: 10px;
        width: 100%;
    }

    main > section:first-child {
        padding: 20px 10px;
    }

    /* Navbar Responsiva */
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .navbar ul {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }

    /* Formulario: Forzamos el estirado total (Imagen 1) */
    main form {
        width: 100%;
        padding: 25px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    main form > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Estilizado de Fieldsets (Radios y Checkboxes - Imagen 2) */
    main fieldset {
        padding: 15px 10px;
        width: 100%;
        margin-bottom: 20px;
    }

    main fieldset > div {
        display: flex;
        align-items: center; /* Ahora se alinean por el centro (Imagen actual corregida) */
        padding: 10px 12px;
        gap: 15px;
        text-align: left;
    }

    main fieldset label {
        margin: 0;
        font-size: 1rem;
        line-height: 1;
        flex: 1;
        cursor: pointer;
    }

    main input[type="radio"], 
    main input[type="checkbox"] {
        flex-shrink: 0;
        margin-top: 0; /* Eliminado el margen que lo desalineaba */
        width: 18px;
        height: 18px;
        accent-color: var(--violeta-primario);
    }

    /* Inputs, Selects y Botones */
    main input[type="text"],
    main input[type="email"],
    main input[type="tel"],
    main input[type="date"],
    main select,
    main textarea,
    main button {
        width: 100%;
        max-width: 100%;
    }

    select {
        text-align: center;
        text-align-last: center;
    }

    /* Secciones Extras */
    section {
        width: 100%;
        padding: 15px;
    }

    main section.cartel-postMensaje {
        border-radius: 20px;
        margin-top: 30px;
    }

    /* Footer */
    footer .logo {
        display: block;
        margin: 0 auto 15px auto;
    }
}