/*
 * Elección del Poder Judicial 2025
 * Hoja específica y encapsulada para epj.blade.php.
 */

.epj-page {
    --epj-purple: #532680;
    --epj-purple-dark: #3d175f;
    --epj-pink: #a53c73;
    --epj-magenta: #c94f8f;
    --epj-graphite: #40404a;
    --epj-muted: #686874;
    --epj-border: rgba(83, 38, 128, 0.14);
    --epj-soft: #f7f3f9;
    --epj-soft-pink: #fdf4f8;
    --epj-shadow: 0 16px 38px rgba(63, 29, 97, 0.10);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px 26px;
    color: var(--epj-graphite);
}

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

.epj-page a,
.epj-page button,
.epj-page select,
.epj-page input {
    font: inherit;
}

.epj-page a:focus-visible,
.epj-page button:focus-visible,
.epj-page select:focus-visible,
.epj-page input:focus-visible {
    outline: 3px solid rgba(201, 79, 143, 0.40);
    outline-offset: 3px;
}

.epj-page img {
    max-width: 100%;
}

.epj-page .site-eyebrow {
    color: var(--epj-pink);
}

.epj-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    align-items: center;
    gap: clamp(26px, 4vw, 52px);
    min-height: 360px;
    overflow: hidden;
}

.epj-hero__content {
    max-width: 760px;
}

.epj-hero__media {
    position: relative;
    z-index: 2;
    justify-self: end;
    width: 100%;
    max-width: 380px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 36px rgba(26, 8, 43, 0.26);
}

.epj-hero__media img {
    display: block;
    width: 100%;
    height: auto;
}


.epj-access-section {
    margin-top: 26px;
}

.epj-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.epj-section-heading--compact {
    margin-bottom: 14px;
}

.epj-section-heading h2 {
    margin: 2px 0 8px;
    color: var(--epj-purple);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.18;
}

.epj-section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--epj-muted);
    line-height: 1.68;
    text-align: left;
}

.epj-access-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.epj-access-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 116px;
    padding: 17px;
    border: 1px solid var(--epj-border);
    border-radius: 22px;
    color: var(--epj-graphite);
    background: #fff;
    box-shadow: 0 10px 26px rgba(63, 29, 97, 0.06);
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.epj-access-card:hover {
    border-color: rgba(201, 79, 143, 0.34);
    box-shadow: var(--epj-shadow);
}

.epj-access-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    color: #fff;
    background: var(--epj-graphite);
}

.epj-access-card--purple .epj-access-card__icon {
    background: linear-gradient(135deg, var(--epj-purple), #74409c);
}

.epj-access-card--pink .epj-access-card__icon {
    background: linear-gradient(135deg, var(--epj-magenta), var(--epj-pink));
}

.epj-access-card--graphite .epj-access-card__icon {
    background: linear-gradient(135deg, #656574, #3f3f49);
}
.epj-access-card--magenta .epj-access-card__icon {
    background: linear-gradient(135deg, var(--epj-magenta), var(--epj-purple));
}

.epj-access-card__icon .mdi {
    font-size: 1.5rem;
}

.epj-access-card__content {
    min-width: 0;
}

.epj-access-card__content strong,
.epj-access-card__content small {
    display: block;
}

.epj-access-card__content strong {
    margin-bottom: 5px;
    color: var(--epj-purple);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.25;
}

.epj-access-card__content small {
    color: var(--epj-muted);
    font-size: 0.77rem;
    font-weight: 650;
    line-height: 1.45;
}

.epj-access-card > .mdi {
    color: var(--epj-pink);
    font-size: 1.2rem;
}


.epj-section {
    scroll-margin-top: 84px;
    margin-top: 34px;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--epj-border);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--epj-shadow);
}

.epj-total-card {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "label value" "label note";
    align-items: center;
    column-gap: 10px;
    min-width: 150px;
    padding: 14px 18px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--epj-purple), var(--epj-pink));
}

.epj-total-card span {
    grid-area: label;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.epj-total-card strong {
    grid-area: value;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}

.epj-total-card small {
    grid-area: note;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.76rem;
    font-weight: 800;
}

.epj-position-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.epj-position-card {
    display: grid;
    grid-template-rows: minmax(190px, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--epj-border);
    border-radius: 24px;
    background: linear-gradient(180deg, #fff, #fcf9fd);
}

.epj-position-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 205px;
    padding: 14px;
    background: var(--epj-soft);
}

.epj-position-card__visual img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 245px;
    object-fit: contain;
}

