/* ═══════════════════════════════════════════════════════
   GYMGEST BLOG — Design System Tokens
   ═══════════════════════════════════════════════════════ */
:root {
    /* Verde GymGest adaptado a lectura sobre claro (AA en texto) */
    --gymgest-blue: #007A55;        /* enlaces y acentos de texto */
    --gymgest-blue-dark: #006144;
    --gymgest-blue-light: #DDF5EB;  /* fondos suaves */
    --gymgest-cream: #F3F1EA;       /* crema de las secciones claras de la landing */
    --gymgest-orange: #00E5A0;      /* CTA brillante de marca (texto oscuro encima) */
    --gymgest-cta-ink: #04160F;     /* texto sobre CTA verde */
    --gymgest-white: #FFFFFF;
    --gymgest-neutral-50: #FAFAFA;
    --gymgest-neutral-100: #F5F5F5;
    --gymgest-neutral-200: #E5E5E5;
    --gymgest-neutral-400: #666666; /* texto secundario: 5.7:1 sobre blanco (antes #A3A3A3, 2.5:1) */
    --gymgest-neutral-600: #525252;
    --gymgest-neutral-700: #404040;
    --gymgest-neutral-800: #262626;
    --gymgest-neutral-900: #171717;

    /* Legacy aliases (keeps existing references working) */
    --primary: var(--gymgest-blue);
    --primary-dark: var(--gymgest-blue-dark);
    --primary-light: var(--gymgest-blue-light);
    --bg: var(--gymgest-neutral-50);
    --bg2: var(--gymgest-cream);
    --surface: var(--gymgest-white);
    --text: var(--gymgest-neutral-800);
    --text-m: var(--gymgest-neutral-600);
    --border: rgba(0,0,0,0.10);
    --success: #22c55e;
    --accent: var(--gymgest-orange);
    --font: 'Inter','Inter Fallback', system-ui, sans-serif;
    --display: 'Anton','Anton Fallback', Impact, 'Arial Narrow', sans-serif;
    --r: 12px;
    --max: 720px;
}

/* ═══════════════════════════════════════════════════════
   GLOBALS
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased }
a { color: var(--gymgest-blue); text-decoration: none }
a:hover { text-decoration: underline }
::selection { background: var(--gymgest-blue-light); color: var(--gymgest-neutral-900) }

/* ═══════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════ */
nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: .75rem 0 }
.w { max-width: var(--max); margin: 0 auto; padding: 0 24px }
.nav-w { max-width: 1100px; margin: 0 auto; padding: 0 2rem }
.nav-inner { display: flex; justify-content: space-between; align-items: center }
.nav-logo { text-decoration: none; display: inline-flex; align-items: center }
.nav-logo img { height: 40px; width: auto; display: block }
.nav-links { display: flex; gap: 1.5rem; align-items: center }
.nav-links a { color: var(--text-m); text-decoration: none; font-size: .88rem; font-weight: 500; transition: color .2s }
.nav-links a:hover { color: var(--text) }
.nav-cta { background: var(--gymgest-orange); color: var(--gymgest-cta-ink) !important; padding: .5rem 1.25rem; border-radius: 8px; font-weight: 700; font-size: .85rem; transition: opacity .2s }
.nav-cta:hover { opacity: .85; text-decoration: none }

/* ═══════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════ */
.breadcrumbs { padding: 1.25rem 0 0; font-size: .82rem; color: var(--text-m) }
.breadcrumbs a { color: var(--text-m); text-decoration: none; transition: color .2s }
.breadcrumbs a:hover { color: var(--gymgest-blue) }
.breadcrumbs span { margin: 0 .4rem; opacity: .5 }

/* ═══════════════════════════════════════════════════════
   BLOG HEADER (index + category)
   ═══════════════════════════════════════════════════════ */
.blog-header { padding: 3rem 0 2rem; text-align: center; background: linear-gradient(180deg, var(--gymgest-cream) 0%, var(--gymgest-neutral-50) 100%); margin-top: -1px; }
.blog-header h1 { font-family: var(--display); font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 400; text-transform: uppercase; letter-spacing: .015em; margin-bottom: .75rem }
.blog-header h1 em { color: var(--gymgest-blue); font-style: normal }
.blog-header p { color: var(--text-m); font-size: 1.05rem; max-width: 550px; margin: 0 auto }

