/* =============================================================================
   UMBRAL FRONTEND — Articles & Secciones de Contenido
   Archivo: webroot/css/umbral-articles.css
   Compatible con Bootstrap 5.3 + FontAwesome 6
   ============================================================================= */

:root {
    /*--umbral-orange:      #e87722;*/
    --umbral-orange:        #ff6000;
    --umbral-orange-light:  #FF6F2D;
    --umbral-orange-dark: #c45f10;
    --umbral-blue:        #1a3a5c;
    --umbral-blue-light:  #2d6a9f;
    --umbral-gray-light:  #f5f6f7;
    --umbral-gray-border: #e0e2e5;
    --umbral-text:        #2c2c2c;
    --umbral-text-muted:  #6b7280;
}

.text-umbral-orange { color: var(--umbral-orange) !important; }

/* =============================================================================
   search_bar.css
   Buscador con tabs — Por palabra / Por adicción
   Paleta: --umbral-blue / --umbral-orange / --umbral-gray-border
   ============================================================================= */

/* =============================================================================
   CONTENEDOR GENERAL
   ============================================================================= */
.umbral-search-bar {
    background: #fff;
    border: 1px solid var(--umbral-gray-border);
    border-top: 3px solid var(--umbral-blue);
    border-radius: 0 0 4px 4px;
}

/* =============================================================================
   TABS
   ============================================================================= */
.umbral-search-tabs {
    display: flex;
    border-bottom: 1px solid var(--umbral-gray-border);
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 0;
}

.umbral-tab-btn {
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--umbral-text-muted);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .75rem 1.25rem;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
    border-radius: 0;
    white-space: nowrap;
}

.umbral-tab-btn:hover {
    color: var(--umbral-blue);
    background: var(--umbral-gray-light);
}

.umbral-tab-btn.active {
    color: var(--umbral-blue);
    border-bottom-color: var(--umbral-orange);
    background: #fff;
}

.umbral-search-tabs .nav-item { margin: 0; }

/* =============================================================================
   PANELES DE TABS
   ============================================================================= */
.umbral-tab-content {
    padding: .9rem 1.25rem;
}

/* =============================================================================
   FILA DEL BUSCADOR — layout compacto en una sola línea
   El input crece, el botón y el clear son fijos.
   ============================================================================= */
.umbral-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;          /* nunca rompe línea en desktop */
}

/* En móvil muy pequeño sí puede romper */
@media (max-width: 480px) {
    .umbral-search-row { flex-wrap: wrap; }
    .umbral-input-wrap { flex: 1 1 100%; }
}

/* =============================================================================
   INPUT CON ÍCONO INTERNO — "Por palabra"
   ============================================================================= */
.umbral-input-wrap {
    position: relative;
    flex: 1 1 0;
    min-width: 0;               /* permite que se encoja */
    max-width: 480px;           /* no ocupa TODO el ancho en pantallas grandes */
}

.umbral-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--umbral-text-muted);
    font-size: .85rem;
    pointer-events: none;
    z-index: 2;
}

.umbral-search-input {
    padding-left: 34px;         /* espacio para el ícono */
    border: 1px solid var(--umbral-gray-border);
    border-radius: 2px;
    font-size: .88rem;
    color: var(--umbral-text);
    background: #fff;
    height: 38px;
    width: 100%;
}

.umbral-search-input::placeholder { color: var(--umbral-text-muted); }

.umbral-search-input:focus {
    border-color: var(--umbral-blue-light);
    box-shadow: 0 0 0 2px rgba(45,106,159,.15);
    outline: none;
}

/* =============================================================================
   BOTÓN BUSCAR / FILTRAR
   ============================================================================= */
.btn-umbral-search {
    background: var(--umbral-blue);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 0 1.1rem;
    height: 38px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s;
}

