/* ===== BLOG PAGE ===== */

/* Hero */
.blog-hero {
    padding: 100px 24px 60px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(248, 249, 252, 0.88) 0%, rgba(238, 241, 248, 0.88) 100%),
        url('photos/blog.jpg') center / cover no-repeat;
    border-bottom: 1px solid #e8ecf4;
}

.blog-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #2b2d42;
    line-height: 1.2;
    margin-bottom: 12px;
}

.blog-lead {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}


/* ===== BLOG LISTING ===== */
.blog-listing {
    padding: 60px 40px 80px;
}

.blog-container {
    max-width: 760px;
    margin: 0 auto;
}

.blog-card {
    display: block;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e8ecf4;
    background: #fff;
    margin-bottom: 20px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    border-color: #d0d5e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.blog-card-date {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 8px;
}

.blog-card-title {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2b2d42;
    margin-bottom: 10px;
    line-height: 1.35;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.65;
    margin-bottom: 12px;
}

.blog-card-read {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ef8354;
}


/* ===== BLOG READER ===== */
.blog-reader {
    padding: 40px 40px 80px;
}

.blog-reader-container {
    max-width: 720px;
    margin: 0 auto;
}

.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #888;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.blog-back svg {
    width: 16px;
    height: 16px;
}

.blog-back:hover {
    color: #2b2d42;
}


/* ===== BLOG POST CONTENT ===== */
.blog-post h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2b2d42;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    color: #999;
    margin-bottom: 24px;
}

.blog-meta .blog-author {
    font-weight: 500;
    color: #777;
}

.blog-divider {
    border: none;
    border-top: 1px solid #e8ecf4;
    margin: 28px 0;
}

.blog-post h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2b2d42;
    margin-bottom: 16px;
    margin-top: 4px;
}

.blog-post p {
    font-size: 1.02rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 18px;
}

.blog-post p strong {
    color: #2b2d42;
    font-weight: 600;
}

.blog-post a {
    color: #ef8354;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-post a:hover {
    color: #e06e3a;
}

.blog-cta {
    margin-top: 8px;
}

.blog-cta a {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ef8354, #e06e3a);
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(239, 131, 84, 0.3);
}

.blog-cta a:hover {
    background: linear-gradient(135deg, #e06e3a, #c85c2e);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 131, 84, 0.4);
    color: white;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 20px 40px;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-listing {
        padding: 40px 20px 60px;
    }

    .blog-card {
        padding: 24px;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-reader {
        padding: 30px 20px 60px;
    }

    .blog-post h1 {
        font-size: 1.7rem;
    }

    .blog-post h2 {
        font-size: 1.2rem;
    }

    .blog-post p {
        font-size: 0.95rem;
    }

    .blog-meta {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}


/* ===== BLOG COMMENTS ===== */
.blog-comments-section {
    margin-top: 16px;
}

.blog-comments-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2b2d42;
    margin-bottom: 20px;
    margin-top: 4px;
}

/* Comment form */
.blog-comment-form {
    margin-bottom: 28px;
}

.blog-comment-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e4ec;
    border-radius: 10px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.92rem;
    color: #333;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfd;
    box-sizing: border-box;
}

.blog-comment-input:focus {
    outline: none;
    border-color: #ef8354;
    box-shadow: 0 0 0 3px rgba(239, 131, 84, 0.12);
}

.blog-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.blog-comment-char-count {
    font-size: 0.78rem;
    color: #aaa;
}

.blog-comment-submit {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ef8354, #e06e3a);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, transform 0.15s;
}

.blog-comment-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #e06e3a, #c85c2e);
    transform: translateY(-1px);
}

.blog-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Login prompt */
.blog-comment-login {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8f9fc;
    border: 1px solid #e8ecf4;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #666;
}

.blog-comment-login a {
    color: #ef8354;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-comment-login a:hover {
    color: #e06e3a;
}

/* Comment list */
.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f1f5;
}


/* ===== DARK MODE ===== */
html[data-theme="dark"] .blog-hero {
    background:
        linear-gradient(135deg, rgba(18, 18, 26, 0.94) 0%, rgba(22, 22, 34, 0.92) 100%),
        url('photos/blog.jpg') center / cover no-repeat;
    border-bottom-color: #2e2e42;
}

html[data-theme="dark"] .blog-hero h1 { color: #e8e8f0; }
html[data-theme="dark"] .blog-lead { color: #a0a0b4; }

html[data-theme="dark"] .blog-card {
    background: #1a1a2a;
    border-color: #2e2e42;
}

html[data-theme="dark"] .blog-card:hover {
    border-color: #3a3a50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .blog-card-date { color: #606074; }
html[data-theme="dark"] .blog-card-title { color: #e8e8f0; }
html[data-theme="dark"] .blog-card-excerpt { color: #a0a0b4; }

html[data-theme="dark"] .blog-back { color: #808098; }
html[data-theme="dark"] .blog-back:hover { color: #e0e0ec; }

html[data-theme="dark"] .blog-post h1 { color: #e8e8f0; }
html[data-theme="dark"] .blog-post h2 { color: #e0e0ec; }
html[data-theme="dark"] .blog-post p { color: #c0c0d4; }
html[data-theme="dark"] .blog-post p strong { color: #e0e0ec; }
html[data-theme="dark"] .blog-meta { color: #606074; }
html[data-theme="dark"] .blog-meta .blog-author { color: #808098; }
html[data-theme="dark"] .blog-divider { border-top-color: #2e2e42; }

html[data-theme="dark"] .blog-comments-heading { color: #e0e0ec; }

html[data-theme="dark"] .blog-comment-input {
    background: #161620;
    border-color: #2e2e42;
    color: #d8d8e8;
}

html[data-theme="dark"] .blog-comment-input:focus {
    border-color: #ef8354;
}

html[data-theme="dark"] .blog-comment-char-count { color: #606074; }

html[data-theme="dark"] .blog-comment-login {
    background: #161620;
    border-color: #2e2e42;
    color: #a0a0b4;
}

html[data-theme="dark"] .blog-comment-item {
    border-bottom-color: #2e2e42;
}

.blog-comment-item:last-child {
    border-bottom: none;
}

.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.blog-comment-author {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2b2d42;
}

.blog-comment-time {
    font-size: 0.78rem;
    color: #aaa;
}

.blog-comment-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.blog-comment-delete svg {
    width: 14px;
    height: 14px;
}

.blog-comment-delete:hover {
    color: #e74c3c;
}

.blog-comment-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.blog-comment-empty,
.blog-comment-error {
    font-size: 0.92rem;
    color: #999;
    font-style: italic;
    padding: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-comment-input {
        font-size: 0.88rem;
    }

    .blog-comment-text {
        font-size: 0.9rem;
    }
}
