/* Carousel base container */
.posts-carousel {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.posts-carousel-title {
    font-size: 1.75rem;
    text-align: left;
    margin: 0 0 1rem 2rem;
    color: var(--color-dark);
}

/* Main carousel structure */
.posts-carousel-viewport {
    margin: 0;
    position: relative;
    overflow: hidden;
}

.posts-carousel-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
    gap: 2rem;
    padding: 1rem 2rem;
}

/* Grid-based page layout */
.carousel-page {
    display: grid;
    min-width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0;
}

/* Individual post cards */
.carousel-post {
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-light);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.carousel-thumbnail {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.carousel-title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.carousel-title a:hover {
    color: var(--color-primary);
}

.carousel-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.carousel-meta .post-date {
    white-space: nowrap;
}

.carousel-meta .post-category {
    font-weight: 600;
}

.carousel-excerpt {
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Clickable overlay */
.carousel-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-decoration: none;
    color: inherit;
}

/* Pagination dots */
.carousel-pagination {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 0.5rem 0;
}

/* Posts carousel pagination dots - specific selectors to avoid conflicts */
.posts-carousel .carousel-pagination .carousel-dot,
.hydrology-posts-posts-carousel-block .carousel-pagination .carousel-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(39, 102, 123, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.posts-carousel .carousel-pagination .carousel-dot:hover,
.hydrology-posts-posts-carousel-block .carousel-pagination .carousel-dot:hover {
    background: rgba(39, 102, 123, 0.6) !important;
    transform: scale(1.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.posts-carousel .carousel-pagination .carousel-dot.active,
.hydrology-posts-posts-carousel-block .carousel-pagination .carousel-dot.active {
    background: #27667B !important;
    width: 24px;
    border-radius: 5px;
    transform: none;
    box-shadow: 0 2px 8px rgba(39, 102, 123, 0.3);
}

/* Legacy carousel-dot class for backward compatibility */
.carousel-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(39, 102, 123, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.carousel-dot:hover {
    background: rgba(39, 102, 123, 0.6);
    transform: scale(1.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.carousel-dot.active {
    background: #27667B;
    width: 24px;
    border-radius: 5px;
    transform: none;
    box-shadow: 0 2px 8px rgba(39, 102, 123, 0.3);
}

/* Force blue color for carousel dots - override any other styles */
.posts-carousel .carousel-dot,
.hydrology-posts-posts-carousel-block .carousel-dot {
    background: rgba(39, 102, 123, 0.3) !important;
}

.posts-carousel .carousel-dot:hover,
.hydrology-posts-posts-carousel-block .carousel-dot:hover {
    background: rgba(39, 102, 123, 0.6) !important;
}

.posts-carousel .carousel-dot.active,
.hydrology-posts-posts-carousel-block .carousel-dot.active {
    background: #27667B !important;
}

/* Responsive breakpoints */
@media screen and (max-width: 1199px) and (min-width: 768px) {
    .carousel-page {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-carousel-wrapper {
        padding: 1rem 1.5rem;
    }
}

@media screen and (max-width: 767px) {
    .carousel-page {
        grid-template-columns: 1fr;
    }
    
    .posts-carousel-wrapper {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .carousel-thumbnail {
        height: 200px;
    }
    
    .posts-carousel-title {
        margin-left: 1rem;
    }
}

