/**
 * Publimark Theme — CSS de producción
 * QCloudStudio
 *
 * Estrategia:
 * 1. Foxiz sigue siendo el framework editorial.
 * 2. Esta hoja redefine tokens y componentes de Publimark.
 * 3. Evitamos copiar/forkear main.css de Foxiz.
 * 4. Evitamos reglas dependientes de wrappers internos de Elementor.
 */

/* =====================================================
   1. PUBLIMARK — DESIGN TOKENS
   ===================================================== */

:root {
    /* Identidad Publimark histórica / corporativa */
    --pm-brand-red: #e1251b;
    --pm-brand-ink: #231f20;
    --pm-white: #ffffff;

    /* Interacción digital solicitada para títulos */
    --pm-interaction-red: #f2295b;

    /* Neutros compatibles con Foxiz */
    --pm-text: #282828;
    --pm-text-muted: #666666;
    --pm-surface-soft: #fafafa;
    --pm-border: #e7e7e7;

    /* Overlays editoriales: más claros que Foxiz por defecto */
    --pm-overlay-bottom: rgba(14, 15, 18, 0.66);
    --pm-overlay-mid: rgba(14, 15, 18, 0.34);
    --pm-overlay-soft: rgba(14, 15, 18, 0.10);
    --pm-overlay-clear: rgba(14, 15, 18, 0);

    /* Mapeo de identidad sobre tokens principales de Foxiz */
    --g-color: var(--pm-brand-red);
    --g-color-90: rgba(225, 37, 27, 0.90);
    --heading-sub-color: var(--pm-brand-red);
    --indicator-bg-from: var(--pm-brand-red);
    --indicator-bg-to: var(--pm-interaction-red);
}

/* =====================================================
   2. PUBLIMARK — HOVER GLOBAL DE TÍTULOS FOXIZ
   ===================================================== */

.entry-title a {
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.entry-title a:hover,
.entry-title a:focus {
    color: var(--pm-interaction-red) !important;
    text-decoration: none !important;
}

/* Mantiene foco de teclado visible sin alterar el layout. */
.entry-title a:focus-visible {
    outline: 2px solid var(--pm-interaction-red);
    outline-offset: 3px;
}

/* =====================================================
   3. FOXIZ — OVERLAYS MÁS LIVIANOS
   Títulos/subtítulos sobre imágenes
   ===================================================== */

/*
 * Foxiz 2.7.7 usa por defecto un gradiente basado en --dark-accent
 * prácticamente opaco. Publimark conserva contraste, pero reduce la masa
 * oscura bajo el título y el extracto/subtítulo.
 *
 * Se excluye dark-overlay-scheme para respetar el esquema inverso nativo.
 */
.p-gradient:not(.dark-overlay-scheme) .overlay-inner {
    background-image: linear-gradient(
        to top,
        var(--pm-overlay-bottom) 0%,
        rgba(14, 15, 18, 0.48) 30%,
        var(--pm-overlay-mid) 55%,
        var(--pm-overlay-soft) 78%,
        var(--pm-overlay-clear) 100%
    ) !important;
}

/* Variante con gradiente superior de Foxiz. */
.p-top-gradient:not(.dark-overlay-scheme) .overlay-inner {
    background-image: linear-gradient(
        to bottom,
        var(--pm-overlay-bottom) 0%,
        rgba(14, 15, 18, 0.44) 32%,
        var(--pm-overlay-mid) 56%,
        var(--pm-overlay-soft) 78%,
        var(--pm-overlay-clear) 100%
    ) !important;
}

/*
 * Foxiz aplica opacity: .7 a la capa completa p-bg-overlay.
 * Se reduce a .46 para recuperar detalle y luminosidad de la fotografía.
 */
.p-bg-overlay:not(.dark-overlay-scheme) .overlay-wrap::before {
    opacity: 0.46;
}

/* Las cajas internas mantienen contraste, pero sin negro pleno. */
.is-inner-boxed:not(.dark-overlay-scheme) .overlay-inner {
    background-color: rgba(14, 15, 18, 0.72);
}

/* =====================================================
   4. MICRO-AJUSTES DE MARCA
   ===================================================== */

/* Selección de texto coherente con identidad Publimark. */
::selection {
    background: var(--pm-brand-red);
    color: var(--pm-white);
}

/* Reduce animación para usuarios que así lo solicitan. */
@media (prefers-reduced-motion: reduce) {
    .entry-title a {
        transition: none;
    }
}
