/* ── Base y layout compartidos: index · revista · visor · nosotros ──
   Reset, body, barras de navegación (header / topbar) y contenedor principal.
   Componentes reutilizables (botones, eyebrow, mosaico) → componentes.css */

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

/* Reserva siempre el ancho de la barra de scroll → evita el salto
   horizontal al navegar entre páginas con y sin scroll. */
html {
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

header a {
    color: var(--header-text);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

header a:hover {
    opacity: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    height: 40px;
}

/* Barra superior mínima (home) */
.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding: 16px 22px;
}

.topbar a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.75;
    transition: opacity 0.25s;
}

.topbar a:hover {
    opacity: 1;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    header {
        padding: 10px 15px;
    }

    .header-logo {
        height: 30px;
    }
}
