/**
 * MODULE: PILLAR PAGES (Dark Premium Noir Awwwards Edition)
 * Theme: Relatando.com
 * Palette: Gold #d4af37, Spectral Green #00ff88, Obsidian #030705 / #080c0a
 */

/* ── Hide native page header on pillar pages ── */
body.is-pillar-page .entry-header,
body:has(.pillar-hero) .entry-header,
body:has(.pillar-story-card) .entry-header,
body:has(.pillar-breadcrumbs) .entry-header {
    display: none !important;
}

/* ── Breadcrumbs ── */
.pillar-breadcrumbs {
    font-size: 0.85rem;
    color: #a3b8ad;
    margin-bottom: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.pillar-breadcrumbs a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.25s ease;
}
.pillar-breadcrumbs a:hover {
    color: #00ff88;
}

/* ── Hero Banner ── */
.pillar-hero {
    position: relative;
    width: 100%;
    height: 460px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 50px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
}
.pillar-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 9, 7, 0.25) 0%, rgba(3, 7, 5, 0.95) 100%);
}
.pillar-hero-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
}
.pillar-badge-classified {
    background: #d4af37;
    color: #030705;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: inline-block;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
.pillar-hero-title {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
    line-height: 1.15;
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-weight: 700;
}

/* ── Content Container & Author Meta ── */
.pillar-page-content {
    max-width: 860px;
    margin: 0 auto;
}
.pillar-author-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 20px;
}
.pillar-author-bar img,
.pillar-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #d4af37;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.pillar-author-meta-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}
.pillar-author-meta-role {
    color: #a3b8ad;
    font-size: 0.85rem;
}

/* ── Intro Section ── */
.pillar-intro-section {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #d0ded6;
    margin-bottom: 45px;
    text-align: justify;
}
.pillar-intro-section h2 {
    color: #ffffff;
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-size: 1.85rem;
    margin: 35px 0 18px 0;
    border-left: 3px solid #00ff88;
    padding-left: 15px;
}
.pillar-intro-section p {
    margin-bottom: 20px;
}
.pillar-intro-section a {
    color: #00ff88;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}
.pillar-intro-section a:hover {
    color: #d4af37;
}

/* ── Table of Contents (TOC) ── */
.pillar-toc {
    background: rgba(10, 15, 12, 0.88);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 12px;
    padding: 28px 34px;
    margin: 40px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
.pillar-toc h3 {
    color: #d4af37;
    margin-top: 0;
    font-size: 1.35rem;
    font-family: var(--font-serif, 'Playfair Display', serif);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}
.pillar-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.pillar-toc li {
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}
.pillar-toc a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.25s ease, padding-left 0.25s ease;
    display: block;
    font-size: 0.98rem;
}
.pillar-toc a:hover {
    color: #00ff88;
    padding-left: 8px;
}

/* ── Stories Grid & Cards ── */
.pillar-stories-grid {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Card Container - Optimizado con content-visibility para carga instantánea */
.pillar-story-card {
    background: rgba(8, 12, 10, 0.94) !important;
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(212, 175, 55, 0.4) !important; /* Gold border default */
    border-radius: 16px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: hidden !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.4s ease,
                background-color 0.4s ease !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6) !important;
    scroll-margin-top: 110px;
    position: relative;
}

/* Hover: ILUMINA LA TARJETA (no oscurece) */
.pillar-story-card:hover {
    transform: translateY(-8px) !important;
    background: rgba(14, 22, 18, 0.98) !important;       /* Ilumina sutilmente el fondo */
    border-color: #00ff88 !important;                     /* Borde verde espectral nítido */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95),
                0 0 35px rgba(0, 255, 136, 0.38),
                0 0 70px rgba(0, 255, 136, 0.14),
                inset 0 0 20px rgba(0, 255, 136, 0.08) !important; /* Iluminación total */
}

/* Card Image (Left/Top) */
.pillar-card-img-link {
    flex: 1 1 320px;
    min-height: 280px;
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}
.pillar-card-img-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.55s cubic-bezier(0.165, 0.84, 0.44, 1),
                filter 0.55s ease;
}
/* Imagen al hover: SE ILUMINA Y RESALTA (cero oscurecimiento) */
.pillar-story-card:hover .pillar-card-img-bg {
    transform: scale(1.06);
    filter: brightness(1.15) contrast(1.05);
}

