/* ============================================================
   blog-custom.css — Estilos del artículo y bloques Payload
   Variables del tema: --On-surface, --Surface-light, --White-light,
                       --Line, --Primary, --Secondary, --Secondary2
   Dark mode: .dark-mode (clase del tema Drozy)
   --blog-accent: color de marca Modernado (naranja), distinto de
                  --Primary que es el verde del template Drozy.
   ============================================================ */

:root {
    --blog-accent: #fd1774;
}

/* ══════════════════════════════════════════════
   HEADING-POST — título hero e imagen
   ══════════════════════════════════════════════ */

/* Override padding excesivo del tema */
.heading-post.style-1 .content {
    padding: 75px 50px !important;
}
.single-post.style-1 .sidebar {
    padding-right: 0 !important;
}

.heading-post {
    padding: 20px 0 29px !important;
}

/* Título del post: más compacto que el h1 genérico del tema */
.heading-post h1 {
    font-size: 3.5rem !important;
    line-height: 1.25 !important;
}

/* Imagen hero siempre en 16:9 */
.heading-post .thumbs-post {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}
.heading-post .thumbs-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ══════════════════════════════════════════════
   ARTÍCULO — tipografía y elementos base
   ══════════════════════════════════════════════ */
.post-article {
    color: var(--On-surface);
    font-size: 18px;
    line-height: 30px;
}
.post-article p {
    color: var(--On-surface);
    margin-bottom: 1.5rem;
}

/* H2 — estilo HubSpot: caja bordeada con icono grande */
.post-article h2 {
    display: flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--On-surface) !important;
    margin: 2.5rem 0 1.25rem !important;
    border: 3px solid var(--Line) !important;
    border-radius: 10px !important;
    padding: 3rem !important;
}
.post-article h2::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    background-image: url('/blog/images/logo/favicon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.post-article h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--On-surface) !important;
    margin: 2rem 0 .75rem !important;
}
.post-article h4 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--On-surface) !important;
    margin: 1.5rem 0 .5rem !important;
}

/* Listas del artículo — icono custom en lugar de disco */
.post-article ul {
    list-style: none !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0;
}
.post-article ol {
    list-style: decimal !important;
    margin: 0 0 1.5rem 1.75rem !important;
    padding: 0;
}
.post-article ul > li {
    list-style: none !important;
    position: relative;
    color: var(--On-surface) !important;
    font-size: 18px;
    line-height: 30px;
    margin-bottom: .65rem;
    padding-left: 2.25rem;
}
.post-article ul {
    margin-left: 1rem !important;
}
.post-article ul > li::before {
    content: "\e902";
    font-family: 'icomoon' !important;
    font-style: normal;
    font-weight: normal;
    speak: never;
    position: absolute;
    left: 0;
    top: .3rem;
    color: var(--Primary);
    font-size: 15px;
    line-height: 1;
    margin-top: 7px
}
.post-article ol > li {
    list-style: inherit !important;
    color: var(--On-surface) !important;
    font-size: 18px;
    line-height: 30px;
    margin-bottom: .65rem;
    padding-left: .25rem;
}

/* Dark mode — párrafos atenuados, títulos blancos */
.dark-mode .post-article p,
.dark-mode .post-article li { color: #c9cdd4 !important; }
.dark-mode .post-article h2,
.dark-mode .post-article h3,
.dark-mode .post-article h4 { color: #ffffff !important; }
.post-article a          { color: var(--Primary); text-decoration: underline; }
.post-article strong     { font-weight: 700; }
.post-article em         { font-style: italic; }
.post-article blockquote {
    border-left: 3px solid var(--blog-accent);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--Surface-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--Secondary);
}
.post-article code {
    font-family: 'Courier New', monospace;
    font-size: .875em;
    background: var(--Surface-light);
    border: 1px solid var(--Line);
    border-radius: 4px;
    padding: .1em .4em;
    color: var(--On-surface);
}
.post-article hr,
.post-article-hr {
    border: none;
    border-top: 1px solid var(--Line);
    margin: 2rem 0;
}
.post-article figure { margin: 2rem 0; }
.post-article figure img { width: 100%; border-radius: 8px; }
.post-article figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--Secondary);
    margin-top: .5rem;
    font-style: italic;
}

