/* MCAST News Carousel - Frontend Styles */

.mcast-news-carousel-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.mcast-news-carousel {
    position: relative;
    padding: 0 50px;
}

/* Equal Height Mode - Flexbox Layout */
.mcast-news-carousel.equal-height-mode .slick-track {
    display: flex !important;
    align-items: stretch;
}

.mcast-news-carousel.equal-height-mode .slick-slide {
    height: auto !important;
    display: flex !important;
}

.mcast-news-carousel.equal-height-mode .slick-slide > div {
    height: 100%;
    width: 100%;
    display: flex;
}

/* Carousel Item */
.mcast-news-carousel .carousel-item {
    margin: 0 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mcast-news-carousel.equal-height-mode .carousel-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mcast-news-carousel .carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.mcast-news-carousel .item-image {
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.mcast-news-carousel .item-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.mcast-news-carousel .item-image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcast-news-carousel .item-image-placeholder span {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Caption Area - Flexible in Equal Height Mode */
.mcast-news-carousel .item-caption {
    padding: 25px;
    color: white;
    position: relative;
}

.mcast-news-carousel.equal-height-mode .item-caption {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Title */
.mcast-news-carousel .item-title {
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.4;
    color: inherit;
}

.mcast-news-carousel .item-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mcast-news-carousel .item-title a:hover {
    opacity: 0.8;
}

/* Date */
.mcast-news-carousel .item-date {
    margin: 0 0 12px 0;
    font-style: italic;
    font-weight: 500;
    color: inherit;
}

/* Excerpt - Flexible Growth in Equal Height Mode */
.mcast-news-carousel .item-excerpt {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: inherit;
}

.mcast-news-carousel.equal-height-mode .item-excerpt {
    flex: 1;
    margin-bottom: auto;
}

/* Read More Link - Always at Bottom in Equal Height Mode */
.mcast-news-carousel .item-read-more {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: border-color 0.2s ease;
}

.mcast-news-carousel.equal-height-mode .item-read-more {
    margin-top: auto;
    align-self: flex-start;
}

.mcast-news-carousel .item-read-more:hover {
    border-bottom-color: white;
    color: white;
}

/* Slick Carousel Navigation */
.mcast-news-carousel .slick-prev,
.mcast-news-carousel .slick-next {
    width: 50px;
    height: 50px;
    z-index: 10;
    transition: transform 0.2s ease;
}

.mcast-news-carousel .slick-prev:hover,
.mcast-news-carousel .slick-next:hover {
    transform: scale(1.1);
}

.mcast-news-carousel .slick-prev {
    left: -5px;
}

.mcast-news-carousel .slick-next {
    right: -5px;
}

.mcast-news-carousel .slick-prev:before,
.mcast-news-carousel .slick-next:before {
    font-size: 40px;
    opacity: 1;
    font-weight: bold;
}

/* Slick Dots */
.mcast-news-carousel .slick-dots {
    bottom: -40px;
}

.mcast-news-carousel .slick-dots li button:before {
    font-size: 12px;
    color: #000043;
    opacity: 0.4;
}

.mcast-news-carousel .slick-dots li.slick-active button:before {
    opacity: 1;
    color: #000043;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mcast-news-carousel {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .mcast-news-carousel-wrapper {
        padding: 0 10px;
    }
    
    .mcast-news-carousel {
        padding: 0 30px;
    }
    
    .mcast-news-carousel .carousel-item {
        margin: 0 10px;
    }
    
    .mcast-news-carousel .item-caption {
        padding: 20px;
    }
    
    .mcast-news-carousel .slick-prev,
    .mcast-news-carousel .slick-next {
        width: 40px;
        height: 40px;
    }
    
    .mcast-news-carousel .slick-prev:before,
    .mcast-news-carousel .slick-next:before {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .mcast-news-carousel {
        padding: 0 20px;
    }
    
    .mcast-news-carousel .carousel-item {
        margin: 0 5px;
    }
    
    .mcast-news-carousel .item-caption {
        padding: 15px;
    }
}

/* Loading State */
.mcast-news-carousel.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Accessibility */
.mcast-news-carousel a:focus {
    outline: 2px solid #000043;
    outline-offset: 2px;
}

/* Smooth Transitions */
.mcast-news-carousel * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Error Messages */
.mcast-news-carousel-error,
.mcast-news-carousel-empty {
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
}

.mcast-news-carousel-error p,
.mcast-news-carousel-empty p {
    margin: 0;
    font-size: 16px;
}
