/* =============================================================================
   XCMS v2 — Template "Gran LP"
   Diario digital-grotesk: moderno, minimalista, profesional.
   Hereda estructura y layouts de portada del default (default/style.css se
   carga antes vía site-stylesheets.php). Todo scopeado a .template-granlp.
   Los colores provienen SIEMPRE de las variables inyectadas por el tenant:
   --color-primary / --color-accent / --color-text / --color-background y las
   superficies --color-{header,nav,footer}-*. No se hardcodea paleta.
   ============================================================================= */

body.template-granlp {
    /* Tokens propios del theme (los colores siguen viniendo del tenant) */
    --gl-ink:        var(--color-text);
    --gl-bg:         var(--color-background);
    --gl-surface:    color-mix(in srgb, var(--color-text) 3.5%, var(--color-background));
    --gl-surface-2:  color-mix(in srgb, var(--color-text) 7%, var(--color-background));
    --gl-hairline:   color-mix(in srgb, var(--color-text) 12%, transparent);
    --gl-hairline-strong: color-mix(in srgb, var(--color-text) 22%, transparent);
    --gl-muted:      color-mix(in srgb, var(--color-text) 66%, var(--color-background));
    --gl-primary-ink: color-mix(in srgb, var(--color-primary) 62%, #000);

    --gl-radius:     6px;
    --gl-radius-sm:  4px;
    --gl-radius-lg:  12px;

    /* Curvas ease-out (quart / expo) — sin bounce */
    --gl-ease:       cubic-bezier(0.22, 1, 0.36, 1);
    --gl-ease-out:   cubic-bezier(0.16, 1, 0.3, 1);

    --radius:        var(--gl-radius);
    --radius-sm:     var(--gl-radius-sm);
    --shadow:        0 10px 30px -12px color-mix(in srgb, var(--color-text) 30%, transparent);
    --shadow-sm:     0 2px 10px -6px color-mix(in srgb, var(--color-text) 24%, transparent);
    --gap:           1.5rem;
    --gutter:        1.25rem;
    --nav-h:         66px;

    background: var(--gl-bg);
    color: var(--gl-ink);
    font-feature-settings: "kern", "liga", "cv01", "ss01";
    letter-spacing: -0.006em;
}

/* z-index semántico del theme */
body.template-granlp {
    --z-sticky:  200;
    --z-panel:   700;
    --z-overlay: 690;
}

/* =============================================================================
   TIPOGRAFÍA — grotesk de titulares, sans neutro de cuerpo
   ============================================================================= */
body.template-granlp h1,
body.template-granlp h2,
body.template-granlp h3,
body.template-granlp .article-card__title,
body.template-granlp .section-heading,
body.template-granlp .page-header__title,
body.template-granlp .article-title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.022em;
    line-height: 1.08;
    text-wrap: balance;
}

body.template-granlp .article-card__title a { color: inherit; }

/* =============================================================================
   TOPBAR — strip superior fino (fecha | redes)
   ============================================================================= */
body.template-granlp .site-header.gl-topbar {
    background: var(--color-header-bg);
    color: var(--color-header-fg);
    padding: 0;
    border-bottom: 1px solid var(--color-header-border);
}

body.template-granlp .gl-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 40px;
}

body.template-granlp .gl-topbar__date {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-header-fg-muted);
    margin: 0;
}
body.template-granlp .gl-topbar__date::first-letter { text-transform: uppercase; }

body.template-granlp .gl-topbar__social { gap: 0.15rem; }

body.template-granlp .gl-topbar .header-social__link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--color-header-fg-muted);
    background: transparent;
    transition: color 0.2s var(--gl-ease), background 0.2s var(--gl-ease), transform 0.2s var(--gl-ease);
}
body.template-granlp .gl-topbar .header-social__link:hover {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    transform: translateY(-1px);
}

/* =============================================================================
   BARRA PRINCIPAL — logo | nav | buscador  (sticky)
   ============================================================================= */