.cat-header { padding: 2rem 0; text-align: center; background: linear-gradient(180deg, var(--gymgest-blue-light) 0%, var(--gymgest-neutral-50) 100%); margin-top: -1px; }
.cat-header h1 { font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 400; text-transform: uppercase; letter-spacing: .015em; margin-bottom: .5rem }
.cat-header p { color: var(--text-m); font-size: .98rem; max-width: 560px; margin: 0 auto; line-height: 1.7 }
.cat-intro { max-width: 760px; margin: 0 auto 2rem; color: var(--gymgest-neutral-700); font-size: 1rem; line-height: 1.7; text-align: left }
.cat-intro a { text-decoration: underline; text-underline-offset: 3px }

/* ═══════════════════════════════════════════════════════
   CATEGORY NAV PILLS
   ═══════════════════════════════════════════════════════ */
.cat-nav { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem }
.cat-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .82rem; padding: .45rem 1rem; border-radius: 99px; border: 1px solid var(--gymgest-neutral-200); color: var(--text-m); text-decoration: none; font-weight: 500; transition: all .2s }
.cat-nav a:hover, .cat-nav a.active { border-color: var(--gymgest-blue); color: var(--gymgest-blue); background: rgba(0,122,85,0.08); text-decoration: none }

/* ═══════════════════════════════════════════════════════
   ARTICLES GRID (listing)
   ═══════════════════════════════════════════════════════ */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 3rem }

/* ═══════════════════════════════════════════════════════
   ARTICLE CARD
   ═══════════════════════════════════════════════════════ */
