* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #fff;
    color: #1a1a1a;
}

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

/* ===== HEADER ===== */
.site-header {
    padding: 20px 30px 10px;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #bcdcf5, #5b9bd5 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: #0b2e4f;
    letter-spacing: 1px;
    box-shadow: inset -6px -6px 12px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.nav-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    flex: 1;
}

.nav-btn {
    padding: 14px 26px;
    border-radius: 30px;
    font-weight: bold;
    text-align: center;
    color: #1a1a1a;
    box-shadow: inset -4px -4px 8px rgba(0,0,0,0.15), 0 3px 5px rgba(0,0,0,0.2);
    flex: 1;
    min-width: 140px;
    transition: transform 0.15s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
}

.nav-btn.active {
    outline: 3px solid #333;
}

.nav-btn.hikmatlar   { background: linear-gradient(180deg,#f3945a,#e8622a); color:#fff; }
.nav-btn.rivoyatlar  { background: linear-gradient(180deg,#5b8fd6,#2e5fa3); color:#fff; }
.nav-btn.kitoblar    { background: linear-gradient(180deg,#7ec27e,#4a9e4a); color:#fff; }
.nav-btn.videolar    { background: linear-gradient(180deg,#f6cf4d,#f2b705); color:#1a1a1a; }

.header-divider {
    height: 8px;
    background: linear-gradient(180deg, #8fce4f, #5da62c);
    border-radius: 4px;
    margin: 10px 30px 0;
}

/* ===== MAIN CONTENT ===== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 30px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #2e5fa3;
    border-bottom: 3px solid #8fce4f;
    display: inline-block;
    padding-bottom: 4px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 900px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .header-inner { justify-content: center; }
}

.post-card {
    border: 1px solid #333;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

.post-title {
    font-weight: bold;
    font-size: 15px;
    text-decoration: underline;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-image-box {
    flex: 1;
    min-height: 130px;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    color: #333;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fafafa;
}

.post-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-style: italic;
    font-size: 13px;
    margin-top: auto;
}

.post-meta .cat-label {
    font-weight: bold;
}

.post-detail-link {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 8px;
    display: inline-block;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #f4f4f4;
    border-top: 3px solid #8fce4f;
    padding: 25px 30px;
    margin-top: 50px;
    text-align: center;
    font-size: 14px;
    color: #444;
}

/* ===== DETAIL PAGE ===== */
.detail-box {
    border: 1px solid #333;
    padding: 25px;
    border-radius: 8px;
}

.detail-title {
    font-size: 24px;
    color: #2e5fa3;
    margin-bottom: 10px;
}

.detail-meta {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.detail-image, .detail-video {
    width: 100%;
    max-height: 420px;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    display: block;
}

.detail-video iframe {
    width: 100%;
    height: 420px;
    border: none;
}

.detail-content {
    font-size: 17px;
    line-height: 1.8;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: bold;
    color: #2e5fa3;
}

.empty-msg {
    color: #777;
    font-style: italic;
    padding: 30px 0;
}

/* ===== ADMIN ===== */
.admin-wrap {
    max-width: 700px;
    margin: 50px auto;
    padding: 0 20px;
}

.admin-box {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.admin-box h2 {
    margin-bottom: 20px;
    color: #2e5fa3;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-primary {
    background: #2e5fa3;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary:hover { background: #24487d; }

.btn-danger {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2c0; }
.alert-success { background: #e8f5e9; color: #1e7d32; border: 1px solid #b7dfba; }

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table.admin-table th, table.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

table.admin-table th {
    background: #f4f4f4;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-topbar a {
    color: #2e5fa3;
    font-weight: bold;
}