.epj-position-card__content {
    position: relative;
    padding: 22px;
}

.epj-position-card__number {
    display: block;
    margin-bottom: 7px;
    color: var(--epj-pink);
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1;
}

.epj-position-card h3 {
    margin: 0;
    color: var(--epj-purple);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.3;
}

.epj-position-card p {
    margin: 7px 0 0;
    color: var(--epj-muted);
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.45;
}

.epj-document-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
}

.epj-document-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--epj-border);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--epj-soft) 0, #fff 175px);
}

.epj-document-group__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 42%);
    align-items: center;
    gap: 12px;
    min-height: 158px;
    padding: 20px 16px;
}

.epj-document-group__header > div {
    min-width: 0;
}

.epj-document-group__header h3 {
    margin: 7px 0 0;
    color: var(--epj-purple);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
}

.epj-document-group__illustration {
    display: block;
    width: 100%;
    max-width: 126px;
    height: auto;
    justify-self: end;
    object-fit: contain;
}

.epj-document-group__resources {
    display: grid;
    align-content: start;
    gap: 9px;
    margin-top: 0;
    padding: 12px;
}

.epj-document-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(83, 38, 128, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
}

.epj-document-row__type {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1px;
    width: 40px;
    min-height: 40px;
    padding: 4px 3px;
    border-radius: 11px;
    color: var(--epj-purple);
    background: var(--epj-soft);
}

.epj-document-row__type .mdi {
    font-size: 1.1rem;
}

.epj-document-row__type small {
    font-size: 0.5rem;
    font-weight: 900;
    line-height: 1;
}

.epj-document-row__type--xlsx {
    color: #166d43;
    background: #edf8f2;
}

.epj-document-row__type--pdf {
    color: #b22f52;
    background: #fff1f4;
}

.epj-document-row__content {
    min-width: 0;
}

.epj-document-row__category {
    display: inline-block;
    color: var(--epj-pink);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    line-height: 1.45;
    text-transform: uppercase;
}

.epj-page a.epj-document-row,
.epj-page a.epj-document-row:link,
.epj-page a.epj-document-row:visited {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.epj-page a.epj-document-row:hover,
.epj-page a.epj-document-row:focus-visible {
    border-color: rgba(83, 38, 128, 0.34);
    background: #fff;
    box-shadow: 0 8px 20px rgba(83, 38, 128, 0.09);
}

.epj-page a.epj-document-row:focus-visible {
    outline: 3px solid rgba(205, 82, 144, 0.34);
    outline-offset: 2px;
}

.epj-document-row__title {
    display: block;
    margin: 0;
    color: var(--epj-purple);
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1.3;
}

.epj-document-row__description {
    display: block;
    margin: 3px 0 0;
    color: var(--epj-muted);
    font-size: 0.68rem;
    line-height: 1.4;
    text-align: left;
}

.epj-document-row__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--epj-pink);
    background: transparent;
    font-size: 1rem;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.epj-page a.epj-document-row:hover .epj-document-row__action,
.epj-page a.epj-document-row:focus-visible .epj-document-row__action {
    color: #fff;
    background: var(--epj-purple);
    transform: translateX(2px);
}
.epj-norm-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--epj-border);
    border-radius: 24px;
    background: #fff;
}

.epj-norm-sidebar {
    padding: 20px;
    border-right: 1px solid var(--epj-border);
    background: linear-gradient(180deg, var(--epj-soft), #fff);
}

.epj-norm-tabs {
    display: grid;
    gap: 8px;
}

.epj-norm-tab {
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--epj-graphite);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.epj-norm-tab:hover {
    border-color: var(--epj-border);
    background: #fff;
}

.epj-norm-tab span {
    font-size: 0.91rem;
    font-weight: 900;
}

.epj-norm-tab small {
    color: var(--epj-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.epj-norm-tab--active,
.epj-norm-tab--active:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--epj-purple), var(--epj-pink));
}

