/* Yum Posts Carousel - Frontend Styles */

.yum-posts-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

/* Navigation */
.yum-carousel-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 20px;
    padding-right: 10px;
}

.yum-carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--yum-arrow-color, #333);
    border-radius: 50%;
    background: transparent;
    color: var(--yum-arrow-color, #333);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.yum-carousel-arrow:hover:not(.disabled) {
    background: var(--yum-arrow-hover-bg, #333);
    border-color: var(--yum-arrow-hover-bg, #333);
    color: var(--yum-arrow-hover-color, #fff);
}

.yum-carousel-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.yum-carousel-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

/* Container */
.yum-carousel-container {
    overflow: hidden;
    margin: 0 -12px;
    padding: 0 12px;
}

.yum-carousel-track {
    display: flex;
    gap: 24px;
    cursor: grab;
    user-select: none;
}

.yum-carousel-track:active {
    cursor: grabbing;
}

/* Slides */
.yum-carousel-slide {
    flex: 0 0 calc(33.333% - 16px);
    min-width: calc(33.333% - 16px);
}

@media (max-width: 900px) {
    .yum-carousel-slide {
        flex: 0 0 calc(50% - 12px);
        min-width: calc(50% - 12px);
    }
}

@media (max-width: 600px) {
    .yum-carousel-slide {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

/* Card */
.yum-carousel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f0eb;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yum-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Card Link */
.yum-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.yum-card-link:hover,
.yum-card-link:focus {
    text-decoration: none;
    color: inherit;
}

/* Image */
.yum-card-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin: 16px;
    border-radius: 8px;
}

.yum-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yum-carousel-card:hover .yum-card-image {
    transform: scale(1.05);
}

.yum-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd 0%, #eee 100%);
}

/* Category Badge */
.yum-card-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 8px 16px;
    background: var(--yum-category-bg, #d4a574);
    color: var(--yum-category-color, #fff);
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    text-transform: capitalize;
}

/* Content */
.yum-card-date {
    display: block;
    padding: 0 20px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #888;
}

.yum-card-title {
    padding: 0 20px;
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
}

.yum-card-title a {
    color: inherit;
    text-decoration: none;
}

.yum-card-title a:hover {
    text-decoration: underline;
}

.yum-card-excerpt {
    padding: 0 20px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    flex-grow: 1;
}

/* Read More Button */
.yum-card-read-more {
    display: inline-block;
    margin: 0 20px 20px;
    padding: 10px 20px;
    background: var(--yum-button-bg, #d4a574);
    color: var(--yum-button-color, #fff);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease, opacity 0.3s ease;
    align-self: flex-start;
}

.yum-card-read-more:hover {
    opacity: 0.85;
    color: var(--yum-button-color, #fff);
    text-decoration: none;
}

/* Progress Bar */
.yum-carousel-progress {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 30px;
    overflow: hidden;
}

.yum-carousel-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #333 0%, #666 100%);
    border-radius: 2px;
    transition: width 0.4s ease, margin-left 0.4s ease;
}

/* Accessibility */
.yum-posts-carousel-wrapper:focus {
    outline: 2px solid #007cba;
    outline-offset: 4px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yum-carousel-slide {
    animation: fadeIn 0.5s ease forwards;
}

.yum-carousel-slide:nth-child(1) { animation-delay: 0.1s; }
.yum-carousel-slide:nth-child(2) { animation-delay: 0.2s; }
.yum-carousel-slide:nth-child(3) { animation-delay: 0.3s; }
