/* ==========================================================
   Anatomy — archive (/anatomiya/)
   A–Z list and controls reuse .medterm-index__*.
   ========================================================== */

.anatomy-index [hidden] {
    display: none !important;
}

.anatomy-index__heading {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold, 700);
    font-size: 1.5rem;
    margin: 0 0 var(--space-4, 1rem);
}

.anatomy-systems {
    margin-bottom: var(--space-8, 2.5rem);
}

.anatomy-systems__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--space-5, 1.5rem);
}

.anatomy-system {
    display: flex;
    flex-direction: column;
    background: var(--surface-card, #fff);
    border: var(--border-width-thin, 1px) solid var(--border-light);
    border-radius: var(--radius-card, 0.75rem);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.anatomy-system__head {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem) var(--space-5, 1.5rem);
    background: var(--brand-accent-t1, var(--brand-primary-light));
    color: var(--text-primary);
    text-decoration: none;
}

.anatomy-system__head:hover,
.anatomy-system__head:focus-visible {
    color: var(--brand-primary);
}

.anatomy-system__media {
    flex: 0 0 auto;
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-lg, 0.75rem);
    background: #fff;
    overflow: hidden;
}

.anatomy-system__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.anatomy-system__names {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.anatomy-system__title {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold, 700);
    font-size: 1.125rem;
    line-height: 1.3;
}

.anatomy-system__latin {
    color: var(--text-secondary);
    font-size: var(--font-size-helper, 0.8125rem);
    font-style: italic;
}

.anatomy-system__list {
    list-style: none;
    margin: 0;
    padding: var(--space-3, 0.75rem) var(--space-5, 1.5rem) var(--space-4, 1rem);
}

.anatomy-system__link,
.anatomy-system__link:visited {
    display: block;
    margin-inline-start: -0.875rem;
    padding: 0.3rem 0.875rem;
    border-radius: var(--radius-pill, 999px);
    color: var(--index-letter-color, var(--brand-muted));
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.anatomy-system__link:hover,
.anatomy-system__link:focus-visible {
    background: var(--brand-primary);
    color: var(--text-inverse, #fff);
    outline: none;
}

.anatomy-system__intro {
    margin: 0;
    padding: var(--space-4, 1rem) var(--space-5, 1.5rem);
    color: var(--text-secondary);
}

/* ==========================================================
   Anatomy — single
   Text panels, FAQ and «Açar sözlər:» reuse the article classes.
   ========================================================== */

.anatomy-single__hero {
    padding-block: var(--space-6, 1.75rem) 0;
}

.anatomy-hero {
    display: flex;
    align-items: stretch;
    gap: var(--space-7, 2rem);
    background: var(--brand-accent-t1, var(--brand-primary-light));
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-7, 2rem);
}

.anatomy-hero__figure {
    flex: 0 0 23rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 0.5rem);
    margin: 0;
}

.anatomy-hero__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: var(--space-3, 0.75rem);
    background: #fff;
    border-radius: var(--radius-card, 0.75rem);
    overflow: hidden;
}

.anatomy-hero__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.anatomy-hero__credit {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.anatomy-hero__credit a {
    color: inherit;
    text-decoration: underline;
}

.anatomy-hero__credit a:hover {
    color: var(--brand-primary);
}

.anatomy-hero__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.anatomy-hero__latin {
    margin: 0 0 var(--space-3, 0.75rem);
    color: var(--brand-primary-dark, var(--brand-primary));
    font-style: italic;
    font-size: 1.125rem;
}

.anatomy-hero__lead {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.anatomy-hero__parent {
    margin: var(--space-4, 1rem) 0 0;
}

.anatomy-hero__parent-label {
    color: var(--text-secondary);
}

.anatomy-hero__parent a {
    color: var(--brand-primary);
    font-weight: var(--font-weight-semibold, 600);
    text-decoration: none;
}

.anatomy-hero__parent a:hover {
    text-decoration: underline;
}

.anatomy-hero__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-4, 1rem);
    margin-top: auto;
    padding-top: var(--space-5, 1.5rem);
}

/* «Paylaş» düymələri — geri keçidi ilə eyni sətirdə. */
.anatomy-hero__share {
    margin-top: var(--space-4, 1rem);
}

.anatomy-hero__back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    margin-top: var(--space-4, 1rem);
    background: var(--surface-card, #fff);
    border-radius: var(--radius-pill, 999px);
    padding: var(--space-2, 0.5rem) var(--space-5, 1.5rem);
    color: var(--text-primary);
    text-decoration: none;
}

.anatomy-hero__back:hover,
.anatomy-hero__back:focus-visible {
    color: var(--brand-primary);
}

/* Children */

.anatomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-5, 1.5rem);
}

.anatomy-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-card, #fff);
    border: var(--border-width-thin, 1px) solid var(--border-light);
    border-radius: var(--radius-card, 0.75rem);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.anatomy-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: var(--space-3, 0.75rem);
    background: #fff;
    border-bottom: var(--border-width-thin, 1px) solid var(--border-light);
}

.anatomy-card__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.anatomy-card__body {
    flex: 1 1 auto;
    padding: var(--space-5, 1.5rem) var(--space-5, 1.5rem) 0;
}

.anatomy-card__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold, 700);
}

.anatomy-card__title a {
    color: var(--text-primary);
    text-decoration: none;
}

.anatomy-card__title a:hover,
.anatomy-card__title a:focus-visible {
    color: var(--brand-primary);
}

.anatomy-card__latin {
    margin: var(--space-1, 0.25rem) 0 0;
    color: var(--text-secondary);
    font-size: var(--font-size-helper, 0.8125rem);
    font-style: italic;
}

.anatomy-card__excerpt {
    margin: var(--space-3, 0.75rem) 0 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.anatomy-card__footer {
    padding: var(--space-4, 1rem) var(--space-5, 1.5rem) var(--space-5, 1.5rem);
}

.anatomy-card__button {
    display: inline-block;
    padding: var(--space-2, 0.5rem) var(--space-5, 1.5rem);
    border-radius: var(--radius-pill, 999px);
    background: var(--brand-primary);
    color: var(--text-inverse, #fff);
    text-decoration: none;
}

.anatomy-card__button:hover,
.anatomy-card__button:focus-visible {
    background: var(--brand-primary-dark, var(--brand-primary));
    color: var(--text-inverse, #fff);
}

/* Relations */

.anatomy-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5, 1.5rem);
}

.anatomy-links__group {
    background: var(--brand-surface);
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-6, 1.75rem);
    scroll-margin-top: 6rem;
}

.anatomy-links__title {
    margin: 0 0 var(--space-4, 1rem);
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold, 700);
}

.anatomy-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2, 0.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.anatomy-links__link,
.anatomy-links__link:visited {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-pill, 999px);
    background: var(--surface-card, #fff);
    border: var(--border-width-thin, 1px) solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.anatomy-links__link:hover,
.anatomy-links__link:focus-visible {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--text-inverse, #fff);
}

@media (max-width: 991.98px) {

    .anatomy-hero__figure {
        flex-basis: 18rem;
    }
}

@media (max-width: 767.98px) {

    .anatomy-hero {
        flex-direction: column;
        padding: var(--space-5, 1.5rem);
        gap: var(--space-5, 1.5rem);
    }

    .anatomy-hero__figure {
        flex-basis: auto;
    }

    .anatomy-hero__frame {
        aspect-ratio: 4 / 3;
    }

    .anatomy-links {
        grid-template-columns: minmax(0, 1fr);
    }

    .anatomy-links__group {
        padding: var(--space-5, 1.5rem);
    }

    .anatomy-systems__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