/* ══════════════════════════════════════════════
   TOC AUTOMÁTICO (sidebar)
   ══════════════════════════════════════════════ */
.post-toc__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.post-toc__item a {
    display: block;
    font-size: 14px;
    color: var(--Secondary);
    text-decoration: none;
    line-height: 1.5;
    padding: .2rem 0;
    border-left: 2px solid transparent;
    padding-left: .75rem;
    transition: color .15s, border-color .15s;
}
.post-toc__item a:hover {
    color: var(--blog-accent);
    border-left-color: var(--blog-accent);
    text-decoration: none;
}
/* Indentación por nivel */
.post-toc__item--h2 a { padding-left: .75rem; font-weight: 600; color: var(--On-surface); }
.post-toc__item--h3 a { padding-left: 1.5rem; }
.post-toc__item--h4 a { padding-left: 2.25rem; font-size: 13px; }
/* Scroll spy — sección activa */
.post-toc__item a.is-active {
    color: var(--blog-accent) !important;
    border-left-color: var(--blog-accent) !important;
}

/* ══════════════════════════════════════════════
   SIDEBAR IZQUIERDO — TOC + Share sticky
   ══════════════════════════════════════════════ */
.post-side-sticky {
    position: sticky;
    top: 90px;
}
.post-side-bar__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--Secondary);
    margin: 0 0 .75rem !important;
}

/* Share — grid 2 columnas, solo iconos */
.post-share-icons { margin-top: 1.5rem; }
.post-share-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.post-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--Line);
    border-radius: 8px;
    color: var(--Secondary);
    font-size: 18px;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
}
.post-share-btn:hover {
    color: var(--blog-accent);
    border-color: var(--blog-accent);
    background: rgba(253, 23, 116, 0.06);
    text-decoration: none;
}

/* ══════════════════════════════════════════════
   BLOQUE: BANNER
   ══════════════════════════════════════════════ */
.block-banner {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
    margin: 1.75rem 0;
    font-size: 16px;
    line-height: 1.6;
}
.block-banner__icon { flex-shrink: 0; font-size: 18px; }
.block-banner--info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.block-banner--warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.block-banner--error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.block-banner--success { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.dark-mode .block-banner--info    { background: #1e3a5f; color: #93c5fd; }
.dark-mode .block-banner--warning { background: #3d2e00; color: #fcd34d; }
.dark-mode .block-banner--error   { background: #3d0000; color: #fca5a5; }
.dark-mode .block-banner--success { background: #0d2e1a; color: #86efac; }

/* ══════════════════════════════════════════════
   BLOQUE: CODE
   ══════════════════════════════════════════════ */
.block-code {
    margin: 1.75rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--Line);
}
.block-code__lang {
    display: block;
    background: #1e1e2e;
    color: #7c3aed;
    font-size: 11px;
    font-family: monospace;
    padding: .35rem 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.block-code pre {
    margin: 0;
    padding: 1.25rem;
    background: #0f0f1a;
    overflow-x: auto;
}
.block-code pre code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e2e8f0;
    background: none;
    border: none;
    padding: 0;
    white-space: pre;
}

/* ══════════════════════════════════════════════
   BLOQUE: MEDIA
   ══════════════════════════════════════════════ */
.block-media { margin: 2rem 0; }
.block-media__img { width: 100%; border-radius: 8px; height: auto; display: block; }
.block-media figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--Secondary);
    margin-top: .5rem;
    font-style: italic;
}

/* ══════════════════════════════════════════════
   BLOQUE: CALLOUT LEARN
   ══════════════════════════════════════════════ */
.block-callout {
    border: 1px solid var(--Line);
    border-left: 4px solid var(--blog-accent);
    border-radius: 0 10px 10px 0;
    background: rgba(253, 23, 116, 0.05);
    overflow: hidden;
    margin: 1.75rem 0;
}
.block-callout__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(253, 23, 116, 0.15);
}
.block-callout__title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--On-surface) !important;
}
.block-callout__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 1rem 1.25rem !important;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.block-callout__list li {
    list-style: none !important;
    position: relative;
    padding-left: 1.25rem;
    font-size: 15px !important;
    color: var(--Secondary) !important;
    margin: 0 !important;
    line-height: 1.6;
}
.block-callout__list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--blog-accent);
    font-size: 18px;
    line-height: 1.4;
}
/* ocultar el span ✓ que viene del Twig */
.block-callout__check {
    display: none;
}
.block-callout__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: .875rem 1.25rem;
    border-top: 1px solid rgba(253, 23, 116, 0.15);
    font-size: 13px;
    color: var(--Secondary);
}

