/* ePaper extra CSS v1.1.0 - Developed by BSMAURYA (https://bsmaurya.com/)
   Loads AFTER epaper.css, so these rules make zoom / clip / modal work reliably. */

/* ---------- ZOOM ---------- */
#main_img_div { position: relative; }

#zoomViewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;            /* 1 finger scrolls page, 2 fingers = pinch zoom */
    -webkit-user-select: none;
    user-select: none;
}
#zoomViewport.is-zoomed   { touch-action: none; cursor: grab; }
#zoomViewport.is-dragging { cursor: grabbing; }
#zoomViewport [data-elem="pinchzoomer"] { transform-origin: 0 0; }   /* no will-change: it makes zoomed text blurry */
#zoomViewport img { image-rendering: auto; }
#zoomViewport img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

.viewer-ui {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 14;
    pointer-events: none;
}
.zoom-controls {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 40px;
    margin: 10px 10px 0 auto;
    pointer-events: auto;
}
.page-arrows {
    position: sticky;
    top: calc(50vh - 28px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 56px;
    pointer-events: none;
}
.page-arrow {
    width: 30px;
    height: 56px;
    border: 0;
    padding: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}
.page-arrow:first-child { border-radius: 0 4px 4px 0; }
.page-arrow:last-child  { border-radius: 4px 0 0 4px; }
.page-arrow:hover { background: rgba(255,108,55,.9); }
.page-arrow.is-hidden { visibility: hidden; pointer-events: none; }
@media (max-width: 768px) {
    .page-arrow { width: 26px; height: 48px; }
    .zoom-controls { display: none !important; }
}
.zoom-controls button {
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: rgba(255,255,255,.92);
    color: #333;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.zoom-controls button#zoomResetBtn { font-size: 11px; }
.zoom-controls button:hover { background: #ff6c37; color: #fff; border-color: #ff6c37; }
#main_img_div.overlay-on .viewer-ui { display: none; }

/* ---------- CLIP TOOL ---------- */
#clipOverlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 20;
    touch-action: none;
    cursor: crosshair;
}
#cropRect {
    position: absolute;
    left: 20%; top: 10%;
    width: 60%; height: 30%;
    border: 2px dashed #ff6c37;
    background: rgba(255,108,55,.12);
    cursor: move;
    touch-action: none;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}
#cropRect .handle {
    position: absolute;
    width: 12px; height: 12px;
    background: #fff;
    border: 2px solid #ff6c37;
    border-radius: 50%;
    z-index: 2;
    touch-action: none;
    box-sizing: border-box;
}
#cropRect .handle.tl { left: -7px;  top: -7px;    cursor: nwse-resize; }
#cropRect .handle.tr { right: -7px; top: -7px;    cursor: nesw-resize; }
#cropRect .handle.bl { left: -7px;  bottom: -7px; cursor: nesw-resize; }
#cropRect .handle.br { right: -7px; bottom: -7px; cursor: nwse-resize; }
#cropRect .handle.tm { left: 50%; top: -7px;    margin-left: -6px; cursor: ns-resize; }
#cropRect .handle.bm { left: 50%; bottom: -7px; margin-left: -6px; cursor: ns-resize; }
#cropRect .handle.ml { left: -7px;  top: 50%; margin-top: -6px; cursor: ew-resize; }
#cropRect .handle.mr { right: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }

@media (pointer: coarse) {
    #cropRect .handle { width: 24px; height: 24px; }
    #cropRect .handle.tl { left: -13px;  top: -13px; }
    #cropRect .handle.tr { right: -13px; top: -13px; }
    #cropRect .handle.bl { left: -13px;  bottom: -13px; }
    #cropRect .handle.br { right: -13px; bottom: -13px; }
    #cropRect .handle.tm { top: -13px;    margin-left: -12px; }
    #cropRect .handle.bm { bottom: -13px; margin-left: -12px; }
    #cropRect .handle.ml { left: -13px;  margin-top: -12px; }
    #cropRect .handle.mr { right: -13px; margin-top: -12px; }
}

#cropButtons {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: inline-flex;
    gap: 6px;
    z-index: 9999;
    cursor: default;
    pointer-events: auto;
    white-space: nowrap;
}
#cropRect.buttons-top #cropButtons {
    top: auto;
    bottom: calc(100% + 8px);
}

