/* ═══════════════════════════════════════════════════════════════
   OLEADA — Design System unificado (público)
   ───────────────────────────────────────────────────────────────
   Single source of truth para las vistas públicas responsive.
   Reemplaza la duplicación mobile/desktop en los layouts.

   - Los colores de MARCA (--theme-color, --accent-color) vienen
     de /branding/styles.css (generado en caliente por instancia).
   - Este archivo define tokens NEUTROS + estructura + componentes.
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────── DESIGN TOKENS ───────────────────────── */
:root {
    /* Surfaces */
    --bg-body: #f8f8f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-muted: #f5f5f5;
    --bg-sticky: rgba(255, 255, 255, 0.95);
    --footer-bg: #0f172a;

    /* Text */
    --text-primary: #1a1a2e;
    --text-strong: #1a1a2e;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-subtle: #8e8e93;
    --text-light: #555555;

    /* Borders */
    --border-card: rgba(0, 0, 0, 0.06);
    --border-color: rgba(0, 0, 0, 0.08);

    /* Shadows */
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-circle: 0 4px 14px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(0, 0, 0, 0.04);

    /* Layout */
    --desktop-max-width: 1280px;
    --content-gap: 24px;
    --section-gap: 48px;

    /* Radii */
    --radius-card: 16px;
    --radius-btn: 12px;
    --radius-pill: 9999px;
}

/* Dark mode auto-detect */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #0d0d0d;
        --bg-card: #1a1a2e;
        --bg-sidebar: #111827;
        --bg-muted: #1e1e2e;
        --bg-sticky: rgba(30, 30, 40, 0.95);
        --footer-bg: #1a1a2e;

        --text-primary: #e8e8e8;
        --text-strong: #e8e8e8;
        --text-secondary: #a0a0a0;
        --text-muted: #666666;
        --text-subtle: #555555;
        --text-light: #888888;

        --border-card: rgba(255, 255, 255, 0.06);
        --border-color: rgba(255, 255, 255, 0.08);

        --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.3);
        --shadow-circle: 0 4px 14px rgba(0, 0, 0, 0.35);
        --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
        --shadow-nav:
            0 1px 3px rgba(0, 0, 0, 0.2), 0 2px 12px rgba(0, 0, 0, 0.2);
    }
}

/* Manual dark */
body.dark {
    --bg-body: #0d0d0d;
    --bg-card: #1a1a2e;
    --bg-sidebar: #111827;
    --bg-muted: #1e1e2e;
    --bg-sticky: rgba(30, 30, 40, 0.95);
    --footer-bg: #1a1a2e;

    --text-primary: #e8e8e8;
    --text-strong: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-subtle: #555555;
    --text-light: #888888;

    --border-card: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);

    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.3);
    --shadow-circle: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.2), 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Manual light */
body.light {
    --bg-body: #f8f8f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-muted: #f5f5f5;
    --bg-sticky: rgba(255, 255, 255, 0.95);
    --footer-bg: #0f172a;

    --text-primary: #1a1a2e;
    --text-strong: #1a1a2e;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-subtle: #8e8e93;
    --text-light: #555555;

    --border-card: rgba(0, 0, 0, 0.06);
    --border-color: rgba(0, 0, 0, 0.08);

    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-circle: 0 4px 14px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ───────────────────────── BASE ───────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family:
        "Metropolis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition:
        background 0.3s ease,
        color 0.3s ease;
    /* Sin max-width — el ancho lo controla .oleada-container */
}

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

a {
    color: inherit;
}

/* ───────────────────────── CONTAINER ───────────────────────── */
.oleada-container {
    max-width: var(--desktop-max-width);
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 1024px) {
    .oleada-container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .oleada-container {
        padding: 0 16px;
    }
}

/* ───────────────────────── TOP NAVBAR ───────────────────────── */
.oleada-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-sticky);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-nav);
}