body.template-granlp .site-nav.gl-bar {
    background: var(--color-nav-bg);
    color: var(--color-nav-fg);
    position: sticky;
    top: 0;
    height: auto;
    z-index: var(--z-sticky);
    box-shadow: none;
    border-bottom: 1px solid var(--color-nav-border);
    transition: box-shadow 0.3s var(--gl-ease), background 0.3s var(--gl-ease);
}
body.template-granlp .site-nav.gl-bar.is-stuck {
    box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--color-text) 55%, transparent);
    background: color-mix(in srgb, var(--color-nav-bg) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(8px);
}

body.template-granlp .gl-bar__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--nav-h);
    padding: 0.4rem 0;
}

/* Logo */
body.template-granlp .gl-bar__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 0.25rem;
}
body.template-granlp .gl-bar__logo img {
    max-height: 46px;
    width: auto;
    transition: max-height 0.3s var(--gl-ease);
}
body.template-granlp .site-nav.gl-bar.is-stuck .gl-bar__logo img { max-height: 38px; }
body.template-granlp .gl-bar__logo .site-logo__text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    color: var(--color-nav-fg);
    text-transform: uppercase;
}

/* Lista de navegación */
body.template-granlp .gl-nav-list {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0.1rem;
    height: auto;
    overflow-x: auto;
    scrollbar-width: none;
}
body.template-granlp .gl-nav-list::-webkit-scrollbar { display: none; }

body.template-granlp .gl-nav-list .nav-item { align-items: center; }

body.template-granlp .gl-nav-list .nav-link {
    position: relative;
    height: auto;
    padding: 0.55rem 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--color-nav-fg-muted);
    border: 0;
    background: none;
    white-space: nowrap;
    transition: color 0.2s var(--gl-ease);
}
body.template-granlp .gl-nav-list .nav-link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.28s var(--gl-ease);
}
body.template-granlp .gl-nav-list .nav-link:hover,
body.template-granlp .gl-nav-list .nav-item.is-active .nav-link {
    color: var(--color-nav-fg);
    background: none;
}
body.template-granlp .gl-nav-list .nav-link:hover::after,
body.template-granlp .gl-nav-list .nav-item.is-active .nav-link::after {
    transform: scaleX(1);
}

/* Submenú */
body.template-granlp .gl-nav-list .nav-submenu {
    background: var(--gl-bg);
    border: 1px solid var(--gl-hairline);
    border-radius: var(--gl-radius);
    box-shadow: var(--shadow);
    padding: 0.35rem;
    min-width: 210px;
}
body.template-granlp .gl-nav-list .nav-submenu a {
    color: var(--gl-ink);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--gl-radius-sm);
    padding: 0.5rem 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}
body.template-granlp .gl-nav-list .nav-submenu a:hover {
    background: var(--gl-surface-2);
    color: var(--color-primary);
}

/* Buscador */
body.template-granlp .gl-bar__search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: min(230px, 24vw);
    background: color-mix(in srgb, var(--color-nav-fg) 8%, transparent);
    border: 1px solid var(--color-nav-border);
    border-radius: 100px;
    padding: 0.15rem 0.15rem 0.15rem 0.9rem;
    transition: border-color 0.2s var(--gl-ease), background 0.2s var(--gl-ease), box-shadow 0.2s var(--gl-ease);
}
body.template-granlp .gl-bar__search:focus-within {
    border-color: var(--color-primary);
    background: var(--gl-bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
body.template-granlp .gl-bar__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.85rem;
    font-family: var(--font);
    outline: none;
}
body.template-granlp .gl-bar__search:focus-within input { color: var(--gl-ink); }
body.template-granlp .gl-bar__search input::placeholder { color: var(--color-nav-fg-subtle); }
body.template-granlp .gl-bar__search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    flex-shrink: 0;
    transition: background 0.2s var(--gl-ease), transform 0.15s var(--gl-ease);
}
body.template-granlp .gl-bar__search button:hover { background: var(--gl-primary-ink); }
body.template-granlp .gl-bar__search button:active { transform: scale(0.92); }

/* Hamburguesa (mobile) */
body.template-granlp .gl-bar .nav-toggle { display: none; }

/* =============================================================================
   TICKER — Último momento
   ============================================================================= */
