/* ========================================================
   SYSTEM B: WEEKLY E-NEWSPAPER (साप्ताहिक ई-अखबार) STYLESHEET
   5 Distinct Layout Templates, 8-Page Reader & Curation Styles
   ======================================================== */

/* Public Archive Card */
.epaper-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.epaper-edition-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.edition-cover-wrapper {
    height: 340px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.edition-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edition-placeholder-cover {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    padding: 20px;
    text-align: center;
}

.ph-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
}

.edition-page-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.edition-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.edition-date-tag {
    font-size: 12px;
    color: var(--text-muted);
}

.edition-title {
    font-size: 18px;
    font-weight: 800;
    margin: 6px 0 2px;
}

.edition-issue-meta {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 14px;
}

.edition-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================================
   8-PAGE INTERACTIVE READER STYLES
   ======================================================== */
.epaper-reader-wrapper {
    background: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.reader-toolbar {
    background: #0f172a;
    color: #fff;
    padding: 10px 0;
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.reader-toolbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-link {
    background: #1e293b;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.reader-edition-meta .meta-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
}

.reader-edition-meta .meta-date {
    font-size: 12px;
    color: #94a3b8;
}

.page-nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e293b;
    padding: 4px 12px;
    border-radius: 6px;
}

.btn-page-nav {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 8px;
}

.btn-page-nav.disabled {
    color: #64748b;
    pointer-events: none;
}

.page-indicator {
    font-size: 14px;
    padding: 0 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Reader Paper Sheet Container */
.reader-stage-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 30px 16px 80px;
    overflow-x: auto;
}

.reader-paper-sheet, .epaper-page-canvas {
    background: #fff;
    width: 100%;
    max-width: 900px;
    min-height: 1280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid #cbd5e1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease-out;
}

.sheet-top-header, .page-top-dateline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 6px;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 700;
}

.sheet-brand-name, .masthead-name {
    font-family: var(--font-heading);
    font-size: 18px;
    color: #000;
}

.sheet-bottom-footer, .page-bottom-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #000;
    padding-top: 6px;
    margin-top: 24px;
    font-size: 11px;
    color: #444;
}

