/* ========================================
   BLOG.CSS - Blog Page Specific Styles
   Base, Header, Footer, and Buttons moved to shared files
   ======================================== */

/* ========================================
   Header Jitter Prevention
   ======================================== */

/* Reserve scrollbar gutter from the start so dynamic content loading
   (JSON fetches) doesn't cause a viewport width shift that moves the header */
html {
    scrollbar-gutter: stable;
}

header {
    min-height: 88px;
    contain: layout;
    position: relative;
}

/* Prevent layout shift during initial load */
body {
    overflow-x: hidden;
}

/* Ensure stable positioning for header elements */
#name {
    contain: layout style;
}

#links {
    contain: layout;
}

.minis-button {
    will-change: transform;
    contain: layout style;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Prevent font loading jitter */
@media (max-width: 768px) {
    header {
        min-height: 200px;
    }
}

@media (min-width: 769px) and (max-width: 1440px) {
    header {
        min-height: 120px;
    }
}

/* Loading and Load More - Blog Specific */
.loading-container {
    text-align: center;
    padding: 40px;
    margin: 20px 0;
}

.loading-spinner {
    border: 4px solid #E8D9CD;
    border-top: 4px solid #3b342d;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #8b7355;
}

.no-results h3 {
    color: #3b342d;
    margin-bottom: 10px;
    font-size: 24px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-in-out;
}

/* Lazy loading */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Intro Section */
.intro-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(232, 217, 205, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.intro-section p {
    color: #3b342d;
    font-size: 24px;
    line-height: 1.6;
    margin: 0;
    font-weight: 600;
    max-width: 800px;
    margin: 0 auto;
}