:root {
    --epn-premium-blue: #0f3d5e;
    --epn-premium-blue-dark: #082f4d;
    --epn-premium-ink: #071f33;
    --epn-premium-soft: rgba(255, 255, 255, 0.95);
    --epn-premium-separator: #e7f0fa;
    --epn-premium-focus: #d97706;
    --epn-premium-shadow: 0 22px 58px rgba(8, 47, 77, 0.12);
    --epn-premium-radius: 28px;
}

body.epn-premium-detail .site-content,
body.epn-premium-detail #page {
    background: transparent !important;
}

body.epn-premium-detail .inside-article {
    width: min(1320px, calc(100% - 28px)) !important;
    max-width: 1320px !important;
    margin: 0 auto 56px !important;
    padding: 0 !important;
    border-radius: var(--epn-premium-radius) !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.epn-premium-detail .entry-header {
    overflow: hidden !important;
    margin: 40px 0 0 !important;
    padding: 50px 50px 1.15rem !important;
    border-radius: var(--epn-premium-radius) var(--epn-premium-radius) 0 0 !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
}

body.epn-premium-detail .entry-header::before {
    display: none !important;
    content: none !important;
}

body.epn-premium-detail h1.entry-title {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--epn-premium-ink) !important;
    font-size: 40px !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}

body.epn-premium-detail .entry-content {
    display: flow-root !important;
    margin: 0 !important;
    padding: 40px 50px 50px !important;
    border: 0 !important;
    border-radius: 0 0 var(--epn-premium-radius) var(--epn-premium-radius) !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
    color: var(--epn-premium-ink) !important;
    font-size: 1.12rem !important;
    line-height: 1.9 !important;
}

body.epn-premium-detail .entry-content :is(p, li, blockquote, dd, figcaption),
body.epn-premium-detail .entry-content :is(strong, b) {
    color: var(--epn-premium-ink) !important;
}

body.epn-premium-detail .entry-content :is(p, li) {
    text-align: justify !important;
    text-justify: inter-word !important;
}

body.epn-premium-detail .entry-content :is(.featured-image, .post-image, figure.wp-block-image, .wp-block-image, .wp-caption, figure.epn-image-premium):first-child,
body.epn-premium-detail .entry-content > :is(.featured-image, .post-image) {
    float: left !important;
    width: 40% !important;
    max-width: 40% !important;
    min-width: 260px !important;
    margin: 15px 24px 15px 0 !important;
    padding: 0.55rem !important;
    border: 1px solid rgba(255, 255, 255, 0.84) !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(224, 238, 255, 0.94)) !important;
    box-shadow: 0 22px 48px rgba(8, 47, 77, 0.2), 0 0 0 8px rgba(206, 229, 255, 0.34) !important;
}

body.epn-premium-detail .entry-content img:not(.emoji):not(.avatar):not(.custom-logo) {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 20px !important;
}

body.epn-premium-detail .epn-image-zoom-button {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: transparent !important;
    cursor: zoom-in !important;
}

body.epn-premium-detail .epn-image-zoom-button:focus-visible {
    outline: 3px solid var(--epn-premium-focus) !important;
    outline-offset: 4px !important;
}