/* Number Badge */
.pillar-card-num {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(3, 7, 5, 0.88);
    border: 1.5px solid #d4af37;
    color: #d4af37;
    font-size: 1.3rem;
    font-weight: 900;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-serif, 'Playfair Display', serif);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
    z-index: 2;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.pillar-story-card:hover .pillar-card-num {
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
}

/* Desactivar cualquier overlay oscuro que tape la foto o texto problemático */
.pillar-card-img-overlay,
.pillar-card-img-cta {
    display: none !important;
}

/* Card Body (Right/Bottom) */
.pillar-card-body {
    flex: 2 1 400px;
    padding: 36px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid rgba(212, 175, 55, 0.15);
}
.pillar-card-title {
    color: #ffffff;
    font-size: 1.55rem;
    margin: 0 0 14px 0;
    font-family: var(--font-serif, 'Playfair Display', serif);
    line-height: 1.3;
    transition: color 0.25s ease;
}
.pillar-story-card:hover .pillar-card-title {
    color: #d4af37;
}
.pillar-card-excerpt,
.pillar-story-text p,
.pillar-story-card p,
.pillar-card-body p,
.pillar-story-desc {
    color: #cbd5e1 !important;
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    margin: 0 0 24px 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pillar-story-text h3,
.pillar-story-card h3 {
    color: #ffffff !important;
    font-size: 1.55rem !important;
    margin: 0 0 14px 0 !important;
    font-family: var(--font-serif, 'Playfair Display', serif) !important;
    line-height: 1.3 !important;
    display: block !important;
    visibility: visible !important;
}

/* Card Action Button */
.pillar-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    border: 1.5px solid #d4af37 !important;
    color: #d4af37 !important;
    padding: 12px 28px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    font-size: 0.88rem !important;
    align-self: flex-start;
}
.pillar-read-more:hover {
    background: #d4af37 !important;
    color: #030705 !important;
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.6) !important;
    border-color: #d4af37 !important;
}

/* Backward compatibility for older card structures */
.pillar-story-img {
    flex: 1 1 300px;
    min-height: 260px;
    position: relative;
    background-size: cover;
    background-position: center;
}
.pillar-story-text {
    flex: 2 1 400px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Contenedor amplio para colecciones completas */
.pillar-wide-container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 25px 60px !important;
}

