/**
 * Estilos públicos do tema APELSP.
 */

:root {
    --apelsp-color-blue: #2d376e;
    --apelsp-color-red: #b21f24;
    --apelsp-color-gold: #c79a1b;
    --apelsp-color-background: #f7f4ea;

    --apelsp-color-success: #2e8b57;
    --apelsp-color-warning: #e3a008;
    --apelsp-color-danger: #c53030;
    --apelsp-color-info: #2563eb;

    --apelsp-color-white: #ffffff;
    --apelsp-color-gray-50: #fafafa;
    --apelsp-color-gray-100: #f2f2f2;
    --apelsp-color-gray-200: #e5e5e5;
    --apelsp-color-gray-300: #cccccc;
    --apelsp-color-gray-500: #666666;
    --apelsp-color-gray-700: #333333;
    --apelsp-color-gray-900: #111111;

    --apelsp-font-family-base: Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Arial, sans-serif;
    --apelsp-font-size-body: 1.0625rem;
    --apelsp-line-height-body: 1.6;
    --apelsp-font-weight-normal: 400;
    --apelsp-font-weight-medium: 500;
    --apelsp-font-weight-semibold: 600;
    --apelsp-font-weight-bold: 700;

    --apelsp-font-size-h1: 2.5rem;
    --apelsp-font-size-h2: 2rem;
    --apelsp-font-size-h3: 1.625rem;
    --apelsp-font-size-h4: 1.375rem;

    --apelsp-container-max-width: 82.5rem;
    --apelsp-container-padding: 1.5rem;
    --apelsp-reading-max-width: 50rem;

    --apelsp-space-1: 0.25rem;
    --apelsp-space-2: 0.5rem;
    --apelsp-space-3: 0.75rem;
    --apelsp-space-4: 1rem;
    --apelsp-space-5: 1.5rem;
    --apelsp-space-6: 2rem;
    --apelsp-space-7: 3rem;
    --apelsp-space-8: 4rem;

    --apelsp-border-color: var(--apelsp-color-gray-200);
    --apelsp-border-radius: 0.375rem;
    --apelsp-shadow-subtle: 0 0.125rem 0.5rem rgb(17 17 17 / 8%);
    --apelsp-focus-color: var(--apelsp-color-red);
    --apelsp-focus-offset: 0.1875rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--apelsp-color-background);
    color: var(--apelsp-color-gray-900);
    font-family: var(--apelsp-font-family-base);
    font-size: var(--apelsp-font-size-body);
    font-weight: var(--apelsp-font-weight-normal);
    line-height: var(--apelsp-line-height-body);
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-block: 0 0.75em;
    color: var(--apelsp-color-blue);
    font-weight: var(--apelsp-font-weight-bold);
    overflow-wrap: break-word;
}

h1 {
    font-size: var(--apelsp-font-size-h1);
    line-height: 1.2;
}

h2 {
    font-size: var(--apelsp-font-size-h2);
    line-height: 1.25;
}

h3 {
    font-size: var(--apelsp-font-size-h3);
    font-weight: var(--apelsp-font-weight-semibold);
    line-height: 1.3;
}

h4 {
    font-size: var(--apelsp-font-size-h4);
    font-weight: var(--apelsp-font-weight-semibold);
    line-height: 1.35;
}

p {
    margin-block: 0 1.25em;
}

a {
    color: var(--apelsp-color-blue);
    text-decoration-line: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--apelsp-color-red);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 0.1875rem solid var(--apelsp-focus-color);
    outline-offset: var(--apelsp-focus-offset);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.apelsp-container {
    width: min(
        calc(100% - (2 * var(--apelsp-container-padding))),
        var(--apelsp-container-max-width)
    );
    margin-inline: auto;
}

.apelsp-reading-width {
    max-width: var(--apelsp-reading-max-width);
}

.apelsp-page {
    padding-block: var(--apelsp-space-7);
}

.apelsp-page__content > :last-child {
    margin-bottom: 0;
}

.apelsp-page__content .wp-block-video video {
    display: block;
    width: 100%;
    height: auto;
}

.apelsp-page__content iframe {
    max-width: 100%;
}

.apelsp-home {
    padding-block: var(--apelsp-space-7);
}

.apelsp-home__editorial-content > :last-child,
.apelsp-home__recent-content > :last-child {
    margin-bottom: 0;
}

.apelsp-home-shortcuts {
    margin-top: var(--apelsp-space-7);
}

.apelsp-home-shortcuts__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    margin: 0;
    gap: var(--apelsp-space-5);
    list-style: none;
}

.apelsp-home-shortcuts__list .menu-item {
    min-width: 0;
}