.oleada-nav-inner {
    max-width: var(--desktop-max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .oleada-nav-inner {
        padding: 0 20px;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .oleada-nav-inner {
        padding: 0 16px;
        gap: 12px;
    }
}

.oleada-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--theme-color-hex);
    letter-spacing: -0.3px;
}

.oleada-nav-brand:hover {
    opacity: 0.85;
}

.oleada-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.oleada-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.oleada-nav-link:hover {
    color: var(--theme-color-hex);
    background: rgba(var(--theme-color), 0.06);
}

.oleada-nav-link.active {
    color: var(--theme-color-hex);
    background: rgba(var(--theme-color), 0.08);
    font-weight: 600;
}

.oleada-nav-link i {
    font-size: 18px;
}

.oleada-nav-search {
    flex: 1;
    min-width: 0;
    max-width: 480px;
    position: relative;
}

.oleada-nav-search input {
    width: 100%;
    padding: 10px 20px 10px 46px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: var(--bg-muted);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
}

.oleada-nav-search input::placeholder {
    color: var(--text-muted);
}

.oleada-nav-search input:focus {
    border-color: var(--theme-color-hex);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(var(--theme-color), 0.1);
}

.oleada-nav-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.oleada-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.oleada-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-btn);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.oleada-nav-icon:hover {
    color: var(--theme-color-hex);
    background: rgba(var(--theme-color), 0.06);
}

.oleada-nav-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-btn);
    background: var(--theme-color-hex);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.oleada-nav-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--theme-color), 0.3);
}

.oleada-nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    flex-shrink: 0;
}

.oleada-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ocultar links de texto en pantallas chicas */
@media (max-width: 900px) {
    .oleada-nav-links {
        display: none;
    }

    .oleada-nav-search {
        max-width: none;
    }
}

/* ───────────────────────── BOTTOM NAV (mobile) ───────────────────────── */
.oleada-bottomnav {
    display: none;
}

@media (max-width: 768px) {
    .oleada-bottomnav {
        display: block;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        width: 100%;
        max-width: 600px;
        z-index: 999;
        background: var(--bg-card);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        padding: 4px 0 calc(env(safe-area-inset-bottom, 0px));
    }

    .oleada-bottomnav ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .oleada-bottomnav li {
        /* 5 items: 100/5 */
        width: 20%;
        padding: 6px;
    }

    .oleada-bottomnav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        text-decoration: none;
        color: var(--text-muted);
    }

    .oleada-bottomnav .oleada-bottomnav-icon {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-btn);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: background 0.2s;
    }

    .oleada-bottomnav li.active .oleada-bottomnav-icon {
        background: rgb(var(--theme-color));
        color: #fff;
    }

    .oleada-bottomnav span {
        font-size: 10px;
        font-weight: 500;
    }

    .oleada-bottomnav li.active span {
        color: rgb(var(--theme-color));
        font-weight: 600;
    }
}

/* ───────────────────────── GRID ───────────────────────── */
.oleada-grid {
    display: grid;
    gap: var(--content-gap);
}

.oleada-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.oleada-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.oleada-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}
.oleada-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}
.oleada-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    .oleada-grid-5,
    .oleada-grid-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .oleada-grid-4,
    .oleada-grid-5,
    .oleada-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .oleada-grid-3,
    .oleada-grid-4,
    .oleada-grid-5,
    .oleada-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .oleada-grid-2,
    .oleada-grid-3,
    .oleada-grid-4,
    .oleada-grid-5,
    .oleada-grid-6 {
        grid-template-columns: 1fr;
    }
}

/* ───────────────────────── CARD ───────────────────────── */
.oleada-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    cursor: pointer;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    will-change: transform;
    border: 1px solid var(--border-card);
    text-decoration: none;
    display: block;
    height: 100%;
}

.oleada-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(var(--theme-color), 0.15);
}

.oleada-card:active {
    transform: scale(0.98);
}

.oleada-card-img {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg-muted);
}

