/* Hero Blog Section */
.hero-blog {
    background-color: transparent;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 40px;
    margin: 120px auto 40px auto; /* Fixed header overlap with proper top margin */
    position: relative;
    overflow: hidden;
    max-width: 1247px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hero-blog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.8) 35%, 
        rgba(255, 255, 255, 0.4) 60%, 
        rgba(255, 255, 255, 0.0) 85%);
    z-index: 1;
    border-radius: 40px;
}

.hero-content-blog {
    position: relative;
    z-index: 2;
    padding: 80px 0 80px 80px;
    max-width: 600px;
    width: 100%;
}

.hero-blog h1 {
    font-size: 64px;
    margin-bottom: 44px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

.hero-blog p {
    font-size: 20px;
    max-width: 500px;
    line-height: 1.5;
    color: #333;
    font-weight: 600;
}

/* Categories and Search Section */
.categories-blog {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.category-buttons-blog {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-buttons-blog button {
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 700;
    padding: 10px 15px;
    font-size: 16px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.category-buttons-blog button.active {
    background-color: #CBDFFE;
    color: #333;
}

.category-buttons-blog button:hover:not(.active) {
    background-color: #CBDFFE;
}

.search-blog {
    display: flex;
    align-items: center;
    background: #F4F9FF;
    border-radius: 25px;
    padding: 10px 20px;
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

video.article-image {
    background: #000;
}

.article-video-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-video-wrapper .article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.article-video-wrapper .article-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.article-card-blog:hover .article-video-wrapper .article-image {
    opacity: 0;
    pointer-events: none;
}

.search-blog input {
    padding-left: 15px;
    background: transparent;
    font-family: inherit;
    border: none;
    width: 150px;
}

.search-blog input:focus {
    outline: none;
}


.articles-grid-blog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.article-card-blog {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card-blog:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Articles Grid and Cards */
.article-content-blog {
    padding: 20px;
}

.tags-blog {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag-blog {
    background-color: #e8eef4;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.article-card-blog h2 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
    font-weight: 600;
}

.article-card-blog p {
    color: #474545;
    font-size: 14px;
    margin-bottom: 15px;
}

.read-time-blog {
    color: #A1AAB4;
    font-size: 12px;
    font-weight: bold;
}

.content-container-blog {
    width: 80vw;
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Load More Button */
.load-more-wrapper-blog {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px 0 32px 0;
    width: 100%;
}

.load-more-btn-blog {
    background: #383838;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 16px 90px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 300px;
    text-align: center;
    letter-spacing: 0.01em;
}

.load-more-btn-blog:hover {
    background: #111;
}

.load-more-btn-blog:disabled,
.load-more-btn-blog.loading {
    background: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

/* No results and error states */
.no-results-blog,
.error-blog {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-results-blog p,
.error-blog p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.no-results-blog p:last-child,
.error-blog p:last-child {
    margin-bottom: 0;
    font-size: 14px;
    color: #888;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero-blog {
        margin: 100px auto 32px auto;
        min-height: 450px;
        border-radius: 30px;
    }
    
    .hero-blog::before {
        border-radius: 30px;
    }
    
    .hero-content-blog {
        padding: 60px 0 60px 60px;
        max-width: 500px;
    }

    .hero-blog h1 {
        font-size: 48px;
        margin-bottom: 20px;
    }

    .hero-blog p {
        font-size: 20px;
        max-width: 450px;
    }

    .articles-grid-blog {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-blog {
        margin: 90px auto 24px auto;
        min-height: 400px;
        border-radius: 25px;
    }
    
    .hero-blog::before {
        background: linear-gradient(90deg, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(255, 255, 255, 0.85) 45%, 
            rgba(255, 255, 255, 0.3) 75%, 
            rgba(255, 255, 255, 0.0) 100%);
        border-radius: 25px;
    }
    
    .hero-content-blog {
        padding: 50px 0 50px 40px;
        max-width: 420px;
    }

    .hero-blog h1 {
        font-size: 36px;
        margin-bottom: 16px;
    }

    .hero-blog p {
        font-size: 18px;
        max-width: 380px;
    }

    .categories-blog {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .category-buttons-blog {
        justify-content: flex-start;
        gap: 8px;
    }

    .search-blog {
        width: 100%;
    }

    .search-blog input {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .hero-blog {
        margin: 100px auto 20px auto; /* Account for mobile header */
        min-height: 350px;
        border-radius: 20px;
        background-position: center right;
    }
    
    .hero-blog::before {
        background: linear-gradient(90deg, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(255, 255, 255, 0.9) 50%, 
            rgba(255, 255, 255, 0.5) 80%, 
            rgba(255, 255, 255, 0.1) 100%);
        border-radius: 20px;
    }
    
    .hero-content-blog {
        padding: 40px 0 40px 30px;
        max-width: 100%;
        width: 90%;
    }

    .hero-blog h1 {
        font-size: 32px;
        margin-bottom: 14px;
    }

    .hero-blog p {
        font-size: 16px;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .hero-blog {
        margin: 90px auto 16px auto;
        min-height: 280px;
        border-radius: 15px;
    }
    
    .hero-blog::before {
        background: linear-gradient(180deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(255, 255, 255, 0.8) 60%, 
            rgba(255, 255, 255, 0.3) 100%);
        border-radius: 15px;
    }
    
    .hero-content-blog {
        padding: 30px 20px;
        text-align: center;
        max-width: 100%;
        width: 100%;
    }

    .hero-blog h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .hero-blog p {
        font-size: 15px;
    }

    .articles-grid-blog {
        grid-template-columns: 1fr;
    }

    .categories-blog {
        margin: 16px 0;
        gap: 12px;
    }

    .category-buttons-blog {
        gap: 6px;
        flex-wrap: wrap;
    }

    .search-blog input {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .hero-blog {
        margin: 80px 15px 12px 15px;
        min-height: 240px;
        border-radius: 12px;
    }
    
    .hero-blog::before {
        border-radius: 12px;
    }
    
    .hero-content-blog {
        padding: 25px 15px;
    }

    .hero-blog h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .hero-blog p {
        font-size: 14px;
    }

    .content-container-blog {
        width: 100%;
        padding: 0 15px;
    }
}

/* SEO-friendly Category and Tag Links */
.category-buttons-blog a.category-btn,
.category-buttons-blog .category-btn {
    display: inline-block;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 700;
    padding: 10px 15px;
    font-size: 16px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}

.category-buttons-blog a.category-btn.active,
.category-buttons-blog .category-btn.active {
    background-color: #CBDFFE;
    color: #333;
}

.category-buttons-blog a.category-btn:hover:not(.active),
.category-buttons-blog .category-btn:hover:not(.active) {
    background-color: #CBDFFE;
}

/* SEO-friendly tag links */
a.tag-blog {
    background-color: #e8eef4;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

a.tag-blog:hover {
    background-color: #CBDFFE;
}

/* Article card links */
.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-content-blog a {
    text-decoration: none;
    color: inherit;
}

.article-content-blog a:hover h2 {
    color: #0066cc;
}

/* Current filter info for tag/category pages */
.current-filter-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 500;
    color: #666;
}

.filter-value {
    font-weight: 600;
}

.clear-filter {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-left: auto;
}

.clear-filter:hover {
    color: #333;
    text-decoration: underline;
}

/* Archive pagination */
.archive-pagination {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.archive-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.archive-pagination li {
    display: inline-block;
}

.archive-pagination a,
.archive-pagination span {
    display: inline-block;
    padding: 10px 15px;
    background-color: #f4f9ff;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s;
}

.archive-pagination a:hover {
    background-color: #CBDFFE;
}

.archive-pagination .current {
    background-color: #CBDFFE;
    font-weight: 700;
}

/* No results message */
.no-results-blog {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 15px;
}

.no-results-blog p:first-child {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.no-results-blog p:last-child {
    font-size: 16px;
    color: #666;
}

/* Error message */
.error-blog {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background-color: #fff5f5;
    border-radius: 15px;
}

.error-blog p:first-child {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #c53030;
}

.error-blog p:last-child {
    font-size: 16px;
    color: #666;
}