body.epn-premium-detail .epn-detail-meta-block {
    clear: both !important;
    margin: 2.4rem 0 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

body.epn-premium-detail .epn-detail-separator {
    display: block !important;
    width: 95% !important;
    height: auto !important;
    margin: 0 auto 1rem !important;
    padding: 0 !important;
    background: transparent !important;
}

body.epn-premium-detail .epn-detail-separator-bar {
    display: block !important;
    width: 100% !important;
    height: 6px !important;
    background: linear-gradient(90deg, transparent, var(--epn-premium-separator), transparent) !important;
}

body.epn-premium-detail .epn-detail-meta-line {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    color: #31506a !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    white-space: nowrap !important;
    scrollbar-width: thin !important;
}

body.epn-premium-detail .epn-detail-meta-line .epn-detail-meta-item,
body.epn-premium-detail .epn-detail-meta-separator {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

body.epn-premium-detail .epn-detail-adjacent-nav {
    clear: both !important;
    margin: clamp(2rem, 5vw, 4rem) auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.epn-premium-detail .epn-detail-adjacent-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(2.25rem, 8vw, 5.5rem) !important;
    width: 100% !important;
}

body.epn-premium-detail .epn-detail-nav-button,
body.epn-premium-detail .epn-detail-nav-button:hover,
body.epn-premium-detail .epn-detail-nav-button:focus-visible {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.7rem !important;
    min-width: 92px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #25465e !important;
    text-align: center !important;
    text-decoration: none !important;
}

body.epn-premium-detail .epn-detail-nav-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #25465e !important;
    font-size: 3.1rem !important;
    font-weight: 800 !important;
    line-height: 0.8 !important;
}

body.epn-premium-detail .epn-detail-nav-button:hover .epn-detail-nav-icon,
body.epn-premium-detail .epn-detail-nav-button:focus-visible .epn-detail-nav-icon {
    color: var(--epn-premium-blue-dark) !important;
}

body.epn-premium-detail .epn-detail-nav-label {
    color: #25465e !important;
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
}

body.epn-premium-detail .epn-detail-nav-button:focus-visible,
body.epn-premium-detail :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--epn-premium-focus) !important;
    outline-offset: 6px !important;
}

body .rt-pagination-wrap .rt-pagination .pagination-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
}

body .rt-pagination-wrap .rt-pagination .pagination-list li {
    flex: 0 0 auto !important;
}

body .rt-pagination-wrap .rt-pagination .pagination-list li.active > span,
body .rt-pagination-wrap .rt-pagination .pagination-list li.active > a,
body .rt-pagination-wrap .rt-pagination .pagination-list li .current,
body .rt-pagination-wrap .rt-pagination .pagination-list li > a:hover,
body .rt-pagination-wrap .rt-pagination .pagination-list li > a:focus-visible {
    border-color: var(--epn-premium-blue) !important;
    background: var(--epn-premium-blue) !important;
    color: #ffffff !important;
}

.epn-image-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: grid !important;
    place-items: center !important;
    padding: 1.25rem !important;
    background: rgba(3, 18, 31, 0.86) !important;
}

.epn-image-lightbox[hidden] {
    display: none !important;
}

.epn-image-lightbox-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 46px !important;
    height: 46px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--epn-premium-ink) !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
}

.epn-image-lightbox-figure {
    max-width: min(94vw, 1100px) !important;
    max-height: 88vh !important;
    margin: 0 !important;
}

.epn-image-lightbox-figure img {
    display: block !important;
    max-width: 100% !important;
    max-height: 82vh !important;
    margin: 0 auto !important;
    border-radius: 18px !important;
    object-fit: contain !important;
}

.epn-image-lightbox-figure figcaption {
    margin-top: 0.75rem !important;
    color: #ffffff !important;
    text-align: center !important;
}

@media (max-width: 1024px) {
    body.epn-premium-detail .inside-article {
        width: min(100% - 24px, 980px) !important;
    }

    body.epn-premium-detail .entry-header {
        margin-top: 24px !important;
        padding: 32px 28px 16px !important;
    }

    body.epn-premium-detail .entry-content {
        padding: 32px 28px 40px !important;
    }

    body.epn-premium-detail h1.entry-title {
        font-size: clamp(2rem, 4.8vw, 2.7rem) !important;
    }
}

