:root {
    --blue: #1a3a5c;
    --light-blue: #2c5f8a;
    --accent: #e74c3c;
    --gray: #6c757d;
    --light-gray: #f0f2f5;
    --dark: #1a1a2e;
    --white: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark); background: var(--white); line-height: 1.6;
}
a { color: var(--light-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* HEADER */
.site-header {
    background: var(--blue); color: var(--white); padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }

/* LOGO */
.logo { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-img { width: 36px !important; height: 36px !important; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.logo-text { font-size: 1rem; font-weight: 700; letter-spacing: 0.5px; line-height: 1.2; }

/* NAV */
.main-nav a { color: #ccd; margin-left: 20px; font-size: 0.95rem; }

/* NEWS GRID */
.page-title { margin: 24px 0 16px; font-size: 1.5rem; color: var(--blue); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.news-card {
    background: var(--white); border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); transform: translateY(-2px); }
.news-card-image { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--light-gray); }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2rem; background: var(--light-gray); }
.news-card-body { padding: 14px; }
.news-date { font-size: 0.8rem; color: var(--gray); display: block; margin-bottom: 4px; }
.news-card-title { font-size: 1.05rem; margin-bottom: 6px; line-height: 1.3; }
.news-card-title a { color: var(--dark); }
.news-card-title a:hover { color: var(--light-blue); }
.news-card-anons { font-size: 0.9rem; color: var(--gray); }

/* PAGINATION */
.pagination { text-align: center; padding: 20px 0; display: flex; justify-content: center; gap: 12px; align-items: center; }
.pagination a, .pagination span { padding: 6px 14px; border-radius: 6px; font-size: 0.95rem; }
.pagination a { background: var(--light-gray); color: var(--blue); }
.pagination a:hover { background: var(--light-blue); color: var(--white); text-decoration: none; }
.pagination .current { background: var(--blue); color: var(--white); }

/* ARTICLE */
.news-article { max-width: 800px; margin: 0 auto; padding: 20px 0; }
.back-link { font-size: 0.9rem; display: inline-block; margin-bottom: 12px; }
.article-title { font-size: 1.8rem; margin-bottom: 8px; color: var(--blue); }
.article-date { color: var(--gray); font-size: 0.9rem; margin-bottom: 20px; display: block; }
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 20px; }
.gallery-item img { width: 100%; border-radius: 6px; cursor: pointer; }
.article-text { font-size: 1.05rem; line-height: 1.8; }
.article-text p { margin-bottom: 16px; }

/* VIDEO — responsive 16:9 */
.article-videos { margin: 20px 0; }
.video-embed { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; margin-bottom: 16px; border-radius: 8px; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: none; }
.video-title { font-size: 0.9rem; color: var(--gray); margin-top: 4px; }

.article-links { margin: 20px 0; padding: 16px; background: var(--light-gray); border-radius: 8px; }
.article-links h3 { margin-bottom: 8px; font-size: 1rem; }
.article-links ul { list-style: none; }
.article-links li { margin-bottom: 4px; }

/* RELATED */
.related-news { margin-top: 40px; padding-top: 20px; border-top: 1px solid #e0e0e0; }
.related-news h2 { font-size: 1.3rem; margin-bottom: 16px; color: var(--blue); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.related-card { padding: 12px; border: 1px solid #e0e0e0; border-radius: 6px; transition: box-shadow 0.2s; }
.related-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-decoration: none; }
.related-card h3 { font-size: 0.95rem; color: var(--dark); margin-bottom: 4px; }
.related-card time { font-size: 0.8rem; color: var(--gray); }

/* AD BLOCKS */
.ad-block { margin: 16px 0; text-align: center; min-height: 90px; }
.ad-between { grid-column: 1 / -1; }
.ad-inside { margin: 20px 0; }
.ad-full-width { grid-column: 1 / -1; }

/* FOOTER */
.site-footer { background: var(--dark); color: #aaa; padding: 24px 0; text-align: center; margin-top: 40px; }
.site-footer p { font-size: 0.9rem; margin-bottom: 4px; }
.footer-logo { width: 40px; height: 40px; border-radius: 50%; margin-bottom: 8px; }

/* ADMIN */
.admin-panel { max-width: 1000px; margin: 0 auto; padding: 20px 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-header h1 { font-size: 1.5rem; color: var(--blue); }
.admin-actions { display: flex; gap: 8px; }
.btn { padding: 6px 14px; border-radius: 6px; border: 1px solid #ccc; background: var(--white); cursor: pointer; font-size: 0.9rem; color: var(--dark); text-decoration: none; display: inline-block; }
.btn:hover { background: var(--light-gray); text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--light-blue); }
.btn-danger { color: var(--accent); border-color: var(--accent); }
.btn-small { padding: 3px 8px; font-size: 0.85rem; }
.btn-import { background: var(--accent); color: var(--white); border-color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem; }
.admin-table th { background: var(--blue); color: var(--white); padding: 8px; text-align: left; }
.admin-table td { padding: 8px; border-bottom: 1px solid #e0e0e0; }
.hidden-news { opacity: 0.5; }
.admin-stats { display: flex; gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--light-gray); padding: 12px 20px; border-radius: 6px; text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 0.8rem; color: var(--gray); }
.import-logs { margin-bottom: 24px; }
.edit-form { max-width: 700px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.95rem; font-family: inherit; }
.form-checks { display: flex; gap: 20px; }
.form-checks label { display: flex; align-items: center; gap: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.admin-images { margin-top: 24px; }
.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.images-grid img { width: 100%; border-radius: 4px; }
.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #d4edda; color: #155724; }
.ad-slot { background: var(--light-gray); padding: 16px; border-radius: 8px; margin-bottom: 16px; }
.ad-slot-header label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ad-slot code { background: #ddd; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.admin-login-form { max-width: 360px; margin: 60px auto; text-align: center; }
.admin-login-form h1 { color: var(--blue); margin-bottom: 20px; }
.admin-login-form input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 6px; }
.admin-login-form button { width: 100%; padding: 10px; background: var(--blue); color: var(--white); border: none; border-radius: 6px; cursor: pointer; font-size: 1rem; }

/* MOBILE */
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .article-title { font-size: 1.4rem; }
    .video-embed iframe { height: 100%; }
    .admin-header { flex-direction: column; gap: 10px; }
    .admin-actions { flex-wrap: wrap; justify-content: center; }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 4px; }
    .logo-text { font-size: 0.85rem; }
    .logo-img { width: 30px !important; height: 30px !important; }
}


/* SEARCH */
.header-right { display: flex; align-items: center; gap: 16px; }
.search-form { display: flex; align-items: center; gap: 4px; }
.search-input {
    padding: 6px 12px; border: 1px solid #4a6a8a; border-radius: 20px;
    background: rgba(255,255,255,0.1); color: var(--white); font-size: 0.9rem;
    width: 180px; transition: width 0.3s, background 0.2s;
}
.search-input::placeholder { color: #aabbcc; }
.search-input:focus { outline: none; background: rgba(255,255,255,0.2); width: 220px; }
.search-btn {
    background: none; border: none; color: var(--white); cursor: pointer;
    font-size: 1rem; padding: 4px;
}
.search-results-info { margin-bottom: 20px; padding: 12px 16px; background: var(--light-gray); border-radius: 8px; }
.search-results-info p { margin: 0; }
.search-empty { text-align: center; padding: 40px 20px; color: var(--gray); }
.search-empty p { margin-bottom: 8px; }

@media (max-width: 600px) {
    .header-right { flex-direction: column; gap: 8px; }
    .search-form { width: 100%; }
    .search-input { width: 100%; flex: 1; }
    .search-input:focus { width: 100%; }
    .main-nav { display: none; }
}

.footer-contact { margin-top: 8px; }
.footer-contact a { color: #4a9adb; }
