/*
 * Completely new design for the carousel, now with full selector specificity
 * to prevent all conflicts with the theme's single page.
 */

/* The main container for the entire carousel section */
.my-carousel-container {
    /* background-color: #f8fafc; */
    padding: 2.5rem 1rem;
}

/* Wrapper to center the carousel content */
.my-carousel-container .my-carousel-wrapper {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
}

/* The overflow hidden container for the cards */
.my-carousel-container .my-carousel {
    flex-grow: 1;
    overflow: hidden;
}

/* The track that moves horizontally */
.my-carousel-container .my-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    padding: 20px 0;
    will-change: transform;
}

/* Navigation buttons */
.my-carousel-container .my-carousel-btn {
    background: transparent;
    border: none;
    color: #475569; /* Subtle gray color */
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease-in-out;
}

.my-carousel-container .my-carousel-btn:hover {
    color: #0f172a; /* Darker color on hover */
}

/* Carousel dots navigation */
.my-carousel-container .my-carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.my-carousel-container .my-carousel-dots button {
    background-color: #94a3b8; /* Light gray for inactive dots */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.my-carousel-container .my-carousel-dots button.active {
    background-color: #0f172a; /* Darker color for the active dot */
}

/*
 * The new card design, all selectors are now nested under the main container.
 */
.my-carousel-container .my-carousel-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    margin: 0 1rem;
    width: calc((100% / 3) - 2rem); /* 3 cards on desktop */
    display: flex;
    flex-direction: column;
}

.my-carousel-container .my-carousel-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.my-carousel-container .my-carousel-card a {
    text-decoration: none;
}

.my-carousel-container .my-carousel-card .my-card-image {
    width: 100%;
    height: 150px; /* Adjusted height to match the new image ratio */
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.my-carousel-container .my-carousel-card .my-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.my-carousel-container .my-carousel-card .my-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.my-carousel-container .my-carousel-card .my-card-excerpt {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.my-carousel-container .my-carousel-card .my-card-link {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: auto;
}

.my-carousel-container .my-carousel-card .my-card-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* CTA Card Specific Styling */
.my-carousel-container .my-cta-card {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #eff6ff; /* A lighter blue for the CTA */
}

.my-carousel-container .my-cta-card a {
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .my-carousel-container .my-carousel-card {
        width: calc((100% / 2) - 2rem); /* 2 cards on tablet */
    }
}

@media (max-width: 639px) {
    .my-carousel-container .my-carousel-card {
        width: calc(100% - 2rem); /* 1 card on mobile */
    }
}
