/* =============================================================================
   XCMS v2 — Template "PPQ"
   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-ppq.
   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-ppq {
    /* 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:         88px;

    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-ppq {
    --z-sticky:  200;
    --z-panel:   700;
    --z-overlay: 690;
}

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

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

/* =============================================================================
   TOPBAR — strip superior fino (fecha | redes)
   ============================================================================= */
body.template-ppq .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-ppq .gl-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 40px;
}

body.template-ppq .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-ppq .gl-topbar__date::first-letter { text-transform: uppercase; }

/* Fecha | farmacia de turno | fallecimientos (el strip completo se oculta ≤1024px) */
body.template-ppq .gl-topbar__left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

body.template-ppq .gl-topbar__sep {
    flex: none;
    width: 1px;
    height: 16px;
    background: linear-gradient(
        to bottom,
        transparent,
        color-mix(in srgb, var(--color-header-fg) 35%, transparent) 25%,
        color-mix(in srgb, var(--color-header-fg) 35%, transparent) 75%,
        transparent
    );
}

body.template-ppq .gl-topbar__chip {
    /* Verde de estado ("abierta"), mezclado con el fg del header para que
       contraste tanto sobre fondos claros como oscuros. */
    --gl-turno: color-mix(in srgb, #16a34a 72%, var(--color-header-fg));
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-header-fg-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s var(--gl-ease);
}
body.template-ppq .gl-topbar__chip:hover { color: var(--color-header-fg); }

body.template-ppq .gl-topbar__chip--turno { color: var(--gl-turno); }
body.template-ppq .gl-topbar__chip--turno:hover {
    color: color-mix(in srgb, var(--gl-turno) 80%, var(--color-header-fg));
}
body.template-ppq .gl-topbar__chip-icon { flex: none; }
body.template-ppq .gl-topbar__chip-label { font-weight: 500; }
body.template-ppq .gl-topbar__chip-name {
    font-weight: 700;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.template-ppq .gl-topbar__chip--turno:hover .gl-topbar__chip-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.template-ppq .gl-topbar__count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-header-fg);
    background: color-mix(in srgb, var(--color-header-fg) 16%, transparent);
    transition: background 0.2s var(--gl-ease);
}
body.template-ppq .gl-topbar__chip--necro:hover .gl-topbar__count {
    background: color-mix(in srgb, var(--color-header-fg) 26%, transparent);
}

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

body.template-ppq .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-ppq .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-ppq .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-ppq .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);
}

/* Barra en 3 columnas: [Secciones] · [logo centrado] · [buscador] */
body.template-ppq .gl-bar__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    min-height: var(--nav-h);
    /* Mantener el gutter horizontal del .container (si no, el botón Secciones y
       el buscador quedan pegados a los bordes en resoluciones angostas). */
    padding: 0.4rem var(--gutter);
    position: relative;
}

/* Logo (centrado) */
body.template-ppq .gl-bar__logo {
    display: flex;
    align-items: center;
    justify-self: center;
    flex-shrink: 0;
    margin: 0;
}
body.template-ppq .gl-bar__logo img {
    max-height: 62px;
    width: auto;
    transition: max-height 0.3s var(--gl-ease);
}
body.template-ppq .site-nav.gl-bar.is-stuck .gl-bar__logo img { max-height: 50px; }
body.template-ppq .gl-bar__logo .site-logo__text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.03em;
    color: var(--color-nav-fg);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Menú de secciones: panel desplegable anclado abajo-izquierda (todos los anchos) */