.epj-norm-tab--active small {
    color: rgba(255, 255, 255, 0.82);
}

.epj-norm-select {
    display: none;
}

.epj-norm-search {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.epj-norm-search > span:first-child,
.epj-norm-select > span {
    color: var(--epj-purple);
    font-size: 0.76rem;
    font-weight: 900;
}

.epj-input-wrap {
    position: relative;
    display: block;
}

.epj-input-wrap input,
.epj-norm-select select {
    width: 100%;
    min-height: 46px;
    padding: 10px 42px 10px 13px;
    border: 1px solid var(--epj-border);
    border-radius: 14px;
    color: var(--epj-graphite);
    background: #fff;
    font-size: 0.84rem;
    font-weight: 700;
}

.epj-input-wrap .mdi {
    position: absolute;
    top: 50%;
    right: 13px;
    color: var(--epj-pink);
    font-size: 1.15rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.epj-norm-count {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--epj-border);
    border-radius: 15px;
    color: var(--epj-muted);
    background: #fff;
    font-size: 0.76rem;
    font-weight: 750;
}

.epj-norm-count .mdi {
    color: var(--epj-pink);
    font-size: 1.2rem;
}

.epj-norm-count strong {
    color: var(--epj-purple);
    font-size: 1.15rem;
    font-weight: 900;
}

.epj-norm-panels {
    min-width: 0;
}

.epj-norm-panel {
    padding: 22px;
}

.epj-norm-panel[hidden] {
    display: none;
}

.epj-norm-panel__header {
    margin-bottom: 16px;
}

.epj-norm-panel__header h3 {
    margin: 3px 0 0;
    color: var(--epj-purple);
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.35;
}

.epj-norm-list {
    display: grid;
    gap: 8px;
}

.epj-norm-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 68px;
    padding: 11px 12px;
    border: 1px solid rgba(83, 38, 128, 0.10);
    border-radius: 15px;
    background: #fff;
}

.epj-norm-row[hidden] {
    display: none;
}

.epj-norm-row__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 38px;
    padding: 4px;
    border-radius: 12px;
    color: var(--epj-purple);
    background: var(--epj-soft);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: center;
}

.epj-norm-row h4 {
    margin: 0;
    color: var(--epj-graphite);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.42;
}

.epj-page a.epj-norm-row__action,
.epj-page a.epj-norm-row__action:link,
.epj-page a.epj-norm-row__action:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(165, 60, 115, 0.30);
    border-radius: 12px;
    color: var(--epj-pink);
    background: #fff;
    font-size: 0.76rem;
    font-weight: 900;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.epj-page a.epj-norm-row__action:hover {
    color: #fff;
    background: var(--epj-pink);
}

.epj-empty-link {
    color: var(--epj-muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.epj-norm-empty,
.epj-empty-state {
    margin-top: 12px;
    padding: 16px;
    border-radius: 16px;
    color: var(--epj-muted);
    background: var(--epj-soft);
    font-size: 0.84rem;
    font-weight: 800;
    text-align: center;
}

.epj-norm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--epj-border);
    border-radius: 17px;
    background: var(--epj-soft);
}

.epj-norm-pagination[hidden] {
    display: none;
}

.epj-norm-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}

.epj-norm-page-control,
.epj-norm-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid rgba(83, 38, 128, 0.18);
    border-radius: 13px;
    color: var(--epj-purple);
    background: #fff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.epj-norm-page-control {
    gap: 5px;
    padding: 8px 12px;
}

.epj-norm-page-control:hover:not(:disabled),
.epj-norm-page-number:hover,
.epj-norm-page-number--active {
    color: #fff;
    border-color: var(--epj-purple);
    background: var(--epj-purple);
}

.epj-norm-page-number--active {
    box-shadow: 0 7px 16px rgba(83, 38, 128, 0.18);
}

.epj-norm-page-control:disabled {
    color: var(--epj-muted);
    border-color: var(--epj-border);
    background: #f1eef2;
    cursor: not-allowed;
    opacity: 0.72;
}

.epj-norm-page-control:focus-visible,
.epj-norm-page-number:focus-visible {
    outline: 3px solid rgba(165, 60, 115, 0.34);
    outline-offset: 2px;
}

