/* Shared visual system for internal detail pages. */

.internal-layout {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 992px) {
    .internal-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    }
}

.internal-rich-text {
    color: var(--color-text-750);
    font-size: .92rem;
    line-height: 1.68;
}

.internal-rich-text h2,
.internal-rich-text h3,
.internal-rich-text h4 {
    color: var(--color-heading-neutral);
}

.internal-rich-text h4 {
    margin-bottom: 2rem;
    font-family: var(--portal-font-heading);
    font-size: 18px;
    font-weight: 600;
}

.internal-rich-text h3 {
    position: relative;
    margin: 2.1rem 0 .85rem;
    padding-left: 1rem;
    padding-bottom: 0;
    border: 0;
    color: #17324d;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.35;
}

.internal-rich-text h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: .18em;
    width: 4px;
    height: 1.25em;
    border-radius: 999px;
    background: #0f6f2f;
}

.internal-rich-text p,
.internal-rich-text li {
    line-height: 1.68;
}

.internal-rich-text p {
    margin-bottom: 2rem;
}

.internal-rich-text a:not(.btn):not(.badge):not(.button) {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .16s ease;
}

.internal-rich-text a:not(.btn):not(.badge):not(.button):visited {
    color: var(--color-text-muted);
    text-decoration: none;
}

.internal-rich-text a:not(.btn):not(.badge):not(.button):hover {
    color: var(--color-brand-700);
    text-decoration: none;
}

.internal-sidebar .content-sidebar-card {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 1.35rem;
}

.internal-sidebar .content-sidebar-card:last-child {
    margin-bottom: 0;
}

.internal-sidebar .content-page-sidebar {
    position: sticky;
    top: 20px;
}

@media (max-width: 991.98px) {
    .internal-sidebar .content-page-sidebar {
        position: static;
    }
}

.internal-sidebar .content-sidebar-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .82rem .95rem;
    background: #0f6f2f;
    border-bottom: 0;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.2;
}

.internal-sidebar .content-sidebar-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related {
    overflow: hidden;
    border: 1px solid rgba(15, 111, 47, .16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(15, 111, 47, .055), transparent 34%),
        linear-gradient(180deg, var(--color-surface-0) 0%, #fbfdfb 100%);
    box-shadow: 0 10px 24px rgba(16, 38, 26, .04);
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related .content-sidebar-title {
    display: flex;
    align-items: center;
    gap: .72rem;
    margin: 0;
    padding: .82rem 1.35rem;
    border-bottom: 1px solid rgba(15, 111, 47, .14);
    background: #fff;
    color: var(--color-text-850);
    font-family: var(--portal-font-heading);
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related .content-sidebar-title-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(15, 111, 47, .10);
    color: var(--color-brand-700);
}

.internal-sidebar .content-sidebar-related-list,
.internal-sidebar .content-services-list {
    padding: .75rem 1rem .9rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-list {
    padding: .75rem 1.35rem .95rem;
}

.internal-sidebar .content-sidebar-related-item,
.internal-sidebar .content-service-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: .82rem 0;
    border: 0;
    border-bottom: 1px solid var(--color-border-275);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--color-text-900);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
    transform: none;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .75rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(15, 111, 47, .12);
    border-bottom: 0;
    color: var(--color-text-800);
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item:first-child {
    border-top: 0;
}

.internal-sidebar .content-sidebar-related-item::before {
    content: '';
    align-self: start;
    width: 6px;
    height: 6px;
    margin-top: .48em;
    border-radius: 50%;
    background: rgba(15, 111, 47, .22);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item::before {
    width: 6px;
    height: 6px;
    margin-top: .42rem;
    border-radius: 999px;
    background: rgba(15, 111, 47, .22);
    transition: none;
}

.internal-sidebar .content-sidebar-related-item:visited,
.internal-sidebar .content-service-item:visited {
    color: var(--color-text-900);
    text-decoration: none;
}

.internal-sidebar .content-sidebar-related-item:hover,
.internal-sidebar .content-sidebar-related-item:focus-visible,
.internal-sidebar .content-service-item:hover,
.internal-sidebar .content-service-item:focus-visible {
    color: var(--color-brand-700);
    background: transparent;
    border-color: var(--color-border-275);
    box-shadow: none;
    text-decoration: none;
    transform: none;
}

.internal-sidebar .content-sidebar-related-item:hover::before,
.internal-sidebar .content-sidebar-related-item:focus-visible::before {
    background: var(--color-brand-700);
    box-shadow: 0 0 0 4px rgba(15, 111, 47, .09);
    transform: scale(1.08);
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item:hover::before,
.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item:focus-visible::before {
    background: rgba(15, 111, 47, .22);
    box-shadow: none;
    transform: none;
}

.internal-sidebar .content-sidebar-related-arrow,
.internal-sidebar .content-service-arrow {
    color: var(--color-text-450);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-arrow {
    color: rgba(15, 111, 47, .65);
    font-size: .76rem;
    opacity: 1;
    transform: none;
    transition: none;
}

.internal-sidebar .content-sidebar-related-item:hover .content-sidebar-related-arrow,
.internal-sidebar .content-sidebar-related-item:focus-visible .content-sidebar-related-arrow,
.internal-sidebar .content-service-item:hover .content-service-arrow,
.internal-sidebar .content-service-item:focus-visible .content-service-arrow {
    color: var(--color-brand-700);
    opacity: 1;
    transform: translateX(0);
}

.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item:hover .content-sidebar-related-arrow,
.content-page:not(.secretaria-template-page) .internal-sidebar .content-sidebar-related-item:focus-visible .content-sidebar-related-arrow {
    color: rgba(15, 111, 47, .65);
}

.internal-sidebar .content-sidebar-related-item:last-child,
.internal-sidebar .content-service-item:last-child {
    border-bottom: 0;
}

.internal-sidebar .content-service-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.internal-sidebar .content-service-copy strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.28;
}

.internal-sidebar .content-sidebar-news-list {
    display: grid;
    padding: .75rem 1rem .9rem;
}

.internal-sidebar .content-sidebar-news-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: .75rem;
    align-items: start;
    padding: .85rem 0;
    border-bottom: 1px solid var(--color-border-275);
}

.internal-sidebar .content-sidebar-news-item:first-child {
    padding-top: .2rem;
}

.internal-sidebar .content-sidebar-news-item:last-child {
    padding-bottom: .2rem;
    border-bottom: 0;
}

.internal-sidebar .content-sidebar-news-thumb {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: var(--color-surface-180);
}

.internal-sidebar .content-sidebar-news-thumb img {
    width: 100%;
    aspect-ratio: 1.25 / 1;
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}

.internal-sidebar .content-sidebar-news-copy h3 {
    margin: 0 0 .35rem;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.28;
}

.internal-sidebar .content-sidebar-news-copy h3::before {
    display: none;
}

.internal-sidebar .content-sidebar-news-copy h3 a,
.internal-sidebar .content-sidebar-news-copy h3 a:visited {
    color: var(--color-text-900);
    text-decoration: none;
}

.internal-sidebar .content-sidebar-news-copy h3 a:hover {
    color: var(--color-brand-700);
    text-decoration: none;
}

.internal-sidebar .content-sidebar-news-item:hover .content-sidebar-news-thumb img {
    transform: scale(1.04);
}

.internal-sidebar .news-sidebar-date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--color-text-550);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
}