body.template-ppq .gl-nav-list {
    position: absolute;
    top: calc(100% + 3px);
    left: var(--gutter);
    z-index: var(--z-panel);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 260px;
    max-width: min(360px, 92vw);
    /* height:auto para anular el height:100% que hereda de .nav-list (default),
       que si no capa el panel a la altura de la barra y corta las secciones. */
    height: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 0.4rem;
    background: var(--gl-bg);
    color: var(--gl-ink);
    border: 1px solid var(--gl-hairline);
    border-radius: var(--gl-radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s var(--gl-ease), transform 0.25s var(--gl-ease), max-height 0.3s var(--gl-ease), padding 0.25s var(--gl-ease);
}
body.template-ppq .gl-nav-list.is-open {
    max-height: 75vh;
    overflow-y: auto;
    padding: 0.4rem;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
body.template-ppq .gl-nav-list::-webkit-scrollbar { width: 8px; }

body.template-ppq .gl-nav-list .nav-item { display: block; }
body.template-ppq .gl-nav-list .nav-item + .nav-item { border-top: 1px solid var(--gl-hairline); }

body.template-ppq .gl-nav-list .nav-link {
    display: block;
    padding: 0.72rem 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--gl-ink);
    border: 0;
    border-radius: var(--gl-radius-sm);
    background: none;
    transition: color 0.18s var(--gl-ease), background 0.18s var(--gl-ease);
}
/* PC: items más compactos (en táctil se mantiene el área de toque más grande) */
@media (min-width: 1025px) {
    body.template-ppq .gl-nav-list .nav-link { padding-block: 0.45rem; }
}
body.template-ppq .gl-nav-list .nav-link:hover,
body.template-ppq .gl-nav-list .nav-item.is-active .nav-link {
    color: var(--color-primary);
    background: var(--gl-surface-2);
}

/* Submenú: inline dentro del panel (indentado) */
body.template-ppq .gl-nav-list .nav-submenu {
    display: block;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.3rem 0.85rem;
    min-width: 0;
}
body.template-ppq .gl-nav-list .nav-submenu a {
    display: block;
    color: var(--gl-muted);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--gl-radius-sm);
    padding: 0.45rem 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}
body.template-ppq .gl-nav-list .nav-submenu a:hover {
    background: var(--gl-surface-2);
    color: var(--color-primary);
}

/* Buscador (derecha) */
body.template-ppq .gl-bar__search {
    display: flex;
    align-items: center;
    justify-self: end;
    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-ppq .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-ppq .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-ppq .gl-bar__search:focus-within input { color: var(--gl-ink); }
body.template-ppq .gl-bar__search input::placeholder { color: var(--color-nav-fg-subtle); }
body.template-ppq .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-ppq .gl-bar__search button:hover { background: var(--gl-primary-ink); }
body.template-ppq .gl-bar__search button:active { transform: scale(0.92); }

/* Botón "Secciones" (izquierda): icono + label, abre el panel.
   Reusa .nav-toggle, así que sobreescribimos las reglas base del default
   (display:none, flex-direction:column) con specificity suficiente. */
body.template-ppq .gl-bar .nav-toggle {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    justify-self: start;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.55rem 0.9rem;
    background: color-mix(in srgb, var(--color-nav-fg) 8%, transparent);
    border: 1px solid var(--color-nav-border);
    border-radius: 100px;
    color: var(--color-nav-fg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s var(--gl-ease), border-color 0.2s var(--gl-ease);
}
body.template-ppq .gl-bar .nav-toggle:hover,
body.template-ppq .gl-bar .nav-toggle.is-active {
    background: color-mix(in srgb, var(--color-nav-fg) 15%, transparent);
    border-color: color-mix(in srgb, var(--color-nav-fg) 32%, transparent);
}
body.template-ppq .gl-bar .nav-toggle .gl-sections-btn__icon {
    width: 18px;
    height: auto;
    flex-shrink: 0;
    display: block;
}
/* Neutraliza la hamburguesa base del default (.nav-toggle span ...) sobre el
   label, que si no se convierte en una barrita blanca / se oculta al abrir. */
body.template-ppq .gl-bar .nav-toggle .gl-sections-btn__label {
    display: inline;
    width: auto;
    height: auto;
    background: none;
    opacity: 1;
    transform: none;
    color: inherit;
    line-height: 1;
}

/* =============================================================================
   TICKER — Último momento
   ============================================================================= */
body.template-ppq .gl-ticker {
    display: flex;
    align-items: stretch;
    background: var(--gl-bg);
    border-bottom: 1px solid var(--gl-hairline);
    overflow: hidden;
}
body.template-ppq .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-ppq .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-ppq .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-ppq .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-ppq .gl-ticker:hover .gl-ticker__track { animation-play-state: paused; }
body.template-ppq .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-ppq .gl-ticker__item:hover { color: var(--color-primary); }
body.template-ppq .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-ppq #main-content {
    padding-top: 2.25rem;
    padding-bottom: 4rem;
}

/* =============================================================================
   SECTION HEADINGS — etiqueta grotesk con marca de bloque
   ============================================================================= */
body.template-ppq .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-ppq .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-ppq .portada-section { margin-bottom: 3.25rem; }
/* Bloques de publicidad sin el fondo de puntitos del default */
body.template-ppq .portada-section--publicidad { background: none; }
body.template-ppq .home-full-width { margin-bottom: 3.25rem; }
body.template-ppq .home-layout--with-sidebar { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }

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

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

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

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

body.template-ppq .article-card__image-link {
    display: block;
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--gl-surface-2);
    background-size: cover;
    background-position: center top;
    aspect-ratio: 16 / 10;
}
/* Recorte anclado arriba (centrado en horizontal): así no se cortan las caras
   de las personas, que suelen estar en la parte superior de la foto. El zoom del
   hover también parte desde arriba para no desplazar ese encuadre. */
