/* E-Paper Newspaper frontend. All selectors scoped to avoid theme collisions. */
.epnp-site-main {
        width: 100%;
        max-width: 1320px;
        margin-inline: auto;
        padding: 24px 20px 48px;
}

.epnp-root,
.epnp-root *,
.epnp-widget,
.epnp-widget * {
        box-sizing: border-box;
}

.epnp-root {
        --epnp-accent: #f4ac04;
        --epnp-toolbar: #333333;
        --epnp-radius: 4px;
        position: relative;
        width: 100%;
        color: #222;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        line-height: 1.5;
}

.epnp-root [hidden],
.epnp-widget [hidden] {
        display: none !important;
}

.epnp-root a,
.epnp-widget a {
        text-decoration: none;
}

.epnp-root button,
.epnp-root input,
.epnp-widget button {
        font: inherit;
}

.epnp-root button:focus-visible,
.epnp-root a:focus-visible,
.epnp-root input:focus-visible,
.epnp-widget button:focus-visible,
.epnp-widget a:focus-visible {
        outline: 3px solid #2271b1;
        outline-offset: 2px;
}

.epnp-page-header,
.epnp-edition-header {
        margin: 0 0 20px;
        text-align: right;
}

.epnp-page-header h1,
.epnp-page-header h2,
.epnp-edition-header h1 {
        margin: 0;
        color: #181818;
        font-family: "Noto Naskh Arabic", "Noto Nastaliq Urdu", serif;
        font-size: clamp(28px, 4vw, 44px);
        font-weight: 700;
        line-height: 1.35;
}

.epnp-edition-cities {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
}

.epnp-edition-cities a {
        display: inline-flex;
        padding: 3px 10px;
        border-radius: 999px;
        background: #f0f0f0;
        color: #333;
        font-size: 14px;
}

.epaper-container {
        padding-top: 4px;
}

.epnp-root .epaper-control-row {
        position: relative;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 5px;
        border-radius: var(--epnp-radius);
        background: var(--epnp-toolbar);
        box-shadow: 0 5px 5px rgb(0 0 0 / 30%);
        color: #fff;
        font-weight: 700;
}

.epnp-root .epaper-buttons {
        position: relative;
        margin-inline: 10px;
        text-align: right;
}

.epnp-root .epnp-control-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: 100%;
        min-height: 46px;
        padding: 10px 24px;
        border: 0;
        border-radius: var(--epnp-radius);
        background: #050505;
        box-shadow: none;
        color: #fff;
        cursor: pointer;
        font-family: "Noto Naskh Arabic", "Noto Nastaliq Urdu", serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.2;
        text-align: center;
}

.epnp-root .epnp-control-button:hover {
        background: #171717;
        color: #fff;
}

.epnp-root .dl-btn .epnp-control-button {
        background: var(--epnp-accent);
        color: #111;
}

.epnp-root .posted-on {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: 230px;
        min-height: 46px;
        margin-inline: 5px 10px;
        padding: 8px 14px;
        border-radius: var(--epnp-radius);
        background: #fff;
        color: #333;
        font-family: "Noto Naskh Arabic", "Noto Nastaliq Urdu", serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.2;
        text-align: center;
}

.epnp-root .epaper-nav-links {
        display: flex;
        gap: 8px;
        margin-inline-start: auto;
        text-align: left;
}

.epnp-root .epaper-nav-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 46px;
        border-radius: var(--epnp-radius);
        background: #050505;
        color: #fff;
        font-size: 28px;
        line-height: 1;
}

.epnp-root .epaper-nav-links a:hover {
        background: var(--epnp-accent);
        color: #111;
}

.epnp-root .epnp-dropdown {
        position: relative;
}

.epnp-root .epnp-dropdown-panel {
        position: absolute;
        top: calc(100% + 5px);
        right: 0;
        z-index: 1000;
        width: max-content;
        min-width: 190px;
        max-width: min(320px, 90vw);
        max-height: 360px;
        margin: 0;
        padding: 10px;
        overflow-y: auto;
        border: 1px solid #ddd;
        border-radius: var(--epnp-radius);
        background: #f7f7f7;
        box-shadow: 0 8px 20px rgb(0 0 0 / 25%);
        list-style: none;
        text-align: right;
}

