/* ===================================
   Blog Styles
   Uses existing CSS variables from styles.css
   =================================== */

/* Blog Page Layout */
.blog-page {
    padding-top: 100px;
    padding-bottom: var(--section-gap);
    min-height: 100vh;
}

.blog-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.blog-header .section-title {
    margin-bottom: 12px;
}

.blog-header p {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.7;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent-light);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d9 100%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-date {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.3;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card-title a {
    color: inherit;
    transition: var(--transition);
}

.blog-card-title a:hover {
    color: var(--color-accent);
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-accent);
    transition: var(--transition);
}

.blog-card-link:hover {
    gap: 10px;
}

.blog-card-link svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

/* No Image Placeholder */
.blog-card-image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-light);
}

.blog-card-image--empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* Loading Skeleton */
.blog-skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.skeleton-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.skeleton-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4df 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-body {
    padding: 24px;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4df 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 12px;
}

.skeleton-line:nth-child(1) {
    width: 40%;
    height: 12px;
}

.skeleton-line:nth-child(2) {
    width: 90%;
    height: 18px;
}

.skeleton-line:nth-child(3) {
    width: 70%;
    height: 18px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty / Error State */
.blog-empty {
    text-align: center;
    padding: 80px 24px;
}

.blog-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.blog-empty h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.blog-empty p {
    font-size: 15px;
    color: var(--color-muted);
}

/* ===================================
   Single Post Page
   =================================== */
.post-page {
    padding-top: 80px;
    min-height: 100vh;
}

.post-hero {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    margin-bottom: 48px;
}

.post-hero img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
}

.post-article {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-accent);
    margin-bottom: 32px;
    transition: var(--transition);
}

.post-breadcrumb:hover {
    opacity: 0.7;
}

.post-breadcrumb svg {
    width: 16px;
    height: 16px;
}

.post-meta {
    margin-bottom: 24px;
}

.post-date {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-dark);
    margin-bottom: 32px;
}

/* Post Body — Prose Typography */
.post-body h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 40px 0 16px;
    line-height: 1.3;
}

.post-body h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 36px 0 14px;
    line-height: 1.3;
}

.post-body h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 28px 0 12px;
    line-height: 1.4;
}

.post-body h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 24px 0 10px;
    line-height: 1.4;
}

.post-body p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 20px;
}

.post-body a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.post-body a:hover {
    color: var(--color-accent-light);
}

.post-body strong {
    color: var(--color-dark);
    font-weight: 600;
}

.post-body blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 16px 24px;
    margin: 28px 0;
    background: linear-gradient(135deg, rgba(139, 92, 42, 0.04) 0%, rgba(196, 154, 92, 0.06) 100%);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--color-muted);
}

.post-body ul,
.post-body ol {
    margin: 16px 0;
    padding-left: 28px;
}

.post-body li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 8px;
}

.post-body ul li::marker {
    color: var(--color-accent);
}

.post-body ol li::marker {
    color: var(--color-accent);
    font-weight: 600;
}

.post-body code {
    background: rgba(139, 92, 42, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Post Loading State */
.post-loading {
    max-width: 740px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.post-skeleton-title {
    height: 36px;
    width: 80%;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4df 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 16px;
}

.post-skeleton-meta {
    height: 14px;
    width: 30%;
    border-radius: 7px;
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4df 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 32px;
}

.post-skeleton-body .skeleton-line {
    width: 100%;
    height: 14px;
    margin-bottom: 14px;
}

.post-skeleton-body .skeleton-line:nth-child(3n) {
    width: 85%;
}

.post-skeleton-body .skeleton-line:nth-child(5n) {
    width: 60%;
}

/* ===================================
   Blog Responsive — Tablet
   =================================== */
@media (max-width: 992px) {
    .blog-grid,
    .blog-skeleton {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .post-hero {
        max-height: 360px;
    }

    .post-hero img {
        max-height: 360px;
    }
}

/* ===================================
   Blog Responsive — Mobile
   =================================== */
@media (max-width: 640px) {
    .blog-page {
        padding-top: 80px;
    }

    .blog-header {
        margin-bottom: 36px;
    }

    .blog-grid,
    .blog-skeleton {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-card-body {
        padding: 20px;
    }

    .blog-card-title {
        font-size: 18px;
    }

    .post-page {
        padding-top: 70px;
    }

    .post-hero {
        max-height: 260px;
        margin-bottom: 32px;
    }

    .post-hero img {
        max-height: 260px;
    }

    .post-article {
        padding: 0 20px 60px;
    }

    .post-title {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .post-body p {
        font-size: 15px;
    }

    .post-body h1 { font-size: 26px; }
    .post-body h2 { font-size: 22px; }
    .post-body h3 { font-size: 19px; }
    .post-body h4 { font-size: 17px; }
}