body.template-ppq .article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform-origin: center top;
    transition: transform 0.6s var(--gl-ease-out);
}
body.template-ppq .article-card:hover .article-card__image { transform: scale(1.05); }

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

body.template-ppq .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-ppq .article-card__category:hover { color: var(--gl-primary-ink); }

body.template-ppq .article-card__title {
    font-size: 1.06rem;
    line-height: 1.18;
    margin: 0;
}
body.template-ppq .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-ppq .article-card__title a:hover {
    color: var(--color-primary);
    background-size: 100% 2px;
}

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

body.template-ppq .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);
}
/* El autor se muestra dentro de la nota, no en los listados */
body.template-ppq .article-card__author { display: none; }
body.template-ppq .article-card__date { color: var(--gl-muted); }

/* HERO — titular grande */
body.template-ppq .article-card--hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}
body.template-ppq .article-card--hero:hover { transform: none; box-shadow: none; }
body.template-ppq .article-card--hero .article-card__image { aspect-ratio: 16 / 9; }
body.template-ppq .article-card--hero:hover .article-card__image { transform: scale(1.04); }
body.template-ppq .article-card--hero .article-card__body { padding: 1.1rem 0 0; }
body.template-ppq .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-ppq .article-card--hero .article-card__excerpt {
    font-size: 1.02rem;
    max-width: 60ch;
}

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

