/* Blog System Styles */

/* Inherits variables from style.css */

/* --- Blog List (blog.html) --- */
.blog-hero {
    padding: 150px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.blog-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    padding: 60px 0;
}

/* Blog Card */
.blog-card {
    background: var(--card-bg);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-date {
    font-size: 0.9rem;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.4;
}

.card-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--gold-primary);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* --- Blog Detail (post.html) --- */
.post-header {
    padding: 150px 0 60px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.post-meta {
    color: var(--gold-secondary);
    margin-bottom: 20px;
}

.post-title {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 40px;
    color: #000;
}

.post-cover {
    width: 100%;
    height: auto;
    overflow: visible;
    margin-bottom: 60px;
    border-radius: 4px;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content strong,
.post-content b {
    color: #000;
    font-weight: 700;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
    /* User requested 1.6 */
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 2rem;
    margin-top: 50px;
    margin-bottom: 25px;
    margin-bottom: 25px;
    color: #000;
    font-weight: bold;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #000;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.post-content p {
    margin-bottom: 25px;
    text-align: justify;
}

.post-content ul {
    list-style: none;
    margin-bottom: 30px;
    padding-left: 10px;
}

.post-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    color: var(--text-primary);
}

.post-content li::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.6;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
    padding: 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.35rem;
    border-radius: 0 4px 4px 0;
}

/* --- Admin Dashboard (admin.html) --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 80px;
    /* offset fixed navbar */
}

.admin-sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    position: fixed;
    height: calc(100vh - 80px);
}

.admin-main {
    flex-grow: 1;
    margin-left: 250px;
    padding: 40px;
}

/* Admin Buttons */
.admin-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    color: var(--text-primary);
    border: 1px solid #ddd;
    text-align: left;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.admin-btn:hover,
.admin-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Post List */
.post-list-item {
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-list-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.post-list-actions button {
    margin-left: 10px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.btn-edit {
    color: var(--accent-primary);
    border-color: var(--accent-primary) !important;
}

.btn-delete {
    color: #ff6b6b;
    border-color: #ff6b6b !important;
}

/* Editor */
.editor-container {
    background: var(--card-bg);
    padding: 30px;
    border: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--gold-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 1rem;
    font-family: inherit;
}

.rich-editor {
    min-height: 400px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 20px;
    color: #333;
    overflow-y: auto;
}

.rich-editor blockquote {
    border-left: 4px solid var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
    padding: 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.35rem;
    border-radius: 0 4px 4px 0;
}

.editor-toolbar {
    margin-bottom: 10px;
    padding: 10px;
    /* Removed flex and background to restore original inline layout */
}

.toolbar-btn {
    padding: 5px 10px;
    background: #ddd;
    border: none;
    color: #333;
    cursor: pointer;
}

.image-preview {
    margin-top: 10px;
    max-width: 300px;
    border: 1px solid #ddd;
    display: none;
}