/**
 * Frontend Stylesheet
 * 100% Responsive, avoiding heavy borders
 */

 :root {
    --primary-bg: #f4f6f9;
    --white: #ffffff;
    --text-main: #333333;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --active-color: #d32f2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
}

/* Header & Ad Banners */
header {
    background-color: var(--white);
    padding: 15px 5%;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-banner-top {
    text-align: center;
    margin: 20px auto;
    max-width: 970px;
}

.ad-banner-top img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

/* Main Layout using CSS Grid */
.epaper-wrapper {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar Thumbnails */
.epaper-sidebar {
    background: var(--white);
    padding: 10px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    height: 800px;
    overflow-y: auto;
}

.thumb-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thumb-container img {
    width: 100%;
    cursor: pointer;
    border-radius: 2px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.thumb-container img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.active-thumb {
    box-shadow: 0 0 0 3px var(--active-color); /* Alternative to traditional borders */
}

/* Main Viewer */
.epaper-main-view {
    background: var(--white);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.viewer-controls {
    display: flex;
    justify-content: space-between;
    background: var(--primary-bg);
    padding: 10px;
    border-radius: 4px;
}

.main-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #eaeaea;
    border-radius: 4px;
}

#mainEpaperImage {
    width: 100%;
    display: block;
}

.news-clip-overlay {
    position: absolute;
    background: rgba(255, 255, 0, 0.2);
    cursor: pointer;
    transition: background 0.3s ease;
}

.news-clip-overlay:hover {
    background: rgba(255, 255, 0, 0.4);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .epaper-wrapper {
        grid-template-columns: 120px 1fr;
    }
    .epaper-right-sidebar {
        display: none; /* Hide right ads on tablets */
    }
}

@media (max-width: 768px) {
    .epaper-wrapper {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column-reverse;
    }
    
    .epaper-sidebar {
        height: auto;
        overflow-x: auto;
    }
    
    .thumb-container {
        flex-direction: row;
    }
    
    .thumb-container img {
        width: 80px;
    }
}

/**
 * Additional CSS for Header, Footer, and Sidebar
 * Path: assets/css/style.css
 * 100% Responsive & Border-less UI
 */

/* Container Utility */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= HEADER ================= */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.site-logo {
    max-height: 50px;
    width: auto;
}

.header-meta {
    font-weight: 600;
    color: var(--text-main);
    background: var(--primary-bg);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--primary-bg);
    color: var(--active-color);
    box-shadow: var(--shadow-sm);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
}

/* ================= FOOTER ================= */
.main-footer {
    background-color: #2c3e50;
    color: var(--white);
    margin-top: 40px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 50px 20px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.widget-links {
    list-style: none;
}

.widget-links li {
    margin-bottom: 10px;
}

.widget-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget-links a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #34495e;
    color: var(--white);
    text-decoration: none;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    text-align: center;
}

.copyright-text {
    font-size: 0.9rem;
    color: #95a5a6;
}

/* ================= SIDEBAR ================= */
.general-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget .widget-title {
    color: var(--text-main);
    background: var(--primary-bg);
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    margin-bottom: 15px;
    background: var(--primary-bg);
    padding: 10px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.notice-list li:hover {
    transform: translateX(5px);
}

.notice-date {
    display: block;
    font-size: 0.8rem;
    color: var(--active-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.notice-list a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
}

.ad-placeholder {
    background-color: #e0e0e0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 992px) {
    .header-meta {
        display: none; /* Hide date on smaller screens to save space */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Can be toggled via JS */
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}