.article-card {
    background: var(--gymgest-white);
    border: 1px solid var(--gymgest-neutral-200);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Card image */
.article-card-img {
    width: 100%;
    height: auto; /* el atributo height="431" estiraba la imagen y recortaba el texto de la portada */
    aspect-ratio: 40/21; /* portadas de 1200x630: se ven enteras, sin recorte */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.article-card:hover .article-card-img { transform: scale(1.03) }
.article-card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--gymgest-cream), var(--gymgest-blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: .5;
    transition: transform 0.4s ease;
}
.article-card:hover .article-card-img-placeholder { transform: scale(1.03) }

/* Card body */
.article-card-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category badge */
.article-card .cat {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 8px;
    /* Default colors (fallback) */
    background: var(--gymgest-blue-light);
    color: var(--gymgest-blue);
}
/* Category-specific badge colors */
.article-card .cat[data-cat="gestion"] { background: var(--gymgest-blue-light); color: var(--gymgest-blue) }
.article-card .cat[data-cat="socios"] { background: #FFF0D9; color: #A05E03 }
.article-card .cat[data-cat="clases-y-equipo"] { background: #E3ECFF; color: #3757C4 }
.article-card .cat[data-cat="finanzas-y-normativa"] { background: #FDE5E5; color: #C22C3C }
.article-card .cat[data-cat="marketing"] { background: #F0E5FF; color: #7A3FC2 }
.article-card .cat[data-cat="entrenador-personal"] { background: #E0F4F1; color: #0B6B5E }

/* Card title */
.article-card h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
    margin: 12px 0 8px;
    line-height: 1.35;
    color: var(--gymgest-neutral-900);
    transition: color 0.2s ease;
}
.article-card:hover h2 { color: var(--gymgest-blue) }

/* Card excerpt */
.article-card p {
    color: var(--gymgest-neutral-600);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card date */
.article-card .meta {
    font-size: 13px;
    color: var(--gymgest-neutral-400);
    margin-top: auto;
}

/* Card read-more link */
.article-card .read-more {
    font-size: 14px;
    font-weight: 500;
    color: var(--gymgest-blue);
    text-decoration: none;
    margin-top: auto;
    padding-top: 4px;
}
.article-card:hover .read-more { text-decoration: underline }

/* ═══════════════════════════════════════════════════════
   ARTICLE SINGLE — Header
   ═══════════════════════════════════════════════════════ */
.article-header { padding: 40px 0 1.5rem }
.article-back { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-m); font-size: .88rem; margin-bottom: 1.5rem; text-decoration: none; transition: color .2s }
.article-back:hover { color: var(--text); text-decoration: none }
.article-back svg { width: 16px; height: 16px }

/* Article category badge (single page) */
.article-cat {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: .75rem;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity .2s;
    background: var(--gymgest-blue-light);
    color: var(--gymgest-blue);
}
.article-cat[data-cat="gestion"] { background: var(--gymgest-blue-light); color: var(--gymgest-blue) }
.article-cat[data-cat="socios"] { background: #FFF0D9; color: #A05E03 }
.article-cat[data-cat="clases-y-equipo"] { background: #E3ECFF; color: #3757C4 }
.article-cat[data-cat="finanzas-y-normativa"] { background: #FDE5E5; color: #C22C3C }
.article-cat[data-cat="marketing"] { background: #F0E5FF; color: #7A3FC2 }
.article-cat[data-cat="entrenador-personal"] { background: #E0F4F1; color: #0B6B5E }
.article-cat:hover { opacity: .8; text-decoration: none }

.article-header h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.2; margin-bottom: 1rem }
.article-meta { color: var(--gymgest-neutral-400); font-size: 14px; display: flex; gap: 1.5rem; flex-wrap: wrap }
.article-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px }

/* ═══════════════════════════════════════════════════════
   ARTICLE SINGLE — Featured Image
   ═══════════════════════════════════════════════════════ */
.article-featured-img {
    max-width: 960px;
    margin: 0 auto 32px;
    border-radius: 12px;
    overflow: hidden;
}
.article-featured-img img { width: 100%; height: auto; display: block }

/* ═══════════════════════════════════════════════════════
   ARTICLE SINGLE — Body Typography
   ═══════════════════════════════════════════════════════ */
.article-body { padding-bottom: 2rem }
.article-body p {
    font-size: 18px;
    color: var(--gymgest-neutral-800);
    line-height: 1.75;
    margin-bottom: 1.5em;
}

/* Headings */
.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gymgest-neutral-900);
    line-height: 1.3;
    margin: 2.5em 0 0.75em;
    letter-spacing: -.02em;
    border-top: none;
    padding-top: 0;
}
.article-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gymgest-neutral-900);
    line-height: 1.3;
    margin: 2em 0 0.5em;
}
.article-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gymgest-neutral-800);
    line-height: 1.3;
    margin: 1.5em 0 0.5em;
}
.article-body strong { color: var(--gymgest-neutral-900) }

/* Links */
.article-body a {
    color: var(--gymgest-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(0,122,85,0.35);
    transition: color .2s, text-decoration-color .2s;
}
.article-body a:hover {
    color: var(--gymgest-blue-dark);
    text-decoration-color: var(--gymgest-blue-dark);
}

/* Lists */
.article-body ul, .article-body ol {
    padding-left: 1.5em;
    margin: 0 0 1.5rem;
    color: var(--gymgest-neutral-800);
}
.article-body li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}
.article-body ul li::marker { color: var(--gymgest-blue) }
.article-body ol li::marker { color: var(--gymgest-blue); font-weight: 600 }

/* Blockquotes */
.article-body blockquote {
    border-left: 3px solid var(--gymgest-blue);
    background: rgba(0, 194, 136, 0.07);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--gymgest-neutral-700);
    margin: 1.5em 0;
}
.article-body blockquote p { margin-bottom: 0; font-size: 16px }

/* Tables */
.article-body .table-wrapper { overflow-x: auto; margin: 1.5em 0 }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.article-body thead th {
    background: var(--gymgest-cream);
    color: var(--gymgest-neutral-900);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    padding: 12px 16px;
    text-align: left;
}
.article-body td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gymgest-neutral-200);
}
.article-body tbody tr { transition: background .2s }
.article-body tbody tr:hover { background: var(--gymgest-neutral-50) }

/* Inline code */
.article-body code {
    background: var(--gymgest-neutral-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--gymgest-blue);
}