.apelsp-home-shortcuts__list a {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 12rem;
    padding: var(--apelsp-space-5);
    overflow: hidden;
    border: 0.0625rem solid var(--apelsp-border-color);
    border-radius: var(--apelsp-border-radius);
    background-color: var(--apelsp-color-white);
    box-shadow: var(--apelsp-shadow-subtle);
    color: var(--apelsp-color-blue);
    font-size: 1.25rem;
    font-weight: var(--apelsp-font-weight-semibold);
    line-height: 1.3;
    text-decoration: none;
}

.apelsp-home-shortcuts__list a::before,
.apelsp-home-shortcuts__list a::after {
    position: absolute;
    pointer-events: none;
    content: "";
}

.apelsp-home-shortcuts__list a::before {
    top: -2.5rem;
    right: -2rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background-color: var(--apelsp-color-blue);
    opacity: 0.1;
}

.apelsp-home-shortcuts__list a::after {
    top: var(--apelsp-space-5);
    right: var(--apelsp-space-5);
    width: 3.5rem;
    height: 3.5rem;
    border: 0.5rem solid var(--apelsp-color-gold);
    border-radius: 50% 0 50% 50%;
    opacity: 0.75;
}

.apelsp-home-shortcuts__list a:hover {
    border-color: var(--apelsp-color-red);
    color: var(--apelsp-color-red);
    box-shadow: 0 0.25rem 0.75rem rgb(17 17 17 / 12%);
}

.apelsp-home-news {
    margin-top: var(--apelsp-space-7);
}

.apelsp-home-news__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--apelsp-space-5);
}

.apelsp-news-archive,
.apelsp-news-single {
    padding-block: var(--apelsp-space-7);
}

.apelsp-news-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--apelsp-space-5);
}

.apelsp-news-card {
    display: flex;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 0.0625rem solid var(--apelsp-border-color);
    border-radius: var(--apelsp-border-radius);
    background-color: var(--apelsp-color-white);
    box-shadow: var(--apelsp-shadow-subtle);
}

.apelsp-news-card__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--apelsp-color-gray-100);
}

.apelsp-news-card__image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apelsp-news-card__content {
    display: flex;
    flex: 1;
    align-items: flex-start;
    padding: var(--apelsp-space-5);
    flex-direction: column;
}

.apelsp-news-card__date {
    margin-bottom: var(--apelsp-space-2);
    color: var(--apelsp-color-gray-500);
    font-size: 0.875rem;
    line-height: 1.5;
}

.apelsp-news-card__categories {
    margin-bottom: var(--apelsp-space-3);
    font-size: 0.875rem;
    line-height: 1.5;
}

.apelsp-news-card__title {
    margin-bottom: var(--apelsp-space-3);
    font-size: var(--apelsp-font-size-h4);
}

.apelsp-news-card__title a {
    color: inherit;
    text-decoration: none;
}

.apelsp-news-card__title a:hover {
    color: var(--apelsp-color-red);
    text-decoration: underline;
}

.apelsp-news-card__excerpt {
    flex: 1;
    margin-bottom: var(--apelsp-space-4);
}

.apelsp-news-card__excerpt > :last-child {
    margin-bottom: 0;
}

.apelsp-news-card__link {
    font-weight: var(--apelsp-font-weight-semibold);
}

.apelsp-home-news__all {
    display: inline-flex;
    margin-top: var(--apelsp-space-5);
    font-weight: var(--apelsp-font-weight-semibold);
}

.apelsp-news-archive .navigation.pagination {
    margin-top: var(--apelsp-space-6);
}

.apelsp-news-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--apelsp-space-2);
}

.apelsp-news-archive .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: var(--apelsp-space-2) var(--apelsp-space-3);
    border: 0.0625rem solid var(--apelsp-border-color);
    border-radius: var(--apelsp-border-radius);
    background-color: var(--apelsp-color-white);
    font-weight: var(--apelsp-font-weight-semibold);
    text-decoration: none;
}

.apelsp-news-archive .page-numbers.current {
    border-color: var(--apelsp-color-blue);
    background-color: var(--apelsp-color-blue);
    color: var(--apelsp-color-white);
}

.apelsp-news-archive a.page-numbers:hover {
    border-color: var(--apelsp-color-red);
    color: var(--apelsp-color-red);
}

