/* FORMULARIO ADHESION RED */

/* Tarjeta principal */

form.red-adhesion,
.red-adhesion form {
    max-width: 850px;
    margin: 35px auto;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e2e8d9;
    border-top: 5px solid #648f3c;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    box-sizing: border-box;
    color: #374151;
}

/* Titulos */

.red-adhesion h1,
.red-adhesion h2 {
    color: #648f3c;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

/* Etiquetas */

.red-adhesion label {
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Campos */

.red-adhesion input[type="text"],
.red-adhesion input[type="email"],
.red-adhesion input[type="tel"],
.red-adhesion input[type="number"],
.red-adhesion select,
.red-adhesion textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    background: #f8faf6;
    border: 1px solid #d4dfcc;
    border-radius: 8px;
    color: #374151;
    font-size: 15px;
    box-sizing: border-box;
    box-shadow: none;
    transition: all 0.25s ease;
}

/* Campos seleccionados */

.red-adhesion input:focus,
.red-adhesion select:focus,
.red-adhesion textarea:focus {
    background: #ffffff;
    border-color: #648f3c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(100,143,60,0.18);
}

/* Textos de ayuda */

.red-adhesion input::placeholder {
    color: #778170;
    font-size: 14px;
}

/* Separacion entre campos */

.red-adhesion .control-group,
.red-adhesion .form-group,
.red-adhesion .mb-3 {
    margin-bottom: 24px;
}

/* Casillas de seleccion */

.red-adhesion input[type="radio"],
.red-adhesion input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: #648f3c;
    margin: 5px 8px 5px 0;
    vertical-align: middle;
    cursor: pointer;
}

/* Enlaces */

.red-adhesion a {
    color: #527b30;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.red-adhesion a:hover {
    color: #008f89;
}

/* Boton de envio */

.red-adhesion button[type="submit"],
.red-adhesion input[type="submit"] {
    display: block;
    width: 100%;
    margin: 30px auto 10px;
    padding: 17px 25px;
    background: linear-gradient(
        135deg, #648f3c, #527b30
    );
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(100,143,60,0.25);
    transition: all 0.25s ease;
}

.red-adhesion button[type="submit"]:hover,
.red-adhesion input[type="submit"]:hover {
    background: #466b28;
    transform: translateY(-2px);
}

/* Version movil */

@media (max-width: 767px) {
    form.red-adhesion,
    .red-adhesion form {
        padding: 22px;
        margin: 20px 8px;
        border-radius: 14px;
    }

    .red-adhesion h1,
    .red-adhesion h2 {
        font-size: 24px;
    }

    .red-adhesion label {
        font-size: 14px;
    }
}

/* ==========================================
   CABECERA FORMULARIO ADHESION RED
   ========================================== */

.red-cabecera {
    max-width: 800px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 35px 20px 10px;
    text-align: center;
    font-family: inherit;
    box-sizing: border-box;
}

/* Icono superior */

