@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;900&display=swap');

:root {
    --primary-red: #cc1e24;
    --bg-light: #f4f4f4;
    --border-color: #e0e0e0;
    --text-dark: #222222;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans Devanagari', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.custom-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: #ffffff;
    padding: 20px 0 15px;
}

.header-inner {
    display: flex;
    justify-content: center;
}

.logo-box {
    text-align: center;
}

.logo-english {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.5px;
    margin-bottom: -2px;
    font-family: Arial, sans-serif;
}

.logo-marathi {
    font-size: 64px;
    font-weight: 900;
    color: var(--primary-red);
    line-height: 1;
}

.logo-rni {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-red);
    margin-top: 2px;
    font-family: Arial, sans-serif;
}

/* Navbar */
.main-nav {
    background-color: var(--primary-red);
    color: white;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 42px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.wa-icon {
    background-color: white;
    color: #25D366;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 6px;
}

/* Main Wrapper - THE WHITE BOX BOX FROM REFERENCE */
.main-wrapper {
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 20px 0 40px;
    overflow: hidden;
    width: 100%;
}

/* Subheader / Marquee in reference is Grey */
.subheader {
    background-color: #f1f1f1;
    /* GREY AS PER REQUEST */
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.subheader marquee {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    display: block;
    width: 100%;
}

/* Page Layout */
.page-wrapper {
    display: flex;
    gap: 15px;
    padding: 15px;
}

/* Sidebar for thumbnails */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 200vh;
    overflow-y: auto;
    position: sticky;
    top: 10px;
}

.thumbnail-box {
    border: 1px solid #eee;
    margin-bottom: 15px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.thumbnail-box:hover,
.thumbnail-box.active {
    border-color: #999;
}

.thumbnail-box img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    min-width: 0;
}

/* toolbar MUST BE SINGLE ROW */
.toolbar-wrap {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    /* PREVENT WRAPPING */
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: -1px;
}

.share-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 2px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-wa {
    background-color: #25D366;
}

.btn-fb {
    background-color: #3b5998;
}

.btn-post {
    background-color: #222222;
}

.btn-tg {
    background-color: #0088cc;
}

.btn-email {
    background-color: #888888;
}

.btn-print {
    background-color: #111111;
}

.share-btn:last-child {
    border-right: none;
}

/* Date bar section */
.date-bar {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.date-text {
    font-size: 14px;
    color: #444;
    font-family: Arial, sans-serif;
}

.issue-selector {
    display: flex;
    align-items: center;
}

.date-picker-input {
    width: 130px;
    padding: 6px 32px 6px 10px;
    border: 1px solid #ccc;
    border-right: none;
    font-size: 13px;
    color: #334155;
    outline: none;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    height: 31px;
}

.date-picker-input:focus {
    border-color: #cc1e24;
}

.date-picker-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.issue-selector button {
    background: #888;
    color: white;
    border: 1px solid #888;
    padding: 6px 20px;
    font-size: 13px;
    cursor: pointer;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive fix for date bar */
@media (max-width: 768px) {
    .date-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .issue-selector {
        width: 100%;
    }
    .date-picker-input {
        flex: 1;
    }
}

/* epaper View Port */
.epaper-view {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.epaper-view img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Nav arrows on viewport sides */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.13);
    color: #fff;
    padding-top: 60px;
    padding-bottom: 60px;
    padding-left: 12px;
    padding-right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

.prev-btn {
    left: 0;
    padding-left: 24px;
    padding-right: 12px;
}

.next-btn {
    right: 0;
}

/* Visitor Counter */
.visitor-counter {
    margin-top: 20px;
    padding: 18px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    text-align: center;
}

.visitor-counter-icon {
    font-size: 28px;
    color: var(--theme-primary, #cc1e24);
    margin-bottom: 6px;
}

.visitor-counter-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.visitor-counter-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--theme-primary, #cc1e24);
    line-height: 1;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
    .sidebar {
        display: none;
    }

    .page-wrapper {
        flex-direction: column;
        padding: 10px;
    }

    .toolbar-wrap {
        flex-wrap: wrap;
        /* WRAP ONLY ON MOBILE IF NEEDED */
    }

    .share-btn {
        flex: 1 1 30%;
    }
}