/* OVERLAY — título sobre la foto con degradé */
body.template-ppq .article-card--overlay .article-card__media { border-radius: var(--gl-radius); overflow: hidden; }
body.template-ppq .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-ppq .article-card--overlay .article-card__title { color: #fff; font-size: 1.15rem; }
body.template-ppq .article-card--overlay .article-card__title a { color: #fff; background: none; }
body.template-ppq .article-card--overlay .article-card__category {
    color: #fff;
    background: var(--color-primary);
    padding: 0.15rem 0.5rem;
    border-radius: var(--gl-radius-sm);
}

/* Epígrafe de la imagen destacada: texto más oscuro (legible) */
body.template-ppq .article-featured-image figcaption {
    color: var(--gl-ink);
}

/* =============================================================================
   SIDEBAR — bloques (populares / últimas)
   ============================================================================= */
body.template-ppq .sidebar-block {
    background: transparent;
    border: 0;
    border-top: 3px solid var(--gl-ink);
    border-radius: 0;
}
body.template-ppq .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-ppq .sidebar-block__header::before {
    content: "";
    width: 6px;
    height: 1em;
    background: var(--color-primary);
    border-radius: 2px;
}
body.template-ppq .sidebar-article {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gl-hairline);
    gap: 0.85rem;
    counter-increment: gl-pop;
}
body.template-ppq .sidebar-block--noticias .sidebar-block__body { counter-reset: gl-pop; }
body.template-ppq .sidebar-article__title { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; }
body.template-ppq .sidebar-article__cat { color: var(--color-primary); font-size: 0.66rem; }

/* =============================================================================
   FOOTER — propio del theme: columnas, redes en iconos, categorías
   ============================================================================= */
body.template-ppq .site-footer { background: var(--color-footer-bg); color: var(--color-footer-fg); }
body.template-ppq .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-ppq .gl-footer .footer-brand { flex: 1 1 280px; max-width: 400px; }
body.template-ppq .gl-footer .footer-nav,
body.template-ppq .gl-footer .footer-contact { flex: 1 1 160px; min-width: 0; }
body.template-ppq .gl-footer .footer-cats { flex: 1 1 240px; }

body.template-ppq .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-ppq .footer-logo { max-height: 96px; width: auto; }

body.template-ppq .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-ppq .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-ppq .gl-footer .footer-nav ul { display: flex; flex-direction: column; gap: 0.55rem; }
body.template-ppq .gl-footer .footer-nav a,
body.template-ppq .gl-footer .footer-contact a,
body.template-ppq .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-ppq .gl-footer .footer-nav a:hover,
body.template-ppq .gl-footer .footer-contact a:hover { color: var(--color-primary); }

/* Categorías: dos columnas cuando hay espacio */
body.template-ppq .gl-footer .footer-cats ul {
    display: block;
    column-count: 2;
    column-gap: 1.5rem;
}
body.template-ppq .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-ppq .gl-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.35rem;
}
body.template-ppq .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-ppq .gl-footer-social .footer-social__link:hover {
    background: color-mix(in srgb, var(--color-primary) 68%, #000);
    color: #fff;
    transform: translateY(-2px);
}
body.template-ppq .gl-footer-social .footer-social__link svg { width: 20px; height: 20px; }

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

@media (max-width: 560px) {
    body.template-ppq .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-ppq.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-ppq.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-ppq .article-card__image,
    body.template-ppq .gl-bar__logo img,
    body.template-ppq .article-card__title a { transition: none !important; }
    body.template-ppq .article-card:hover .article-card__image,
    body.template-ppq .article-card--hero:hover .article-card__image { transform: none; }
    body.template-ppq .gl-ticker__track { animation: none !important; }
    body.template-ppq .gl-nav-list .nav-link::after { transition: none; }
}

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

@media (max-width: 1024px) {
    /* Ocultamos el strip superior (fecha/redes) en mobile/tablet */
    body.template-ppq .gl-topbar { display: none; }

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

    /* Barra un poco más baja y logo algo menor en pantallas chicas */
    body.template-ppq { --nav-h: 66px; }
    body.template-ppq .gl-bar__inner { gap: 0.75rem; }
    body.template-ppq .gl-bar__logo img { max-height: 46px; }
    body.template-ppq .site-nav.gl-bar.is-stuck .gl-bar__logo img { max-height: 40px; }

    /* El panel de secciones un poco más angosto */
    body.template-ppq .gl-nav-list { min-width: 240px; max-width: min(340px, 92vw); }

    /* Buscador colapsado a ícono; se expande al enfocar */
    body.template-ppq .gl-bar__search { width: 44px; padding: 0.15rem; }
    body.template-ppq .gl-bar__search input {
        width: 0;
        padding: 0;
        transition: width 0.3s var(--gl-ease);
    }
    body.template-ppq .gl-bar__search:focus-within { width: min(220px, 60vw); padding-left: 0.9rem; }
    body.template-ppq .gl-bar__search:focus-within input { width: auto; flex: 1; }

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

@media (max-width: 560px) {
    body.template-ppq .portada-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    body.template-ppq #main-content { padding-top: 1.5rem; }
    body.template-ppq .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 ppq la barra
       es sticky y ocupa su espacio, así que ese padding deja un hueco blanco arriba. */
    body.template-ppq { padding-top: 0; }

    /* El buscador ya está en la barra inferior mobile: lo sacamos del header.
       Con eso la col. derecha del grid queda vacía y el logo (col. central)
       sigue perfectamente centrado. */
    body.template-ppq .gl-bar__search { display: none; }

    /* En el teléfono el botón "Secciones" queda solo con el ícono para ahorrar
       espacio (el texto de secciones también está en la barra inferior). */
    body.template-ppq .gl-bar .nav-toggle .gl-sections-btn__label { display: none; }
    body.template-ppq .gl-bar .nav-toggle { padding: 0.5rem 0.7rem; }

    /* 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-ppq .portada-headline__sidebar {
        gap: 1rem;
        padding-bottom: 0.35rem;
        border-top: 0;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    body.template-ppq .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-ppq .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-ppq .portada-headline__sidebar .article-card--row .article-card__body {
        order: 1;
        padding: 0;
    }
    body.template-ppq .portada-headline__sidebar .article-card--row .article-card__title {
        font-size: 0.95rem;
    }
}

/* Farmacias de turno — /farmacias-de-turno (2026-11-18) */
