@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

/* ================================================================
   ACADEMY STYLES — Delitbee España S.L.
   Aplica a: .academy-content (frontend + Elementor) y al editor Gutenberg
   ================================================================ */

/* ── BASE ──────────────────────────────────────────────────────── */
.academy-content {
    color: #3A3A3C;
    font-family: 'Figtree', sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

/* ── HEADINGS ──────────────────────────────────────────────────── */
.academy-content h1,
.academy-content h2,
.academy-content h3,
.academy-content h4,
.academy-content h5,
.academy-content h6 {
    color: #1a1a2e;
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin: 2rem 0 0.75rem;
}
.academy-content h1 { font-size: 2rem; }
.academy-content h2 {
    font-size: 1.5rem;
    border-left: 4px solid #F63F60;
    padding-left: 12px;
}
.academy-content h3 { font-size: 1.25rem; }
.academy-content h4 { font-size: 1.1rem; }
.academy-content h5,
.academy-content h6 { font-size: 1rem; }

/* ── PÁRRAFOS ──────────────────────────────────────────────────── */
.academy-content p {
    margin: 0 0 1.25rem;
    color: #54595F;
}

/* ── LISTAS ────────────────────────────────────────────────────── */
.academy-content ul,
.academy-content ol {
    margin: 0 0 1.25rem 0;
    padding-left: 1.6rem;
    color: #54595F;
}
.academy-content li {
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
}
/* Marcadores nivel 1 */
.academy-content ul li::marker { color: #F63F60; }
.academy-content ol li::marker { color: #F63F60; font-weight: 700; }

/* ── Sublistas anidadas: indent consistente por nivel ────────── */
.academy-content ul ul,
.academy-content ul ol,
.academy-content ol ul,
.academy-content ol ol {
    margin: 0.35rem 0 0.35rem 0;
    padding-left: 1.4rem;
}
.academy-content ul ul ul,
.academy-content ul ul ol,
.academy-content ol ol ul,
.academy-content ol ol ol {
    padding-left: 1.2rem;
}

/* Listas anidadas sin margen inferior extra */
.academy-content li > ul,
.academy-content li > ol {
    margin-bottom: 0;
}

/* Excepción: listas dentro de academy-special-list no heredan el color de marca */
.academy-special-list ul li::marker,
.academy-special-list ol li::marker,
.academy-special-list li::marker {
    color: inherit !important;
    font-weight: inherit !important;
}
.academy-special-list ul,
.academy-special-list ol {
    border-left: none !important;
    padding-left: revert !important;
    margin: 0 !important;
}

/* ── LINKS ─────────────────────────────────────────────────────── */
.academy-content a {
    color: #F63F60;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    overflow-wrap: anywhere;
}
.academy-content a:hover { border-bottom-color: #F63F60; }

/* Links dentro de listas: no partir la URL en mitad de una palabra */
.academy-content li a {
    overflow-wrap: normal;
    word-break: normal;
}

/* Neutralizar border-left del h2/h3 dentro de callouts */
.academy-content .academy-callout h1,
.academy-content .academy-callout h2,
.academy-content .academy-callout h3,
.academy-content .academy-callout h4,
.academy-content .academy-callout h5,
.academy-content .academy-callout h6 {
    border-left: none !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
}

/* ── SEPARADOR ─────────────────────────────────────────────────── */
.academy-content .wp-block-separator,
.academy-content hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 2rem 0;
}

/* ── QUOTE ─────────────────────────────────────────────────────── */
/* Quote — especificidad baja para que los colores del panel de Gutenberg ganen */
/* Quote y Pullquote — sin estilos propios, Gutenberg los gestiona */

/* ── PULLQUOTE ─────────────────────────────────────────────────── */
/* Pullquote — especificidad baja para que los colores del panel de Gutenberg ganen */


/* ── CÓDIGO ────────────────────────────────────────────────────── */
.academy-content code {
    background: #F3F4F6;
    color: #F63F60;
    font-family: 'Courier New', monospace;
    font-size: 0.88em;
    padding: 2px 6px;
    border-radius: 4px;
}
.academy-content pre,
.academy-content .wp-block-code {
    background: #1a1a2e;
    color: #e5e7eb;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.academy-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ── TABLA ─────────────────────────────────────────────────────── */
/* Tabla — especificidad baja para que los colores del panel de Gutenberg ganen */
:where(.academy-content) .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}
:where(.academy-content) .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
:where(.academy-content) .wp-block-table th {
    background: #F9FAFB;
    color: #1a1a2e;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid #E5E7EB;
}
:where(.academy-content) .wp-block-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #E5E7EB;
    color: #54595F;
    vertical-align: top;
}
:where(.academy-content) .wp-block-table tr:last-child td { border-bottom: none; }
:where(.academy-content) .wp-block-table tr:hover td { filter: brightness(0.97); }
:where(.academy-content) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
    background-color: #F9FAFB;
}

/* ── IMAGEN ────────────────────────────────────────────────────── */
.academy-content .wp-block-image { margin: 1.5rem 0; }
.academy-content .wp-block-image img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
}
.academy-content .wp-block-image figcaption {
    text-align: center;
    font-size: 0.82rem;
    color: #9CA3AF;
    margin-top: 6px;
}