.apelsp-news-single__categories,
.apelsp-news-single__date {
    color: var(--apelsp-color-gray-500);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.apelsp-news-single__categories {
    margin-bottom: var(--apelsp-space-2);
}

.apelsp-news-single__date {
    display: block;
    margin-bottom: var(--apelsp-space-5);
}

.apelsp-news-single__featured-image {
    margin: 0 0 var(--apelsp-space-6);
    overflow: hidden;
    border-radius: var(--apelsp-border-radius);
}

.apelsp-news-single__featured-image img,
.apelsp-news-single__content video {
    width: 100%;
    height: auto;
}

.apelsp-news-single__content iframe {
    max-width: 100%;
}

.apelsp-news-single__content > :last-child {
    margin-bottom: 0;
}

.apelsp-news-single__back {
    display: inline-flex;
    margin-top: var(--apelsp-space-6);
    font-weight: var(--apelsp-font-weight-semibold);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: var(--apelsp-space-4);
    left: var(--apelsp-space-4);
    width: auto;
    height: auto;
    padding: var(--apelsp-space-3) var(--apelsp-space-4);
    clip: auto;
    background-color: var(--apelsp-color-white);
    color: var(--apelsp-color-blue);
    font-weight: var(--apelsp-font-weight-semibold);
    white-space: normal;
}

.apelsp-site-header {
    background-color: var(--apelsp-color-white);
    box-shadow: var(--apelsp-shadow-subtle);
}

.apelsp-site-header__identity-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 7.5rem;
    gap: var(--apelsp-space-5);
}

.apelsp-brand {
    position: relative;
    display: block;
    flex: 0 1 21rem;
    max-width: 21rem;
    aspect-ratio: 404 / 126;
    overflow: hidden;
}

.apelsp-brand__logo {
    position: absolute;
    top: -169.84%;
    left: -12.38%;
    width: 123.76%;
    max-width: none;
}

.apelsp-site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--apelsp-space-3);
}

.apelsp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: var(--apelsp-space-2) var(--apelsp-space-5);
    border: 0.125rem solid transparent;
    border-radius: var(--apelsp-border-radius);
    font-weight: var(--apelsp-font-weight-semibold);
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.apelsp-button--primary {
    border-color: var(--apelsp-color-blue);
    background-color: var(--apelsp-color-blue);
    color: var(--apelsp-color-white);
}

.apelsp-button--primary:hover {
    border-color: var(--apelsp-color-red);
    background-color: var(--apelsp-color-red);
    color: var(--apelsp-color-white);
}

.apelsp-menu-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0.125rem solid var(--apelsp-color-blue);
    border-radius: var(--apelsp-border-radius);
    background-color: var(--apelsp-color-white);
    color: var(--apelsp-color-blue);
}

.apelsp-menu-toggle__icon,
.apelsp-menu-toggle__icon::before,
.apelsp-menu-toggle__icon::after {
    display: block;
    width: 1.375rem;
    height: 0.125rem;
    background-color: currentcolor;
}

.apelsp-menu-toggle__icon {
    position: relative;
}

.apelsp-menu-toggle__icon::before,
.apelsp-menu-toggle__icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.apelsp-menu-toggle__icon::before {
    top: -0.4375rem;
}

.apelsp-menu-toggle__icon::after {
    top: 0.4375rem;
}

.apelsp-site-header__navigation {
    border-top: 0.0625rem solid var(--apelsp-border-color);
}

.apelsp-primary-navigation__list,
.apelsp-primary-navigation__list .sub-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.apelsp-primary-navigation [hidden] {
    display: none !important;
}

.apelsp-primary-navigation__list > .menu-item > a {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: var(--apelsp-space-3) var(--apelsp-space-4);
    color: var(--apelsp-color-blue);
    font-weight: var(--apelsp-font-weight-semibold);
    text-decoration: none;
}

.apelsp-primary-navigation__list > .menu-item > a:hover {
    color: var(--apelsp-color-red);
}

.apelsp-primary-navigation__list > .current-menu-item > a,
.apelsp-primary-navigation__list > .current-menu-ancestor > a {
    color: var(--apelsp-color-red);
    box-shadow: inset 0 -0.1875rem var(--apelsp-color-red);
}

.apelsp-primary-navigation__list .sub-menu a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: var(--apelsp-space-2) var(--apelsp-space-4) var(--apelsp-space-2)
        var(--apelsp-space-6);
    color: var(--apelsp-color-blue);
    text-decoration: none;
}

