/* Modern UI Core - Final Unified Design */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --ai-purple: #8b5cf6;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --green-bright: #10b981;
    --red-bright: #ef4444;
    --orange-bright: #f97316;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 40px;
    scrollbar-gutter: stable;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* Header & Nav */
.header-main { background: #ffffff; padding: 20px 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 25px; }
.site-title { font-size: 24px; font-weight: 800; text-align: center; color: var(--primary); letter-spacing: -0.5px; margin-bottom: 5px; }
.site-subtitle { text-align: center; color: var(--secondary); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.header-nav { margin-top: 15px; }
.nav-list { display: flex; justify-content: center; list-style: none; gap: 10px; flex-wrap: wrap; padding: 0; }
.nav-link { 
    text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 13px; 
    padding: 8px 16px; border-radius: 20px; transition: all 0.2s; 
    background: #f1f5f9; border: 1px solid #e2e8f0;
}
.nav-link:hover { background: #e2e8f0; color: var(--primary); }
.nav-link.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary-dark) !important; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.news-card { 
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); 
    border: 1px solid #e2e8f0; display: flex !important; flex-direction: column !important; height: 100% !important; transition: transform 0.2s;
}
.news-card a { display: flex !important; flex-direction: column !important; flex-grow: 1 !important; text-decoration: none; color: inherit; height: 100%; }
.news-card:hover { transform: translateY(-3px); }
.news-img-wrap { position: relative; width: 100%; padding-top: 60%; background: #000; overflow: hidden; border-bottom: 3px solid var(--primary); flex-shrink: 0; }
.news-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20% !important; }
.news-content { padding: 15px; flex-grow: 1 !important; display: flex !important; flex-direction: column !important; }
.news-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.news-title { font-size: 17px; font-weight: 800; line-height: 1.3; margin-bottom: 15px; color: var(--text-main); flex-grow: 0; }

.btn-read { 
    margin-top: auto !important; background: var(--primary); color: #fff; text-align: center; padding: 12px; 
    border-radius: 8px; text-decoration: none; display: block; font-weight: 700; font-size: 13px; transition: all 0.2s;
}
.btn-read:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }

.btn-back { display: inline-block; margin-bottom: 20px; text-decoration: none; color: var(--secondary); font-weight: 600; font-size: 14px; transition: all 0.2s; }
.btn-back:hover { color: var(--primary); transform: translateX(-3px); }