/* Code blocks */
.article-body pre {
    background: var(--gymgest-neutral-900);
    color: #E5E5E5;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 1.5em 0;
}
.article-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

/* Images inside article */
.article-img { margin: 2em 0; border-radius: 8px; overflow: hidden }
.article-img img { width: 100%; height: auto; display: block; border-radius: 8px }
.article-img figcaption { font-size: .82rem; color: var(--text-m); text-align: center; padding: .75rem 0 0; font-style: italic }
.article-body > img,
.article-body > p > img {
    max-width: 100%;
    border-radius: 8px;
    margin: 2em 0;
}

/* Horizontal rules */
.article-body hr {
    border: none;
    height: 1px;
    background: var(--gymgest-neutral-200);
    margin: 3em 0;
}

/* ═══════════════════════════════════════════════════════
   INLINE CTA (inside articles)
   ═══════════════════════════════════════════════════════ */
.article-cta-inline {
    background: var(--gymgest-blue-light);
    border: 1px solid rgba(0,122,85,0.22);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 2rem 0;
}
.article-cta-inline p { margin-bottom: .75rem !important; font-size: .95rem; color: var(--gymgest-neutral-800) }
.article-cta-inline .cta-link { color: var(--gymgest-blue); font-weight: 700; font-size: .95rem; text-decoration: none; transition: opacity .2s }
.article-cta-inline .cta-link:hover { opacity: .8; text-decoration: none }
.article-cta-inline .cta-btn {
    display: inline-block;
    background: var(--gymgest-orange);
    color: var(--gymgest-cta-ink);
    padding: .6rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s;
}
.article-cta-inline .cta-btn:hover { opacity: .85; text-decoration: none }

/* ═══════════════════════════════════════════════════════
   CTA BOX
   ═══════════════════════════════════════════════════════ */
.blog-cta {
    background: var(--gymgest-blue-light);
    border: 1px solid rgba(0,122,85,0.22);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}
.blog-cta h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem }
.blog-cta p { color: var(--text-m); font-size: .95rem; margin-bottom: 1.25rem; max-width: 480px; margin-left: auto; margin-right: auto }
.blog-cta a.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--gymgest-orange);
    color: var(--gymgest-cta-ink);
    padding: .75rem 1.75rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s;
}
.blog-cta a.cta-btn:hover { opacity: .85; text-decoration: none }

/* ═══════════════════════════════════════════════════════
   RELATED ARTICLES
   ═══════════════════════════════════════════════════════ */
.related { border-top: 1px solid var(--gymgest-neutral-200); padding: 2.5rem 0 }
.related h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem }
.related-card {
    background: var(--gymgest-white);
    border: 1px solid var(--gymgest-neutral-200);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.related-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}
.related-card-img { width: 100%; height: 120px; object-fit: cover; display: block; transition: transform 0.4s ease }
.related-card:hover .related-card-img { transform: scale(1.03) }
.related-card-body { padding: 1rem 1.25rem 1.25rem }
.related-card h3 { font-size: .92rem; font-weight: 600; margin-bottom: .3rem; line-height: 1.3; transition: color .2s }
.related-card:hover h3 { color: var(--gymgest-blue) }
.related-card .meta { font-size: 13px; color: var(--gymgest-neutral-400) }

/* ═══════════════════════════════════════════════════════
   CATEGORIES SECTION (index)
   ═══════════════════════════════════════════════════════ */
.cat-section { padding: 0 0 2rem }
.cat-section h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem }
.cat-card {
    background: var(--gymgest-white);
    border: 1px solid var(--gymgest-neutral-200);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cat-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}
.cat-card-icon { font-size: 1.5rem; margin-bottom: .5rem }
.cat-card h2 { font-size: .95rem; font-weight: 600; margin-bottom: .25rem }
.cat-card p { font-size: .8rem; color: var(--text-m); line-height: 1.5 }

/* ═══════════════════════════════════════════════════════
   SIDEBAR — Article layout with TOC
   ═══════════════════════════════════════════════════════ */
.article-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}
.article-layout .article-content { min-width: 0 }
.article-layout .article-content .w { max-width: none; padding: 0 }