body.template-granlp .gl-ticker {
    display: flex;
    align-items: stretch;
    background: var(--gl-bg);
    border-bottom: 1px solid var(--gl-hairline);
    overflow: hidden;
}
body.template-granlp .gl-ticker__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
}
body.template-granlp .gl-ticker__label::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 0;
    bottom: 0;
    width: 8px;
    background: var(--color-primary);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
body.template-granlp .gl-ticker__viewport {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 96%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 3%, #000 96%, transparent);
}
body.template-granlp .gl-ticker__track {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    will-change: transform;
    animation: gl-ticker-scroll 45s linear infinite;
}
body.template-granlp .gl-ticker:hover .gl-ticker__track { animation-play-state: paused; }
body.template-granlp .gl-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.6rem 0.55rem 0;
    margin-left: 1.6rem;
    color: var(--gl-ink);
    font-size: 0.86rem;
    font-weight: 600;
}
body.template-granlp .gl-ticker__item:hover { color: var(--color-primary); }
body.template-granlp .gl-ticker__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}
@keyframes gl-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* =============================================================================
   MAIN — respiración
   ============================================================================= */
body.template-granlp #main-content {
    padding-top: 2.25rem;
    padding-bottom: 4rem;
}

/* =============================================================================
   SECTION HEADINGS — etiqueta grotesk con marca de bloque
   ============================================================================= */
body.template-granlp .section-heading {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--gl-ink);
    padding: 0 0 0.9rem;
    margin-bottom: 1.4rem;
    border-bottom: 2px solid var(--gl-ink);
}
body.template-granlp .section-heading::before {
    content: "";
    width: 6px;
    align-self: stretch;
    min-height: 1.1em;
    background: var(--color-primary);
    border-radius: 2px;
}

/* =============================================================================
   PORTADA — proporciones y ritmo
   ============================================================================= */
body.template-granlp .portada-section { margin-bottom: 3.25rem; }
body.template-granlp .home-full-width { margin-bottom: 3.25rem; }
body.template-granlp .home-layout--with-sidebar { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }

/* Bloque hero + sidebar de titulares */
body.template-granlp .portada-headline {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 1.75rem;
}
body.template-granlp .portada-headline__sidebar {
    gap: 0;
    border-top: 1px solid var(--gl-hairline);
}
body.template-granlp .portada-headline__sidebar .article-card--row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gl-hairline);
}

/* Grilla estándar */
body.template-granlp .portada-grid {
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 1.75rem 1.5rem;
}

/* Hero grid 2x2 */
body.template-granlp .portada-hero-grid { gap: 1.75rem; }
body.template-granlp .portada-hero-grid__side { gap: 1.5rem; }

/* =============================================================================
   ARTICLE CARDS — minimalismo editorial + zoom en hover
   ============================================================================= */
body.template-granlp .article-card {
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.template-granlp .article-card__image-link {
    display: block;
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--gl-surface-2);
    aspect-ratio: 16 / 10;
}
body.template-granlp .article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--gl-ease-out);
}
body.template-granlp .article-card:hover .article-card__image { transform: scale(1.05); }

body.template-granlp .article-card__body {
    padding: 0.85rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

body.template-granlp .article-card__category {
    align-self: flex-start;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: color 0.2s var(--gl-ease);
}
body.template-granlp .article-card__category:hover { color: var(--gl-primary-ink); }

body.template-granlp .article-card__title {
    font-size: 1.06rem;
    line-height: 1.18;
    margin: 0;
}
body.template-granlp .article-card__title a {
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-size: 0% 2px;
    background-position: left 100%;
    background-repeat: no-repeat;
    transition: background-size 0.35s var(--gl-ease), color 0.2s var(--gl-ease);
    padding-bottom: 1px;
}
body.template-granlp .article-card__title a:hover {
    color: var(--color-primary);
    background-size: 100% 2px;
}

body.template-granlp .article-card__excerpt {
    color: var(--gl-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    text-wrap: pretty;
}

body.template-granlp .article-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.15rem;
    font-size: 0.74rem;
    color: var(--gl-muted);
}
body.template-granlp .article-card__author { font-weight: 700; color: var(--gl-ink); }
body.template-granlp .article-card__date { color: var(--gl-muted); }

/* HERO — titular grande */
body.template-granlp .article-card--hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}
body.template-granlp .article-card--hero:hover { transform: none; box-shadow: none; }
body.template-granlp .article-card--hero .article-card__image { aspect-ratio: 16 / 9; }
body.template-granlp .article-card--hero:hover .article-card__image { transform: scale(1.04); }
body.template-granlp .article-card--hero .article-card__body { padding: 1.1rem 0 0; }
body.template-granlp .article-card--hero .article-card__title {
    font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.8rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    font-weight: 900;
}
body.template-granlp .article-card--hero .article-card__excerpt {
    font-size: 1.02rem;
    max-width: 60ch;
}