/* Article Page & Static Pages */
.article-container, .content-wrapper { background: #ffffff; padding: 30px 20px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #e2e8f0; margin-bottom: 30px; }
.article-header-img { width: 100%; height: auto; max-height: 80vh; object-fit: contain !important; background: #000; border-radius: var(--radius); margin-bottom: 25px; display: block; border: 1px solid #e2e8f0; }
.article-title, .page-title { font-size: 22px; font-weight: 800; color: var(--text-main); margin-bottom: 15px; line-height: 1.2; }
.page-title { border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; font-size: 28px; }

/* Metadata & Sharing */
.article-meta-block { 
    display: flex; align-items: center; justify-content: flex-start; margin-bottom: 25px; 
    padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; gap: 20px; flex-wrap: nowrap; overflow-x: auto; 
}
.author-info { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.author-avatar { width: 32px; height: 32px; background: #f1f5f9; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; flex-shrink: 0; }
.author-avatar svg { width: 18px; height: 18px; display: block; }
.author-name-date { font-size: 13px; line-height: 1.2; display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.author-name { font-weight: 700; color: var(--text-main); white-space: nowrap; }
.publish-date { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

.share-buttons { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin-left: auto; }
.share-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff; transition: all 0.2s; flex-shrink: 0; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.share-btn svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.share-tg { background: #229ED9; }
.share-fb { background: #1877F2; }
.share-viber { background: #7360F2; }
.share-wa { background: #25D366; }

/* Article Body & Lists */
.article-body, .content-body { font-size: 17px; color: #334155; line-height: 1.6; }
.article-body p, .content-body p { margin-bottom: 15px; }
.article-body ul, .article-body ol, .content-body ul { margin: 20px 0 20px 25px; padding: 0; }
.article-body li, .content-body li { margin-bottom: 10px; }
.content-body h2 { margin: 25px 0 15px; font-size: 20px; font-weight: 700; color: var(--text-main); }

/* Energy Schedule Styles */
.schedule-content { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.location-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid #e2e8f0; }
.location-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; gap: 15px; }
.location-title { font-size: 16px; font-weight: 700; color: var(--text-main); line-height: 1.4; }
.location-badge { background: #f1f5f9; color: var(--primary); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; white-space: nowrap; border: 1px solid #e2e8f0; }

.hours-grid { display: grid !important; grid-template-columns: repeat(12, 1fr) !important; gap: 3px !important; margin: 15px 0 !important; }
@media (max-width: 600px) { .hours-grid { grid-template-columns: repeat(6, 1fr) !important; } }
.hour-slot { height: 38px !important; border: 1px solid rgba(0,0,0,0.1) !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 11px !important; font-weight: 800 !important; border-radius: 6px !important; color: #fff !important; text-shadow: 1px 1px 1px rgba(0,0,0,0.3) !important; }
.hour-slot.available { background-color: #059669 !important; }
.hour-slot.unavailable { background-color: #dc2626 !important; }
.hour-slot.past { opacity: 0.4 !important; filter: grayscale(0.8) !important; }
.hour-slot.current { border: 4px solid #fbbf24 !important; transform: scale(1.08) !important; z-index: 5 !important; box-shadow: 0 0 15px rgba(251, 191, 36, 0.6) !important; }

/* Banners */
.info-bar { display: flex !important; gap: 15px !important; margin-bottom: 20px !important; width: 100% !important; flex-wrap: wrap; }
.banner-card { 
    background: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius); 
    padding: 12px 20px; box-shadow: var(--shadow); flex: 1; min-width: 250px;
    display: flex !important; align-items: center !important; justify-content: space-between !important;
}
.weather-label { font-size: 11px; color: var(--secondary); font-weight: 800; text-transform: uppercase; margin-bottom: 2px; }
.weather-temp { font-size: 20px; font-weight: 800; color: var(--text-main); }
.weather-icon { font-size: 28px; }

.alarm-banner-wrap { background: #fee2e2 !important; border-color: #fecaca !important; justify-content: center !important; }
.alarm-banner-content { color: #b91c1c !important; font-weight: 800 !important; font-size: 15px !important; text-align: center; }

.no-outage-banner { background: #ecfdf5 !important; color: #059669 !important; padding: 12px !important; border-radius: 10px !important; border: 1px solid #a7f3d0 !important; margin-bottom: 20px !important; text-align: center !important; font-weight: 800 !important; font-size: 14px !important; width: 100%; }

.footer-main { margin-top: 50px; padding: 40px 0; text-align: center; border-top: 1px solid #e2e8f0; background: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 50px 0; list-style: none; padding: 0; width: 100%; }
.pagination-item { 
    display: flex; align-items: center; justify-content: center; 
    min-width: 42px; height: 42px; padding: 0 15px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 14px;
    transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.pagination-item:hover { background: #f8fafc; border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.pagination-item.active { background: var(--primary); border-color: var(--primary-dark); color: #fff; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3); }
.pagination-item.disabled { background: transparent; border: none; color: var(--text-muted); cursor: default; box-shadow: none; pointer-events: none; }
.pagination-item.nav-btn { background: #f1f5f9; border-color: #e2e8f0; }
.pagination-item.nav-btn:hover { background: var(--primary); color: #fff; }

/* Article & Sidebar Grid */
.article-layout { 
    display: grid !important; 
    grid-template-columns: 1fr 300px !important; 
    gap: 30px !important; 
    align-items: start !important; 
}

@media (max-width: 1000px) {
    .article-layout { 
        grid-template-columns: 1fr !important; 
    }
    .sidebar {
        margin-top: 40px;
        position: static !important;
    }
}

@media (max-width: 640px) {
    .site-title { font-size: 22px; }
    .article-container { padding: 25px 15px; }
    .article-title { font-size: 26px; }
    .news-grid { grid-template-columns: 1fr; }
    
    .article-meta-block {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
    .author-info { width: 100%; gap: 10px; }
    .author-avatar { display: none !important; }
    .author-name-date { flex-direction: column !important; align-items: flex-start !important; gap: 5px !important; }
    .share-buttons { margin-left: 0 !important; width: 100%; justify-content: flex-start; }
}