/*
 * Estilos de la web de AFA San Buenaventura.
 * Colores del manual de marca: naranja #EA3808, verde #008A3E, azul #0284C7.
 * Tipografía: Arial.
 */

:root {
    --naranja: #EA3808;
    --verde: #008A3E;
    --azul: #0284C7;
    --lima: #46D312;
    --amarillo: #FEC500;

    --fondo: #FFFFFF;
    --texto: #000000;
    --texto-suave: #4D4D4D;
    --suave: #F6F5F1;
    --linea: #E4E4E4;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.15;
    font-weight: bold;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 1.9rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1rem;
}

p {
    margin: 0;
}

/* ---------- Estructura ---------- */

.contenedor {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 24px;
}

.contenedor-estrecho {
    max-width: 768px;
}

.centrado {
    text-align: center;
}

.franja-marca {
    height: 8px;
    background: linear-gradient(90deg,
        var(--naranja) 0 25%,
        var(--lima) 25% 50%,
        var(--azul) 50% 75%,
        var(--amarillo) 75% 100%);
}

/* ---------- Cabecera ---------- */

.cabecera {
    max-width: 1152px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.marca {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--texto);
    font-weight: bold;
    line-height: 1.2;
}

.marca img {
    width: 56px;
    height: 56px;
}

.marca small {
    display: block;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--texto-suave);
}

.menu {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: bold;
}

.menu a {
    color: var(--texto);
    text-decoration: none;
}

.menu a:hover {
    color: var(--naranja);
}

/* ---------- Portada ---------- */

.portada {
    padding: 64px 0;
}

.portada-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.etiqueta {
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--verde);
}

.texto-naranja {
    color: var(--naranja);
}

.portada-texto {
    margin-top: 20px;
    max-width: 28rem;
    font-size: 1.1rem;
    color: var(--texto-suave);
}

.portada-logo {
    display: flex;
    justify-content: center;
}

.portada-logo img {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

/* ---------- Secciones ---------- */

.seccion {
    padding: 80px 0;
}

.seccion-suave {
    background: var(--suave);
}

.seccion-verde {
    background: var(--verde);
    color: #FFFFFF;
}

.seccion-verde h2,
.seccion-verde .seccion-texto {
    color: #FFFFFF;
}

.seccion-texto {
    margin-top: 16px;
    max-width: 42rem;
    color: var(--texto-suave);
}

.seccion-texto.centrado {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Rejillas y tarjetas ---------- */

.rejilla {
    display: grid;
    gap: 24px;
    margin-top: 40px;
    list-style: none;
    padding: 0;
}

.rejilla-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rejilla-4 {
    grid-template-columns: repeat(4, 1fr);
}

.tarjeta {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.tarjeta-contorno {
    background: transparent;
    border: 2px solid var(--linea);
    box-shadow: none;
}

.tarjeta p {
    margin-top: 8px;
    color: var(--texto-suave);
}

.barra {
    display: block;
    width: 48px;
    height: 8px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.barra-naranja { background: var(--naranja); }
.barra-lima { background: var(--lima); }
.barra-azul { background: var(--azul); }

.circulo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.circulo-naranja { background: var(--naranja); }

.numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--verde);
    color: #FFFFFF;
    font-weight: bold;
}

.fecha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--azul);
    color: #FFFFFF;
    border-radius: 999px;
    padding: 4px 16px;
    font-size: 0.9rem;
    font-weight: bold;
}

.lugar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.iban {
    margin-top: 12px;
    background: var(--suave);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: var(--texto);
    word-break: break-word;
}

.caja-destacada {
    margin-top: 32px;
    border: 2px solid var(--linea);
    border-radius: 16px;
    padding: 24px;
}

.caja-destacada h3 {
    margin-top: 0;
}

.caja-destacada p {
    margin-top: 8px;
    color: var(--texto-suave);
}

/* ---------- Botones ---------- */

.botones {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
}

.boton-pequeno {
    margin-top: auto;
    padding: 8px 20px;
    font-size: 0.9rem;
    align-self: flex-start;
}

.tarjeta .boton-pequeno {
    margin-top: auto;
    padding-top: 8px;
    padding-bottom: 8px;
}

.boton-naranja {
    background: var(--naranja);
    color: #FFFFFF;
}

.boton-naranja:hover { opacity: 0.9; }

.boton-contorno {
    border-color: var(--texto);
    color: var(--texto);
    background: transparent;
}

.boton-contorno:hover {
    background: var(--texto);
    color: #FFFFFF;
}

.boton-claro {
    background: #FFFFFF;
    color: var(--texto);
}

.boton-claro:hover { opacity: 0.9; }

.boton-contorno-claro {
    border-color: rgba(255, 255, 255, 0.45);
    color: #FFFFFF;
    background: transparent;
}

.boton-contorno-claro:hover {
    border-color: #FFFFFF;
}

.enlace {
    color: var(--texto);
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Formulario ---------- */

.formulario {
    margin: 32px auto 0;
    max-width: 576px;
    text-align: left;
}

.formulario label {
    display: block;
    font-weight: bold;
    margin-top: 16px;
}

.formulario input,
.formulario textarea {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid var(--texto);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--texto);
    font-family: inherit;
    font-size: 1rem;
}

.formulario textarea {
    resize: vertical;
}

.formulario .centrado {
    margin-top: 24px;
}

.antispam {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.aviso {
    margin-top: 24px;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: bold;
}

.aviso-correcto {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

.aviso-error {
    background: #FFFFFF;
    border: 1px solid var(--naranja);
    color: var(--naranja);
}

.contacto-directo {
    margin-top: 40px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
}

.seccion-verde .botones.centrado {
    justify-content: center;
}

/* ---------- Pie ---------- */

.pie {
    max-width: 1152px;
    margin: 0 auto;
    padding: 32px 24px;
    font-size: 0.9rem;
    color: var(--texto-suave);
}

.pie a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pie a:hover {
    opacity: 0.8;
}

/* ---------- Móviles ---------- */

@media (max-width: 900px) {
    h1 {
        font-size: 2.5rem;
    }

    .portada-grid,
    .rejilla-3,
    .rejilla-4 {
        grid-template-columns: 1fr;
    }

    .portada {
        padding: 32px 0;
    }

    .seccion {
        padding: 56px 0;
    }

    /* En el móvil el menú se centra y ocupa una segunda línea ordenada. */
    .cabecera {
        flex-direction: column;
        align-items: stretch;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 18px;
        padding-top: 12px;
        border-top: 1px solid var(--linea);
        font-size: 0.85rem;
    }
}

.aviso-datos { margin-top: 1rem; padding: 1rem; border-radius: .5rem; background: rgba(255,255,255,.12); font-size: .9rem; line-height: 1.5; }
.aviso-datos p { margin: 0 0 .5rem; }
.aviso-datos a { color: inherit; font-weight: bold; text-decoration: underline; }
.formulario .casilla { display: flex; gap: .75rem; align-items: flex-start; font-weight: bold; margin-top: .75rem; }
.formulario .casilla input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex-shrink: 0; }
.privacidad { max-width: 46rem; margin: 0 auto; padding: 4rem 1.5rem; }
.privacidad dt { font-size: 1.25rem; font-weight: bold; margin-top: 1.5rem; }
.privacidad dd { margin: .25rem 0 0; line-height: 1.6; }
