/* Import Barlow font */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&display=swap');

/* Blog Page Template Styles */
.blog-page-section {
    padding: 2rem 0;
}

.blog-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .blog-container {
        padding: 0 21px;
    }
}

.blog-content-wrapper {
    margin-bottom: 3rem;
}

.blog-page-content {
    max-width: 66.666%;
    margin: 0 auto;
    text-align: center;
    font-family: 'Barlow', sans-serif;
}

@media (max-width: 767px) {
    .blog-page-content {
        max-width: 100%;
        text-align: left;
    }
}

/* Blog Loop Section */
.blog-loop-section {
    margin-bottom: 4rem;
}

/* Search and Filter Row */
.blog-filters {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 3rem;
}

.blog-search-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-search-input {
    padding: 1rem 1.5rem;
    border: 2px solid #000;
    border-radius: 50px;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    min-width: 300px;
}

.blog-search-input:focus {
    border-color: #000;
}

.blog-search-btn {
    width: 60px;
    height: 60px;
    background: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-btn svg {
    fill: white;
}

.thema-filter-select {
    padding: 1rem 1.5rem;
    border: 2px solid #000;
    border-radius: 50px;
    background: #000;
    color: #fff;
    font-weight: 900;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    min-width: 335px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.blog-filter-dropdown {
    position: relative;
}

.blog-filter-dropdown::before {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    width: 14px;
    height: 12px;
    background-image: url('/wp-content/uploads/2025/07/Iconwhite.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
}

.thema-filter-select:focus {
    border-color: #000;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .blog-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Post Card */
.blog-post-card {
    background: white;
    overflow: hidden;
    transition: transform 0.3s ease;
    font-family: 'Barlow', sans-serif;
}

.blog-post-card:hover {
    transform: translateY(-5px);
}

.blog-post-image {
    width: 100%;
    height: 245px;
    overflow: hidden;
    border-radius: 5px;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-content {
    padding-top: 1.6rem;
}

.blog-post-thema {
    color: #64CCC9;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.32px;
}

.blog-post-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    margin: 5px 0;
    line-height: 1.3;
    letter-spacing: 0.4px;
}

.blog-post-excerpt {
    font-size: 0.9rem;
    color: #000;
    line-height: 1.5;
    letter-spacing: 0.3px;
    margin: 0 0 1.5rem 0;
}

.blog-post-link {
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.blog-post-link span {
    color: #64CCC9;
    padding-left: 12px;
}

.blog-post-link:hover {
    color: #64CCC9;
}

.blog-post-link:hover span {
    color: #fbdb65 !important;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
}

.pagination-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e1e5e9;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: #64CCC9;
    color: white;
    border-color: #64CCC9;
}

/* CTA Section */
.blog-cta-section {
    padding: 85px 0;
    background: #F0F0F0;
}

.blog-cta-content {
    display: flex;
    align-items: center;
    gap: 69px;
    max-width: 850px;
    margin: 0 auto;
}

.blog-cta-text {
    flex: 1;
    font-family: 'Barlow', sans-serif;
}

.blog-cta-text h2 {
    font-size: 1.728rem;
    font-weight: 800;
    color: #000;
    margin: 0 0 2rem 0;
    line-height: 1.1;
}

.blog-cta-text p {
    width: 409px;
    font-size: 1.1rem;
    line-height: 35px;
    font-weight: 300;
    margin: 0 0 2rem 0;
}

.blog-cta-btn {
    display: inline-block;
    background: #333;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

.blog-cta-btn:hover {
    background: #555;
    color: white;
    text-decoration: none;
}

.blog-cta-image {
    flex: 0 1 auto;
}

.blog-cta-image img {
    width: 100%;
    max-width: 270px;
    height: 360px;
    border-radius: 45% 45% 45% 45%/35% 35% 35% 35%;
    object-fit: cover;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Blog Detail Hero Section */
.blog-detail-hero-section {
    padding: 60px 0;
    background: #fff;
}

.blog-detail-hero-wrapper {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-detail-hero-content {
    flex: 1;
}

.blog-detail-hero-content .wp-block-heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.blog-detail-hero-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

.blog-detail-hero-image {
    flex: 0 0 374px;
}

.blog-detail-hero-featured-image {
    width: 374px;
    height: 501px;
    border-radius: 170px;
    object-fit: cover;
}

/* Blog Detail Content Section */
.blog-detail-content-section {
    padding: 60px 0;
    background: #fff;
}

/* Container 1: Main Content + TOC */
.blog-detail-main-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.blog-detail-content {
    flex: 1;
}

.blog-detail-content-blocks {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-detail-content-block {
    margin-bottom: 40px;
}

.blog-detail-content-title {
    color: #64CCC9;
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 20px;
}

.blog-detail-content-text {
    font-size: 16px;
    color: #000;
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-detail-content-image {
    margin-bottom: 20px;
}

.blog-detail-content-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.blog-detail-content-button {
    margin-top: 20px;
}

/* Table of Contents */
.blog-detail-toc {
    flex: 0 0 374px;
}

.blog-detail-toc-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blog-detail-toc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #000;
    font-size: 16px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

.blog-detail-toc-item:hover {
    color: #64CCC9;
}

.blog-detail-toc-item svg {
    fill: #000;
    width: 20px;
    height: 20px;
}

/* Container 2: Gallery */
.blog-detail-gallery-section {
    margin-bottom: 80px;
}

.blog-detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-detail-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* Related Posts Section */
.blog-detail-related-section {
    padding: 85px 0;
    background: #F0F0F0;
}

.blog-detail-related-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-detail-related-posts {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.blog-detail-related-post {
    flex: 1;
    max-width: 580px;
    cursor: pointer;
}

/* Keep next post on right when previous doesn't exist */
.blog-detail-related-post--next:first-child {
    margin-left: auto;
}

.blog-detail-related-nav {
    margin-bottom: 20px;
    position: relative;
}

.blog-detail-related-nav-content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.blog-detail-related-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    position: relative;
}

/* Animated line underneath ONLY the custom text */
.blog-detail-related-label::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #64CCC9, #64CCC9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.blog-detail-related-post:hover .blog-detail-related-label::after {
    transform: scaleX(1);
}

.blog-detail-related-nav svg {
    fill: #64CCC9;
    flex-shrink: 0;
}

.blog-detail-related-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.blog-detail-related-image {
    flex: 0 0 138px;
}

.blog-detail-related-image img {
    width: 138px;
    height: 138px;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    border-radius: 5px;
    object-fit: cover;
}

.blog-detail-related-text {
    flex: 1;
}

.blog-detail-related-category {
    color: #64CCC9;
    font-family: Barlow;
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
    line-height: 20px;
    letter-spacing: 0.32px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.blog-detail-related-title {
    margin: 0;
}

.blog-detail-related-title a {
    color: #000;
    font-size: 20px;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.4px;
    text-decoration: none;
}

.blog-detail-related-title a:hover {
    color: #64CCC9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .blog-search-wrapper {
        justify-content: space-between;
    }
    
    .blog-search-input,
    .thema-filter-select {
        min-width: auto;
        flex: 1;
    }
    
    .blog-cta-content {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
    }
    
    .blog-cta-image img {
        width: 300px;
        height: 300px;
    }
    
    .blog-cta-text h2 {
        font-size: 2.5rem;
    }
    
    .blog-detail-hero-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .blog-detail-hero-image {
        flex: none;
        text-align: center;
    }
    
    .blog-detail-hero-featured-image {
        width: 280px;
        height: 375px;
        border-radius: 130px;
    }
    
    .blog-detail-main-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .blog-detail-toc {
        flex: none;
    }
    
    .blog-detail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-detail-related-posts {
        flex-direction: column;
        gap: 60px;
    }
    
    .blog-detail-related-post--next:first-child {
        margin-left: 0;
    }
    
    .blog-detail-related-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .blog-detail-gallery-grid {
        grid-template-columns: 1fr;
    }
}