/* Blog-only overrides (scoped by body.blog) to keep the homepage styling unchanged. */

body.blog .container {
    max-width: 900px;
}

body.blog section {
    padding: 2rem;
}

body.blog h1 {
    margin-bottom: 0.5rem;
}

body.blog .blog-meta {
    color: #666;
    margin-bottom: 1.25rem;
}

body.blog .blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    /* Keep the body text aligned to the same left/right edges as the main heading. */
    width: 100%;
}

body.blog .blog-content p {
    margin: 0 0 1rem;
    text-align: justify;
    hyphens: auto;
}

body.blog .blog-content h2 {
    /* Override homepage section h2 styles for normal article headings. */
    display: block;
    padding-bottom: 0;
    position: static;
    margin: 2rem 0 0.75rem;
    font-size: 1.4rem;
    line-height: 1.3;
}

body.blog .blog-content h2::after {
    content: none;
}

body.blog .blog-content h3 {
    margin: 1.5rem 0 0.5rem;
}

body.blog .blog-content ul,
body.blog .blog-content ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

body.blog .blog-content li {
    margin: 0 0 0.35rem;
    text-align: justify;
    hyphens: auto;
}

body.blog .blog-content img {
    display: block;
    width: 100%;
    max-width: 720px;
    object-fit: contain;
    height: auto;
    max-height: 380px;
    margin: 1rem auto 1.5rem;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

body.blog .blog-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

body.blog.blog-image-modal-open {
    overflow: hidden;
}

body.blog .blog-image-modal[hidden] {
    display: none;
}

body.blog .blog-image-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

body.blog .blog-image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

body.blog .blog-image-modal__content {
    position: relative;
    max-width: min(1200px, 92vw);
    max-height: 92vh;
    margin: 4vh auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body.blog .blog-image-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
}

body.blog .blog-image-modal__content img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 92vh;
    object-fit: contain;
    margin: 0;
    border-radius: 0;
    cursor: zoom-out;
}

body.blog .blog-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--secondary-color);
    background: #f7f9fb;
    text-align: left;
}

body.blog .blog-post-list {
    list-style: none;
    padding-left: 0;
}

body.blog .blog-post-list-item {
    margin-bottom: 1rem;
}

body.blog .blog-post-card {
    display: block;
    padding: 1.25rem 1.25rem;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

body.blog .blog-post-card:hover {
    transform: translateY(-1px);
    border-color: #d9d9d9;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

body.blog .blog-post-card__date {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

body.blog .blog-post-card__title {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    line-height: 1.3;
    padding-bottom: 0;
    position: static;
}

body.blog .blog-post-card__title::after {
    content: none;
}

body.blog .blog-post-card__description {
    color: #2c3e50;
    opacity: 0.9;
    line-height: 1.6;
}
