/* Encouragement Carousel Widget Styles */

.ec-carousel-wrapper {
    width: 100%;
    position: relative;
}

.ec-carousel-container {
    background-color: #f5f5f5;
    padding: 60px;
    border-radius: 0;
}

.ec-content-wrapper {
    display: flex;
    align-items: stretch;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left Side Styles */
.ec-left-content {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 40px;
}

.ec-left-heading {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #000000;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.ec-left-heading strong {
    font-weight: 700;
    color: #000000;
}

.ec-left-description {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

/* Right Side Styles */
.ec-right-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ec-carousel-slides {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 300px;
}

.ec-slide {
    display: none;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 120px; /* Space for right horizontal navigation */
    width: auto;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.ec-slide.active {
    display: block;
    opacity: 1;
    position: relative;
    right: auto;
    width: auto;
    padding-right: 120px; /* Space for right horizontal navigation when active */
}

/* When navigation is at bottom, remove slides padding */
.ec-right-content:has(.ec-nav-bottom) .ec-slide,
.ec-right-content:has(.ec-nav-bottom-left) .ec-slide,
.ec-right-content:has(.ec-nav-bottom-right) .ec-slide {
    right: 0;
    padding-right: 0;
}

/* Fallback for browsers without :has() support */
.ec-right-content.ec-nav-at-bottom .ec-slide {
    right: 0;
    padding-right: 0;
}

/* Fade transition */
.ec-carousel-wrapper[data-transition="fade"] .ec-slide {
    transform: none;
}

.ec-carousel-wrapper[data-transition="fade"] .ec-slide.active {
    animation: fadeIn 0.5s ease-in-out;
}

/* Slide transition */
.ec-carousel-wrapper[data-transition="slide"] .ec-slide {
    transform: translateX(100%);
}

.ec-carousel-wrapper[data-transition="slide"] .ec-slide.active {
    transform: translateX(0);
    animation: slideInFromRight 0.5s ease-in-out;
}

.ec-carousel-wrapper[data-transition="slide"] .ec-slide.slide-out-left {
    animation: slideOutToLeft 0.5s ease-in-out;
}

.ec-carousel-wrapper[data-transition="slide"] .ec-slide.slide-out-right {
    animation: slideOutToRight 0.5s ease-in-out;
}

/* Slide + Fade transition */
.ec-carousel-wrapper[data-transition="slide-fade"] .ec-slide {
    transform: translateX(50px);
}

.ec-carousel-wrapper[data-transition="slide-fade"] .ec-slide.active {
    transform: translateX(0);
    animation: slideAndFadeIn 0.5s ease-in-out;
}

.ec-carousel-wrapper[data-transition="slide-fade"] .ec-slide.slide-out {
    animation: slideAndFadeOut 0.5s ease-in-out;
}

.ec-quote-icon {
    font-size: 48px;
    color: #E91E63;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 15px;
    font-family: Georgia, serif;
}

.ec-quote-icon img {
    width: 48px;
    height: auto;
    display: block;
}

.ec-quote-text {
    font-size: 18px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 30px;
    text-align: justify;
}

/* Author Info Styles */
.ec-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.ec-author-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #CCCCCC;
}

.ec-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-author-details {
    flex: 1;
}

.ec-author-name {
    font-size: 20px;
    font-weight: 600;
    color: #E91E63;
    margin-bottom: 3px;
}

.ec-author-title {
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

/* Navigation Styles */
.ec-navigation {
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* Right Side Navigation (Default) - Horizontal arrows on right */
.ec-nav-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row;
    gap: 5px;
}

/* Bottom Center Navigation */
.ec-nav-bottom {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 30px;
}

/* Bottom Left Navigation */
.ec-nav-bottom-left {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 30px;
}

/* Bottom Right Navigation */
.ec-nav-bottom-right {
    position: static;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 30px;
}

.ec-nav-arrow {
    background: transparent;
    border: none;
    color: #CCCCCC;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
    width: auto;
    height: auto;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    line-height: 1;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.ec-nav-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-nav-arrow:hover {
    color: #E91E63;
}

.ec-nav-arrow:hover::before {
    width: 100%;
    height: 100%;
}

/* Smooth directional movement on hover */
.ec-nav-prev:hover {
    transform: translateX(-3px);
}

.ec-nav-next:hover {
    transform: translateX(3px);
}

.ec-nav-arrow:active {
    transform: scale(0.9);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-nav-prev:active {
    transform: translateX(-3px) scale(0.9);
}

.ec-nav-next:active {
    transform: translateX(3px) scale(0.9);
}

.ec-nav-arrow:focus {
    outline: 2px solid #E91E63;
    outline-offset: 2px;
}

/* Ripple effect on click */
.ec-nav-arrow.ec-clicked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(233, 30, 99, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes ripple {
    to {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .ec-content-wrapper {
        gap: 40px;
    }
    
    .ec-left-content {
        flex: 0 0 35%;
        padding-right: 20px;
    }
    
    .ec-left-heading {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .ec-carousel-container {
        padding: 40px 30px;
    }
    
    .ec-content-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .ec-left-content {
        flex: 1;
        padding-right: 0;
    }
    
    .ec-slide {
        right: 0; /* Remove right offset on mobile */
    }
    
    .ec-slide.active {
        padding-right: 0; /* Remove slide padding on mobile */
    }
    
    .ec-left-heading {
        font-size: 32px;
    }
    
    /* Force bottom navigation on mobile */
    .ec-navigation,
    .ec-nav-right {
        position: static;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .ec-carousel-container {
        padding: 30px 20px;
    }
    
    .ec-left-heading {
        font-size: 28px;
    }
    
    .ec-quote-icon {
        font-size: 36px;
    }
    
    .ec-quote-text {
        font-size: 16px;
    }
    
    .ec-author-image {
        width: 50px;
        height: 50px;
    }
    
    .ec-author-name {
        font-size: 18px;
    }
    
    .ec-author-title {
        font-size: 13px;
    }
}

/* Animation Classes */
.ec-slide-enter {
    opacity: 0;
    transform: translateX(50px);
}

.ec-slide-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s ease;
}

.ec-slide-exit {
    opacity: 1;
    transform: translateX(0);
}

.ec-slide-exit-active {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.5s ease;
}

/* Animation keyframes */

/* Fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide animations - smoother with cubic-bezier */
@keyframes slideInFromRight {
    from {
        transform: translateX(60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-60px);
        opacity: 0;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(60px);
        opacity: 0;
    }
}

/* Slide + Fade animations - smoother */
@keyframes slideAndFadeIn {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideAndFadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-30px);
        opacity: 0;
    }
}

.ec-slide.active {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