.btn-umbral-search:hover,
.btn-umbral-search:focus  { background: var(--umbral-blue-light); color: #fff; }
.btn-umbral-search:disabled { opacity: .45; cursor: not-allowed; }

/* =============================================================================
   BOTÓN LIMPIAR (×)
   ============================================================================= */
.btn-umbral-clear {
    background: transparent;
    color: var(--umbral-text-muted);
    border: 1px solid var(--umbral-gray-border);
    border-radius: 2px;
    font-size: .85rem;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}

.btn-umbral-clear:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* =============================================================================
   DROPDOWN ADICCIONES — BOTÓN TRIGGER
   ============================================================================= */
.umbral-addiction-dropdown {
    position: relative;
    min-width: 180px;
    max-width: 360px;           /* no ocupa todo el ancho en desktop */
    flex: 1 1 180px;            /* crece pero con límite */
}

/* En móvil sí ocupa todo el ancho disponible */
@media (max-width: 575.98px) {
    .umbral-addiction-dropdown {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

.btn-umbral-dropdown {
    background: #fff;
    border: 1px solid var(--umbral-gray-border);
    border-radius: 2px;
    color: var(--umbral-text-muted);
    font-size: .88rem;
    height: 38px;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: border-color .2s, box-shadow .2s, color .2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tiene valor seleccionado */
.btn-umbral-dropdown.has-value {
    border-color: var(--umbral-blue);
    color: var(--umbral-blue);
    font-weight: 600;
}

.btn-umbral-dropdown:hover,
.btn-umbral-dropdown:focus,
.btn-umbral-dropdown[aria-expanded="true"] {
    border-color: var(--umbral-blue-light);
    box-shadow: 0 0 0 2px rgba(45,106,159,.15);
    color: var(--umbral-text);
    background: #fff;
}

/* =============================================================================
   DROPDOWN MENÚ — ÁRBOL COLAPSABLE
   ============================================================================= */
.umbral-addiction-menu {
    border: 1px solid var(--umbral-gray-border);
    border-radius: 3px;
    padding: .25rem 0;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);

    /* Scrollbar discreta */
    scrollbar-width: thin;
    scrollbar-color: var(--umbral-gray-border) transparent;
}

.umbral-addiction-menu::-webkit-scrollbar { width: 5px; }
.umbral-addiction-menu::-webkit-scrollbar-thumb {
    background: var(--umbral-gray-border);
    border-radius: 3px;
}

/* Item hoja / "Todas" */
.umbral-addiction-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--umbral-text);
    padding: .45rem 0.5rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: normal;
    line-height: 1.35;
}

.umbral-addiction-item:hover  { background: var(--umbral-gray-light); color: var(--umbral-blue); }
.umbral-addiction-item.active {
    background: #e8f0f8;
    color: var(--umbral-blue);
    font-weight: 700;
}

.umbral-addiction-item .item-icon {
    color: var(--umbral-orange);
    font-size: .55rem;
    flex-shrink: 0;
}

/* =============================================================================
   NODO ÁRBOL (li)
   ============================================================================= */
.umbral-tree-node { list-style: none; }

/* =============================================================================
   <details> / <summary> — NODO PADRE (no seleccionable, solo expande)
   ============================================================================= */
.umbral-tree-details { margin: 0; }

.umbral-tree-summary {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: .85rem;
    font-weight: 700;
    color: var(--umbral-text);
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.umbral-tree-summary::-webkit-details-marker { display: none; }
.umbral-tree-summary::marker                 { display: none; }

.umbral-tree-summary:hover {
    background: var(--umbral-gray-light);
    color: var(--umbral-blue);
    border-left-color: var(--umbral-orange);
}

/* Wrapper del chevron para animación limpia */
.umbral-chevron-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 14px;
}

/* Chevron animado */
.umbral-chevron {
    font-size: .65rem;
    color: var(--umbral-orange);
    transition: transform .2s ease;
}

/* Etiqueta del padre (no es un enlace) */
.umbral-tree-parent-label {
    flex-grow: 1;
    line-height: 1.3;
}

/* Hijos dentro de details */
.umbral-tree-children {
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--umbral-gray-border);
    margin-left: 20px;
}

/* =============================================================================
   AVISO FILTRO ACTIVO
   ============================================================================= */