/* ══════════════════════════════════════════════
   BLOQUE: EXPERT QUOTE
   ══════════════════════════════════════════════ */
.block-expert-quote {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--Line);
    border-radius: 10px;
    margin: 1.75rem 0;
    background: var(--Surface-light);
}
.block-expert-quote__photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.block-expert-quote__content { flex: 1; }
.block-expert-quote__quote {
    font-style: italic;
    font-size: 18px;
    color: var(--Secondary);
    line-height: 1.7;
    margin: 0 0 .75rem !important;
}
.block-expert-quote__meta {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.block-expert-quote__name {
    font-weight: 700;
    font-size: 15px;
    color: var(--On-surface);
    text-decoration: none;
}
.block-expert-quote__name:hover { color: var(--blog-accent); }
.block-expert-quote__role {
    font-size: 13px;
    color: var(--Secondary);
}

/* ══════════════════════════════════════════════
   BLOQUE: STAT HIGHLIGHT
   ══════════════════════════════════════════════ */
.block-stats {
    display: grid;
    gap: 1px;
    background: var(--Line);
    border: 1px solid var(--Line);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.75rem 0;
}
.block-stats--1 { grid-template-columns: 1fr; }
.block-stats--2 { grid-template-columns: repeat(2, 1fr); }
.block-stats--3 { grid-template-columns: repeat(3, 1fr); }
.block-stats--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
    .block-stats--4 { grid-template-columns: repeat(4, 1fr); }
}
.block-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--White-light);
}
.block-stats__value {
    font-size: 42px;
    font-weight: 800;
    color: var(--blog-accent);
    line-height: 1;
}
.block-stats__desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--On-surface);
}
.block-stats__source {
    font-size: 12px;
    color: var(--Secondary);
}

/* ══════════════════════════════════════════════
   BLOQUE: TABLE OF CONTENTS
   ══════════════════════════════════════════════ */
.block-toc {
    border: 1px solid var(--Line);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.75rem 0;
}
.block-toc__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 1.25rem;
    background: var(--Surface-light);
    border-bottom: 1px solid var(--Line);
    font-size: 15px;
    font-weight: 600;
    color: var(--On-surface);
}
.block-toc__list {
    list-style: none !important;
    margin: 0 !important;
    padding: .875rem 1.25rem !important;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    counter-reset: toc-counter;
}
.block-toc__list li {
    list-style: none !important;
    display: flex;
    align-items: baseline;
    gap: .75rem;
    font-size: 15px;
    color: var(--On-surface) !important;
    counter-increment: toc-counter;
    margin: 0 !important;
}
.block-toc__list li::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--blog-accent);
    flex-shrink: 0;
}
.block-toc__list a {
    color: var(--Secondary);
    text-decoration: none;
}
.block-toc__list a:hover { color: var(--blog-accent); }

/* ══════════════════════════════════════════════
   BLOQUE: CTA INLINE
   ══════════════════════════════════════════════ */
