:root {
    --brand-primary: #8B1E24;
    --brand-accent: #D49A3A;
    --bg-paper: #FAF7F2;
    --bg-card: #FFFFFF;
    --text-main: #1F1F1F;
    --text-muted: #666666;
    --border-color: #E4DDD2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Georgia, serif;
    background: var(--bg-paper);
    color: var(--text-main);
    line-height: 1.55;
}
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 18px; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Header */
.site-header {
    background: var(--brand-primary);
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.brand-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--brand-accent); color: #1a1a1a;
    font-weight: 800; font-family: Georgia, serif;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.brand-name { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: 0.75rem; opacity: 0.85; letter-spacing: 0.5px; }
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: #fff; font-size: 0.95rem; font-weight: 500; }

/* Buttons */
.btn {
    display: inline-block; padding: 9px 18px; border-radius: 6px;
    font-weight: 600; font-size: 0.92rem; cursor: pointer;
    border: 1px solid transparent; transition: all 0.15s; text-decoration: none !important;
}
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-accent { background: var(--brand-accent); color: #1a1a1a; }
.btn-outline { background: transparent; border-color: var(--border-color); color: var(--text-main); }
.site-header .btn-outline { border-color: rgba(255,255,255,0.45); color: #fff; }
.btn-outline-light { background: transparent; border: 1px solid rgba(255,255,255,0.6); color: #fff; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-facebook { background: #1877F2; color: #fff; }
.btn-twitter { background: #111; color: #fff; }

/* Hero & Sections */
.hero-section {
    background: linear-gradient(135deg, #5e1116, var(--brand-primary));
    color: #fff; padding: 48px 0;
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 36px; align-items: center; }
.hero-section h1 { font-family: Georgia, serif; font-size: 2.5rem; line-height: 1.15; margin: 12px 0; }
.hero-section p { font-size: 1.05rem; opacity: 0.92; margin-bottom: 22px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cover img { border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,0.35); max-height: 360px; margin: 0 auto; }
.cover-caption { text-align: center; font-size: 0.85rem; margin-top: 8px; color: #F5D08A; }
.pill { display: inline-block; background: var(--brand-accent); color: #1a1a1a; padding: 4px 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }

.section { padding: 40px 0; }
.section-compact { padding: 16px 0; }
.section-alt { background: #F2ECE1; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-header h2, .section-header h3 { font-family: Georgia, serif; }

/* Cards & Grids */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; }
.featured-issue-card {
    display: grid; grid-template-columns: 280px 1fr; gap: 26px;
    background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 22px;
}
.featured-cover img { border-radius: 6px; border: 1px solid var(--border-color); }
.toc-list ul { list-style: none; margin-top: 10px; }
.toc-list li { padding: 6px 0; border-bottom: 1px dashed var(--border-color); }
.pg-badge { display: inline-block; background: #eee6d8; color: var(--brand-primary); font-weight: 700; font-size: 0.75rem; padding: 2px 7px; border-radius: 4px; margin-right: 6px; }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.issue-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: transform 0.15s; }
.issue-card:hover { transform: translateY(-3px); }
.issue-thumb {
    width: 100%;
    height: auto;
    min-height: 260px;
    background: #FAF7F2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
}
.issue-thumb img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}
.issue-card-body { padding: 14px; }
.issue-date { font-size: 0.8rem; color: var(--brand-primary); font-weight: 600; }
.issue-card-body h3 { font-family: Georgia, serif; font-size: 1rem; color: var(--text-main); margin: 4px 0; }
.issue-meta { font-size: 0.82rem; color: var(--text-muted); }

/* CTA & Pricing */
.cta-banner { background: #221c1a; color: #fff; padding: 36px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; max-width: 780px; margin: 0 auto; }
.pricing-card { background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 26px; }
.pricing-card.featured { border: 2px solid var(--brand-primary); }
.pricing-card .price { font-size: 2rem; font-weight: 800; color: var(--brand-primary); margin: 12px 0; }
.pricing-card .price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pricing-card ul { list-style: none; margin: 16px 0 22px; }
.pricing-card li { padding: 5px 0; }
.pricing-card li::before { content: "✓ "; color: var(--brand-primary); font-weight: 700; }

/* Ads */
.ad-slot { position: relative; margin: 10px 0; text-align: center; }
.ad-badge { display: block; font-size: 0.68rem; text-transform: uppercase; color: #888; letter-spacing: 1px; margin-bottom: 4px; }
.ad-slot img { margin: 0 auto; border-radius: 6px; }
.ad-html-link { text-decoration: none !important; color: inherit; display: block; }

/* Reader */
.reader-toolbar { background: #231f20; color: #fff; padding: 10px 0; border-bottom: 2px solid var(--brand-accent); }
.toolbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-btn {
    background: #363233; color: #fff; border: 1px solid #4d4849;
    padding: 6px 11px; border-radius: 5px; cursor: pointer; font-size: 0.85rem; text-decoration: none !important;
}
.tool-btn.active, .tool-btn:hover { background: var(--brand-primary); border-color: var(--brand-accent); }
.form-select-sm { padding: 6px 10px; border-radius: 5px; border: 1px solid #555; background: #fff; color: #111; max-width: 280px; }

.reader-layout { display: grid; grid-template-columns: 150px 1fr 260px; gap: 18px; padding-top: 18px; padding-bottom: 36px; align-items: start; }
.reader-sidebar-left, .reader-sidebar-right { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; }
.thumb-list { display: flex; flex-direction: column; gap: 10px; max-height: 75vh; overflow-y: auto; margin-top: 10px; }
.thumb-item { background: none; border: 2px solid transparent; border-radius: 6px; padding: 4px; cursor: pointer; text-align: center; }
.thumb-item.active { border-color: var(--brand-primary); background: #fdf5e6; }
.thumb-item span { display: block; font-size: 0.78rem; margin-top: 4px; }

.reader-stage-wrap { overflow: auto; background: #e8e2d6; border-radius: 8px; padding: 16px; min-height: 75vh; }
.reader-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; transition: transform 0.2s; }
.epaper-page { position: relative; max-width: 780px; width: 100%; box-shadow: 0 8px 24px rgba(0,0,0,0.18); background: #fff; }
.epaper-page.flip-enter { animation: flipIn 0.28s ease-out; }
@keyframes flipIn { from { opacity: 0.4; transform: perspective(1000px) rotateY(-8deg); } to { opacity: 1; transform: none; } }

.area-overlay-layer { position: absolute; inset: 0; }
.area-hotspot {
    position: absolute; cursor: pointer;
    border: 2px solid transparent; transition: all 0.15s;
}
.area-overlay-layer.always-visible .area-hotspot {
    border-color: rgba(139, 30, 36, 0.75); background: rgba(212, 154, 58, 0.18);
}
.area-hotspot:hover {
    border-color: var(--brand-primary);
    background: rgba(212, 154, 58, 0.28);
    z-index: 5;
}
.area-hotspot-label {
    display: none; position: absolute; top: 0; left: 0;
    background: var(--brand-primary); color: #fff; font-size: 0.75rem; padding: 2px 7px;
}
.area-hotspot:hover .area-hotspot-label, .area-overlay-layer.always-visible .area-hotspot-label { display: inline-block; }

.article-index-list { list-style: none; margin-top: 10px; }
.article-index-list li { padding: 7px 0; border-bottom: 1px solid #f0ebe1; font-size: 0.88rem; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.modal-dialog { position: relative; background: #fff; border-radius: 10px; width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-dialog.modal-lg { max-width: 820px; }
.modal-header { padding: 14px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; flex-wrap: wrap; }
.clip-canvas-wrap { text-align: center; background: #f4f1ea; padding: 10px; border-radius: 6px; margin-bottom: 14px; }
#clipCanvas { max-width: 100%; height: auto; margin: 0 auto; border: 1px solid #ddd; }
.clip-linked-box { background: #fff7e6; border: 1px solid #e6c68a; padding: 12px; border-radius: 6px; margin-top: 12px; }
.search-form-row { display: flex; gap: 8px; margin-bottom: 14px; }
.search-result-item { display: block; padding: 10px; border-bottom: 1px solid var(--border-color); color: inherit; }
.search-result-title { font-weight: 700; color: var(--brand-primary); }
.search-result-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Forms & Alerts */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 5px; }
.form-control { width: 100%; padding: 9px 11px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.94rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.alert { padding: 12px 16px; border-radius: 6px; background: #fff3cd; border: 1px solid #ffe69c; margin-bottom: 16px; }
.alert-success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.alert-danger { background: #f8d7da; border-color: #f5c2c7; color: #842029; }

/* Admin Layout */
.admin-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #2c1517; }
.login-card { width: 100%; max-width: 400px; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #1e1a1b; color: #fff; padding: 18px 14px; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #333; margin-bottom: 16px; }
.admin-brand small { display: block; color: #aaa; font-size: 0.75rem; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { color: #ddd; padding: 9px 12px; border-radius: 6px; font-size: 0.92rem; }
.admin-nav a.active, .admin-nav a:hover { background: var(--brand-primary); color: #fff; text-decoration: none; }
.admin-nav hr { border: none; border-top: 1px solid #333; margin: 10px 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border-color); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.admin-topbar h1 { font-size: 1.35rem; font-family: Georgia, serif; }
.admin-content { padding: 22px 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; }
.stat-card span { display: block; font-size: 0.82rem; color: var(--text-muted); }
.stat-card strong { font-size: 1.7rem; color: var(--brand-primary); }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
.data-table th { background: #f8f5ef; font-weight: 700; }
.status-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 0.76rem; font-weight: 700; }
.status-published { background: #d1e7dd; color: #0f5132; }
.status-scheduled { background: #fff3cd; color: #664d03; }
.status-draft { background: #e2e3e5; color: #41464b; }
.progress-bar { width: 100%; height: 12px; background: #eee; border-radius: 99px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--brand-primary); transition: width 0.2s; }

/* Area Map Editor */
.editor-workspace { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 20px; align-items: start; }
.editor-stage-card { background: #fff; border: 1px solid var(--border-color); padding: 12px; border-radius: 8px; }
.editor-canvas-wrap { position: relative; user-select: none; cursor: crosshair; }
.editor-overlay-layer { position: absolute; inset: 0; }
.editor-box {
    position: absolute; border: 2px solid #8B1E24; background: rgba(212, 154, 58, 0.25);
    cursor: pointer; font-size: 0.72rem; overflow: hidden;
}
.editor-box span { background: #8B1E24; color: #fff; padding: 1px 5px; display: inline-block; }
.editor-box.drawing { border-style: dashed; background: rgba(139, 30, 36, 0.2); }
.admin-map-list { list-style: none; }
.admin-map-list li { padding: 7px 9px; border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 6px; cursor: pointer; }
.admin-map-list li:hover { background: #fdf6ea; }

/* Page Builder */
.builder-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.builder-item { border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; background: #fcfaf6; }
.builder-item.dragging { opacity: 0.5; border-style: dashed; }
.builder-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: grab; }
.drag-handle { font-size: 1.1rem; color: #888; }

/* Footer */
.site-footer { background: #1e1a1b; color: #ccc; padding: 36px 0 18px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.site-footer h4 { color: #F5D08A; margin-bottom: 10px; font-family: Georgia, serif; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #ddd; }
.footer-bottom { text-align: center; border-top: 1px solid #333; margin-top: 24px; padding-top: 14px; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 960px) {
    .hero-grid, .featured-issue-card, .reader-layout, .admin-grid-2, .editor-workspace, .admin-shell {
        grid-template-columns: 1fr;
    }
    .reader-sidebar-left { display: none; }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}


/* About Us Page (Justified) */
.about-card { max-width: 880px; margin: 0 auto; padding: 32px; }
.about-heading { font-family: Georgia, serif; color: var(--brand-primary); margin: 12px 0 18px; font-size: 1.9rem; }
.about-justified, .about-justified p { text-align: justify; text-justify: inter-word; line-height: 1.75; margin-bottom: 14px; font-size: 1.02rem; }
.about-details-box { background: #FAF7F2; border-left: 4px solid var(--brand-primary); padding: 18px 22px; border-radius: 6px; margin-top: 22px; }
.about-details-box p { margin-bottom: 8px; }
.about-details-box p:last-child { margin-bottom: 0; }

/* Footer Contact & 4 Social Media Badges */
.footer-portal-title { color: #fff; font-weight: 600; margin-bottom: 10px; line-height: 1.5; }
.footer-contact-line { font-size: 0.9rem; margin-bottom: 6px; color: #d5d0c8; }
.social-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.social-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 6px;
    font-size: 0.85rem; font-weight: 600; color: #fff !important;
    text-decoration: none !important; transition: transform 0.15s, filter 0.15s;
}
.social-badge:hover { transform: translateY(-2px); filter: brightness(1.12); }
.social-fb { background: #1877F2; }
.social-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-x  { background: #000000; border: 1px solid #444; }
.social-yt { background: #FF0000; }
.footer-bottom-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; font-size: 0.88rem;
}
.footer-bottom-inner a { color: #F5D08A; font-weight: 600; }


/* Header & Footer Logo Styling */
.site-logo-img {
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 14px;
    object-fit: contain;
    display: block;
}
.header-logo-img {
    height: 82px;
    width: auto;
    max-width: 380px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.24);
}
.footer-logo-link {
    display: inline-block;
    margin-bottom: 14px;
}
.footer-logo-img {
    height: 90px;
    width: auto;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.28);
}


/* Round Follow Us Social Buttons */
.social-badge.social-round {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}
.social-badge.social-round svg {
    width: 19px;
    height: 19px;
}


/* Footer Newsletter Section */
.footer-newsletter-desc {
    font-size: 0.88rem;
    color: #d5d0c8;
    line-height: 1.55;
    margin-bottom: 12px;
}
.footer-newsletter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-newsletter-form input[type="email"] {
    flex: 1 1 170px;
    padding: 8px 11px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2b2627;
    color: #fff;
    font-size: 0.86rem;
}
.footer-newsletter-form input[type="email"]::placeholder {
    color: #aaa;
}
.footer-newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--brand-accent);
}


/* ---------- Weekly Archive 4-Card Slider ---------- */
.archive-slider-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.slider-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--brand-primary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.18s;
}
.slider-nav-btn:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}
.archive-slider-viewport {
    overflow: hidden;
    position: relative;
}
.archive-slider-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.archive-slide-item {
    flex: 0 0 calc((100% - 54px) / 4);
    min-width: calc((100% - 54px) / 4);
    scroll-snap-align: start;
}

/* ---------- Mobile Navigation & Readable PDF Reader ---------- */
.mobile-nav-toggle {
    display: none;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 1.35rem;
    padding: 5px 11px;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .archive-slide-item {
        flex: 0 0 calc((100% - 18px) / 2);
        min-width: calc((100% - 18px) / 2);
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.18);
    }
    .main-nav.open {
        display: flex;
    }
    .header-logo-img {
        height: 64px;
        max-width: 270px;
        padding: 6px 10px;
    }
    .footer-logo-img {
        height: 74px;
        max-width: 310px;
        padding: 6px 10px;
    }
    .issue-thumb {
        min-height: 220px;
        padding: 8px;
    }
    .issue-thumb img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .hero-section { padding: 28px 0; }
    .hero-section h1 { font-size: 1.75rem; }

    /* Mobile-Optimized ePaper Reader for Crisp PDF Readability */
    .reader-toolbar { padding: 8px 0; }
    .toolbar-inner { gap: 8px; }
    .toolbar-group { width: 100%; justify-content: space-between; }
    .form-select-sm { width: 100%; max-width: 100%; font-size: 0.9rem; }
    .tool-btn { padding: 7px 9px; font-size: 0.8rem; }
    .reader-layout { padding: 10px 8px 24px; gap: 12px; }
    .reader-stage-wrap {
        padding: 6px;
        min-height: 62vh;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y pinch-zoom;
    }
    .epaper-page {
        max-width: 100%;
        width: 100%;
    }
    .epaper-page img {
        width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
    }
    .archive-slide-item {
        flex: 0 0 82%;
        min-width: 82%;
    }
    .about-card { padding: 20px 16px; }
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}


/* Premium Issue Badge & Paywall */
.premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #E2AC4C, #B87A18);
    color: #1A140B;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
    z-index: 4;
}
.paywall-card { max-width: 880px; margin: 0 auto; padding: 30px; }
.paywall-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }
.paywall-cover { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); }
@media (max-width: 768px) {
    .paywall-grid { grid-template-columns: 1fr; }
}


/* Clip Slider Strip */
.clip-slider-bar {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
}
.clip-slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.clip-slider-nav { display: flex; gap: 6px; }
.clip-slider-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.clip-pill-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FAF7F2;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--text-main);
    transition: all 0.15s;
}
.clip-pill-card:hover {
    border-color: var(--brand-primary);
    background: #FFF6E8;
}
.clip-pill-title {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}


/* Archive Page: One-Line Compact Filter Bar */
.archive-filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}
.archive-filter-form .form-control {
    height: 36px;
    padding: 5px 10px;
    font-size: 0.84rem;
    border-radius: 6px;
    width: auto;
}
.archive-filter-form .filter-box-search {
    width: 170px;
}
.archive-filter-form .filter-box-cat {
    width: 150px;
}
.archive-filter-form .filter-box-year {
    width: 105px;
}
.archive-filter-form .filter-btn {
    height: 36px;
    padding: 0 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .archive-filter-form {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
    }
    .archive-filter-form .filter-box-search { width: 120px; min-width: 110px; }
    .archive-filter-form .filter-box-cat { width: 115px; min-width: 105px; }
    .archive-filter-form .filter-box-year { width: 85px; min-width: 80px; }
}


/* ---------- 4-Issue Hero Slider ---------- */
.hero-slider { position: relative; }
.hero-slide { display: none; animation: heroFadeIn 0.4s ease; }
.hero-slide.active { display: block; }
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-issue-meta {
    font-size: 0.92rem !important;
    color: #F5D08A;
    font-weight: 600;
    margin-bottom: 10px !important;
}
.hero-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}
.hero-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}
.hero-arrow:hover {
    background: var(--brand-accent);
    color: #1a1a1a;
    border-color: var(--brand-accent);
}
.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.hero-dot.active {
    width: 28px;
    background: var(--brand-accent);
}


/* Freeform Article Cropping (Crop & Share & Download) */
.tool-btn-crop {
    background: var(--brand-accent);
    color: #1a1a1a !important;
    border-color: var(--brand-accent);
    font-weight: 700;
}
.tool-btn-crop.active {
    background: #ffffff;
    color: var(--brand-primary) !important;
    box-shadow: 0 0 0 2px var(--brand-accent);
}
.crop-mode-banner {
    background: #2D1214;
    color: #fff;
    padding: 10px 0;
    border-bottom: 2px solid var(--brand-accent);
    font-size: 0.9rem;
}
.crop-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.reader-stage.crop-mode-active .epaper-page {
    cursor: crosshair !important;
    user-select: none;
    touch-action: none;
}
.reader-stage.crop-mode-active .area-overlay-layer {
    pointer-events: none;
}
.user-crop-selection {
    position: absolute;
    border: 2.5px dashed #8B1E24;
    background: rgba(212, 154, 58, 0.28);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 20;
}
.btn-telegram {
    background: #229ED9;
    color: #fff;
}


/* Mobile & Desktop Interactive Crop Handles */
.user-crop-selection.interactive-crop-box {
    pointer-events: auto !important;
    cursor: move;
    touch-action: none;
    border: 2.5px solid #D49A3A;
    background: rgba(212, 154, 58, 0.14);
}
.crop-drag-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 30, 36, 0.88);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    pointer-events: none;
    white-space: nowrap;
}
.crop-handle {
    position: absolute;
    width: 26px;
    height: 26px;
    background: #8B1E24;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    touch-action: none;
    z-index: 25;
}
.handle-nw { top: -13px; left: -13px; cursor: nwse-resize; }
.handle-ne { top: -13px; right: -13px; cursor: nesw-resize; }
.handle-sw { bottom: -13px; left: -13px; cursor: nesw-resize; }
.handle-se { bottom: -13px; right: -13px; cursor: nwse-resize; }
.reader-inline-ad {
    margin-bottom: 12px;
}


/* ---------- Book Ad Space & Inquiry Page (subscribe.php) ---------- */
.ad-booking-header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 30px;
}
.ad-booking-header h1 {
    font-family: Georgia, serif;
    color: var(--brand-primary);
    font-size: 2rem;
    margin: 10px 0 12px;
}
.ad-booking-lead {
    text-align: justify;
    text-align-last: center;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}
.ad-booking-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 26px;
    align-items: start;
}
.ad-booking-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ad-info-card {
    padding: 24px 26px;
}
.ad-info-card h2 {
    font-family: Georgia, serif;
    font-size: 1.32rem;
    color: var(--brand-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #EFE8DC;
}
.ad-justified {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.7;
    margin-bottom: 10px;
    font-size: 0.96rem;
}
.ad-format-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}
.ad-format-item {
    background: #FAF7F2;
    border-left: 4px solid var(--brand-accent);
    border-radius: 6px;
    padding: 14px 16px;
}
.ad-format-item h3 {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.ad-format-item p:last-child {
    margin-bottom: 0;
}
.ad-clean-list, .ad-steps-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.ad-clean-list li, .ad-steps-list li {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.68;
    font-size: 0.95rem;
}
.ad-sub-list {
    padding-left: 20px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ad-inquiry-sidebar {
    position: sticky;
    top: 86px;
}
.ad-inquiry-card {
    border-top: 4px solid var(--brand-primary);
    padding: 24px;
}
.ad-inquiry-card h2 {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    margin: 10px 0 6px;
}
.ad-direct-contact {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
}
@media (max-width: 960px) {
    .ad-booking-layout {
        grid-template-columns: 1fr;
    }
    .ad-inquiry-sidebar {
        position: static;
    }
    .ad-booking-header h1 {
        font-size: 1.6rem;
    }
    .ad-info-card {
        padding: 18px;
    }
}


/* Digital ePaper Subscription Comparison Table */
.sub-comparison-card {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding: 22px;
}
.sub-compare-table th,
.sub-compare-table td {
    text-align: center;
    padding: 11px 14px;
}
.sub-compare-table th:first-child,
.sub-compare-table td:first-child {
    text-align: left;
}
.sub-compare-table th:last-child {
    background: #FDF4E3;
    color: var(--brand-primary);
}


/* ---------- Mobile & Desktop Uncropped Weekly Issues Thumbnails (v29 Fix) ---------- */
.issue-card > a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.issue-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #FAF7F2;
    padding: 8px;
    display: block !important;
}
.issue-thumb img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 440px;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
}
.hero-cover img,
.featured-cover img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .archive-slider-viewport {
        overflow: visible;
    }
    .archive-slider-track {
        gap: 14px;
        scroll-snap-type: x mandatory;
        padding: 2px 0 12px;
    }
    .archive-slide-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        scroll-snap-align: center;
    }
    .issue-thumb {
        padding: 6px !important;
    }
    .issue-thumb img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
    }
    .hero-cover img {
        max-height: none !important;
        width: 100%;
        height: auto;
    }
}


/* ---------- PWA Install App Banner ---------- */
.pwa-install-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 520px;
    background: #1F1718;
    color: #fff;
    border: 1px solid var(--brand-accent);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    z-index: 300;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pwa-banner-content img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    flex-shrink: 0;
}
.pwa-banner-content strong {
    display: block;
    font-size: 0.92rem;
    color: #F5D08A;
}
.pwa-banner-content span {
    display: block;
    font-size: 0.78rem;
    color: #ddd;
}
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pwa-dismiss-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}


/* ---------- Admin-Managed Cookie Consent Banner ---------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1B1516;
    color: #f3eee8;
    border-top: 3px solid var(--brand-accent);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.28);
    z-index: 350;
}
.cookie-banner.cookie-pos-bottom-left {
    left: 16px;
    right: auto;
    bottom: 16px;
    max-width: 420px;
    border: 1px solid var(--brand-accent);
    border-radius: 12px;
}
.cookie-banner-text {
    flex: 1 1 320px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.cookie-banner-text strong {
    display: block;
    color: #F5D08A;
    margin-bottom: 3px;
}
.cookie-banner-text p { margin: 0; }
.cookie-banner-text a { color: #F5D08A; text-decoration: underline; }
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}


/* ---------- Mobile Crystal-Clear PDF ePaper Display (v37) ---------- */
.reader-stage-wrap {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}
.epaper-page img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
@media (max-width: 768px) {
    .reader-layout.container {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    .reader-stage-wrap {
        padding: 4px !important;
        border-radius: 4px;
        min-height: 68vh;
        touch-action: pan-x pan-y pinch-zoom;
    }
    .reader-stage {
        gap: 12px;
        min-width: 100%;
    }
    .epaper-page {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
    }
}
