/* css/style.css */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
    color: #111827;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo {
    font-weight: 700;
    font-size: 20px;
}

.main-nav a {
    margin-left: 16px;
    font-size: 14px;
}

.btn-small {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #4f46e5;
    color: #4f46e5;
}

.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    color: #fff;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.search-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 8px;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 999px;
    border: none;
}

.search-form button {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #fff;
    color: #4f46e5;
    font-weight: 600;
    cursor: pointer;
}

.section {
    padding: 40px 0;
}

.section-accent {
    background: #111827;
    color: #e5e7eb;
    text-align: center;
}

.section-accent .inline-form {
    display: flex;
    max-width: 420px;
    margin: 16px auto 0;
    gap: 8px;
}

.inline-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 999px;
    border: none;
}

.inline-form button {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #fbbf24;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
}

h1, h2, h3 {
    margin: 0 0 12px;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
}

.chip.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: #eef2ff;
    color: #4f46e5;
}

.muted {
    color: #6b7280;
    font-size: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 6px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.page-link {
    padding: 6px 10px;
    border-radius: 8px;
    background: #e5e7eb;
    font-size: 13px;
}

.page-link.active {
    background: #4f46e5;
    color: #fff;
}

.article-detail h1 {
    margin-bottom: 8px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 16px;
}

.article-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 20px;
}

.article-content {
    line-height: 1.7;
    font-size: 15px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
    color: #4f46e5;
}

.site-footer {
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 40px;
}

@media (max-width: 640px) {
    .search-form,
    .inline-form {
        flex-direction: column;
    }
}
.admin-login-body {
    background: #0f172a;
    color: #e5e7eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-wrapper {
    width: 100%;
    max-width: 360px;
    padding: 16px;
}

.admin-login-card {
    background: #020617;
    border-radius: 16px;
    padding: 24px 22px 26px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.6);
}

.admin-login-card h1 {
    margin-bottom: 16px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
}

.btn-primary {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg,#4f46e5,#9333ea);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.alert {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 10px;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.small { font-size: 12px; }

.admin-body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e5e7eb;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: #020617;
    border-right: 1px solid #1f2937;
    padding: 16px 14px;
}

.admin-sidebar-header {
    margin-bottom: 20px;
    font-weight: 700;
}

.admin-sidebar nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
    background: #111827;
    color: #e5e7eb;
}

.admin-main {
    flex: 1;
    padding: 16px 18px;
}

.admin-main-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: #020617;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #1f2937;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
}

.admin-section {
    background: #020617;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #1f2937;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #111827;
}

.admin-table th {
    text-align: left;
    color: #9ca3af;
}
.articles-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.articles-container h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 40px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.article-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.article-image-wrapper.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #999;
}

.placeholder-icon {
    font-size: 48px;
    opacity: 0.5;
}

.article-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-thumbnail {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-content h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.article-content a {
    color: #2c3e50;
    text-decoration: none;
}

.article-content a:hover {
    color: #667eea;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: auto;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s;
}

.read-more:hover {
    color: #764ba2;
}

/* ===== ARTICLE DETAIL STYLES ===== */

.article-detail {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.featured-image-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: #f0f0f0;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-header {
    padding: 40px;
    border-bottom: 1px solid #f0f0f0;
}

.article-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.article-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

.article-body {
    padding: 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.article-body h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 30px 0 15px 0;
}

.article-body h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 25px 0 12px 0;
}

.article-body p {
    margin-bottom: 15px;
}

.article-body a {
    color: #667eea;
    text-decoration: underline;
}

.article-body a:hover {
    color: #764ba2;
}

.article-body strong {
    color: #2c3e50;
    font-weight: 600;
}

.article-body em {
    font-style: italic;
}

.article-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

.article-body ul,
.article-body ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Content images - inserted via 📷 button */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-container h1 {
        font-size: 24px;
    }
    
    .article-image-wrapper {
        height: 150px;
    }
    
    .featured-image-wrapper {
        max-height: 300px;
    }
    
    .article-header {
        padding: 20px;
    }
    
    .article-header h1 {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .article-info {
        gap: 12px;
        font-size: 12px;
    }
    
    .article-body {
        padding: 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .articles-container {
        margin: 20px auto;
    }
    
    .articles-container h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .article-card {
        border-radius: 8px;
    }
    
    .article-image-wrapper {
        height: 120px;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-content h2 {
        font-size: 16px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
}