.search-notice {
    font-size: .83rem;
    color: var(--umbral-text-muted);
    background: var(--umbral-gray-light);
    border-left: 3px solid var(--umbral-orange);
    padding: .5rem .85rem;
    border-radius: 0 2px 2px 0;
}

.search-notice strong { color: var(--umbral-blue); }

/* =============================================================================
   TÍTULOS DE SECCIÓN
   ============================================================================= */
.umbral-section-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--umbral-blue);
    line-height: 1.2;
}

.umbral-section-title strong { font-weight: 800; }

/* =============================================================================
   LISTA DE ARTÍCULOS
   ============================================================================= */
.article-marker {
    color: var(--umbral-orange);
    font-size: .55rem;
    padding-top: .4rem;
    flex-shrink: 0;
}

.article-link {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--umbral-text);
    text-decoration: none;
    line-height: 1.35;
    transition: color .2s;
}

.article-link:hover { color: var(--umbral-blue-light); }

.article-date    { font-size: .82rem; font-weight: 600; }
.article-excerpt { font-size: .85rem; line-height: 1.6; color: var(--umbral-text-muted); }
.article-divider { border-color: var(--umbral-gray-border); opacity: 1; }
.article-excerpt p { margin-bottom: 0 !important;}

/* =============================================================================
   PAGINADOR RESPONSIVO
   CakePHP 5.3 + Bootstrap 5 — paleta umbral
   ============================================================================= */

/* ── Contenedor ────────────────────────────────────────────────────────────── */
.umbral-paginator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

/* ── Lista de páginas ──────────────────────────────────────────────────────── */
.umbral-paginator .pagination {
    flex-wrap: nowrap;      /* nunca rompe línea — el truco está en modulus */
    margin: 0;
    align-items: center;
}

/* ── Cada botón ────────────────────────────────────────────────────────────── */
.umbral-paginator .page-item .page-link {
    color: var(--umbral-blue);
    border: 1px solid var(--umbral-gray-border);
    border-radius: 2px !important;
    font-size: .8rem;
    padding: .3rem .6rem;
    min-width: 32px;
    text-align: center;
    line-height: 1.4;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

/* ── Página activa ─────────────────────────────────────────────────────────── */
.umbral-paginator .page-item.active .page-link {
    background: var(--umbral-blue);
    border-color: var(--umbral-blue);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

/* ── Hover ─────────────────────────────────────────────────────────────────── */
.umbral-paginator .page-item:not(.active):not(.disabled) .page-link:hover {
    background: var(--umbral-blue);
    border-color: var(--umbral-blue);
    color: #fff;
}

/* ── Deshabilitado (first/prev en pág 1, next/last en última) ──────────────── */
.umbral-paginator .page-item.disabled .page-link {
    color: var(--umbral-gray-border);
    background: transparent;
    border-color: var(--umbral-gray-border);
    pointer-events: none;
    opacity: .5;
}

/* ── Elipsis (…) ───────────────────────────────────────────────────────────── */
.umbral-paginator .page-ellipsis .page-link {
    border-color: transparent;
    background: transparent;
    color: var(--umbral-text-muted);
    cursor: default;
    min-width: auto;
    padding: .3rem .25rem;
}

/* ── Contador de páginas ───────────────────────────────────────────────────── */
.umbral-paginator .page-counter {
    color: var(--umbral-text-muted);
    font-size: .78rem;
    margin: 0;
}

/* ── Iconos de navegación ──────────────────────────────────────────────────── */
.umbral-paginator .page-item .page-link i {
    font-size: .7rem;
    vertical-align: middle;
}

/* =============================================================================
   RESPONSIVO — en móvil reducir aún más
   Con modulus=2 ya se ven máx. 7 items (1 … A B C … N).
   En móvil muy pequeño ocultamos first/last para ganar espacio.
   ============================================================================= */
@media (max-width: 480px) {
    /* CakePHP genera el <li> con .first y .last como clases propias del helper */
    .umbral-paginator .pagination li.first,
    .umbral-paginator .pagination li.last {
        display: none;
    }

    .umbral-paginator .page-item .page-link {
        font-size: .75rem;
        padding: .25rem .45rem;
        min-width: 28px;
    }
}

/* =============================================================================
   SIDEBAR
   ============================================================================= */
.umbral-sidebar { position: sticky; top: 2rem; }

.sidebar-card {
    background: var(--umbral-gray-light);
    border: 1px solid var(--umbral-gray-border);
    border-top: 3px solid var(--umbral-orange);
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 2px;
}

.most-read-list  { margin: 0; padding: 0; }

.most-read-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--umbral-gray-border);
}