.oleada-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.oleada-card:hover .oleada-card-img img {
    transform: scale(1.05);
}

.oleada-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 2;
}

.oleada-card-body {
    padding: 14px 16px;
}

.oleada-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.oleada-card-excerpt {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.oleada-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.oleada-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.oleada-card-meta i {
    font-size: 12px;
}

/* ───────────────────────── SECTION HEADER ───────────────────────── */
.oleada-section {
    padding: var(--section-gap) 0;
}

.oleada-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.oleada-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-strong);
    margin: 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oleada-section-title i {
    font-size: 22px;
    color: rgb(var(--theme-color));
}

.oleada-see-all {
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--theme-color));
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.oleada-see-all:hover {
    gap: 8px;
}

.oleada-see-all i {
    font-size: 16px;
}

/* ───────────────────────── CHIPS (filtros) ───────────────────────── */
.oleada-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0 6px;
}

.oleada-chips::-webkit-scrollbar {
    display: none;
}

.oleada-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.15s;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

.oleada-chip:active {
    transform: scale(0.95);
}

.oleada-chip.active {
    background: rgb(var(--theme-color));
    color: #fff;
    border-color: rgb(var(--theme-color));
}

.oleada-chip i {
    font-size: 14px;
}

/* ───────────────────────── BREADCRUMB ───────────────────────── */
.oleada-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 20px;
    flex-wrap: wrap;
}

.oleada-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.oleada-breadcrumb a:hover {
    color: var(--theme-color-hex);
}

.oleada-breadcrumb .sep {
    opacity: 0.5;
}

.oleada-breadcrumb .current {
    color: var(--text-strong);
    font-weight: 600;
}

/* ───────────────────────── HERO ───────────────────────── */
.oleada-hero {
    padding: 32px 0 8px;
}

.oleada-hero h1 {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text-strong);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.oleada-hero p {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .oleada-hero h1 {
        font-size: 28px;
    }

    .oleada-hero p {
        font-size: 15px;
    }
}

/* ───────────────────────── SEARCH BAR ───────────────────────── */
.oleada-searchbar {
    position: relative;
    margin: 16px 0 4px;
}

.oleada-searchbar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.oleada-searchbar input:focus {
    border-color: rgb(var(--theme-color));
    box-shadow: 0 0 0 3px rgba(var(--theme-color), 0.1);
}

.oleada-searchbar input::placeholder {
    color: var(--text-muted);
}

.oleada-searchbar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ───────────────────────── FOOTER ───────────────────────── */
.oleada-footer {
    background: var(--footer-bg);
    color: #fff;
    margin-top: 80px;
    padding: 48px 0 32px;
    border-top: 3px solid var(--theme-color-hex);
}

.oleada-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.oleada-footer a:hover {
    color: #fff;
}

.oleada-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .oleada-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .oleada-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ───────────────────────── EMPTY STATE ───────────────────────── */
.oleada-empty {
    text-align: center;
    padding: 48px 0;
}

.oleada-empty .icon {
    font-size: 52px;
    opacity: 0.2;
    display: block;
    margin-bottom: 10px;
}

.oleada-empty h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.oleada-empty p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.oleada-empty a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    background: rgb(var(--theme-color));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* ───────────────────────── PAGINATION ───────────────────────── */
.oleada-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.oleada-pagination a,
.oleada-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

.oleada-pagination .active span {
    background: rgb(var(--theme-color));
    color: #fff;
    border-color: rgb(var(--theme-color));
}

.oleada-pagination .disabled span {
    opacity: 0.3;
    pointer-events: none;
}

/* ───────────────────────── SKELETON ───────────────────────── */
.skeleton-box {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: oleada-shimmer 1.5s ease-in-out infinite;
    will-change: background-position;
}

@keyframes oleada-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

