/* ============================================================
   ESTILOS GENERALES
   FERIA 01 DE NOVIEMBRE - CUREPTO
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background: #f3f4f6;

    color: #1f2937;
}


/* ============================================================
   INICIO
   ============================================================ */

.inicio {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;
}


.inicio-contenido {
    width: 100%;
    max-width: 700px;

    background: #ffffff;

    border-radius: 16px;

    padding: 50px 40px;

    text-align: center;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}


.logo-municipal {
    color: #1d4ed8;

    font-size: 14px;

    font-weight: bold;

    letter-spacing: 1px;

    margin-bottom: 25px;
}


.inicio h1 {
    font-size: 40px;

    color: #111827;

    margin-bottom: 10px;
}


.inicio h2 {
    font-size: 24px;

    font-weight: normal;

    color: #4b5563;

    margin-bottom: 25px;
}


.inicio p {
    color: #6b7280;

    font-size: 17px;

    line-height: 1.6;

    margin-bottom: 35px;
}


/* ============================================================
   BOTONES
   ============================================================ */

.btn-principal {
    display: inline-block;

    background: #1d4ed8;

    color: #ffffff;

    text-decoration: none;

    border: none;

    padding: 14px 28px;

    border-radius: 8px;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


.btn-principal:hover {
    background: #1e40af;
}


.btn-secundario {
    display: inline-block;

    background: #e5e7eb;

    color: #374151;

    text-decoration: none;

    border: none;

    padding: 14px 28px;

    border-radius: 8px;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;
}


.btn-secundario:hover {
    background: #d1d5db;
}


/* ============================================================
   FORMULARIO
   ============================================================ */

.pagina-formulario {
    min-height: 100vh;

    padding: 40px 20px;
}


.contenedor-formulario {
    width: 100%;

    max-width: 900px;

    margin: 0 auto;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);

    overflow: hidden;
}


/* ============================================================
   CABECERA DEL FORMULARIO
   ============================================================ */

.formulario-header {
    background: #1d4ed8;

    color: #ffffff;

    padding: 40px;

    text-align: center;
}


.formulario-header .logo-municipal {
    color: #dbeafe;

    margin-bottom: 15px;
}


.formulario-header h1 {
    font-size: 32px;

    margin-bottom: 8px;
}


.formulario-header h2 {
    font-size: 21px;

    font-weight: normal;

    margin-bottom: 12px;
}


.formulario-header p {
    color: #dbeafe;

    font-size: 16px;
}


/* ============================================================
   ALERTA
   ============================================================ */

.alerta-info {
    margin: 30px;

    padding: 18px 20px;

    background: #eff6ff;

    border-left: 4px solid #2563eb;

    border-radius: 8px;

    color: #1e3a8a;
}


.alerta-info strong {
    display: block;

    margin-bottom: 6px;
}


.alerta-info p {
    line-height: 1.5;
}


/* ============================================================
   SECCIONES
   ============================================================ */

.form-seccion {
    padding: 30px;

    border-top: 1px solid #e5e7eb;
}


.seccion-titulo {
    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}


.seccion-titulo > span {
    width: 38px;

    height: 38px;

    min-width: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #dbeafe;

    color: #1d4ed8;

    font-weight: bold;
}


.seccion-titulo h3 {
    font-size: 20px;

    margin-bottom: 4px;
}


.seccion-titulo p {
    color: #6b7280;

    font-size: 14px;
}


/* ============================================================
   CAMPOS
   ============================================================ */

.fila {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    margin-bottom: 20px;
}


.fila:last-child {
    margin-bottom: 0;
}


.campo {
    margin-bottom: 20px;
}


.campo:last-child {
    margin-bottom: 0;
}


.campo label,
.archivo-campo label {
    display: block;

    font-weight: bold;

    font-size: 14px;

    margin-bottom: 8px;

    color: #374151;
}


.campo input,
.campo select {
    width: 100%;

    height: 46px;

    padding: 0 13px;

    border: 1px solid #d1d5db;

    border-radius: 7px;

    font-size: 15px;

    background: #ffffff;

    color: #111827;

    outline: none;

    transition: border-color 0.2s,
                box-shadow 0.2s;
}


