/* Blog Page Styles */
.blog-page .page-header {
    margin-bottom: 40px;
    padding-top: 20px;
}

.blog-page .page-title {
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0;
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 800px; /* Adjust based on container width needs */
    margin: 0 auto;
}

.blog-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.blog-item-thumbnail {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.blog-item-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 20px;
}

.blog-item-content {
    text-align: left;
}

.blog-item-title {
	text-align: left;
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 10px;
    line-height: 1.3;
	
}

.blog-item-title a {
    color: inherit;
    text-decoration: none;
}

.blog-item-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 16px;
    line-height: 1.4;
	text-align: left;
}

.blog-item-meta {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 20px;
	text-align: left;
}

.blog-item-description {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    max-width: 90%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .blog-page .page-title {
        font-size: 40px;
    }
    
    .blog-item-title {
        font-size: 32px;
    }
    
    .blog-item-subtitle {
        font-size: 22px;
    }
}

/* Desktop styles for blog/journal page */
@media (min-width: 992px) {
    .blog-item-thumbnail {
        border-radius: 20px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .blog-item-thumbnail img {
        border-radius: 20px;
    }
    
    .blog-item-thumbnail a {
        display: block;
        width: 100%;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .blog-item-content {
        text-align: center;
    }
    
    .blog-item-title {
        text-align: left;
    }
    
    .blog-item-meta {
        text-align: left;
    }
}

@media (max-width: 991px) {
    .main {
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .main {
        padding-top: 0;
    }
}

/* ========================================
   Blog Carousel Styles - Horizontal Scroll
   ======================================== */

.blog-carousel {
    position: relative !important;
    width: 100% !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    aspect-ratio: 1 / 1 !important;
}

.blog-carousel-slides {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: 100% !important;
    transition: transform 0.4s ease-out;
}

.blog-carousel-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
}

.blog-carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover;
    border-radius: 0 !important;
}

/* Navigation Arrows */
.blog-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    border-radius: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: none;
}

.blog-carousel:hover .blog-carousel-nav {
    opacity: 1;
}

.blog-carousel-nav:hover {
    background: transparent;
    box-shadow: none;
}

.blog-carousel-nav svg {
    display: none;
}

.blog-carousel-nav::before {
    content: '‹';
    font-size: 32px;
    line-height: 1;
    color: #000;
    font-weight: 300;
}

.blog-carousel-next::before {
    content: '›';
}

.blog-carousel-prev {
    left: 16px;
}

.blog-carousel-next {
    right: 16px;
}

/* Progress Bars Indicator */
.blog-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 15px;
    right: 15px;
    transform: none;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.blog-carousel-dot {
    flex: 1;
    height: 2px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
}

.blog-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.blog-carousel-dot.active {
    background: #000;
    transform: none;
}

/* Desktop carousel styles */
@media (min-width: 992px) {
    .blog-carousel {
        border-radius: 20px;
    }
    
    .blog-carousel-nav {
        width: 50px;
        height: 50px;
    }
    
    .blog-carousel-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .blog-carousel-prev {
        left: 20px;
    }
    
    .blog-carousel-next {
        right: 20px;
    }
    
    .blog-carousel-dots {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .blog-carousel-dot {
        height: 3px;
    }
}

/* Mobile carousel - hide navigation arrows, swipe only */
@media (max-width: 767px) {
    .blog-carousel-nav {
        display: none !important;
    }
    
    .blog-carousel-dots {
        bottom: 8px;
        left: 10px;
        right: 10px;
        gap: 3px;
    }
    
    .blog-carousel-dot {
        height: 2px;
    }
}

/* ========================================
   Single Post Page Carousel Styles
   ======================================== */

.single-post-page .entry-thumbnail.blog-carousel,
.entry-thumbnail.blog-carousel {
    position: relative !important;
    margin-bottom: 30px;
    border-radius: 20px !important;
    overflow: hidden !important;
    width: 100% !important;
    aspect-ratio: 4 / 3 !important; /* Фиксированное соотношение для единообразия */
}

.single-post-page .entry-thumbnail.blog-carousel .blog-carousel-slides,
.entry-thumbnail.blog-carousel .blog-carousel-slides {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: 100% !important;
}

.single-post-page .entry-thumbnail.blog-carousel .blog-carousel-slide,
.entry-thumbnail.blog-carousel .blog-carousel-slide {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
}

.single-post-page .entry-thumbnail.blog-carousel img,
.entry-thumbnail.blog-carousel img {
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Заполняет всю область, обрезая при необходимости */
}

.single-post-page .entry-thumbnail:not(.blog-carousel) {
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
}

.single-post-page .entry-thumbnail:not(.blog-carousel) img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* Desktop single post */
@media (min-width: 992px) {
    .single-post-page .entry-thumbnail.blog-carousel,
    .entry-thumbnail.blog-carousel {
        border-radius: 20px !important;
    }
    
    .single-post-page .entry-thumbnail:not(.blog-carousel) img {
        border-radius: 20px;
    }
}

/* Center title and date on single post */
.single-post-page .entry-header {
    text-align: center;
    margin-bottom: 30px;
}

.single-post-page .entry-title {
    text-align: center;
}

.single-post-page .entry-meta {
    text-align: center;
}

.entry-meta,
.entry-meta span,
.entry-meta a,
.entry-meta time,
.entry-meta-item {
    font-weight: 400 !important;
}

/* Entry content text styles */
.entry-content {
    font-weight: 400 !important;
}

.entry-content p,
.entry-content span,
.entry-content li,
.entry-content a {
    font-weight: 400 !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-weight: 400 !important;
}