#cropButtons span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #ff6c37;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    pointer-events: auto;
    transition: transform 0.15s ease, filter 0.15s ease;
}
#cropButtons span:hover {
    filter: brightness(1.1);
}
#cropButtons span:active {
    transform: scale(0.96);
}
#cropButtons span.crop-btn-save { background: #0073aa; }
#cropButtons span.crop-btn-share { background: #28a745; }
#cropButtons span#cancelBtn, #cropButtons span.crop-btn-cancel { background: #555555; }

#Loading_id {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.65);
}

/* ---------- CLIP MODAL ---------- */
#clip_modal {
    display: none;
    position: fixed;
    z-index: 10000;
    width: 380px;
    max-width: 94vw;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
#clip_modal .clip-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #ff6c37;
    color: #fff;
    font-weight: 600;
    cursor: move;
    touch-action: none;
}
#clip_modal .clip-modal-header p { margin: 0; }

/* ---------- TOAST ---------- */
#epaper_toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 10001;
    max-width: 90vw;
    padding: 10px 18px;
    background: rgba(30,30,30,.92);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
#epaper_toast.show { opacity: 1; }

/* ---------- FOOTER ---------- */
.epaper-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}
.epaper-footer .footer-links a:hover,
.epaper-footer .developer-credit a:hover { text-decoration: underline; }
.epaper-footer .developer-credit { margin-top: 4px; font-size: 13px; }
.epaper-footer .developer-credit a { font-weight: 700; color: #ff6c37; }

/* ---------- SOCIAL BUTTONS: single sleek row on all devices ---------- */
.page-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
ul.social-media-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}
ul.social-media-list li.social-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    transition: transform 0.15s ease, opacity 0.2s ease !important;
}
ul.social-media-list li.social-btn:hover {
    opacity: 0.9 !important;
    transform: scale(1.05) !important;
}
ul.social-media-list li.social-btn svg {
    width: 14px !important;
    height: 14px !important;
    fill: #ffffff !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .page-header {
        padding: 6px 2px !important;
        gap: 6px !important;
    }
    .page-header h1,
    .page-header #edition_page_name_label {
        font-size: 13.5px !important;
        line-height: 1.25 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    ul.social-media-list {
        gap: 4px !important;
    }
    ul.social-media-list li.social-btn {
        width: 24px !important;
        height: 24px !important;
        border-radius: 3px !important;
    }
    ul.social-media-list li.social-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}


/* ---------- HD (crisp) ZOOM LAYER ---------- */
#zoomCrisp {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    z-index: 2;
    display: none;
    pointer-events: none;
}
#zoomViewport.crisp-on::after {
    content: 'HD';
    position: absolute;
    left: 6px; top: 6px;
    z-index: 3;
    padding: 2px 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    pointer-events: none;
}

/* ============================================================
   BRAND LOGO (विश्व प्रवाह + Sun Graphic)
   ============================================================ */
.brand-masthead-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.vp-logo-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 4px 0;
}
.vp-sun-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.vp-sun-icon .sun-svg {
    display: block;
    width: 60px;
    height: 31px;
}
.vp-logo-text {
    font-family: 'Mukta', 'Poppins', sans-serif;
    font-size: 27px;
    font-weight: 800;
    color: #000000;
    line-height: 1.1;
    margin-top: -3px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ============================================================
   TOP HEADER BAR & HAMBURGER
   ============================================================ */
.top-header-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}
.main-logo-div {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.mobile-hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #111111;
    border-radius: 4px;
    line-height: 1;
}
.mobile-hamburger-btn:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .main-logo-div {
        justify-content: center !important;
        position: relative;
        padding: 4px 10px;
    }
    .mobile-hamburger-btn {
        display: flex !important;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 100;
    }
    .header-nav-links {
        display: none !important;
    }
    .vp-sun-icon .sun-svg {
        width: 50px;
        height: 26px;
    }
    .vp-logo-text {
        font-size: 22px;
    }
}

/* ============================================================
   BLACK NAVIGATION BAR (🏠 | उत्तर प्रदेश ▼ | मुरादाबाद ▼ ...)
   ============================================================ */
.city-edition-bar {
    background-color: #000000 !important;
    padding: 0 !important;
    border-top: 1px solid #1c1c1c;
}
.city-nav-wrap {
    display: flex;
    align-items: center;
    background-color: #000000;
    padding: 0 4px;
}