.epnp-root .epnp-dropdown-panel li {
        width: 100%;
        margin: 0;
        padding: 0;
}

.epnp-root .epnp-dropdown-panel li + li {
        border-top: 1px solid #e5e5e5;
}

.epnp-root .epnp-dropdown-panel a {
        display: block;
        width: 100%;
        padding: 8px 10px;
        background: transparent;
        color: #333;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 14px;
        line-height: 1.4;
        text-align: right;
}

.epnp-root .epnp-dropdown-panel a:hover,
.epnp-root .epnp-dropdown-panel a[aria-current="page"] {
        background: #e9e9e9;
        color: #000;
}

.epnp-root .archive-controls .epaper-buttons {
        width: 180px;
        max-width: 180px;
}

.epnp-root .archive-controls .epnp-control-button {
        padding-inline: 15px;
}

.epnp-root .epaper-search-box {
        position: relative;
        width: 50%;
        margin-inline-start: auto;
        padding-inline: 10px;
}

.epnp-root .epaper-ajax-search {
        width: 100%;
        height: 46px;
        margin: 0;
        padding: 9px 12px;
        border: 1px solid #ccc;
        border-radius: var(--epnp-radius);
        background: #fff;
        color: #222;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 16px;
        direction: auto;
}

.epnp-root .epnp-search-results {
        position: absolute;
        top: calc(100% + 5px);
        left: 10px;
        z-index: 1001;
        width: calc(100% - 20px);
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: var(--epnp-radius);
        background: #f7f7f7;
        box-shadow: 0 8px 20px rgb(0 0 0 / 25%);
        color: #333;
        direction: rtl;
}

.epnp-root .epnp-search-results > a {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px;
        border-radius: 3px;
        color: #222;
        text-align: right;
}

.epnp-root .epnp-search-results > a + a {
        border-top: 1px solid #e3e3e3;
}

.epnp-root .epnp-search-results > a:hover {
        background: #e7e7e7;
}

.epnp-root .epnp-search-results img {
        width: 46px;
        height: 58px;
        flex: 0 0 auto;
        object-fit: cover;
}

.epnp-root .epnp-search-results span {
        display: grid;
        min-width: 0;
}

.epnp-root .epnp-search-results strong,
.epnp-root .epnp-search-results small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
}

.epnp-root .epnp-search-results small {
        color: #666;
        font-size: 12px;
}

.epnp-root .epnp-search-results p {
        margin: 0;
        padding: 10px;
        color: #333;
}

.epnp-root .epaper-thumbs-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        align-items: flex-start !important;
        align-content: flex-start;
        width: 100%;
        height: auto !important;
        margin: 20px 0;
        padding: 10px 10px 20px;
        overflow-x: auto;
        overflow-y: visible;
        border-radius: var(--epnp-radius);
        background: #f0f0f0;
        scrollbar-width: thin;
}

.epnp-root .epaper_nav_thumb {
        position: relative;
        display: block;
        width: 100px;
        min-width: 100px;
        height: auto !important;
        flex: 0 0 auto;
        align-self: flex-start;
        margin: 0;
        padding: 0;
        overflow: visible !important;
        border: 5px solid #fff;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        cursor: pointer;
        line-height: 0;
}

.epnp-root .epaper_nav_thumb.active {
        border-color: var(--epnp-accent);
}

.epnp-root .epaper_nav_thumb img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0;
        vertical-align: top;
        object-fit: contain !important;
}

.epnp-root .epaper_nav_thumb .page-count {
        position: absolute;
        left: 0;
        bottom: 0;
        display: block;
        width: 100%;
        padding: 5px;
        background: rgb(0 0 0 / 78%);
        color: #fff;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 13px;
        line-height: 1.2;
        text-align: center;
        text-transform: uppercase;
}

.epnp-root .epaper_nav_thumb .arrow-bottom {
        position: absolute;
        bottom: -19px;
        left: 50%;
        display: none;
        width: 0;
        height: 0;
        margin-left: -10px;
        border-width: 14px 10px 0;
        border-style: solid;
        border-color: var(--epnp-accent) transparent transparent;
}

.epnp-root .epaper_nav_thumb.active .arrow-bottom {
        display: block;
}