/* Bottom Page Navigation Thumbnails */
.reader-bottom-nav {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.page-thumbs-strip {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.thumb-item {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 6px 12px;
    border-radius: 4px;
    text-align: center;
    min-width: 90px;
    color: #cbd5e1 !important;
}

.thumb-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
}

.thumb-badge {
    display: block;
    font-weight: 800;
    font-size: 12px;
}

.thumb-title {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100px;
}

/* Empty Slot Placeholder in Editor */
.epaper-empty-slot {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 8px 0;
}

.slot-name {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #475569;
}

.slot-hint {
    font-size: 12px;
    color: #94a3b8;
}

/* ========================================================
   TEMPLATE 1: CLASSIC BROADSHEET (पारंपरिक 8-कॉलम)
   ======================================================== */
.layout-classic .classic-banner-section {
    margin-bottom: 16px;
}

.layout-classic .classic-kicker {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.layout-classic .classic-banner-headline {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
    color: #000;
    margin-bottom: 6px;
}

.layout-classic .classic-subhead {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.layout-classic .classic-banner-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

.layout-classic .classic-banner-media img {
    width: 100%;
    border: 1px solid #000;
}

.layout-classic .classic-caption {
    font-size: 11px;
    color: #555;
    display: block;
    margin-top: 4px;
}

.layout-classic .classic-banner-columns {
    font-size: 14px;
    line-height: 1.6;
    column-count: 2;
    column-gap: 16px;
    text-align: justify;
}

.classic-divider-rule {
    border-top: 2px solid #000;
    border-bottom: 1px solid #000;
    height: 3px;
    margin: 14px 0;
}

.layout-classic .classic-lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.layout-classic .classic-story-headline {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
}

.layout-classic .classic-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.layout-classic .classic-box-story p,
.layout-classic .classic-anchor-box p,
.layout-classic .classic-sidebar-feed p {
    font-size: 13px;
    line-height: 1.55;
    text-align: justify;
}

.layout-classic .classic-anchor-box {
    border: 1px solid #000;
    padding: 12px;
    background: #fbfbf9;
}

.layout-classic .anchor-label {
    background: #000;
    color: #fff;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 6px;
}

.layout-classic .feed-header {
    background: var(--primary);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ========================================================
   TEMPLATE 2: MODERN VISUAL TABLOID (आधुनिक टैब्लॉयड)
   ======================================================== */
.layout-tabloid .tabloid-hero-wrapper {
    margin-bottom: 16px;
}

.layout-tabloid .tabloid-hero-img-box {
    position: relative;
    max-height: 320px;
    overflow: hidden;
    border: 1px solid #000;
    margin-bottom: 12px;
}

.layout-tabloid .tabloid-hero-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-tabloid .tabloid-tag-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

.layout-tabloid .tabloid-main-headline {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 900;
    line-height: 1.18;
    color: #000;
    margin-bottom: 8px;
}

.layout-tabloid .tabloid-pullquote {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    margin: 10px 0;
}

.layout-tabloid .tabloid-hero-text p {
    font-size: 14px;
    line-height: 1.6;
    column-count: 2;
    column-gap: 16px;
    text-align: justify;
}

.tabloid-accent-line {
    height: 4px;
    background: #000;
    margin: 16px 0;
}

.layout-tabloid .tabloid-columns-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.layout-tabloid .tabloid-card {
    border-top: 2px solid #000;
    padding-top: 8px;
}

.layout-tabloid .tabloid-badge-red {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
}

.layout-tabloid .tabloid-badge-dark {
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
}

.layout-tabloid .tabloid-story-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    margin: 6px 0;
}

.layout-tabloid .tabloid-card p {
    font-size: 13px;
    line-height: 1.55;
    text-align: justify;
}

/* ========================================================
   TEMPLATE 3: EDITORIAL & OPINION (संपादकीय एवं विचार)
   ======================================================== */
.layout-editorial .editorial-top-masthead {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.layout-editorial .editorial-page-banner {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 900;
    margin: 4px 0;
}

.layout-editorial .editorial-quote {
    font-size: 13px;
    color: #555;
    font-style: italic;
}

.layout-editorial .editorial-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
}

.layout-editorial .editorial-stamp {
    border-bottom: 1px solid var(--primary);
    padding-bottom: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.layout-editorial .editorial-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 8px;
}

.layout-editorial .editorial-intro {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.layout-editorial .editorial-body-columns p {
    font-size: 14px;
    line-height: 1.65;
    column-count: 2;
    column-gap: 16px;
    text-align: justify;
}

.layout-editorial .author-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.layout-editorial .author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #000;
}

.layout-editorial .author-name {
    display: block;
    font-weight: 700;
    font-size: 14px;
}

.layout-editorial .column-name {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
}

.layout-editorial .guest-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.layout-editorial .guest-body {
    font-size: 13px;
    line-height: 1.55;
    text-align: justify;
}

.layout-editorial .letters-box {
    margin-top: 20px;
    background: #fbfbf9;
    border: 1px solid #999;
    padding: 12px;
}

.layout-editorial .letters-header {
    background: #000;
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.layout-editorial .letter-topic {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.layout-editorial .letter-text {
    font-size: 12px;
    line-height: 1.5;
}

/* ========================================================
   TEMPLATE 4: PHOTOJOURNALISM FEATURE (फोटो-फीचर)
   ======================================================== */
.layout-photo .photo-centerpiece-section {
    margin-bottom: 20px;
}

.layout-photo .centerpiece-frame {
    position: relative;
    max-height: 380px;
    overflow: hidden;
    border: 2px solid #000;
    margin-bottom: 10px;
}

.layout-photo .centerpiece-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-photo .photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.layout-photo .centerpiece-headline {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
}

.layout-photo .centerpiece-narrative {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
}

.layout-photo .photo-gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.layout-photo .photo-gallery-card {
    border-top: 2px solid #000;
    padding-top: 8px;
}

.layout-photo .gallery-img-box {
    height: 140px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #000;
}

.layout-photo .gallery-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-photo .gallery-headline {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.layout-photo .gallery-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #333;
}

/* ========================================================
   TEMPLATE 5: METRO REGIONAL GRID (मेट्रो प्रादेशिक ग्रिड)
   ======================================================== */
.layout-metro .metro-grid-header {
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.layout-metro .metro-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
}

.layout-metro .metro-tagline {
    font-size: 12px;
    color: #666;
}

.layout-metro .metro-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.layout-metro .metro-city-card {
    border: 1px solid #111;
    padding: 10px;
    background: #fbfbf9;
    display: flex;
    flex-direction: column;
}

.layout-metro .city-badge {
    background: #111;
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.layout-metro .city-headline {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.3;
}

.layout-metro .city-thumb {
    height: 100px;
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid #ccc;
}

.layout-metro .city-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-metro .city-text {
    font-size: 12px;
    line-height: 1.5;
    color: #222;
    text-align: justify;
}

/* ========================================================
   ADMIN 8-PAGE EDITOR STYLES
   ======================================================== */
.epaper-page-tabs {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.page-tab {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.page-tab:hover {
    border-color: var(--primary);
}

.page-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(197, 26, 26, 0.25);
}

.tab-number {
    display: block;
    font-weight: 800;
    font-size: 14px;
}

.tab-title {
    font-size: 11px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0;
}

.tab-tpl-name {
    font-size: 10px;
    opacity: 0.8;
    display: block;
    text-transform: capitalize;
}

.editor-controls-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.epaper-preview-stage {
    display: flex;
    justify-content: center;
    background: #475569;
    padding: 24px;
    border-radius: 6px;
    overflow-x: auto;
}
