/* Base Styles */

.slide-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
    margin-right: 5px;
}

.slide-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.slide-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.slide-content-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4; /* Adjust as needed */
    height: calc(1.4em * 3); /* 3 lines based on line-height */
    min-height: calc(1.4em * 3);
    max-height: calc(1.4em * 3);
}

.clio-play-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clio-play-video:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.clio-play-icon {
    color: white;
    font-size: 24px;
    margin-left: 3px;
}

.slide-content {
    padding: 15px;
    flex-grow: 1;
}

.slide-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* External arrows positioning */
.clio-carousel-container {
    position: relative;
    padding: 0 60px; /* Add padding to make space for external arrows */
}

.glide__arrows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* Allow clicks to pass through the container */
    z-index: 10;
}

.glide__slide {
    padding-right: 17px;
	height: 377px;
}

.glide__slides {
    list-style: none;
    list-style-type: none;
}

.glide__slides li {
    list-style: none;
    list-style-type: none;
}

.glide__slides li::marker {
    display: none;
}

.glide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto; /* Re-enable pointer events on the buttons */
    
    /* Tall red-tinted arrows */
    width: 50px;
    height: 80px;
    color: rgba(220, 53, 69, 0.9); /* Red tint with transparency */
    border-radius: 8px;
    cursor: pointer;
    
    /* Flexbox for centering the icon */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Smooth transitions */
    transition: all 0.3s ease;
    
    /* Shadow for better visibility */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    
    /* Arrow icons */
    font-size: 24px;
    font-weight: 800;
}

.glide__arrow:hover {
    background: rgba(220, 53, 69, 1); /* Solid red on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
	color: #fff;
    transform: translateY(-50%) scale(1.05);
}

/* controversial, check out */
/* li.glide__slide.glide__slide--clone {
    margin-left: 1px !important;
    margin-right: 5px !important;
}
 */

.glide__arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Position left arrow outside carousel */
.glide__arrow--left {
    left: -60px; /* Position outside the carousel */
}

/* Position right arrow outside carousel */
.glide__arrow--right {
    right: -60px; /* Position outside the carousel */
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.video-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.video-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.video-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.video-modal-body {
    padding: 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    /* Carousel arrows responsive */
    .clio-carousel-container {
        padding: 0 45px; /* Reduce padding on mobile */
    }
    
    .glide__arrow {
        width: 40px;
        height: 60px;
        font-size: 22px;
    }
    
    .glide__arrow--left {
        left: -45px;
    }
    
    .glide__arrow--right {
        right: -45px;
    }
    
    /* Video modal adjustments */
    .video-modal-content {
        width: 95vw;
        margin: 20px;
    }
    
    .video-modal-header {
        padding: 15px 20px;
    }
    
    .video-modal-title {
        font-size: 16px;
    }
    
    .video-modal-close {
        font-size: 24px;
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .clio-carousel-container {
        padding: 0 35px;
    }
    
    .glide__arrow {
        width: 34px;
        height: 50px;
        font-size: 20px;
    }
    
    .glide__arrow--left {
        left: -35px;
    }
    
    .glide__arrow--right {
        right: -35px;
    }
}

@media (min-width: 1024px) {
    /* Reset carousel styles for desktop */
    .clio-carousel-container {
        padding: 0 60px;
    }
    
    .glide__arrow {
        width: 50px;
        height: 80px;
        font-size: 24px;
    }
    
    .glide__arrow--left {
        left: -60px;
    }
    
    .glide__arrow--right {
        right: -60px;
    }
    
    /* Reset modal styles for desktop */
    .video-modal-content {
        width: 900px;
        margin: 0;
    }
    
    .video-modal-header {
        padding: 20px 25px;
    }
    
    .video-modal-title {
        font-size: 18px;
    }
    
    .video-modal-close {
        font-size: 28px;
        width: 30px;
        height: 30px;
    }
}