.epnp-root .epaper-preview {
        position: relative;
        width: 100%;
        min-height: 420px;
        margin: 0;
        overflow: hidden;
        background: #eee;
        text-align: center;
}

.epnp-root .epaper-preview > img {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 auto;
}

.epnp-root .epnp-loading {
        position: absolute;
        inset: 0;
        z-index: 10;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 80px;
        background: rgb(0 0 0 / 72%);
        color: #fff;
        font-size: 18px;
}

.epnp-root .epnp-image-error {
        position: absolute;
        inset: 30px;
        z-index: 11;
        margin: 0;
        padding: 16px;
        border-radius: var(--epnp-radius);
        background: #fff0f0;
        color: #8a1f11;
}

.epnp-root .img-magnifier-glass {
        position: absolute;
        z-index: 5;
        width: min(500px, 48%);
        height: 200px;
        border: 3px solid #000;
        border-radius: 5px;
        background-color: #fff;
        background-repeat: no-repeat;
        box-shadow: 0 5px 18px rgb(0 0 0 / 40%);
        pointer-events: none;
}

.epnp-root .epnp-empty {
        margin: 20px 0;
        padding: 28px;
        border: 1px solid #ddd;
        border-radius: var(--epnp-radius);
        background: #f7f7f7;
        font-size: 18px;
        text-align: center;
}

.epnp-root .epnp-archive-description {
        margin-top: 8px;
        color: #555;
}

.epnp-root .epnp-archive-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px 18px;
        margin-top: 22px;
}

.epnp-root.epnp-columns-1 .epnp-archive-grid {
        grid-template-columns: minmax(0, 1fr);
}

.epnp-root.epnp-columns-2 .epnp-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
}

.epnp-root.epnp-columns-3 .epnp-archive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
}

.epnp-root .epnp-archive-card {
        min-width: 0;
        margin: 0;
        padding: 10px;
        border: 1px solid #e3e3e3;
        border-radius: var(--epnp-radius);
        background: #fff;
        box-shadow: 0 2px 8px rgb(0 0 0 / 7%);
        transition: transform 160ms ease, box-shadow 160ms ease;
}

.epnp-root .epnp-archive-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 18px rgb(0 0 0 / 14%);
}

.epnp-root .epnp-card-cover {
        display: block;
        width: 100%;
        overflow: hidden;
        background: #e9e9e9;
}

.epnp-root .epnp-card-cover img {
        display: block;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0;
        object-fit: contain !important;
}

.epnp-cover-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 180px;
        background: linear-gradient(145deg, #efefef, #d4d4d4);
        color: #777;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: .08em;
}

.epnp-root .epnp-card-content {
        text-align: center;
}

.epnp-root .epnp-card-content h2 {
        margin: 10px 0 4px;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
}

.epnp-root .epnp-card-content h2 a {
        color: #161616;
}

.epnp-root .epnp-card-content time {
        display: block;
        color: #707070;
        font-size: 13px;
}

.epnp-root .epnp-pagination {
        margin-top: 30px;
}

.epnp-root .epnp-pagination .nav-links,
.epnp-root .epnp-pagination .page-numbers {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 0;
        padding: 0;
        list-style: none;
}

.epnp-root .epnp-pagination a.page-numbers,
.epnp-root .epnp-pagination span.page-numbers,
.epnp-root .epnp-pagination .page-numbers a,
.epnp-root .epnp-pagination .page-numbers span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
        padding: 6px 10px;
        border-radius: var(--epnp-radius);
        background: #111;
        color: #fff;
}

.epnp-root .epnp-pagination .current {
        background: var(--epnp-accent) !important;
        color: #111 !important;
}

.epnp-comments {
        width: 100%;
        max-width: 1280px;
        margin: 30px auto 0;
}

/* Sidebar slider widget */
.epnp-widget {
        --epnp-accent: #f4ac04;
        --epnp-radius: 4px;
        position: relative;
        width: 100%;
}

.epnp-widget .epnp-widget-slider {
        position: relative;
        width: 100%;
        height: auto;
        overflow: hidden;
        text-align: center;
}

.epnp-widget .epnp-widget-slide {
        width: 100%;
        margin: 0;
}