@media (max-width: 61.999rem) {
    .apelsp-site-header__identity-inner {
        display: grid;
        grid-template-columns: 2.75rem minmax(0, 1fr) auto;
        align-items: center;
        min-height: auto;
        padding-block: var(--apelsp-space-4);
        gap: var(--apelsp-space-3);
    }

    .apelsp-menu-toggle {
        grid-column: 1;
    }

    .apelsp-brand {
        grid-column: 2;
        width: 100%;
        max-width: 17rem;
        justify-self: center;
    }

    .apelsp-site-header__actions {
        grid-column: 3;
        justify-self: end;
    }

    .apelsp-site-header__navigation {
        --bs-offcanvas-width: min(88vw, 22rem);

        border: 0;
        background-color: var(--apelsp-color-white);
        color: var(--apelsp-color-gray-900);
    }

    .apelsp-site-header__navigation .offcanvas-header {
        min-height: 4.5rem;
        padding: var(--apelsp-space-4) var(--apelsp-space-5);
        border-bottom: 0.0625rem solid var(--apelsp-border-color);
    }

    .apelsp-site-header__navigation .offcanvas-title {
        margin: 0;
        font-size: var(--apelsp-font-size-h4);
        line-height: 1.35;
    }

    .apelsp-site-header__navigation .btn-close {
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
        margin: 0;
        background-size: 1rem;
        opacity: 1;
    }

    .apelsp-site-header__navigation .offcanvas-body {
        display: block;
        padding: 0;
    }

    .apelsp-site-header__navigation .apelsp-container {
        width: 100%;
        padding-inline: var(--apelsp-space-2);
    }

    .apelsp-primary-navigation {
        padding-block: var(--apelsp-space-2);
    }

    .apelsp-primary-navigation__list > .menu-item + .menu-item {
        border-top: 0.0625rem solid var(--apelsp-border-color);
    }

    .apelsp-primary-navigation__list > .menu-item > a {
        min-height: 3.25rem;
    }

    .apelsp-primary-navigation__list .sub-menu {
        border-left: 0.1875rem solid var(--apelsp-border-color);
        margin-left: var(--apelsp-space-4);
    }
}

@media (min-width: 62rem) {
    .apelsp-menu-toggle {
        display: none;
    }

    .apelsp-site-header__navigation .offcanvas-header {
        display: none;
    }

    .apelsp-site-header__navigation .offcanvas-body {
        display: block;
        padding: 0;
        overflow: visible;
    }

    .apelsp-primary-navigation__list {
        display: flex;
        align-items: stretch;
        gap: var(--apelsp-space-2);
    }

    .apelsp-primary-navigation__list > .menu-item {
        position: relative;
    }

    .apelsp-primary-navigation__list .sub-menu {
        position: absolute;
        z-index: 20;
        top: 100%;
        left: 0;
        min-width: 16rem;
        visibility: hidden;
        border: 0.0625rem solid var(--apelsp-border-color);
        background-color: var(--apelsp-color-white);
        box-shadow: var(--apelsp-shadow-subtle);
        opacity: 0;
    }

    .apelsp-primary-navigation__list .menu-item:hover > .sub-menu,
    .apelsp-primary-navigation__list .menu-item:focus-within > .sub-menu {
        visibility: visible;
        opacity: 1;
    }

    .apelsp-primary-navigation__list .sub-menu a {
        padding: var(--apelsp-space-3) var(--apelsp-space-4);
    }

    .apelsp-primary-navigation__list .sub-menu a:hover,
    .apelsp-primary-navigation__list .sub-menu a:focus-visible {
        background-color: var(--apelsp-color-gray-100);
        color: var(--apelsp-color-red);
    }
}

@media (max-width: 47.999rem) {
    :root {
        --apelsp-font-size-body: 1rem;
        --apelsp-font-size-h1: 2rem;
        --apelsp-font-size-h2: 1.6875rem;
        --apelsp-font-size-h3: 1.4375rem;
        --apelsp-font-size-h4: 1.25rem;
        --apelsp-container-padding: 1rem;
    }

    .apelsp-brand {
        max-width: clamp(8rem, 38vw, 15rem);
    }

    .apelsp-site-header__member-area {
        padding-inline: var(--apelsp-space-3);
        font-size: 0.875rem;
    }

    .apelsp-home-shortcuts__list {
        grid-template-columns: 1fr;
    }

    .apelsp-home-news__list {
        grid-template-columns: 1fr;
    }

    .apelsp-news-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 74.999rem) {
    .apelsp-home__editorial-content .wp-block-media-text {
        grid-template-columns: 100% !important;
    }

    .apelsp-home__editorial-content .wp-block-media-text__media {
        grid-column: 1;
        grid-row: 1;
    }

    .apelsp-home__editorial-content .wp-block-media-text__content {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (min-width: 48rem) and (max-width: 74.999rem) {
    :root {
        --apelsp-container-padding: 1.25rem;
    }

    .apelsp-home-shortcuts__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apelsp-home-news__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apelsp-news-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