.most-read-item:last-child { border-bottom: none; }

.most-read-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    background: var(--umbral-blue);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    border-radius: 2px;
    flex-shrink: 0;
}

.most-read-link {
    font-size: .84rem;
    font-weight: 600;
    color: var(--umbral-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color .2s;
}

.most-read-link:hover { color: var(--umbral-blue-light); }

/* =============================================================================
   DETALLE DEL ARTÍCULO (view)
   ============================================================================= */
.article-detail-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--umbral-text);
    line-height: 1.3;
}

.article-source-badge {
    display: inline-block;
    background: #2c2c2c;
    color: #fff;
    font-size: .75rem;
    padding: .3rem .75rem;
    border-radius: 2px;
    word-break: break-all;
}

.article-source-badge .source-link { color: #fff; text-decoration: underline; }
.article-source-badge .source-link:hover { color: var(--umbral-orange); }

.article-img   { max-width: 320px; width: 100%; height: auto; display: block; }

.article-body-content {
    font-family: 'Open Sans', sans-serif;
    font-size: .95rem;
    line-height: 1.8;
    color: var(--umbral-text);
}

.article-body-content p           { margin-bottom: 1.1rem; }
.article-body-content h2,
.article-body-content h3          { font-family: 'Nunito', sans-serif; font-weight: 700; color: var(--umbral-blue); margin-top: 1.5rem; }

.btn-umbral-back {
    background: var(--umbral-orange);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: .85rem;
    font-weight: 700;
    padding: .55rem 1.4rem;
    transition: background .2s;
}

.btn-umbral-back:hover { background: var(--umbral-orange-dark); color: #fff; }

.related-item {
    background: var(--umbral-gray-light);
    border: 1px solid var(--umbral-gray-border);
    border-left: 3px solid var(--umbral-orange);
    border-radius: 2px;
    transition: border-color .2s;
}

.related-item:hover  { border-left-color: var(--umbral-blue-light); }
.related-title       { font-size: .875rem; font-weight: 700; margin: 0; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 991.98px) {
    .umbral-sidebar     { position: static; margin-top: 2rem; }
    .article-detail-title { font-size: 1.3rem; }
}

@media (max-width: 575.98px) {
    .umbral-section-title { font-size: 1.25rem; }
    .article-link         { font-size: 1rem; }
    .umbral-tab-btn       { font-size: .72rem; padding: .6rem .85rem; }
}


/* =============================================================================
   TESTIMONIALS — Grid de cards
   ============================================================================= */

/* ── Card contenedor ─────────────────────────────────────────────────────── */
.testi-card {
    background: #fff;
    border: 1px solid var(--umbral-gray-border);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .2s;
}

.testi-card:hover {
    box-shadow: 0 6px 20px rgba(26, 58, 92, .12);
    transform: translateY(-3px);
}

/* ── Imagen ──────────────────────────────────────────────────────────────── */
.testi-card__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;   /* mismo ratio para todas las cards */
    overflow: hidden;
    background: var(--umbral-gray-light);
    flex-shrink: 0;
}

.testi-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.testi-card:hover .testi-card__img {
    transform: scale(1.04);
}

/* ── Placeholder (sin imagen) ────────────────────────────────────────────── */
.testi-card__placeholder {
    width: 100%;
    height: 100%;
    background: var(--umbral-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testi-card__placeholder-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255,255,255,.85);
    letter-spacing: .02em;
}

/* ── Cuerpo ──────────────────────────────────────────────────────────────── */
.testi-card__body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: .5rem;
}