body.dark .skeleton-box {
    background: linear-gradient(90deg, #2a2a3a 25%, #3a3a4a 50%, #2a2a3a 75%);
    background-size: 200% 100%;
}

.skeleton-img-wrap {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

.skeleton-img-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 25%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: oleada-shimmer 1.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.skeleton-img-wrap img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skeleton-img-wrap img.loaded {
    opacity: 1;
}

.skeleton-img-wrap.loaded {
    background: transparent;
}

.skeleton-img-wrap.loaded::before {
    display: none;
}

/* ───────────────────────── TOAST ───────────────────────── */
#oleada-toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 90vw;
}

@media (min-width: 769px) {
    #oleada-toast-container {
        bottom: 32px;
    }
}

/* ───────────────────────── MISC ───────────────────────── */
button,
a,
[role="button"],
[tabindex]:not([tabindex="-1"]),
input[type="submit"],
input[type="button"],
input[type="reset"],
select {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid rgb(var(--theme-color));
    outline-offset: 2px;
    border-radius: 4px;
}

::selection {
    background: rgba(var(--theme-color), 0.2);
    color: var(--text-primary);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Spacer para el bottom nav en mobile */
.oleada-bottomnav-spacer {
    display: none;
}

@media (max-width: 768px) {
    .oleada-bottomnav-spacer {
        display: block;
        height: 90px;
    }
}

/* ───────────────────────── AVATAR DROPDOWN ───────────────────────── */
.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.avatar-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.avatar-dd-item:hover {
    background: rgba(var(--theme-color), 0.06);
}

.avatar-dd-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 16px;
}

.avatar-dd-header {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ───────────────────────── SIDEBAR OFFCANVAS ───────────────────────── */
.sidebar-offcanvas {
    max-width: 320px !important;
    width: 85% !important;
    border: none !important;
    background: var(--bg-sidebar) !important;
}

.sidebar-offcanvas .offcanvas-header {
    padding-top: max(16px, env(safe-area-inset-top, 16px)) !important;
}

.sidebar-offcanvas .offcanvas-body {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px)) !important;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.15s ease;
    will-change: transform;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-link:hover {
    background: rgba(var(--theme-color), 0.06);
}

.sidebar-link:active {
    background: rgba(var(--theme-color), 0.12);
    transform: scale(0.98);
}

body.dark .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.dark .sidebar-offcanvas .offcanvas-body .btn-close {
    filter: invert(1);
}

/* ───────────────────────── GUIDE DETAIL (article) ─────────────────────────
   Página de publicación (Guides show, desktop).
   Layout editorial: header + cover a ancho de container, cuerpo de lectura
   centrado en la columna principal y aside sticky con relacionadas.
   Sobre 1024px colapsa a una columna. Consume los tokens de arriba, así que
   dark mode y white-label funcionan sin reglas extra.
   ────────────────────────────────────────────────────────────────────────── */
.oleada-article-page {
    padding: 24px 0 48px;
}

.oleada-article-header {
    margin-bottom: 8px;
}

.oleada-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: rgba(var(--theme-color), 0.1);
    color: var(--theme-color-hex);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.oleada-article-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.7px;
    color: var(--text-strong);
    margin: 16px 0 14px;
    max-width: 900px;
}

.oleada-article-lead {
    font-size: 18px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 18px;
    max-width: 820px;
}

.oleada-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-card);
    font-size: 13px;
    color: var(--text-muted);
}

.oleada-article-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.oleada-article-meta i {
    color: var(--theme-color-hex);
    font-size: 15px;
}

.oleada-article-season {
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    background: rgba(var(--theme-color), 0.08);
    color: var(--theme-color-hex);
    font-weight: 600;
}

.oleada-article-cover {
    margin: 24px 0 0;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: linear-gradient(135deg, rgba(var(--theme-color), 0.18), rgba(var(--accent-color), 0.12));
    box-shadow: var(--shadow-card);
}

.oleada-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Layout de dos columnas ── */
.oleada-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 44px;
    align-items: start;
    margin-top: 32px;
}