/* ROW — item de lista (sidebar de titulares) */
body.template-granlp .article-card--row {
    display: grid;
    grid-template-columns: 1fr 96px;
    gap: 0.9rem;
    align-items: start;
}
body.template-granlp .article-card--row .article-card__image-link {
    order: 2;
    aspect-ratio: 1 / 1;
    border-radius: var(--gl-radius-sm);
}
body.template-granlp .article-card--row .article-card__body { order: 1; padding: 0; gap: 0.3rem; }
body.template-granlp .article-card--row .article-card__title { font-size: 0.98rem; line-height: 1.2; }

/* OVERLAY — título sobre la foto con degradé */
body.template-granlp .article-card--overlay .article-card__media { border-radius: var(--gl-radius); overflow: hidden; }
body.template-granlp .article-card--overlay .article-card__overlay {
    background: linear-gradient(to top,
        color-mix(in srgb, #000 88%, transparent) 0%,
        color-mix(in srgb, #000 45%, transparent) 45%,
        transparent 100%);
    padding: 1.5rem 1.15rem 1.1rem;
}
body.template-granlp .article-card--overlay .article-card__title { color: #fff; font-size: 1.15rem; }
body.template-granlp .article-card--overlay .article-card__title a { color: #fff; background: none; }
body.template-granlp .article-card--overlay .article-card__category {
    color: #fff;
    background: var(--color-primary);
    padding: 0.15rem 0.5rem;
    border-radius: var(--gl-radius-sm);
}

/* =============================================================================
   SIDEBAR — bloques (populares / últimas)
   ============================================================================= */
body.template-granlp .sidebar-block {
    background: transparent;
    border: 0;
    border-top: 3px solid var(--gl-ink);
    border-radius: 0;
}
body.template-granlp .sidebar-block__header {
    background: transparent;
    color: var(--gl-ink);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.7rem 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.template-granlp .sidebar-block__header::before {
    content: "";
    width: 6px;
    height: 1em;
    background: var(--color-primary);
    border-radius: 2px;
}
body.template-granlp .sidebar-article {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gl-hairline);
    gap: 0.85rem;
    counter-increment: gl-pop;
}
body.template-granlp .sidebar-block--noticias .sidebar-block__body { counter-reset: gl-pop; }
body.template-granlp .sidebar-article__title { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; }
body.template-granlp .sidebar-article__cat { color: var(--color-primary); font-size: 0.66rem; }

/* =============================================================================
   FOOTER — propio del theme: columnas, redes en iconos, categorías
   ============================================================================= */
body.template-granlp .site-footer { background: var(--color-footer-bg); color: var(--color-footer-fg); }
body.template-granlp .gl-footer .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 3rem;
    padding-top: 3.25rem;
    padding-bottom: 2.75rem;
    align-items: flex-start;
}
body.template-granlp .gl-footer .footer-brand { flex: 1 1 280px; max-width: 400px; }
body.template-granlp .gl-footer .footer-nav,
body.template-granlp .gl-footer .footer-contact { flex: 1 1 160px; min-width: 0; }
body.template-granlp .gl-footer .footer-cats { flex: 1 1 240px; }

body.template-granlp .footer-logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--color-footer-fg);
}
body.template-granlp .footer-logo { max-height: 96px; width: auto; }

body.template-granlp .footer-custom-text {
    color: var(--color-footer-fg-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 42ch;
}

body.template-granlp .footer-nav__title {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
    color: var(--color-footer-fg);
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--color-footer-border);
}

/* Listas de nav y categorías */
body.template-granlp .gl-footer .footer-nav ul { display: flex; flex-direction: column; gap: 0.55rem; }
body.template-granlp .gl-footer .footer-nav a,
body.template-granlp .gl-footer .footer-contact a,
body.template-granlp .gl-footer .footer-contact p {
    color: var(--color-footer-fg-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.2s var(--gl-ease);
}
body.template-granlp .gl-footer .footer-nav a:hover,
body.template-granlp .gl-footer .footer-contact a:hover { color: var(--color-primary); }

/* Categorías: dos columnas cuando hay espacio */
body.template-granlp .gl-footer .footer-cats ul {
    display: block;
    column-count: 2;
    column-gap: 1.5rem;
}
body.template-granlp .gl-footer .footer-cats li { break-inside: avoid; margin-bottom: 0.55rem; }

/* Redes: iconos SVG, icono SIEMPRE blanco, solo cambia el fondo en hover */
body.template-granlp .gl-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.35rem;
}
body.template-granlp .gl-footer-social .footer-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    transition: background 0.2s var(--gl-ease), transform 0.2s var(--gl-ease);
}
body.template-granlp .gl-footer-social .footer-social__link:hover {
    background: color-mix(in srgb, var(--color-primary) 68%, #000);
    color: #fff;
    transform: translateY(-2px);
}
body.template-granlp .gl-footer-social .footer-social__link svg { width: 20px; height: 20px; }

body.template-granlp .site-footer__bottom { border-top: 1px solid var(--color-footer-border); }

@media (max-width: 560px) {
    body.template-granlp .gl-footer .footer-cats ul { column-count: 1; }
}

/* =============================================================================
   MOTION — reveal en scroll (mejora una base ya visible)
   ============================================================================= */
@media (prefers-reduced-motion: no-preference) {
    body.template-granlp.gl-anim .gl-reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.65s var(--gl-ease-out), transform 0.65s var(--gl-ease-out);
        transition-delay: var(--gl-delay, 0ms);
    }
    body.template-granlp.gl-anim .gl-reveal.is-in {
        opacity: 1;
        transform: none;
    }
}