.article-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-bottom: 2rem;
}
.article-sidebar::-webkit-scrollbar { width: 3px }
.article-sidebar::-webkit-scrollbar-thumb { background: var(--gymgest-neutral-200); border-radius: 3px }

.sidebar-block {
    margin-bottom: 1.75rem;
}
.sidebar-block-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gymgest-neutral-400);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--gymgest-neutral-200);
}

/* TOC */
.sidebar-toc { list-style: none }
.sidebar-toc li { margin-bottom: .25rem }
.sidebar-toc a {
    display: block;
    font-size: .82rem;
    color: var(--gymgest-neutral-600);
    text-decoration: none;
    padding: 4px 0 4px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
    line-height: 1.35;
    transition: color .2s, border-color .2s;
}
.sidebar-toc a:hover {
    color: var(--gymgest-blue);
    text-decoration: none;
}
.sidebar-toc a.active {
    color: var(--gymgest-blue);
    border-left-color: var(--gymgest-blue);
    font-weight: 600;
}
.sidebar-toc .toc-h3 { padding-left: 22px; font-size: .78rem }

/* Sidebar related articles */
.sidebar-related a {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--gymgest-neutral-100);
    transition: color .2s;
}
.sidebar-related a:last-child { border-bottom: none }
.sidebar-related a:hover { color: var(--gymgest-blue); text-decoration: none }
.sidebar-related img {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.sidebar-related span {
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.35;
}

/* Sidebar links */
.sidebar-links { list-style: none }
.sidebar-links li { margin-bottom: .15rem }
.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--gymgest-neutral-600);
    text-decoration: none;
    padding: 5px 0;
    transition: color .2s;
}
.sidebar-links a:hover { color: var(--gymgest-blue); text-decoration: none }
.sidebar-links svg { flex-shrink: 0; opacity: .5 }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer { border-top: 1px solid var(--gymgest-neutral-200); padding: 2rem 0; text-align: center; font-size: .82rem; color: var(--text-m) }
footer a { color: var(--gymgest-blue); text-decoration: none }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Desktop (>1024px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
    .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px }
    /* Widen the wrapper for listing pages */
    .blog-header .w, .cat-header .w { max-width: 1100px }
    /* Article body stays at 720px, featured image goes wider */
    .article-featured-img { max-width: 960px; margin-left: auto; margin-right: auto }
}

/* Wide wrapper for listing pages */
.w-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Tablet (768–1024px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
    .w { max-width: 720px }
    .w-wide { max-width: 720px }
    .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 20px }
    .article-layout { grid-template-columns: 1fr; max-width: 720px }
    .article-sidebar { display: none }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Mobile (<768px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .w, .w-wide, .nav-w { padding: 0 1.25rem }
    body { font-size: 16px }
    .nav-links a:not(.nav-cta) { display: none }

    /* Grid: 1 column, 86% centered */
    .w-wide { width: 86%; max-width: none; margin-left: auto; margin-right: auto }
    .articles-grid { grid-template-columns: 1fr; gap: 16px }

    /* Card adjustments */
    .article-card-body { padding: 14px 16px 16px }

    /* Article single */
    .article-body p { font-size: 16px }
    .article-body h2 { font-size: 24px }
    .article-body h3 { font-size: 20px }
    .article-body h4 { font-size: 17px }

    /* Featured image edge-to-edge */
    .article-featured-img { border-radius: 0; max-width: 100% }

    /* Category cards */
    .cat-grid { grid-template-columns: 1fr 1fr }

    /* Tables */
    .article-body .table-wrapper { margin-left: -1.25rem; margin-right: -1.25rem; padding: 0 1.25rem }

    /* Sidebar hidden on mobile */
    .article-layout { grid-template-columns: 1fr; padding: 0 1.25rem }
    .article-sidebar { display: none }
}

@media (max-width: 400px) {
    .cat-grid { grid-template-columns: 1fr }
}

/* Iconos de categoría (SVG de línea, sin emojis) */
.cat-card-icon, .article-card-img-placeholder { color: #007A52; }
.cat-card-icon svg { display: block; }