.block-cta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.75rem;
    border-radius: 10px;
    margin: 1.75rem 0;
}
@media (min-width: 768px) {
    .block-cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.block-cta__body { flex: 1; }
.block-cta__title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 .4rem !important;
    color: var(--On-surface) !important;
}
.block-cta__desc {
    font-size: 16px !important;
    margin: 0 0 .7rem !important;
    color: var(--Secondary) !important;
    line-height: 1.6 !important;
}
.block-cta__features {
    list-style: none !important;
    margin: .65rem 0 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.block-cta__features li {
    list-style: disc !important;
    font-size: 16px !important;
    color: var(--Secondary) !important;
    margin: 0 !important;
    line-height: 1.5;
    margin-left: 1.25rem !important;
}
.block-cta__check {
    display: none;
}
.block-cta__btn {
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
    padding: .75rem 1.5rem;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity .2s;
}
.block-cta__btn:hover { opacity: .85; text-decoration: none; }

/* Variantes */
.block-cta--primary {
    background: rgba(253, 23, 116, 0.07);
    border: 1px solid rgba(253, 23, 116, 0.3);
}
.block-cta--primary .block-cta__btn {
    background: var(--blog-accent);
    color: #fff;
}
.block-cta--dark {
    background: #161616;
    border: 1px solid #2a2a2a;
}
.block-cta--dark .block-cta__title,
.block-cta--dark .block-cta__desc,
.block-cta--dark .block-cta__features li { color: #e5e7eb !important; }
.block-cta--dark .block-cta__btn {
    background: var(--blog-accent);
    color: #fff;
}
.block-cta--muted {
    background: var(--Surface-light);
    border: 1px solid var(--Line);
}
.block-cta--muted .block-cta__btn {
    background: var(--On-surface);
    color: var(--White-light);
}

/* Visually hidden — visible para crawlers/lectores de pantalla, oculto visualmente */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Table ── */
.post-table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.post-table th,
.post-table td { padding: 0.6rem 1rem; border: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.post-table thead th { background: #f8fafc; font-weight: 600; color: #1e293b; }
.post-table tbody tr:nth-child(even) { background: #f8fafc; }
.post-table p { margin: 0; }
.dark-mode .post-table th,
.dark-mode .post-table td { border-color: #2d3748; color: #c9cdd4; }
.dark-mode .post-table thead th { background: #1e2535; color: #e2e8f0; }
.dark-mode .post-table tbody tr:nth-child(even) { background: #1a2030; }
.dark-mode .post-table tbody tr:nth-child(odd) { background: transparent; }

/* ── Upload inline ── */
.post-upload-figure { margin: 1.5rem 0; text-align: center; }
.post-upload-img { max-width: 100%; height: auto; border-radius: 8px; }
.post-upload-caption { margin-top: 0.5rem; font-size: 0.85rem; color: #64748b; font-style: italic; }
.dark-mode .post-upload-caption { color: #94a3b8; }

/* ══════════════════════════════════════════
   FAQ block
   ══════════════════════════════════════════ */

.faq-block { margin: 2rem 0; }

.faq-item {
    border: 1px solid var(--Line);
    border-radius: 8px;
    margin-bottom: .6rem;
    overflow: hidden;
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .875rem;
    background: transparent;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--On-surface);
    text-align: left;
    cursor: pointer;
    transition: color .15s;
}

.faq-btn::after {
    content: "";
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1rem;
    transition: transform .2s;
}
.faq-btn[aria-expanded="true"]::after { transform: rotate(-180deg); }
.faq-btn[aria-expanded="true"] { color: var(--blog-accent); }

.faq-body {
    padding: .25rem 1.25rem 1rem;
    font-size: 16px;
    line-height: 1.7;
    color: var(--Secondary);
}

/* Dark mode */
.dark-mode .faq-item { border-color: var(--Line); }
.dark-mode .faq-btn { color: var(--On-surface); }
.dark-mode .faq-btn::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23c9cdd4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.dark-mode .faq-btn[aria-expanded="true"] { color: var(--blog-accent); }
.dark-mode .faq-body { color: #94a3b8; }


/* ══════════════════════════════════════════════
   SEARCH — Página de resultados
   ══════════════════════════════════════════════ */

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 280px;
    max-width: 480px;
    width: 100%;
}

.search-form__input {
    flex: 1;
    height: 56px;
    padding: 0 20px;
    border-radius: 8px;
    border: 2px solid var(--Line);
    background: var(--Surface-light);
    color: var(--On-surface);
    font-size: 1.1rem;
    outline: none;
    transition: border-color .2s;
}
.search-form__input:focus { border-color: var(--blog-accent); }

.search-form__btn {
    flex-shrink: 0;
    height: 56px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--blog-accent), #c0125c);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity .2s;
}
.search-form__btn:hover { opacity: .85; }

.search-empty {
    padding: 80px 0;
    text-align: center;
}
.search-empty__icon {
    font-size: 4rem;
    opacity: .3;
    margin-bottom: 16px;
}

/* Dark mode */
.dark-mode .search-form__input {
    border-color: var(--Line);
    background: var(--Surface-light);
    color: var(--On-surface);
}