.red-cabecera .red-cabecera-icono {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    background: #dfead5;
    color: #527b30;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* Nombre de la RED */

.red-cabecera .red-cabecera-subtitulo {
    color: #527b30;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Titulo principal */

.red-cabecera h1 {
    font-family: inherit !important;
    font-size: 38px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: #527b30 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    margin: 0 0 18px !important;
    letter-spacing: -0.5px;
}

/* Lema */

.red-cabecera .red-cabecera-lema {
    max-width: 650px;
    margin: 0 auto 25px;
    font-size: 20px;
    line-height: 1.6;
    font-weight: 400;
    color: #596451;
}

/* Tarjeta informativa */

.red-cabecera .red-cabecera-info {
    background: #ffffff;
    border: 1px solid #dfe7d8;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 25px auto 0;
    box-shadow: 0 4px 15px rgba(0,0,0,.03);
}

/* Texto informativo */

.red-cabecera .red-cabecera-info p {
    color: #465442;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.8;
    margin: 0;
}

/* Aviso del manifiesto */

.red-cabecera .red-cabecera-manifiesto {
    border-top: 1px solid #e2e9db;
    margin-top: 20px;
    padding-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: #527b30;
    line-height: 1.6;
}

.red-cabecera .red-cabecera-manifiesto i {
    margin-right: 8px;
    font-size: 18px;
}

/* Adaptacion a dispositivos moviles */

@media (max-width: 767px) {

    .red-cabecera {
        padding: 25px 10px 0;
    }

    .red-cabecera h1 {
        font-size: 30px !important;
    }

    .red-cabecera .red-cabecera-subtitulo {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .red-cabecera .red-cabecera-lema {
        font-size: 17px;
    }

    .red-cabecera .red-cabecera-info {
        padding: 20px 15px;
    }

    .red-cabecera .red-cabecera-icono {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
}

/* ICONO DE LA CABECERA RED */

.red-cabecera .red-cabecera-icono::before {
    content: "";
    display: block;
    width: 38px;
    height: 38px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23527b30' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.red-cabecera-icono span,
.red-cabecera-icono i {
    display: none;
}

/* ==========================================
   TITULOS DE LOS APARTADOS
   ========================================== */

.red-adhesion h2.red-titulo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px;
    width: 100%;
    margin: 30px 0 24px !important;
    padding: 0 0 15px !important;
    border-bottom: 2px solid #dfe7d8;
    color: #527b30 !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: left !important;
    box-sizing: border-box;
}

/* Contenedor de los iconos */

.red-adhesion .red-titulo::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    background-color: #e6efdf;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 26px;
    border-radius: 10px;
}

/* Icono datos de adhesion */

.red-titulo-adhesion::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23527b30' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 21v-4h6v4M9 7h.01M15 7h.01M9 12h.01M15 12h.01'/%3E%3C/svg%3E");
}

/* Icono datos de contacto */

.red-titulo-contacto::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23527b30' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}

/* Icono compromiso */

.red-titulo-compromiso::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23527b30' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M9 15l2 2 5-5'/%3E%3C/svg%3E");
}

@media (max-width: 767px) {

    .red-adhesion h2.red-titulo {
        font-size: 19px !important;
        gap: 10px;
    }

    .red-adhesion .red-titulo::before {
        width: 38px;
        height: 38px;
        background-size: 22px;
    }
}

/* ==========================================
   OPCIONES DE SELECCION DEL FORMULARIO RED
   ========================================== */

/* Contenedor general del campo */

.red-adhesion .red-opciones {
    display: block !important;
    width: 100% !important;
    margin: 20px 0 25px !important;
    clear: both;
    text-align: left !important;
}

/* Etiqueta principal */

.red-adhesion .red-opciones-etiqueta {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    text-align: left !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

/* Contenedor de opciones */

.red-adhesion .red-opciones .controls,
.red-adhesion .red-opciones fieldset,
.red-adhesion .red-opciones .red-opciones-campo:not(input) {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    border: 0;
    box-sizing: border-box;
}

/* Botones radio */

.red-adhesion .red-opciones input[type="radio"] {
    display: inline-block !important;
    position: static !important;
    float: none !important;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    accent-color: #527b30;
    vertical-align: middle !important;
    cursor: pointer;
}

/* Tarjetas de las opciones */

.red-adhesion .red-opciones label:not(.red-opciones-etiqueta) {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    margin: 5px 8px 5px 0 !important;
    background: #f8faf6;
    border: 1px solid #d4dfcc;
    border-radius: 9px;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #374151 !important;
    cursor: pointer;
    box-sizing: border-box;
    transition: all .2s ease;
}

/* Efecto al pasar el raton */

.red-adhesion .red-opciones label:not(.red-opciones-etiqueta):hover {
    background: #e6efdf;
    border-color: #648f3c;
}

/* Opcion seleccionada */

.red-adhesion .red-opciones label:has(input[type="radio"]:checked) {
    background: #e6efdf;
    border-color: #648f3c;
    color: #527b30 !important;
}

/* Adaptacion a movil */

@media (max-width: 767px) {

    .red-adhesion .red-opciones label:not(.red-opciones-etiqueta) {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}

/* ==========================================
   CORRECCION DE BOTONES RADIO
   ========================================== */

.red-adhesion .red-opciones {
    display: block !important;
    width: 100% !important;
}

/* Etiqueta principal del campo */

.red-adhesion .red-opciones-etiqueta {
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

/* Botones de seleccion */

.red-adhesion .red-opciones input[type="radio"] {
    display: inline-block !important;
    float: none !important;
    position: static !important;
    width: 19px !important;
    height: 19px !important;
    margin: 0 8px 0 0 !important;
    vertical-align: middle !important;
}

/* Texto situado junto al boton */

.red-adhesion .red-opciones input[type="radio"] + label,
.red-adhesion .red-opciones input[type="radio"] + span {
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    padding: 10px 15px 10px 0 !important;
    margin: 0 12px 8px 0 !important;
    vertical-align: middle !important;
    background: transparent !important;
    border: none !important;
    font-weight: 400 !important;
    cursor: pointer;
}

/* Eliminar saltos de linea innecesarios */

.red-adhesion .red-opciones input[type="radio"] + br {
    display: none !important;
}

/* Etiquetas que contienen el boton */

.red-adhesion .red-opciones label:has(input[type="radio"]) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    width: auto !important;
    padding: 12px 15px !important;
    margin: 5px 10px 5px 0 !important;
    background: #f8faf6 !important;
    border: 1px solid #d4dfcc !important;
    border-radius: 9px;
}

/* Opcion seleccionada */

.red-adhesion .red-opciones label:has(input:checked) {
    background: #e6efdf !important;
    border-color: #648f3c !important;
}

/* ==========================================
   CASILLAS DE ACEPTACION
   ========================================== */

.red-adhesion .red-aceptacion {
    display: flow-root !important;
    width: 100% !important;
    padding: 20px !important;
    margin: 15px 0 !important;
    background: #f3f6ef !important;
    border: 1px solid #dfe7d8;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: left !important;
}

/* Etiqueta de aceptacion */

.red-adhesion .red-aceptacion-etiqueta {
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 8px 10px 8px 0 !important;
    padding: 0 !important;
    color: #374151 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    vertical-align: middle !important;
}

/* Contenedor de la casilla */

.red-adhesion .red-aceptacion .controls {
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Casilla */

.red-adhesion .red-aceptacion input[type="checkbox"] {
    display: inline-block !important;
    position: static !important;
    float: none !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 8px !important;
    accent-color: #527b30;
    vertical-align: middle !important;
    cursor: pointer;
}

/* Enlaces a los documentos */

.red-adhesion .red-aceptacion a {
    color: #527b30 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-style: normal !important;
    line-height: 1.6;
}

/* Version movil */

@media (max-width: 767px) {

    .red-adhesion .red-aceptacion {
        padding: 15px !important;
    }

    .red-adhesion .red-aceptacion-etiqueta {
        font-size: 14px !important;
    }
}

/* ==========================================
   DISENO DE TARJETAS DE SELECCION
   ========================================== */

/* Etiqueta principal del campo */

.red-adhesion .red-opciones-etiqueta {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    color: #374151 !important;
}

/* Botones radio */

.red-adhesion .red-opciones input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 10px 0 0 !important;
    accent-color: #527b30;
    cursor: pointer;
}

/* Tarjetas de las opciones */

.red-adhesion .red-opciones input[type="radio"] + label,
.red-adhesion .red-opciones input[type="radio"] + span {
    display: inline-block !important;
    width: calc(100% - 40px) !important;
    padding: 16px 20px !important;
    margin: 5px 0 10px !important;
    background: #f8faf6 !important;
    border: 1px solid #d4dfcc !important;
    border-radius: 10px !important;
    color: #374151 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    cursor: pointer;
    transition: all .2s ease;
}

/* Efecto al pasar el raton */

.red-adhesion .red-opciones input[type="radio"] + label:hover,
.red-adhesion .red-opciones input[type="radio"] + span:hover {
    background: #edf3e7 !important;
    border-color: #648f3c !important;
}

/* Tarjeta seleccionada */

.red-adhesion .red-opciones input[type="radio"]:checked + label,
.red-adhesion .red-opciones input[type="radio"]:checked + span {
    background: #e6efdf !important;
    border: 1px solid #648f3c !important;
    color: #527b30 !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(82,123,48,.10);
}

/* Si Visforms incluye el radio dentro de la etiqueta */

.red-adhesion .red-opciones label:has(input[type="radio"]) {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 16px 20px !important;
    margin: 8px 0 !important;
    background: #f8faf6 !important;
    border: 1px solid #d4dfcc !important;
    border-radius: 10px !important;
    box-sizing: border-box;
}

.red-adhesion .red-opciones label:has(input[type="radio"]:checked) {
    background: #e6efdf !important;
    border-color: #648f3c !important;
}

/* Adaptacion a moviles */

@media (max-width: 767px) {

    .red-adhesion .red-opciones input[type="radio"] + label,
    .red-adhesion .red-opciones input[type="radio"] + span {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
}
