/* 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;
}
/* Public blog pages: match the main site's editorial palette. */
.blog-hero{background:#eeefe7;border-bottom:1px solid var(--line);padding:166px 0 68px;text-align:left}
.blog-hero h1{font-size:clamp(32px,4vw,50px);font-weight:400;letter-spacing:.12em;margin-bottom:22px}
.blog-hero p{max-width:760px;line-height:1.9;font-size:16px!important;color:var(--text-secondary)!important}
.blog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;padding:48px 0}
.blog-card{background:var(--card-bg);border:1px solid var(--line);border-radius:3px;box-shadow:none}
.blog-card:hover{border-color:#a7b69f;box-shadow:0 12px 30px #243c3410;transform:translateY(-4px)}
.card-image{height:auto;aspect-ratio:1.6;background:#e4e8dd}
.card-content{padding:26px}
.card-date{font-size:12px;letter-spacing:.08em;color:#8d774e;margin-bottom:14px}
.card-title{font-size:21px;line-height:1.65;color:var(--text-primary)}
.card-excerpt{font-size:14px;line-height:1.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.read-more{font-size:12px;letter-spacing:.1em;color:var(--accent-primary);font-weight:500;border-top:1px solid var(--line);padding-top:18px}
#post-container{padding-top:145px}
.post-header{padding:30px 24px 40px;max-width:900px}
.post-meta{color:#8d774e;font-size:13px;letter-spacing:.1em}
.post-title{color:var(--text-primary);font-size:clamp(28px,3vw,42px);font-weight:400;line-height:1.65;margin-bottom:0}
.post-cover{max-width:960px;margin:0 auto 60px;border-radius:3px;overflow:hidden}
.post-cover img{display:block;height:auto}
.post-content{max-width:780px;font-size:17px;line-height:2;color:var(--text-primary)}
.post-content p{line-height:2;margin-bottom:26px}
.post-content h2{font-size:28px;border-color:var(--line);color:var(--accent-primary)}
.post-content h3,.post-content h4,.post-content h5,.post-content h6,.post-content strong,.post-content b{color:var(--text-primary)}
.post-content blockquote{background:#eeefe7;border-color:#a68b55;color:var(--accent-primary);font-family:var(--font-heading);font-size:22px;font-weight:400}
.post-content img{max-width:100%;height:auto;border-radius:3px}
.post-content ol{list-style:decimal;padding-left:28px}.post-content ol li{padding-left:4px}.post-content ol li::before{content:none}
@media(max-width:1000px){.blog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.blog-hero{padding:128px 0 38px}.blog-hero h1{font-size:29px;letter-spacing:.05em}.blog-hero p{font-size:14px!important}.blog-grid{grid-template-columns:1fr;gap:24px;padding:24px 0}.card-content{padding:24px}.card-title{font-size:21px}#post-container{padding-top:110px}.post-header{padding:20px 22px 34px}.post-cover{margin-bottom:32px}.post-content{font-size:16px;line-height:2}.post-content p{text-align:left}.post-content h2{font-size:24px}.post-content blockquote{padding:22px;font-size:20px}}