.epj-norm-page-summary {
    min-width: 96px;
    color: var(--epj-muted);
    font-size: 0.76rem;
    font-weight: 850;
    text-align: center;
}

.epj-interest-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.epj-interest-card {
    display: grid;
    grid-template-rows: 128px 1fr auto;
    overflow: hidden;
    border: 1px solid var(--epj-border);
    border-radius: 22px;
    color: var(--epj-graphite);
    background: #fff;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.epj-interest-card:hover {
    border-color: rgba(201, 79, 143, 0.34);
    box-shadow: var(--epj-shadow);
}

.epj-interest-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: var(--epj-soft);
}

.epj-interest-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.epj-interest-card__content {
    display: block;
    padding: 16px 16px 7px;
}

.epj-interest-card__content strong,
.epj-interest-card__content small {
    display: block;
}

.epj-interest-card__content strong {
    margin-bottom: 6px;
    color: var(--epj-purple);
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.35;
}

.epj-interest-card__content small {
    color: var(--epj-muted);
    font-size: 0.77rem;
    line-height: 1.5;
}

.epj-interest-card > .mdi {
    justify-self: end;
    margin: 0 16px 14px;
    color: var(--epj-pink);
}

.epj-video-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: 18px;
}

.epj-video-player {
    overflow: hidden;
    border: 1px solid var(--epj-border);
    border-radius: 22px;
    background: #fff;
}

.epj-video-player__frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
}

.epj-video-player__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.epj-video-player__caption {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 13px 16px;
    background: var(--epj-soft);
}

.epj-video-player__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--epj-purple), var(--epj-pink));
}

.epj-video-player__caption small,
.epj-video-player__caption strong {
    display: block;
}

.epj-video-player__caption small {
    margin-bottom: 3px;
    color: var(--epj-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.epj-video-player__caption strong {
    color: var(--epj-purple);
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.35;
}

.epj-video-playlist {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 5px;
}

.epj-video-option {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 66px;
    padding: 10px 11px;
    border: 1px solid var(--epj-border);
    border-radius: 15px;
    color: var(--epj-graphite);
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.epj-video-option:hover {
    border-color: rgba(83, 38, 128, 0.28);
    background: var(--epj-soft);
}

.epj-video-option--active,
.epj-video-option--active:hover {
    border-color: var(--epj-purple);
    background: rgba(83, 38, 128, 0.07);
    box-shadow: inset 4px 0 0 var(--epj-purple);
}

.epj-video-option__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: var(--epj-pink);
    font-size: 0.75rem;
    font-weight: 900;
}

.epj-video-option--active .epj-video-option__number {
    background: var(--epj-purple);
}

.epj-video-option__text {
    min-width: 0;
}

.epj-video-option__text strong,
.epj-video-option__text small {
    display: block;
}

.epj-video-option__text strong {
    color: var(--epj-purple);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.32;
}

.epj-video-option__text small {
    margin-top: 3px;
    color: var(--epj-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.epj-video-option > .mdi {
    color: var(--epj-pink);
    font-size: 1.1rem;
}

.epj-video-option--active > .mdi {
    color: var(--epj-purple);
}

.epj-sites-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.epj-site-link {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 94px;
    padding: 13px;
    border: 1px solid var(--epj-border);
    border-radius: 19px;
    color: var(--epj-graphite);
    background: #fff;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.epj-site-link:hover {
    border-color: rgba(201, 79, 143, 0.34);
    box-shadow: 0 12px 26px rgba(63, 29, 97, 0.08);
}

.epj-site-link__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 62px;
    padding: 7px;
    border-radius: 13px;
    background: var(--epj-soft);
}

.epj-site-link__logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.epj-site-link__name {
    color: var(--epj-purple);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.35;
}

.epj-site-link > .mdi {
    color: var(--epj-pink);
}

.epj-history-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 24px 0 4px;
    padding: 16px 18px;
    border: 1px solid rgba(83, 38, 128, 0.12);
    border-radius: 18px;
    color: var(--epj-graphite);
    background: linear-gradient(135deg, var(--epj-soft), var(--epj-soft-pink));
}

.epj-history-note .mdi {
    color: var(--epj-purple);
    font-size: 1.45rem;
}

.epj-history-note p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
}

@media (max-width: 1120px) {
    .epj-document-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .epj-access-grid,
    .epj-interest-grid,
    .epj-sites-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .epj-video-gallery {
        grid-template-columns: 1fr;
    }

    .epj-video-playlist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 960px) {
    .epj-document-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .epj-hero {
        grid-template-columns: 1fr;
    }

    .epj-hero__media {
        justify-self: center;
        max-width: 420px;
    }

    .epj-position-grid {
        grid-template-columns: 1fr;
    }

    .epj-position-card {
        grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
        grid-template-rows: auto;
        align-items: stretch;
    }

    .epj-position-card__visual {
        min-height: 180px;
    }

    .epj-position-card__content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .epj-norm-card {
        grid-template-columns: 1fr;
    }

    .epj-norm-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--epj-border);
    }

    .epj-norm-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .epj-norm-search {
        max-width: 520px;
    }
}