/* ── Cuerpo del artículo ── */
.oleada-article-body {
    min-width: 0;
    max-width: 760px;
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--text-primary);
}

.oleada-article-body h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.4px;
    color: var(--text-strong);
    margin: 36px 0 12px;
}

.oleada-article-body h3 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-strong);
    margin: 30px 0 10px;
}

.oleada-article-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 24px 0 8px;
}

.oleada-article-body p {
    margin: 0 0 18px;
}

.oleada-article-body ul,
.oleada-article-body ol {
    padding-left: 24px;
    margin: 0 0 18px;
}

.oleada-article-body li {
    margin-bottom: 8px;
}

.oleada-article-body a {
    color: var(--theme-color-hex);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.oleada-article-body strong {
    color: var(--text-strong);
    font-weight: 700;
}

.oleada-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 20px 0;
}

.oleada-article-body iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 14px;
    margin: 20px 0;
}

.oleada-article-body blockquote {
    border-left: 3px solid var(--theme-color-hex);
    padding: 14px 20px;
    margin: 24px 0;
    background: rgba(var(--theme-color), 0.04);
    border-radius: 0 14px 14px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.oleada-article-body hr {
    border: 0;
    border-top: 1px solid var(--border-card);
    margin: 34px 0;
}

.oleada-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.oleada-article-body th,
.oleada-article-body td {
    border: 1px solid var(--border-card);
    padding: 10px 14px;
    text-align: left;
}

.oleada-article-body th {
    background: var(--bg-muted);
    font-weight: 700;
    color: var(--text-strong);
}

/* ── Secciones internas del artículo ── */
.oleada-article-section {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border-card);
}

.oleada-article-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 18px;
}

.oleada-article-section-title i {
    color: var(--theme-color-hex);
    font-size: 22px;
}

/* ── Card de negocio mencionado ── */
.oleada-biz-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.oleada-biz-card:hover {
    border-color: rgba(var(--theme-color), 0.35);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.oleada-biz-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.oleada-biz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.oleada-biz-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.oleada-biz-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.oleada-biz-cat {
    font-size: 12px;
    color: var(--text-muted);
}

.oleada-biz-rating {
    font-size: 12px;
    font-weight: 600;
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.oleada-biz-arrow {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Tags + share ── */
.oleada-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-card);
}

.oleada-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.oleada-tag:hover {
    border-color: rgba(var(--theme-color), 0.4);
    color: var(--theme-color-hex);
}

.oleada-article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-card);
}

.oleada-article-share > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}

.oleada-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-size: 18px;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.oleada-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.oleada-share-btn.is-wa {
    color: #25d366;
}

.oleada-share-btn.is-fb {
    color: #1877f2;
}

.oleada-share-btn.is-tw {
    color: #000;
}

body.dark .oleada-share-btn.is-tw {
    color: #fff;
}

/* ── Aside ── */
.oleada-article-aside {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.oleada-aside-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-card);
}

.oleada-aside-card h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 14px;
}

.oleada-aside-card h3 i {
    color: var(--theme-color-hex);
    font-size: 17px;
}

.oleada-aside-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oleada-aside-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.oleada-aside-item:hover {
    background: var(--bg-muted);
}

.oleada-aside-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.oleada-aside-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.oleada-aside-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.oleada-aside-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oleada-aside-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.oleada-aside-cta p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.oleada-aside-cta a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--theme-color-hex);
    text-decoration: none;
}

.oleada-aside-cta a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .oleada-article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .oleada-article-aside {
        position: static;
    }

    .oleada-article-body {
        max-width: none;
    }

    .oleada-article-title {
        font-size: 32px;
    }

    .oleada-article-cover {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .oleada-article-title {
        font-size: 26px;
    }

    .oleada-article-lead {
        font-size: 16px;
    }

    .oleada-article-body {
        font-size: 16px;
    }

    .oleada-article-body h2 {
        font-size: 22px;
    }

    .oleada-article-body h3 {
        font-size: 19px;
    }
}