/* ── EMBED / VIDEO ─────────────────────────────────────────────── */
.academy-content .wp-block-embed,
.academy-content .wp-block-video { margin: 1.5rem 0; }
.academy-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}
.academy-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ── ACCORDION / DETAILS (nativo WP 6.4+) ─────────────────────── */
.academy-content details,
.academy-content .wp-block-details {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin: 0.5rem 0;
    overflow: hidden;
}
.academy-content details summary,
.academy-content .wp-block-details summary {
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    color: #1a1a2e;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.academy-content details summary::after {
    content: '›';
    font-size: 1.2rem;
    transform: rotate(90deg);
    transition: transform 0.2s;
    color: #F63F60;
}
.academy-content details[open] summary::after { transform: rotate(270deg); }
.academy-content details > *:not(summary) {
    padding: 0 16px 14px;
    color: #54595F;
}

/* ── CHIPS DE TAGS ─────────────────────────────────────────────── */
.elementor-widget-post-info .elementor-icon-list-item a,
.academy-tags a,
.post-tags a {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Figtree', sans-serif;
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    transition: opacity 0.2s, filter 0.2s;
    margin: 2px 3px 2px 0;
    cursor: pointer;
}
.elementor-widget-post-info .elementor-icon-list-item a:hover,
.academy-tags a:hover,
.post-tags a:hover {
    opacity: 0.75;
    filter: saturate(1.4);
    text-decoration: none;
    border: none;
}

