/* HOJA DE ESTILO STYLEPUBLIC.CSS (ORDENADA Y COMENTADA)  */

/* =========================================================
   VARIABLES GLOBALES — CONTRASTE AAA
========================================================= */
:root {
    /* Colores principales */
    --color-primario: #155a44;
    /* Verde oscuro */
    --color-acento: #0d47a1;
    /* Azul oscuro */
    --color-fondo: #e3f2fd;
    /* Tarjetas / bloques */
    --color-texto: #000000;
    /* Texto principal */
    --color-blanco: #ffffff;
    --color-focus: #ffeb3b;
    /* Foco visible AAA */

    /* UI */
    --radio: 12px;
    --sombra: 0 8px 24px rgba(0, 0, 0, 0.55);

    /* Bordes y sombras */
    --radio-borde: 8px;
    --sombra-caja: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Tipografía */
    --fuente-base: 'Poppins', sans-serif;
    --fuente-secundaria: sans-serif;
    /* --fuente-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; */
    /***********************************/

    --color-borde-input: #ccc;
    --color-boton-hover: #0056b3;
    --color-error: red;
    /* Transiciones */
    --transicion-boton: background-color 0.3s ease;
}

/* =========================================================
   RESET BÁSICO
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================================
   BODY — LECTURA CÓMODA
========================================================= */
body {
    font-family: var(--fuente-base);
    background: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.8;
    font-size: 1.05rem;
    /* background: var(--color-fondo-body);
    min-height: 100dvh;
    padding: 20px;
    display: flex;
    align-items: center; */
}

/* =========================================================
   FOCUS VISIBLE GLOBAL (WCAG AAA)
========================================================= */
a:focus-visible,
button:focus-visible,
:focus-visible {
    outline: 4px solid var(--color-focus);
    outline-offset: 4px;
}

/* =========================================================
   ENLACES — SUBRAYADO CALMADO
========================================================= */
a {
    color: var(--color-acento);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.25s ease-out;
}

a:hover,
a:focus-visible {
    background-size: 100% 2px;
}

/* Subrayado más fino en texto largo */
.contenedor a:not(.btn) {
    background-size: 0% 1.5px;
}

.contenedor a:not(.btn):hover,
.contenedor a:not(.btn):focus-visible {
    background-size: 100% 1.5px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    a {
        transition: none;
    }
}

/* =========================================================
   SKIP LINK — ACCESIBILIDAD TECLADO
========================================================= */
.skip-link {
    position: absolute;
    top: -70px;
    left: 10px;
    background: var(--color-blanco);
    color: var(--color-texto);
    padding: 10px;
    z-index: 1000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 325px;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */
.contenedor {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* =========================================================
   HERO
========================================================= */
.hero {
    border-bottom: 3px solid var(--color-blanco);
    position: relative;
    overflow: hidden;
    height: 380px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
}

/* Overlay oscuro para contraste AAA */
.hero::after {
    content: "";
    position: absolute;
    border-bottom: 3px solid var(--color-blanco);
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.logo-hero {
    width: 4rem;
    height: auto;
}

.logo-hero .st1 {
    fill: #155A44;
    stroke: #155A44;
    stroke-miterlimit: 10;
}

.logo-hero .st2 {
    fill: #FFFFFF;
    stroke: #FFFFFF;
    stroke-width: 0.5;
    stroke-miterlimit: 10;
}

.logo-hero .st3 {
    fill: #FFFFFF;
}

.hero-text {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 1.5rem;
}

.hero-text h1 {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    /* margin-bottom: 0.6rem; */
}

.hero-text .lema {
    /* margin-top: 1.1rem; */
    font-size: 1.2rem;
    max-width: 540px;
}

/* =========================================================
   ICONOS
========================================================= */
.icon-main {
    margin-right: 0.6rem;
}

.icon-section {
    color: var(--color-primario);
    margin-right: 0.5rem;
}

.icon-footer {
    color: var(--color-primario);
    margin-right: 1.5rem;
}

/* =========================================================
   BLOQUES DE CONTENIDO
========================================================= */
.bloque {
    position: relative;
    overflow: hidden;
    padding: 1rem 2.8rem 0;
}

.bloque h3 {
    font-size: 1.6rem;
    font-weight: bold;
}

.bloque p {
    margin-bottom: 1.2rem;
}

.negrita {
    font-weight: bold;
}

/* Iconos decorativos de fondo */
.bloque::before {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 180px;
    color: rgba(0, 0, 0, 0.04);
    pointer-events: none;
}

/* Icono según sección */
.bloque:nth-of-type(1)::before {
    content: "\f4c4";
}

.bloque:nth-of-type(2)::before {
    content: "\f0c0";
}

.bloque:nth-of-type(3)::before {
    content: "\f06c";
}

.bloque:nth-of-type(4)::before {
    content: "\f023";
}

.bloque:nth-of-type(5)::before {
    content: "\f004";
}

/* =========================================================
   FONDO SUAVE
========================================================= */
.fondo-suave {
    background: var(--color-blanco);
    padding: 1.8rem 2.8rem;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

/* =========================================================
   LISTAS
========================================================= */
ul {
    margin: 1.2rem 0 1.6rem 1.5rem;
}

li {
    margin-bottom: 0.8rem;
}

/* =========================================================
   BOTONES
========================================================= */
.acciones {
    display: flex;
    gap: 2.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.acciones-destacadas .btn i {
    font-size: 1.35em;
    color: var(--color-acento);
    border: 12px solid red;
}

.btn {
    background: var(--color-primario);
    color: #ffffff;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

.btn.secundario {
    background: var(--color-acento);
}

.btn:hover {
    opacity: 0.8;
    transform: translateX(3px);
}

.marginf {
    margin-bottom: 1.5rem;
}

.paddsup {
    padding-top: 1.5rem;
}

/* =========================================================
   ICONOS SVG EN ACCIONES
========================================================= */

.acciones .icono-accion {
    width: 1.4em;
    height: 1.4em;
    fill: var(--color-blanco);
    /* color principal */
    margin-right: 0.4em;
    vertical-align: middle;
    transition: transform 0.2s ease, fill 0.2s ease;
}

/* Botón secundario */
.acciones .btn.secundario .icono-accion {
    fill: var(--color-blanco);
}

/* Hover / focus */
.acciones .btn:hover .icono-accion,
.acciones .btn:focus-visible .icono-accion {
    transform: scale(1.15);
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
    background: var(--color-primario);
    color: #ffffff;
    text-align: center;
    padding: 1.2rem;
    font-size: 0.95rem;
}

.footer-legal {
    text-align: center;
    font-size: 0.9rem;
}

.footer-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 0.1rem 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-legal li {
    display: inline-flex;
    align-items: center;
}

.footer-legal li:not(:last-child)::after {
    content: "|";
    margin: 0 0 0 20px;
    color: #ffffff;
}

@media (max-width: 832px) {
    .footer-legal li:not(:last-child)::after {
        content: "";
        margin: 0;
    }
}

.footer-legal a {
    color: inherit;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

/* Línea inferior al hover */
.footer-legal a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.25s ease;
}

.footer-legal a:hover::after,
.footer-legal a:focus-visible::after {
    width: 100%;
}


/* =========================================================
   VISUALLY HIDDEN
========================================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (orientation: portrait) {
    body {
        font-size: 1rem;
    }

    .contenedor {
        padding: 0rem 1.5rem 3rem;
        /* border: 2px solid red; */
    }

    .bloque {
        margin-bottom: 0;
        padding: 1.5rem;
    }

    .bloque p {
        margin-bottom: 0;
    }
}