/* Desktop: Categories are centered */
@media (min-width: 769px) {
    .city-nav-wrap {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile: Horizontally scrollable without breaking */
@media (max-width: 768px) {
    .city-nav-wrap {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 4px;
    }
    .city-nav-wrap::-webkit-scrollbar {
        display: none;
    }
}

.nav-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: 8px 10px;
    text-decoration: none;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}
.nav-home-btn:hover {
    color: #ff6c37;
}

.nav-pipe-divider {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-weight: 300;
    margin: 0 2px;
    user-select: none;
    pointer-events: none;
    flex-shrink: 0;
}

.city-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.city-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-family: 'Mukta', 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}
.city-nav-link:hover,
.city-nav-item.active-cat > .city-nav-link {
    color: #ff6c37;
}
.dropdown-caret {
    font-size: 8px;
    color: #ffffff;
    opacity: 0.85;
    margin-left: 3px;
    transition: transform 0.2s;
}

/* Category Dropdown Menu */
.city-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #000000;
    border: 1px solid #333333;
    border-top: 2px solid #ff6c37;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    z-index: 99999;
    border-radius: 0 0 4px 4px;
    padding: 2px 0;
}

.city-dropdown-sublink {
    display: block;
    color: #f1f1f1;
    padding: 9px 14px;
    font-family: 'Mukta', 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.15s;
    white-space: nowrap;
}
.city-dropdown-sublink:last-child {
    border-bottom: none;
}
.city-dropdown-sublink:hover,
.city-dropdown-sublink.is-active {
    background: #ff6c37;
    color: #ffffff;
    padding-left: 18px;
}

/* Desktop hover & Mobile open states */
@media (min-width: 769px) {
    .city-nav-item:hover .city-dropdown-menu,
    .city-nav-item.is-open .city-dropdown-menu {
        display: block;
    }
    .city-nav-item:hover .dropdown-caret,
    .city-nav-item.is-open .dropdown-caret {
        transform: rotate(180deg);
    }
}
@media (max-width: 768px) {
    .city-nav-item.is-open .city-dropdown-menu {
        display: block;
    }
    .city-nav-item.is-open .dropdown-caret {
        transform: rotate(180deg);
    }
}

/* ============================================================
   CATEGORY ARCHIVE & CATALOG GRID (Screenshot 2 exact replica)
   ============================================================ */
.category-catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 10px 40px;
    min-height: 65vh;
}
.category-section-block {
    margin-bottom: 30px;
}

.category-title-header {
    text-align: center;
    margin: 10px auto 14px;
    padding: 0 10px;
}
.category-main-title {
    font-family: 'Mukta', 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #111111;
    margin: 0 0 10px 0;
    text-align: center;
    letter-spacing: 0.3px;
}
.category-title-divider {
    width: 100%;
    max-width: 1100px;
    height: 1px;
    background: #dfdfdf;
    margin: 0 auto;
}

/* 2 columns on mobile, 4-5 on desktop */
.category-grid-wrapper {
    margin-top: 14px;
}
.editions-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 600px) {
    .editions-grid-layout {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}
@media (min-width: 992px) {
    .editions-grid-layout {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.catalog-edition-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #d2d2d2;
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.catalog-edition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.14);
}

.catalog-card-header {
    background: #f36523;
    background: linear-gradient(135deg, #ff6c37 0%, #e55a28 100%);
    color: #ffffff;
    text-align: center;
    font-family: 'Mukta', 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 7px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.catalog-card-img-wrap {
    width: 100%;
    background: #fbfbfb;
    aspect-ratio: 1 / 1.45;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catalog-card-date {
    font-size: 11.5px;
    color: #666666;
    text-align: center;
    padding: 5px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    font-family: 'Poppins', sans-serif;
}

/* ============================================================
   MOBILE SIDEBAR HIERARCHICAL ITEMS
   ============================================================ */
.sidebar-header {
    padding: 12px 18px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}
.sidebar-brand-name {
    font-family: 'Mukta', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ff6c37;
}
.sidebar-logo-img {
    max-height: 40px;
    max-width: 160px;
}
.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    padding: 10px 18px 4px;
    letter-spacing: 0.5px;
}
.sidebar-parent-cat {
    font-weight: 700 !important;
    background: #f2f2f2;
}
.sidebar-sub-link {
    display: block;
    padding: 8px 18px 8px 32px !important;
    color: #333333 !important;
    font-size: 13px !important;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0 !important;
}
.sidebar-sub-link:hover {
    background: #ff6c37 !important;
    color: #ffffff !important;
}