/* Reduced motion: sin zooms, sin barridos, sin marquee (JS también lo apaga) */
@media (prefers-reduced-motion: reduce) {
    body.template-granlp .article-card__image,
    body.template-granlp .gl-bar__logo img,
    body.template-granlp .article-card__title a { transition: none !important; }
    body.template-granlp .article-card:hover .article-card__image,
    body.template-granlp .article-card--hero:hover .article-card__image { transform: none; }
    body.template-granlp .gl-ticker__track { animation: none !important; }
    body.template-granlp .gl-nav-list .nav-link::after { transition: none; }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
    body.template-granlp .home-layout--with-sidebar { grid-template-columns: 1fr; }
    body.template-granlp .portada-headline { grid-template-columns: 1fr; gap: 1.5rem; }
    body.template-granlp .portada-hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    /* La barra principal pasa a: hamburguesa | logo | buscador
       (breakpoint alineado con el toggle de submenús de main.js: <=1024) */
    body.template-granlp .gl-topbar { display: none; }

    /* El default oculta .site-nav en <=768px (usa la barra inferior mobile);
       en granlp .site-nav ES la barra principal con el logo, así que la
       mantenemos visible sí o sí. */
    body.template-granlp .site-nav.gl-bar { display: block; }

    body.template-granlp .gl-bar__inner { gap: 0.75rem; }
    body.template-granlp .gl-bar .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 42px;
        height: 42px;
        padding: 0 9px;
        border: 1px solid var(--color-nav-border);
        border-radius: var(--gl-radius-sm);
        background: transparent;
        flex-shrink: 0;
    }
    body.template-granlp .gl-bar .nav-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--color-nav-fg);
        border-radius: 2px;
        transition: transform 0.25s var(--gl-ease), opacity 0.2s var(--gl-ease);
    }
    body.template-granlp .gl-bar .nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    body.template-granlp .gl-bar .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
    body.template-granlp .gl-bar .nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    body.template-granlp .gl-bar__logo { margin: 0 auto 0 0; }
    body.template-granlp .gl-bar__logo img { max-height: 40px; }

    /* Nav como panel desplegable */
    body.template-granlp .gl-nav-list {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-nav-bg);
        border-bottom: 1px solid var(--color-nav-border);
        box-shadow: var(--shadow);
        padding: 0.5rem 1.25rem 1rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.35s var(--gl-ease), opacity 0.25s var(--gl-ease);
    }
    body.template-granlp .gl-nav-list.is-open {
        max-height: 80vh;
        overflow-y: auto;
        opacity: 1;
        pointer-events: auto;
    }
    body.template-granlp .gl-nav-list .nav-item { border-bottom: 1px solid var(--color-nav-border); }
    body.template-granlp .gl-nav-list .nav-link {
        padding: 0.9rem 0.25rem;
        font-size: 0.95rem;
        width: 100%;
    }
    body.template-granlp .gl-nav-list .nav-link::after { display: none; }
    body.template-granlp .gl-nav-list .nav-submenu {
        position: static;
        box-shadow: none;
        border: 0;
        padding: 0 0 0.5rem 0.75rem;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    body.template-granlp .gl-nav-list .nav-item.submenu-open .nav-submenu { display: block; }

    body.template-granlp .gl-bar__search { width: 44px; padding: 0.15rem; }
    body.template-granlp .gl-bar__search input {
        width: 0;
        padding: 0;
        transition: width 0.3s var(--gl-ease);
    }
    body.template-granlp .gl-bar__search:focus-within { width: min(220px, 60vw); padding-left: 0.9rem; }
    body.template-granlp .gl-bar__search:focus-within input { width: auto; flex: 1; }

    body.template-granlp .article-card--hero .article-card__title {
        font-size: clamp(1.5rem, 1.1rem + 3.5vw, 2.1rem);
    }
}