@media (max-width: 767px) {
    body.epn-premium-detail .inside-article {
        width: min(100% - 16px, 540px) !important;
        margin-bottom: 32px !important;
    }

    body.epn-premium-detail .entry-header {
        margin-top: 18px !important;
        padding: 24px 18px 12px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    body.epn-premium-detail .entry-content {
        padding: 28px 18px 32px !important;
        border-radius: 0 0 20px 20px !important;
    }

    body.epn-premium-detail h1.entry-title {
        font-size: clamp(1.55rem, 7vw, 2rem) !important;
        line-height: 1.18 !important;
    }

    body.epn-premium-detail .entry-content :is(p, li) {
        text-align: left !important;
    }

    body.epn-premium-detail .entry-content :is(.featured-image, .post-image, figure.wp-block-image, .wp-block-image, .wp-caption, figure.epn-image-premium):first-child,
    body.epn-premium-detail .entry-content > :is(.featured-image, .post-image) {
        float: none !important;
        width: 90vw !important;
        max-width: 90vw !important;
        min-width: 0 !important;
        margin: 0 calc(50% - 45vw) 1.5rem !important;
    }

    body.epn-premium-detail .epn-detail-meta-line {
        justify-content: center !important;
        gap: 0.12rem !important;
        overflow: hidden !important;
        font-size: clamp(0.54rem, 2.18vw, 0.68rem) !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
    }

    body.epn-premium-detail .epn-detail-meta-line::-webkit-scrollbar {
        display: none !important;
    }

    body.epn-premium-detail .epn-detail-meta-separator,
    body.epn-premium-detail .epn-detail-meta-label {
        display: none !important;
    }

    body.epn-premium-detail .epn-detail-meta-line .epn-detail-meta-item {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }

    body .rt-pagination-wrap .rt-pagination .pagination-list {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    body .rt-pagination-wrap .rt-pagination .pagination-list li:nth-child(n+4):not(:last-child) {
        display: none !important;
    }
}

/* Hard fallback for hosted sites where body_class/cache prevents the plugin class from being printed. */
body.page:not(.home):not(.front-page):not(.single-event),
body.single-post {
    background:
        radial-gradient(circle at 0% 0%, rgba(206, 229, 255, 0.88) 0%, rgba(206, 229, 255, 0) 30%),
        linear-gradient(180deg, #f4f8ff 0%, #eef6ff 100%) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(#page, .site-content, .content-area, .site-main),
body.single-post :is(#page, .site-content, .content-area, .site-main) {
    background: transparent !important;
    background-color: transparent !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(.site-content, .site-main, .content-area),
body.single-post :is(.site-content, .site-main, .content-area) {
    width: min(1320px, calc(100% - 28px)) !important;
    max-width: 1320px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(article, .inside-article),
body.single-post :is(article, .inside-article) {
    width: 100% !important;
    max-width: 1320px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-header, header.entry-header),
body.single-post :is(.entry-header, header.entry-header) {
    display: block !important;
    margin: 40px 0 0 !important;
    padding: 50px 50px 1.15rem !important;
    border: 0 !important;
    border-radius: var(--epn-premium-radius) var(--epn-premium-radius) 0 0 !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-title, h1.entry-title),
body.single-post :is(.entry-title, h1.entry-title) {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--epn-premium-ink) !important;
    font-size: 40px !important;
    line-height: 1.22 !important;
    font-weight: 800 !important;
    text-align: center !important;
}

body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-content, .entry-summary),
body.single-post :is(.entry-content, .entry-summary) {
    display: flow-root !important;
    min-height: 190px !important;
    margin: 0 !important;
    padding: 40px 50px 50px !important;
    border: 0 !important;
    border-radius: 0 0 var(--epn-premium-radius) var(--epn-premium-radius) !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
    color: var(--epn-premium-ink) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-meta-block,
body.single-post .epn-detail-meta-block {
    clear: both !important;
    margin: 2.4rem 0 0 !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-adjacent-nav,
body.single-post .epn-detail-adjacent-nav {
    clear: both !important;
    margin: clamp(2rem, 5vw, 4rem) auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-adjacent-actions,
body.single-post .epn-detail-adjacent-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(2.25rem, 8vw, 5.5rem) !important;
    width: 100% !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button,
body.single-post .epn-detail-nav-button {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.7rem !important;
    min-width: 96px !important;
    padding: 0.25rem !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: transparent !important;
    color: #25465e !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: transform 180ms ease, color 180ms ease !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-icon,
body.single-post .epn-detail-nav-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #25465e !important;
    font-size: 3.3rem !important;
    font-weight: 900 !important;
    line-height: 0.78 !important;
    text-shadow: 0 12px 22px rgba(8, 47, 77, 0.18) !important;
    transition: transform 180ms ease, color 180ms ease, text-shadow 180ms ease !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-label,
body.single-post .epn-detail-nav-label {
    color: #25465e !important;
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:hover,
body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:focus-visible,
body.single-post .epn-detail-nav-button:hover,
body.single-post .epn-detail-nav-button:focus-visible {
    background: transparent !important;
    color: var(--epn-premium-blue-dark) !important;
    transform: translateY(-3px) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:hover .epn-detail-nav-icon,
body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:focus-visible .epn-detail-nav-icon,
body.single-post .epn-detail-nav-button:hover .epn-detail-nav-icon,
body.single-post .epn-detail-nav-button:focus-visible .epn-detail-nav-icon {
    color: var(--epn-premium-blue-dark) !important;
    transform: scale(1.12) !important;
    text-shadow: 0 18px 30px rgba(8, 47, 77, 0.28) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:hover .epn-detail-nav-label,
body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:focus-visible .epn-detail-nav-label,
body.single-post .epn-detail-nav-button:hover .epn-detail-nav-label,
body.single-post .epn-detail-nav-button:focus-visible .epn-detail-nav-label {
    color: var(--epn-premium-blue-dark) !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-nav-button:focus-visible,
body.single-post .epn-detail-nav-button:focus-visible {
    outline: 3px solid var(--epn-premium-focus) !important;
    outline-offset: 8px !important;
}

body.page:not(.home):not(.front-page):not(.single-event) .epn-detail-meta-line,
body.single-post .epn-detail-meta-line {
    justify-content: center !important;
    text-align: center !important;
}

@media (max-width: 1024px) {
    body.page:not(.home):not(.front-page):not(.single-event) :is(.site-content, .site-main, .content-area),
    body.single-post :is(.site-content, .site-main, .content-area) {
        width: min(100% - 24px, 980px) !important;
    }
}

@media (max-width: 767px) {
    body.page:not(.home):not(.front-page):not(.single-event) :is(.site-content, .site-main, .content-area),
    body.single-post :is(.site-content, .site-main, .content-area) {
        width: min(100% - 16px, 540px) !important;
    }

    body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-header, header.entry-header),
    body.single-post :is(.entry-header, header.entry-header) {
        margin-top: 18px !important;
        padding: 24px 18px 12px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-content, .entry-summary),
    body.single-post :is(.entry-content, .entry-summary) {
        min-height: 150px !important;
        padding: 28px 18px 32px !important;
        border-radius: 0 0 20px 20px !important;
    }

    body.page:not(.home):not(.front-page):not(.single-event) :is(.entry-title, h1.entry-title),
    body.single-post :is(.entry-title, h1.entry-title) {
        font-size: clamp(1.55rem, 7vw, 2rem) !important;
        line-height: 1.18 !important;
    }
}

/* Compatibility layer for themes that load strong CSS late or omit .inside-article wrappers. */
body.epn-premium-detail {
    background:
        radial-gradient(circle at 0% 0%, rgba(206, 229, 255, 0.88) 0%, rgba(206, 229, 255, 0) 30%),
        linear-gradient(180deg, #f4f8ff 0%, #eef6ff 100%) !important;
}

body.epn-premium-detail :is(#page, .site-content, .content-area, .site-main) {
    background: transparent !important;
    background-color: transparent !important;
}

body.epn-premium-detail .site-main > article,
body.epn-premium-detail article:is(.post, .page, .hentry) {
    width: min(1320px, calc(100% - 28px)) !important;
    max-width: 1320px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.epn-premium-detail :is(.entry-header, header.entry-header) {
    margin-top: 40px !important;
    padding: 50px 50px 1.15rem !important;
    border-radius: var(--epn-premium-radius) var(--epn-premium-radius) 0 0 !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
}

body.epn-premium-detail :is(.entry-content, .entry-summary) {
    padding: 40px 50px 50px !important;
    border-radius: 0 0 var(--epn-premium-radius) var(--epn-premium-radius) !important;
    background: var(--epn-premium-soft) !important;
    box-shadow: var(--epn-premium-shadow) !important;
}

@media (max-width: 1024px) {
    body.epn-premium-detail .site-main > article,
    body.epn-premium-detail article:is(.post, .page, .hentry) {
        width: min(100% - 24px, 980px) !important;
    }
}

@media (max-width: 767px) {
    body.epn-premium-detail .site-main > article,
    body.epn-premium-detail article:is(.post, .page, .hentry) {
        width: min(100% - 16px, 540px) !important;
    }

    body.epn-premium-detail :is(.entry-header, header.entry-header) {
        margin-top: 18px !important;
        padding: 24px 18px 12px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    body.epn-premium-detail :is(.entry-content, .entry-summary) {
        padding: 28px 18px 32px !important;
        border-radius: 0 0 20px 20px !important;
    }
}