/* Colores rotativos por posición — mismo estilo que la imagen de referencia */
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+1) a,
.academy-tags a:nth-child(7n+1), .post-tags a:nth-child(7n+1) { background: #EDE9FD; color: #4C3D9E; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+2) a,
.academy-tags a:nth-child(7n+2), .post-tags a:nth-child(7n+2) { background: #D9F5EC; color: #1A6B50; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+3) a,
.academy-tags a:nth-child(7n+3), .post-tags a:nth-child(7n+3) { background: #FEF3D9; color: #8A5F0A; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+4) a,
.academy-tags a:nth-child(7n+4), .post-tags a:nth-child(7n+4) { background: #FFE4EC; color: #C02050; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+5) a,
.academy-tags a:nth-child(7n+5), .post-tags a:nth-child(7n+5) { background: #DDEEFF; color: #1A4F8A; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+6) a,
.academy-tags a:nth-child(7n+6), .post-tags a:nth-child(7n+6) { background: #E3F5D9; color: #2D6A10; }
.elementor-widget-post-info .elementor-icon-list-item:nth-child(7n+0) a,
.academy-tags a:nth-child(7n+0), .post-tags a:nth-child(7n+0) { background: #F0F0F0; color: #555555; }

/* ── TOC ────────────────────────────────────────────────────────── */
.elementor-widget-academy-toc .elementor-widget-container {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.academy-toc__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    margin: 0 0 10px 14px;
    font-family: 'Figtree', sans-serif;
}
.academy-toc__list { list-style: none; padding: 0; margin: 0; }
.academy-toc__list li { margin: 0; }
.academy-toc__list a {
    display: block;
    padding: 5px 14px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    line-height: 1.4;
    background: transparent;
    border-left: 3px solid transparent;
    transition: color .2s, border-color .2s;
    font-family: 'Figtree', sans-serif;
}
.academy-toc__list a:hover { color: #333; border-bottom: none; }
.academy-toc__list a.is-active {
    color: #F63F60;
    border-left-color: #F63F60;
    font-weight: 600;
}
.academy-toc__list li[data-level="h3"] a { padding-left: 26px; }
.academy-toc__list li[data-level="h4"] a { padding-left: 38px; }

/* ── ARTICLE META ───────────────────────────────────────────────── */
.academy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    align-items: center;
    font-size: 13px;
    color: #888;
    font-family: 'Figtree', sans-serif;
}
.academy-meta__icon { margin-right: 4px; }
.academy-meta__divider { margin: 0 8px; color: #ccc; }

/* ── BREADCRUMB ─────────────────────────────────────────────────── */
.ac-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-family: 'Figtree', sans-serif;
    font-size: 13px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.ac-breadcrumb__link {
    color: #888;
    text-decoration: none;
    border-bottom: none !important;
    transition: color 0.2s;
}
.ac-breadcrumb__link:hover {
    color: #F63F60;
    border-bottom: none !important;
}
.ac-breadcrumb__sep {
    color: #ccc;
    margin: 0 8px;
    user-select: none;
}
.ac-breadcrumb__current {
    color: #3A3A3C;
}

/* ── TERM PILLS ─────────────────────────────────────────────────── */
.ac-term-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 8px;
}
.ac-term-pill {
    display: inline-flex !important;
    align-items: center;
    font-family: 'Figtree', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none !important;
    border: none !important;
    line-height: 1.5;
    transition: opacity 0.2s;
    cursor: default;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}
/* Contrarrestar word-break:break-word del loop grid de Elementor */
.e-loop-item .ac-term-pill,
.elementor-loop-container .ac-term-pill,
.elementor-widget-container .ac-term-pill {
    display: inline-flex !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    flex-shrink: 0 !important;
}
.e-loop-item .ac-term-pills,
.elementor-loop-container .ac-term-pills,
.elementor-widget-container .ac-term-pills {
    display: flex !important;
    flex-wrap: wrap !important;
}
a.ac-term-pill {
    cursor: pointer;
}
a.ac-term-pill:hover {
    opacity: 0.75;
    border-bottom: none !important;
}

/* ── ACADEMY SPECIAL LIST ───────────────────────────────────────── */
/* Elimina la barra roja izquierda heredada de .academy-content h2  */
.academy-special-list h2,
.academy-special-list h3,
.academy-special-list h4 {
    border-left: none !important;
    padding-left: 0 !important;
}

/* Li: forzar display block para contrarrestar display:flex de Elementor */
.academy-special-list ul li,
.academy-special-list ol li,
.academy-special-list li {
    display: block !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    padding-left: 0.25em !important;
}

/* Párrafos dentro de la lista */
.academy-special-list p {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Links: fluyen inline dentro del texto, sin border ni cortes */
.academy-special-list a {
    display: inline !important;
    border-bottom: none !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

/* Espacio entre checkmark y texto + separador entre items */
.academy-special-list ul li,
.academy-special-list ol li {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid #D8D8D8 !important;
    margin-bottom: 0 !important;
}
.academy-special-list ul li:last-child,
.academy-special-list ol li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}
/* Espacio entre el ::before (icono) y el texto */
.academy-special-list ul li::before,
.academy-special-list ol li::before {
    margin-right: 8px !important;
    flex-shrink: 0 !important;
}