.campo input:focus,
.campo select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


.obligatorio {
    color: #dc2626;
}


/* ============================================================
   RADIO
   ============================================================ */

.opciones-radio {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;
}


.radio-card {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 18px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    cursor: pointer;

    transition: 0.2s;
}


.radio-card:hover {
    border-color: #2563eb;

    background: #f8fbff;
}


.radio-card input {
    margin-top: 3px;
}


.radio-contenido {
    display: flex;

    flex-direction: column;

    gap: 6px;
}


.radio-contenido strong {
    font-size: 16px;
}


.radio-contenido small {
    color: #6b7280;

    line-height: 1.4;
}


/* ============================================================
   ARCHIVOS
   ============================================================ */

.archivo-campo {
    margin-bottom: 20px;

    padding: 20px;

    background: #f9fafb;

    border: 1px dashed #cbd5e1;

    border-radius: 10px;
}


.archivo-campo:last-child {
    margin-bottom: 0;
}


.archivo-campo input[type="file"] {
    width: 100%;

    margin-top: 5px;

    padding: 10px;

    background: #ffffff;

    border: 1px solid #d1d5db;

    border-radius: 7px;
}


.archivo-campo small {
    display: block;

    color: #6b7280;

    margin-top: 8px;

    line-height: 1.4;
}


/* ============================================================
   CHECKBOX
   ============================================================ */

.checkbox {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    cursor: pointer;

    line-height: 1.5;
}


.checkbox input {
    margin-top: 4px;

    width: 18px;

    height: 18px;

    min-width: 18px;
}


/* ============================================================
   MENSAJES RUT
   ============================================================ */

.mensaje-error {
    display: block;

    color: #dc2626;

    margin-top: 7px;

    font-size: 13px;
}


.mensaje-exito {
    display: block;

    color: #16a34a;

    margin-top: 7px;

    font-size: 13px;
}


.campo-error {
    border-color: #dc2626 !important;

    background: #fff7f7 !important;
}


/* ============================================================
   AYUDA
   ============================================================ */

.texto-ayuda {
    display: block;

    color: #6b7280;

    font-size: 13px;

    margin-top: 7px;
}


/* ============================================================
   OCULTAR ELEMENTOS
   ============================================================ */

.oculto {
    display: none !important;
}


/* ============================================================
   ACCIONES
   ============================================================ */

.acciones-formulario {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 30px;

    border-top: 1px solid #e5e7eb;

    background: #f9fafb;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 750px) {

    .fila {
        grid-template-columns: 1fr;

        gap: 0;
    }


    .opciones-radio {
        grid-template-columns: 1fr;
    }


    .formulario-header {
        padding: 30px 20px;
    }


    .formulario-header h1 {
        font-size: 27px;
    }


    .form-seccion {
        padding: 25px 20px;
    }


    .alerta-info {
        margin: 20px;
    }


    .acciones-formulario {
        padding: 20px;

        flex-direction: column-reverse;
    }


    .acciones-formulario a,
    .acciones-formulario button {
        width: 100%;

        text-align: center;
    }

}


@media (max-width: 450px) {

    .pagina-formulario {
        padding: 0;
    }


    .contenedor-formulario {
        border-radius: 0;

        min-height: 100vh;
    }


    .formulario-header h1 {
        font-size: 24px;
    }


    .formulario-header h2 {
        font-size: 18px;
    }

}

/* ============================================================
   BOTÓN DESHABILITADO
   ============================================================ */

.btn-principal:disabled {
    background: #9ca3af;

    color: #e5e7eb;

    cursor: not-allowed;

    opacity: 0.7;
}


.btn-principal:disabled:hover {
    background: #9ca3af;
}

.logo-municipal {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 25px;
}

.logo-municipal img {
    display: block;

    width: auto;
    max-width: 220px;
    height: auto;
    max-height: 120px;

    object-fit: contain;
}