/* ── Título ──────────────────────────────────────────────────────────────── */
.testi-card__title {
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;

    /* Truncar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testi-card__title-link {
    color: var(--umbral-text);
    text-decoration: none;
    transition: color .2s;
}

.testi-card__title-link:hover { color: var(--umbral-blue-light); }

/* ── Excerpt ─────────────────────────────────────────────────────────────── */
.testi-card__excerpt {
    font-size: .82rem;
    line-height: 1.55;
    color: var(--umbral-text-muted);
    margin: 0;
    flex-grow: 1;

    /* Truncar a 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Botón VER MÁS ───────────────────────────────────────────────────────── */
.btn-testi-more {
    align-self: flex-start;
    background: var(--umbral-blue);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    padding: .4rem 1rem;
    text-transform: uppercase;
    transition: background .2s;
    margin-top: auto;
    text-decoration: none;
    display: inline-block;
}

.btn-testi-more:hover,
.btn-testi-more:focus {
    background: var(--umbral-blue-light);
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .testi-card__title    { font-size: .9rem; }
    .testi-card__excerpt  { font-size: .8rem; }
}


/* =============================================================================
   ADDICTIONS — index: grid de cards con badge naranja + select subtemas
   ============================================================================= */

/* ── Card contenedor ─────────────────────────────────────────────────────── */
.addict-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--umbral-gray-border);
    border-radius: 3px;
    overflow: hidden;
    transition: box-shadow .25s, transform .2s;
}

.addict-card:hover {
    box-shadow: 0 8px 28px rgba(26,58,92,.15);
    transform: translateY(-3px);
}

/* ── Badge nombre (flag naranja tipo flechita) ───────────────────────────── */
.addict-card__badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    background: var(--umbral-orange);
    padding: .45rem .9rem .45rem .85rem;
    max-width: calc(100% - 1.5rem);
}

.addict-card__badge span {
    font-family: 'Nunito', sans-serif;
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flecha derecha del badge */
.addict-card__badge-arrow {
    position: absolute;
    right: -14px;
    top: 0;
    bottom: 0;
    width: 0;
    border-top: 100px solid transparent;
    border-bottom: 0 solid transparent;
    border-left: 14px solid var(--umbral-orange);
}

/* ── Imagen ──────────────────────────────────────────────────────────────── */
.addict-card__img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--umbral-gray-light);
}

.addict-card__img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.addict-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.addict-card:hover .addict-card__img {
    transform: scale(1.05);
}

.addict-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--umbral-blue) 0%, var(--umbral-blue-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.addict-card__placeholder span {
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: rgba(255,255,255,.75);
}

/* ── Footer: select subtemas o botón directo ─────────────────────────────── */
.addict-card__footer {
    padding: .6rem .75rem;
    background: #fff;
    border-top: 1px solid var(--umbral-gray-border);
}

.addict-subtemas-select {
    border: 1px solid var(--umbral-gray-border);
    border-radius: 2px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--umbral-text-muted);
    background-color: #fff;
    height: 34px;
    cursor: pointer;
    transition: border-color .2s;
    width: 100%;
}

.addict-subtemas-select:focus {
    border-color: var(--umbral-orange);
    box-shadow: 0 0 0 2px rgba(232,119,34,.15);
    outline: none;
}

.btn-addict-view {
    background: var(--umbral-blue);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    height: 34px;
    transition: background .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-addict-view:hover { background: var(--umbral-blue-light); color: #fff; }

/* =============================================================================
   ADDICTIONS — view: cards magazine de AddictionContents
   ============================================================================= */

/* ── Título / subtítulo ──────────────────────────────────────────────────── */
.addiction-view__subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--umbral-orange);
    border-left: 4px solid var(--umbral-orange);
    padding-left: .75rem;
}

/* ── Buscador simple (sin tabs, solo texto) ──────────────────────────────── */
.umbral-search-bar--simple {
    padding: .75rem 1rem;
    border-top-color: var(--umbral-orange);
}

