/* ===== Variables base ===== */

:root {
    --max-width: 1100px;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;

    --color-text: #222;
    --color-muted: #666;
    --color-border: #e5e5e5;
    --color-bg-soft: #f7f7f7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
    margin-top: 0;
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Header ===== */

.header-inner {
    max-width: 1280px;
    justify-content: space-between;
    min-height: 70px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    position: relative;
}

/* ===== Archives ===== */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.archive-grid article {
    background: #fff;
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e5e5;
    padding: 1rem;
}

.archive-grid article:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.archive-grid h2 {
    margin-top: 0;
}

section {
    margin-bottom: var(--space-lg);
}

.page-header {
    margin-bottom: var(--space-md);
}

.page-title {
    font-size: 2rem;
}

.page-content {
    max-width: 800px;
}

/* Menu */
.main-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    min-height: 70px;
}

.main-menu li {
    margin: 0;
}

.main-menu a {
    font-weight: 500;
    font-size: 1.25rem;
    position: relative;
    transition: color 0.25s ease;
}

.main-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #3aaed8;
    /* color corporativo */
    transition: width 0.25s ease;
}

.site-nav {
    display: flex;
    align-items: center;
    /* ← centra verticalmente */
    padding-top: 2px;
    /* o -2px si hace falta */
    margin-left: auto;
    /* empuja el menú a la derecha */
}

.site-nav .main-menu {
    display: flex;
    align-items: center;
    /* ← centra los links */
    gap: 1.5rem;
}

/* Header */
.site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    position: relative;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    height: auto;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Legal */
.legal-container {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.legal-group>.wp-block-group__inner-container {
    padding: 3rem 2.5rem;
}

@media (max-width: 768px) {

    /* Logo */
    .site-logo {
        max-height: 150px;
        width: auto;
        height: auto;
    }

    /* Contenedor del logo */
    .custom-logo-link {
        display: flex;
        align-items: center;
        height: 150px;
        /* ALTURA REAL DEL LOGO */
    }

    /* Imagen */
    .custom-logo {
        max-height: 100%;
        width: auto;
        height: auto;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
    }

    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
        padding: 1.2rem 2rem;
    }

    .menu-overlay {
        position: fixed;
        inset: 0;
        background: #e5e3e373;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
        z-index: 998;
    }

    .main-menu {
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xs);
    }

    .page-title {
        font-size: 1.6rem;
    }

    .custom-logo {
        max-height: 150px !important;
    }

    .hero-home {
        min-height: auto;
        padding: 1.25rem 1.25rem;
        color: #f8fafc;
    }

    .hero-home form {
        max-width: 80%;
    }

    .hero-home .wp-block-columns {
        gap: 0.2rem;
        /* menos espacio en vertical */
    }

    /* Menú off-canvas */
    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px;
        background: #eeeeee;
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 999;
        padding: 1.25rem 1.5rem;
    }

    .site-nav .main-menu {
        flex-direction: column;
        gap: 1.5rem;
    }

    body {
        padding-top: 180px;
        /* altura del header */
    }

    /* BOTÓN OCULTO */
    body.menu-button-hidden .menu-toggle {
        transform: translateY(-120%);
        opacity: 0;
    }

    /* Estado abierto */
    body.menu-open .site-nav {
        transform: translateX(0);
    }

    body.menu-open .menu-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    /* Legal */

    .legal-group {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 12px;
    }

    .legal-group>.wp-block-group__inner-container {
        padding: 2rem 1.4rem;
    }


}