@media (max-width: 760px) {
    .epj-page {
        width: calc(100% - 28px);
        max-width: calc(100% - 28px);
        padding-right: 0;
        padding-left: 0;
    }

    .epj-hero {
        min-height: auto;
        padding: 28px 20px 60px;
    }

    .epj-hero__media {
        border-radius: 22px;
    }

    .epj-access-grid,
    .epj-interest-grid,
    .epj-sites-grid {
        grid-template-columns: 1fr;
    }


    .epj-norm-select select {
        padding-right: 14px;
    }

    .epj-norm-pagination {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 12px;
    }

    .epj-norm-pagination[hidden] {
        display: none;
    }

    .epj-norm-page-numbers,
    .epj-norm-page-summary {
        grid-column: 1 / -1;
    }

    .epj-norm-page-numbers {
        grid-row: 1;
    }

    .epj-norm-page-summary {
        grid-row: 2;
    }

    .epj-norm-page-control {
        width: 100%;
    }

    .epj-section {
        margin-top: 24px;
        padding: 18px;
        border-radius: 23px;
        scroll-margin-top: 16px;
    }

    .epj-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .epj-total-card {
        width: 100%;
        max-width: 220px;
    }

    .epj-position-card {
        grid-template-columns: 1fr;
    }

    .epj-position-card__visual {
        min-height: 190px;
    }

    .epj-document-list {
        grid-template-columns: 1fr;
    }

    .epj-document-group__header {
        min-height: 132px;
        grid-template-columns: minmax(0, 1fr) 118px;
        padding: 18px 16px;
    }

    .epj-document-group__illustration {
        max-width: 118px;
    }

    .epj-norm-tabs {
        display: none;
    }

    .epj-norm-select {
        display: grid;
        gap: 7px;
    }

    .epj-norm-search {
        margin-top: 13px;
    }

    .epj-norm-panel {
        padding: 16px;
    }

    .epj-norm-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .epj-norm-row__action,
    .epj-norm-row > .epj-empty-link {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .epj-video-playlist {
        grid-template-columns: 1fr;
    }

    .epj-site-link {
        min-height: 88px;
    }
}

@media (max-width: 480px) {
    .epj-page {
        width: calc(100% - 22px);
        max-width: calc(100% - 22px);
    }

    .epj-hero {
        padding: 24px 16px 56px;
    }

    .epj-access-card {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        min-height: 104px;
        padding: 14px;
    }

    .epj-access-card__icon {
        width: 46px;
        height: 46px;
    }

    .epj-section {
        padding: 15px;
    }

    .epj-position-card__content {
        padding: 18px;
    }

    .epj-document-row {
        padding: 13px;
    }

    .epj-document-row p,
    .epj-section-heading p,
    .epj-history-note p {
        text-align: left;
    }

    .epj-video-player__caption {
        align-items: flex-start;
    }

    .epj-site-link {
        grid-template-columns: 58px minmax(0, 1fr) auto;
    }

    .epj-site-link__logo {
        width: 58px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .epj-page *,
    .epj-page *::before,
    .epj-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media (forced-colors: active) {
    .epj-access-card,
    .epj-section,
    .epj-document-group,
    .epj-document-row,
    .epj-norm-card,
    .epj-norm-row,
    .epj-interest-card,
    .epj-site-link,
    .epj-video-option {
        border: 1px solid CanvasText;
    }
}