/* ── Card magazine ───────────────────────────────────────────────────────── */
.content-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border-bottom: 3px solid var(--umbral-orange);
    transition: box-shadow .25s, transform .2s;
}

.content-card:hover {
    box-shadow: 0 8px 28px rgba(26,58,92,.15);
    transform: translateY(-4px);
}

/* ── Imagen de la card ───────────────────────────────────────────────────── */
.content-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--umbral-gray-light);
    flex-shrink: 0;
}

.content-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.content-card:hover .content-card__img { transform: scale(1.06); }

.content-card__no-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--umbral-blue) 0%, #2d6a9f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: 2.5rem;
}

/* Ribbon "Externo" */
.content-card__ribbon {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: var(--umbral-orange);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .2rem .55rem;
    border-radius: 2px;
}

/* ── Cuerpo ──────────────────────────────────────────────────────────────── */
.content-card__body {
    padding: 1rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: .4rem;
}

.content-card__date {
    font-size: .72rem;
    font-weight: 700;
    color: var(--umbral-orange);
    letter-spacing: .03em;
    margin: 0;
    text-transform: uppercase;
}

.content-card__title {
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card__title-link {
    color: var(--umbral-text);
    text-decoration: none;
    transition: color .2s;
}

.content-card__title-link:hover { color: var(--umbral-blue-light); }

.content-card__excerpt {
    font-size: .82rem;
    line-height: 1.55;
    color: var(--umbral-text-muted);
    margin: 0;
    flex-grow: 1;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card__footer {
    margin-top: auto;
    padding-top: .6rem;
}

.btn-content-more {
    background: transparent;
    color: var(--umbral-blue);
    border: 1.5px solid var(--umbral-blue);
    border-radius: 2px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background .2s, color .2s;
}

.btn-content-more:hover {
    background: var(--umbral-blue);
    color: #fff;
}

/* ── Sidebar de navegación ───────────────────────────────────────────────── */
.addiction-nav-sidebar { position: sticky; top: 2rem; }

.sidebar-nav-title {
    font-family: 'Nunito', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: var(--umbral-blue);
    margin-bottom: 1rem;
    line-height: 1.35;
}

.sidebar-nav-list { margin: 0; padding: 0; }

.sidebar-nav-item {
    border-bottom: 1px solid var(--umbral-gray-border);
}

.sidebar-nav-item:last-child { border-bottom: none; }

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: .5rem .25rem;
    font-size: .83rem;
    font-weight: 600;
    color: var(--umbral-text-muted);
    text-decoration: none;
    transition: color .2s, padding-left .15s;
}

.sidebar-nav-link:hover           { color: var(--umbral-blue-light); padding-left: .35rem; }
.sidebar-nav-item.active .sidebar-nav-link {
    color: var(--umbral-blue);
    font-weight: 700;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.umbral-breadcrumb {
    font-size: .8rem;
    background: transparent;
    padding: 0;
    margin: 0;
}

.umbral-breadcrumb .breadcrumb-item a {
    color: var(--umbral-blue-light);
    text-decoration: none;
}

.umbral-breadcrumb .breadcrumb-item a:hover { text-decoration: underline; }
.umbral-breadcrumb .breadcrumb-item.active  { color: var(--umbral-text-muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .addiction-nav-sidebar { position: static; margin-top: 2rem; }
}

@media (max-width: 575.98px) {
    .addict-card__badge span { font-size: .75rem; }
    .content-card__title     { font-size: .9rem; }
}


/* =============================================================================
   PUBLICATIONS — Lista con badges de tipo
   ============================================================================= */

/* ── Item de publicación ─────────────────────────────────────────────────── */
.pub-item {
    padding: .25rem 0 .75rem;
}

.pub-item__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

/* ── Badge de tipo ───────────────────────────────────────────────────────── */
.pub-type-badge {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 2px;
    white-space: nowrap;
}

/* Colores por tipo */
.type--article     { background: #dbeafe; color: #1e40af; }
.type--addiction   { background: #fce7f3; color: #9d174d; }
.type--testimonial { background: #d1fae5; color: #065f46; }
.type--tiding      { background: #fef3c7; color: #92400e; }

/* ── Fecha ───────────────────────────────────────────────────────────────── */
.pub-item__date {
    font-size: .78rem;
    color: var(--umbral-text-muted);
    margin-left: auto;
}

/* ── Título ──────────────────────────────────────────────────────────────── */
.pub-item__title {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    line-height: 1.4;
}

.pub-item__link {
    color: var(--umbral-text);
    text-decoration: none;
    transition: color .2s;
}

.pub-item__link:hover { color: var(--umbral-blue-light); }

/* ── Excerpt ─────────────────────────────────────────────────────────────── */
.pub-item__excerpt {
    font-size: .85rem;
    line-height: 1.6;
    color: var(--umbral-text-muted);
    margin: 0 0 .4rem;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Fuente ──────────────────────────────────────────────────────────────── */
.pub-item__source {
    font-size: .75rem;
    color: var(--umbral-text-muted);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pub-source-link {
    color: var(--umbral-blue-light);
    text-decoration: none;
}

.pub-source-link:hover { text-decoration: underline; }

.pub-item__divider {
    border-color: var(--umbral-gray-border);
    opacity: 1;
    margin: .75rem 0 0;
}

/* ── Sidebar: por tipo ───────────────────────────────────────────────────── */
.pub-type-nav__item,
.pub-type-nav__item a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--umbral-gray-border);
    font-size: .84rem;
    color: var(--umbral-text-muted);
    text-decoration: none;
}

.pub-type-nav__item:last-child { border-bottom: none; }

.pub-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Dot colors matching badges */
.pub-type-dot.type--article     { background: #1e40af; }
.pub-type-dot.type--addiction   { background: #9d174d; }
.pub-type-dot.type--testimonial { background: #065f46; }
.pub-type-dot.type--tiding      { background: #92400e; }

.pub-type-nav__label { font-weight: 600; }


/* =============================================================================
   ADDICTION CONTENTS — view
   ============================================================================= */

/* ── Título principal ────────────────────────────────────────────────────── */
.ac-detail-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--umbral-text);
    line-height: 1.3;
}

.ac-detail-meta { font-size: .83rem; }

.ac-addiction-link:hover { color: var(--umbral-blue-light) !important; }

/* ── Imagen ──────────────────────────────────────────────────────────────── */


.ac-img {
    max-width: 380px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* =============================================================================
   SIDEBAR — lista de contenidos relacionados
   ============================================================================= */
.ac-sidebar-list { margin: 0; padding: 0; }

.ac-sidebar-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .65rem 0;
    border-bottom: 1px solid var(--umbral-gray-border);
}

.ac-sidebar-item:last-child { border-bottom: none; }

/* Thumbnail cuadrado */
.ac-sidebar-thumb {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--umbral-gray-light);
    flex-shrink: 0;
}

.ac-sidebar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.ac-sidebar-item:hover .ac-sidebar-img { transform: scale(1.08); }

/* Texto del item */
.ac-sidebar-body  { flex: 1; min-width: 0; }

.ac-sidebar-title {
    font-family: 'Nunito', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    margin: 0 0 .2rem;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ac-sidebar-link {
    color: var(--umbral-text);
    text-decoration: none;
    transition: color .2s;
}

.ac-sidebar-link:hover { color: var(--umbral-blue-light); }

.ac-sidebar-date {
    font-size: .7rem;
    color: var(--umbral-orange);
    font-weight: 600;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .umbral-sidebar { position: static; margin-top: 2rem; }
    .ac-detail-title { font-size: 1.3rem; }
}

/* ── Addictions Filter TABS ──────────────────────────────────────────────── */
.pub-type-tabs .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: var(--bs-nav-pills-link-active-color);
  background-color: var(--umbral-blue);
}

.pub-type-tabs .nav-link {
  color: var(--umbral-blue);
}
.text-bg-orange {
  color: #fff !important;
  background: linear-gradient(135deg, var(--umbral-orange) 0%, var(--umbral-orange-light) 100%);
}