/* ── FAQs Section ── */
.pillar-faqs {
    margin-top: 65px;
}
.pillar-faqs h2 {
    font-family: var(--font-serif, 'Playfair Display', serif);
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}
.pillar-faqs details {
    background: rgba(12, 18, 14, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 16px 26px;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.pillar-faqs details:hover {
    border-color: rgba(212, 175, 55, 0.5);
}
.pillar-faqs details[open] {
    border-color: rgba(0, 255, 136, 0.45);
    background: rgba(15, 24, 18, 0.96);
}
.pillar-faqs summary {
    font-size: 1.15rem;
    color: #d4af37;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    list-style: none;
}
.pillar-faqs summary::-webkit-details-marker {
    display: none;
}
.pillar-faqs p {
    color: #b8cfc6;
    margin-top: 14px;
    line-height: 1.7;
    font-size: 1.02rem;
}

/* ── Author EEAT Box ── */
.pillar-author-eeat {
    margin-top: 65px;
    padding: 35px;
    background: linear-gradient(135deg, rgba(10, 15, 12, 0.94) 0%, rgba(26, 21, 16, 0.96) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}
.pillar-author-eeat-avatar {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    border: 3px solid #d4af37;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.pillar-author-eeat-body {
    flex: 1 1 320px;
    text-align: left;
}
.pillar-author-eeat-body h3 {
    color: #d4af37;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    font-family: var(--font-serif, 'Playfair Display', serif);
}
.pillar-author-eeat-body h3 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.pillar-author-eeat-body h3 a:hover {
    color: #00ff88;
}
.pillar-author-eeat-body p {
    color: #a3b8ad;
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 0 16px 0;
}
.pillar-author-eeat-badges {
    display: flex;
    gap: 14px;
    font-size: 0.9rem;
    font-weight: 700;
}
.pillar-badge-eeat {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 5px 14px;
    border-radius: 4px;
}
.pillar-badge-date {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 5px 14px;
    border-radius: 4px;
}

/* ── Related Carousel ── */
.pillar-carousel-title {
    color: #ffffff;
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-size: 1.85rem;
    margin: 60px 0 25px 0;
}
.pillar-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}
.pillar-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}
.pillar-horizontal-scroll::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}
.pillar-h-card {
    scroll-snap-align: start;
    min-width: 260px;
    background: rgba(10, 15, 12, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: block;
}
.pillar-h-card:hover {
    border-color: #00ff88;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}
.pillar-h-card-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.pillar-h-card-content {
    padding: 18px;
}
.pillar-h-card-content h4 {
    color: #d4af37;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .pillar-hero {
        height: 380px;
        margin-bottom: 35px;
    }
    .pillar-hero-content {
        left: 20px;
        right: 20px;
        bottom: 25px;
    }
    .pillar-card-img-link {
        min-height: 220px;
    }
    .pillar-card-body {
        padding: 24px 20px;
        border-left: none;
        border-top: 1px solid rgba(212, 175, 55, 0.15);
    }
    .pillar-card-title {
        font-size: 1.35rem;
    }
    .pillar-toc {
        padding: 20px;
    }
    .pillar-author-eeat {
        padding: 25px;
    }
}

/* ── Inyector Automático de Pilares en Relatos (Pillar Injector Cards) ── */
.pillar-injector-wrapper {
    clear: both !important;
    display: block !important;
    width: 100% !important;
    margin: 40px auto !important;
    box-sizing: border-box !important;
}
.pillar-injector-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    background: rgba(10, 16, 12, 0.94) !important;
    border: 1.5px solid rgba(212, 175, 55, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}
.pillar-injector-card:hover {
    transform: translateY(-5px) !important;
    border-color: #00ff88 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 255, 136, 0.25) !important;
}
.pillar-injector-card-end {
    border-color: rgba(212, 175, 55, 0.45) !important;
}
.pillar-injector-card-end:hover {
    border-color: #d4af37 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.3) !important;
}
.pillar-injector-img-wrap {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}
.pillar-injector-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}
.pillar-injector-card:hover .pillar-injector-img {
    transform: scale(1.08) !important;
}
.pillar-injector-content {
    padding: 22px 26px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}
.pillar-injector-badge {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #00ff88 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.pillar-injector-card-end .pillar-injector-badge {
    color: #d4af37 !important;
}
.pillar-injector-title {
    display: block !important;
    font-family: 'Cinzel', serif !important;
    font-size: 1.22rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    line-height: 1.35 !important;
    margin: 0 0 10px 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9) !important;
    transition: color 0.3s ease !important;
}
.pillar-injector-card:hover .pillar-injector-title {
    color: #d4af37 !important;
}
.pillar-injector-desc {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.92rem !important;
    color: #a3b8ad !important;
    line-height: 1.55 !important;
    margin: 0 0 12px 0 !important;
}
.pillar-injector-btn {
    display: inline-block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: color 0.3s ease !important;
}
.pillar-injector-card:hover .pillar-injector-btn {
    color: #00ff88 !important;
}
.pillar-injector-card-end:hover .pillar-injector-btn {
    color: #d4af37 !important;
}
@media (max-width: 640px) {
    .pillar-injector-card {
        flex-direction: column !important;
    }
    .pillar-injector-img-wrap {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 170px !important;
    }
    .pillar-injector-content {
        padding: 18px 20px !important;
    }
    .pillar-injector-title {
        font-size: 1.1rem !important;
    }
}

