/* MedicinasNaturistas | Ficha individual de temas */

.topic-detail {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 120px 0 85px;
    color: var(--text, #e9f7ef);
}

.topic-detail__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    font-size: .86rem;
    color: var(--text-soft, #b6d0c4);
}

.topic-detail__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.topic-detail__breadcrumb a:hover {
    color: var(--green, #91e9aa);
}

.topic-detail__hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 38px;
    min-height: 275px;
    padding: 38px 44px;
    margin-bottom: 48px;
    overflow: hidden;
    border: 1px solid rgba(157, 238, 192, .19);
    border-radius: 32px;
    background:
        radial-gradient(circle at 15% 50%, rgba(51, 153, 121, .24), transparent 40%),
        linear-gradient(135deg, rgba(19, 71, 61, .84), rgba(5, 31, 29, .94));
    box-shadow: 0 20px 60px rgba(0, 0, 0, .13);
}

.topic-detail__orb {
    flex: none;
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(169, 251, 205, .5);
    background: radial-gradient(circle at 36% 30%,
            rgba(191, 255, 221, .45),
            rgba(30, 130, 102, .38) 44%,
            rgba(6, 47, 44, .85) 74%);
    box-shadow:
        0 0 0 14px rgba(96, 195, 148, .06),
        0 0 45px rgba(91, 217, 156, .2),
        inset 0 0 28px rgba(197, 255, 224, .12);
}

.topic-detail__orb span {
    font-size: 3rem;
    color: #c7ffdc;
}

.topic-detail__hero-text {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.topic-detail__eyebrow {
    margin: 0 0 12px;
    color: var(--green, #98e7b2);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.topic-detail h1 {
    margin: 0 0 15px;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.topic-detail__description {
    max-width: 700px;
    line-height: 1.75;
    color: var(--text-soft, #c2d9ce);
}

.topic-detail__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.topic-detail__stats span,
.topic-detail__tag {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(142, 229, 171, .25);
    border-radius: 999px;
    background: rgba(93, 173, 128, .11);
    color: #c7f6d6;
    font-size: .78rem;
}

.topic-detail__section {
    margin: 0 0 48px;
}

.topic-detail__section h2 {
    margin: 0 0 20px;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.topic-detail__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
    gap: 16px;
}

.topic-detail__card {
    min-height: 145px;
    padding: 23px;
    border: 1px solid rgba(161, 237, 193, .15);
    border-radius: 22px;
    background: linear-gradient(145deg,
            rgba(23, 75, 63, .65),
            rgba(6, 37, 33, .87));
}

.topic-detail__card h3 {
    margin: 13px 0 9px;
    font-size: 1.08rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.topic-detail__card p {
    margin: 0;
    color: var(--text-soft, #bed2c7);
    font-size: .88rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.topic-detail__tag--secondary {
    color: #d1def9;
    border-color: rgba(143, 172, 237, .25);
    background: rgba(99, 125, 189, .13);
}

.topic-detail__empty {
    color: var(--text-soft, #bed2c7);
}

.topic-detail__back {
    display: inline-block;
    margin-top: 10px;
    color: var(--green, #9ceab6);
    text-decoration: none;
}

.topic-detail__back:hover {
    text-decoration: underline;
}

.topic-detail--missing {
    min-height: 65vh;
}

/* Botón para desplegar más artículos */

.topic-detail__more {
    margin-top: 22px;
}

.topic-detail__more>summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: fit-content;
    min-height: 50px;
    margin: 22px auto 28px;
    padding: 13px 26px;
    border: 1px solid rgba(111, 230, 160, .48);
    border-radius: 999px;
    background: linear-gradient(135deg,
            rgba(31, 105, 79, .95),
            rgba(12, 67, 55, .95));
    color: #e9fff2;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .15);
    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease;
}

.topic-detail__more>summary::marker {
    content: '';
}

.topic-detail__more>summary::-webkit-details-marker {
    display: none;
}

.topic-detail__more>summary::before {
    content: '+';
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(180, 255, 210, .45);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 400;
}

.topic-detail__more[open]>summary::before {
    content: '−';
}

.topic-detail__more>summary:hover {
    transform: translateY(-2px);
    border-color: #91edb4;
    background: linear-gradient(135deg,
            rgba(41, 132, 96, 1),
            rgba(19, 83, 67, 1));
}

.topic-detail__more>summary:focus-visible {
    outline: 2px solid #a5f4c1;
    outline-offset: 4px;
}

.topic-detail__more[open]>summary {
    margin-bottom: 22px;
}

/* Adaptación móvil */

@media (max-width: 680px) {
    .topic-detail {
        padding-top: 102px;
    }

    .topic-detail__hero {
        display: block;
        padding: 28px 24px;
        border-radius: 25px;
    }

    .topic-detail__orb {
        width: 100px;
        height: 100px;
        margin: 0 0 26px;
    }

    .topic-detail__orb span {
        font-size: 2rem;
    }

    .topic-detail__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .topic-detail__more>summary {
        width: 100%;
        padding: 14px 18px;
        font-size: .88rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topic-detail__more>summary {
        transition: none;
    }
}



/* Imagen principal de la ficha de Temas */
.topic-detail__image {
    width: 100%;
    max-width: 320px;
    margin: 0;
    flex: 0 1 320px;
}

.topic-detail__image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 1rem;
}


@media (max-width: 768px) {
    .topic-detail__image {
        width: 100%;
        max-width: 220px;
        margin: 0 auto 1.5rem;
        flex: 0 1 auto;
    }

    .topic-detail__image img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 220px;
        object-fit: contain;
    }
}