/**
 * Project Carousel Styles
 * Styling for the project carousel with split layout
 */

.project-carousel-container {
    width: 100%;
    position: relative;
}

.project-carousel {
    position: relative;
    background: #fff;
    overflow: hidden;
    display: flex;
    height: 600px;
    width: 100%;
}

.carousel-content {
    display: flex;
    height: 100%;
    position: relative;
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
}

/* Text Content Styles */
.text-content {
    flex: 1;
    padding: 60px 50px 60px 0;
    display: flex;
    align-items: center;
    background: #fff;
    position: relative;
    z-index: 2;
    margin-left: 11px;
}

.project-text-slides {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
}

.project-text-slide {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    opacity: 0;
}

.project-text-slide.active {
    position: absolute;
    opacity: 1;
    z-index: 10;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.project-excerpt {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 25px 0;
    max-width: 500px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.project-link {
    display: inline-block;
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: color 0.3s ease;
    line-height: 20px;
    flex-shrink: 0;
}

.project-link:hover {
    color: #e55a2b;
    text-decoration: underline;
}

/* Avada button styling - let theme handle the styling */
.fusion-button {
    flex-shrink: 0;
}

/* Carousel Navigation Buttons */
.carousel-nav-buttons{
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
}
.carousel-nav-buttons.mobile-nav-buttons {
    right: 20px;
}

.carousel-nav-buttons.desktop-nav-buttons {
    left: 0;
}

@media (max-width: 1024px) {
    .carousel-nav-buttons.desktop-nav-buttons {
        display: none;
    }
}

@media (min-width: 1025px) {
    .carousel-nav-buttons.mobile-nav-buttons {
        display: none;
    }
}

.carousel-nav-buttons .carousel-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    outline: none;
}

.carousel-nav-btn:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.carousel-nav-btn:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

.carousel-nav-btn:active {
    transform: scale(0.95);
    outline: none;
}

.carousel-nav-btn span {
    display: inline-block;
    line-height: 1;
}

/* Image Content Styles */
.image-content {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
    height: 600px;
    min-height: 600px;
    margin-right: calc(-50vw + 50%);
    width: 50vw;
    min-width: calc(50vw + var(--awb-spacing-left) / 2);
}

.image-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(30px);
}

.image-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
    /* Fallback for older browsers */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Target the actual img element inside the picture */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
}

/* Ensure image fills container completely */
.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: -1;
}

.image-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 3;
}

.category-text {
    color: #fff;
    font-weight: 600;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, 0.3));
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 4;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 1);
    cursor: pointer;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.dot.active {
    background: rgba(255, 255, 255, .5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-carousel {
        flex-direction: column;
        height: auto;
    }
    
    .carousel-content {
        flex-direction: column;
        height: auto;
        max-width: 100%;
    }
    
    .text-content {
        padding: 40px 30px;
        order: 2;
        height: 400px;
    }
    
    .project-text-slides {
        height: 400px;
    }
    
    .project-text-slide {
        height: 100%;
    }
    
    .project-title {
    }
    
    .project-excerpt {
    }
    
    .image-content {
        order: 1;
        height: 400px;
        min-height: 400px;
        margin-right: 0;
        width: 100%;
    }

    .image-slides {
        height: 400px;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-excerpt {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .project-carousel-container {
        /* padding: 0 15px; */
    }
    
    .text-content {
        padding: 30px 20px;
    }
    
    .project-text-slides {
    }
    
    .project-text-slide {
        height: 100%;
    }
    
    .project-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .project-excerpt {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    /* Avada button handles its own responsive styling */
    
    .image-content {
        height: 300px;
        min-height: 300px;
        margin-right: 0;
        width: 100%;
    }
    
    .carousel-dots {
        bottom: 15px;
        right: 15px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .carousel-nav-buttons {
        bottom: 15px;
        right: 15px;
    }
    
    .carousel-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .text-content {
        padding: 25px 15px;
        height: 300px;
    }
    
    .project-text-slides {
        height: 355px;
    }
    
    .project-text-slide {
        height: 100%;
    }
    
    .project-title {
        font-size: 1.6rem;
    }
    
    .project-excerpt {
        font-size: 0.9rem;
    }
    
    /* Avada button handles its own responsive styling */
    
    .image-content {
        height: 250px;
        min-height: 250px;
        margin-right: 0;
        width: 100%;
    }
    
    .image-overlay {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
    }
    
    .category-text {
        font-size: 0.8rem;
    }
    
    .carousel-nav-buttons {
        bottom: 10px;
        right: 10px;
    }
    
    .carousel-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Loading Animation */
.project-carousel.loading {
    opacity: 0;
    transform: translateY(20px);
}

.project-carousel.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* Accessibility */
.project-carousel:focus-within {
    outline: none;
}

.project-carousel :focus,
.project-carousel :focus-visible,
.project-carousel a:-moz-focusring {
    outline: none !important;
    box-shadow: none !important;
}

.carousel-nav-btn:focus,
.carousel-nav-btn:focus-visible,
.dot:focus,
.dot:focus-visible,
.project-link:focus,
.project-link:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Print Styles */
@media print {
    .project-carousel {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .carousel-dots {
        display: none;
    }
    
    .text-slide {
        position: relative;
        opacity: 1;
        transform: none;
    }
    
    .image-slide {
        position: relative;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1480px) {
    .text-content {
        margin-left: 0 !important;
    }
}