/* CMS Carousel Component Styles */

/* Base Wrapper */
.cms-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.cms-carousel {
    width: 100%;
}

/* Empty State */
.cms-carousel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background-color: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 32px;
}

/* Edit Mode */
.cms-carousel-edit {
    position: relative;
}

.cms-carousel-preview {
    position: relative;
}

.cms-carousel-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.cms-carousel-preview:hover .cms-carousel-overlay {
    opacity: 1;
}

.cms-carousel-overlay .mud-icon-button {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Slide Wrapper */
.cms-carousel-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cms-carousel-slide-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Image Slide */
.cms-carousel-slide {
    position: relative;
    overflow: hidden;
}

.cms-carousel-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cms-carousel-slide-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 32px 48px;
    box-sizing: border-box;
}

/* Text positioning */
.cms-carousel-slide-content.position-top {
    justify-content: flex-start;
}

.cms-carousel-slide-content.position-center {
    justify-content: center;
}

.cms-carousel-slide-content.position-bottom {
    justify-content: flex-end;
}

/* Text alignment */
.cms-carousel-slide-content.align-left {
    align-items: flex-start;
    text-align: left;
}

.cms-carousel-slide-content.align-center {
    align-items: center;
    text-align: center;
}

.cms-carousel-slide-content.align-right {
    align-items: flex-end;
    text-align: right;
}

/* Title and subtitle */
.cms-carousel-title {
    font-weight: 800;
    margin: 0 0 16px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cms-carousel-subtitle {
    margin: 0 0 24px 0;
    line-height: 1.5;
    max-width: 800px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* CTA Button */
.cms-carousel-cta {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.cms-carousel-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cms-carousel-cta.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cms-carousel-cta.disabled:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Legacy image container styles */
.cms-carousel-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.cms-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cms-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 32px 24px 24px;
}

.cms-carousel-caption-text {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Content Slide */
.cms-carousel-content-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background-color: #f9f9f9;
    height: 100%;
}

.cms-carousel-content-image {
    max-width: 300px;
    margin-bottom: 24px;
}

.cms-carousel-content-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.cms-carousel-content-text {
    text-align: center;
    max-width: 800px;
}

/* Testimonial Slide */
.cms-carousel-testimonial-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background-color: #0d5d2c; /* EAA Green */
    height: 100%;
    text-align: center;
}

.cms-carousel-quote-icon {
    margin-bottom: 24px;
    color: #f0b323 !important; /* EAA Gold */
}

.cms-carousel-quote-text {
    color: white;
    font-style: italic;
    max-width: 800px;
    line-height: 1.8;
}

.cms-carousel-quote-attribution {
    color: #f0b323; /* EAA Gold */
    font-weight: 600;
}

/* Responsive */
@media (max-width: 959px) {
    .cms-carousel-caption {
        padding: 16px 12px 12px;
    }

    .cms-carousel-content-slide,
    .cms-carousel-testimonial-slide {
        padding: 32px 16px;
    }
}

/* Animation */
.cms-carousel-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cms-carousel-overlay,
    .cms-carousel-content {
        transition: none;
        animation: none;
    }
}