.epnp-widget .epnp-widget-cover {
        display: block;
        width: 100%;
        margin: 0 0 5px;
        overflow: hidden;
        background: #eee;
}

.epnp-widget .epnp-widget-cover img {
        display: block;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0;
        object-fit: contain !important;
}

.epnp-widget .epnp-widget-slide h4 {
        margin: 5px 0;
        font-size: 22px;
        line-height: 1.35;
        text-align: center;
}

.epnp-widget .epnp-widget-slide h4 a {
        display: block;
        width: 100%;
        padding: 10px;
        border-radius: var(--epnp-radius);
        background: #101010;
        color: #fff;
}

.epnp-widget .epnp-widget-nav {
        position: absolute;
        top: 45%;
        left: 0;
        display: flex;
        justify-content: space-between;
        width: 100%;
        pointer-events: none;
}

.epnp-widget .epnp-widget-nav button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 44px;
        padding: 0;
        border: 0;
        background: rgb(0 0 0 / 74%);
        color: #fff;
        cursor: pointer;
        font-size: 24px;
        pointer-events: auto;
}

.epnp-widget .epnp-widget-nav button:hover {
        background: var(--epnp-accent);
        color: #111;
}

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

@media (max-width: 1024px) {
        .epnp-root .epnp-archive-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        .epnp-root.epnp-columns-1 .epnp-archive-grid {
                grid-template-columns: minmax(0, 1fr);
        }
        .epnp-root.epnp-columns-2 .epnp-archive-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .epnp-root .epnp-control-button {
                padding-inline: 14px;
                font-size: 18px;
        }
}

@media (max-width: 768px) {
        .epnp-site-main {
                padding: 16px 12px 36px;
        }
        .epnp-root .epaper-control-row {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
                padding: 10px;
        }
        .epnp-root .epaper-control-row > *,
        .epnp-root .archive-controls .epaper-buttons,
        .epnp-root .epaper-search-box,
        .epnp-root .posted-on,
        .epnp-root .epaper-nav-links {
                width: 100%;
                max-width: none;
                margin: 0;
        }
        .epnp-root .epaper-nav-links {
                justify-content: center;
        }
        .epnp-root .epaper-nav-links a {
                width: 50%;
        }
        .epnp-root .epaper-search-box {
                padding: 0;
        }
        .epnp-root .epnp-search-results {
                left: 0;
                width: 100%;
        }
        .epnp-root .epnp-dropdown-panel {
                position: static;
                width: 100%;
                max-width: none;
                margin-top: 5px;
        }
        .epnp-root .epnp-archive-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 16px 12px;
        }
        .epnp-root.epnp-columns-1 .epnp-archive-grid {
                grid-template-columns: minmax(0, 1fr);
        }
        .epnp-root.epnp-columns-3 .epnp-archive-grid,
        .epnp-root.epnp-columns-4 .epnp-archive-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .epnp-root .epaper_nav_thumb {
                width: 95px;
                min-width: 95px;
                height: auto !important;
        }
        .epnp-root .epaper_nav_thumb img {
                height: auto !important;
        }
        .epnp-root .epaper-preview {
                min-height: 180px;
        }
        .epnp-root .img-magnifier-glass {
                display: none !important;
        }
}

@media (max-width: 480px) {
        .epnp-root .epnp-archive-grid,
        .epnp-root.epnp-columns-1 .epnp-archive-grid,
        .epnp-root.epnp-columns-2 .epnp-archive-grid,
        .epnp-root.epnp-columns-3 .epnp-archive-grid,
        .epnp-root.epnp-columns-4 .epnp-archive-grid {
                grid-template-columns: 1fr;
        }
        .epnp-root .epnp-archive-card {
                max-width: 360px;
                margin-inline: auto;
        }
        .epnp-root .epaper_nav_thumb {
                width: 82px;
                min-width: 82px;
                height: auto !important;
        }
        .epnp-root .epaper_nav_thumb img {
                height: auto !important;
                max-height: none !important;
        }
}

@media (prefers-reduced-motion: reduce) {
        .epnp-root *,
        .epnp-widget * {
                scroll-behavior: auto !important;
                transition-duration: .01ms !important;
                animation-duration: .01ms !important;
        }
}