@media (max-width: 560px) {
    body.template-granlp .portada-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    body.template-granlp #main-content { padding-top: 1.5rem; }
    body.template-granlp .gl-ticker__label { font-size: 0.66rem; padding: 0.5rem 0.7rem; }
}

/* Teléfono: acá aparece la barra inferior mobile (con su propio buscador).
   Header = hamburguesa (izq) + logo (centrado), sin buscador. */
@media (max-width: 768px) {
    /* El default agrega padding-top:55px para su header fixed; en granlp la barra
       es sticky y ocupa su espacio, así que ese padding deja un hueco blanco arriba. */
    body.template-granlp { padding-top: 0; }

    /* El buscador ya está en la barra inferior mobile: lo sacamos del header. */
    body.template-granlp .gl-bar__search { display: none; }

    /* Logo centrado con la hamburguesa fija a la izquierda (el ::after balancea). */
    body.template-granlp .gl-bar__logo { margin: 0 auto; }
    body.template-granlp .gl-bar__inner::after { content: ""; flex: 0 0 42px; }

    /* Bloque "1 grande + sidebar lateral": en mobile el default lo vuelve un
       carrusel horizontal. Nuestras cards row eran [texto | imagen] y quedaban
       pegadas (gap 0 entre cards -> el texto chocaba con la imagen de la de al
       lado). Las pasamos a card vertical (imagen arriba, texto abajo), con ancho
       fijo y separación real entre ellas. */
    body.template-granlp .portada-headline__sidebar {
        gap: 1rem;
        padding-bottom: 0.35rem;
        border-top: 0;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    body.template-granlp .portada-headline__sidebar .article-card--row {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        flex: 0 0 210px;
        min-width: 210px;
        padding: 0;
        border: 0;
        scroll-snap-align: start;
    }
    body.template-granlp .portada-headline__sidebar .article-card--row .article-card__image-link {
        order: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: var(--gl-radius);
    }
    body.template-granlp .portada-headline__sidebar .article-card--row .article-card__body {
        order: 1;
        padding: 0;
    }
    body.template-granlp .portada-headline__sidebar .article-card--row .article-card__title {
        font-size: 0.95rem;
    }
}
