.custom-card-carousel {
    position: relative;
    max-width: 100%;
    margin: 20px 0;
    font-family: inherit;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    cursor: grab;
    height: 370px;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-card {
    position: absolute;
    width: 300px;
    height: 370px;
    background: linear-gradient(180deg, rgba(236, 57, 60, 1) 0%, rgba(85, 12, 51, 1) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    top: 0;
    left: 0;
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-cover {
    overflow: hidden;
    transition: all 0.5s;
    height: 370px;
    display: flex;
    flex-direction: column;
}

.card-cover img {
    max-width: 100%;
    width: 100%;
    object-fit: cover;
    object-position: top;
    height: 87%;
}

.carousel-card:hover .card-cover {
    height: 0;
}

.card-content {
    padding: 20px;
}

.card-ribbon {
    background-color: #550C33;
    padding: 11px;
    padding-bottom: 11px !important;
}

.card-title {
    margin: 0 0 10px 0;
    padding-bottom: 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
    line-height: 1.4;
    text-align: center;
}

.card-subtitle {
    margin: 0 0 5px 0;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

.card-company {
    margin: 0 0 10px 0;
    color: white;
    font-size: 0.9em;
    text-align: center;
}

.card-subtitle-2 {
    margin: 10px 0 30px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
}

.card-custom-bio {
    margin: 10px 0 30px;
    color: white;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.card-excerpt {
    margin: 15px 0;
    color: #555555;
    line-height: 1.6;
    font-size: 0.9em;
}

.card-meta {
    margin: 5px 0;
    color: #777777;
    font-size: 0.85em;
}

.card-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card-link {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.card-link.primary {
    background: #2ea3f2;
    color: white;
}

.card-link.primary:hover {
    background: #1e88d4;
    color: white;
}

.card-link.secondary {
    background: transparent;
    color: #2ea3f2;
    border: 1px solid #2ea3f2;
}

.card-link.secondary:hover {
    background: #2ea3f2;
    color: white;
}

.carousel-nav {
    text-align: center;
    margin: 20px 0 10px 0;
}

.carousel-prev, .carousel-next {
    background: #2ea3f2;
    color: white;
    border: none;
    padding: 12px 18px;
    margin: 0 8px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 163, 242, 0.3);
}

.carousel-prev:hover, .carousel-next:hover {
    background: #1e88d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 163, 242, 0.4);
}

.carousel-prev:disabled, .carousel-next:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.carousel-prev.disabled, .carousel-next.disabled {
    opacity: 0.5;
}

.carousel-dots {
    text-align: center;
    margin-top: 15px;
}

.carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dddddd;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active, .carousel-dot:hover {
    background: #2ea3f2;
    transform: scale(1.2);
}

.custom-carousel-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .carousel-card {
        width: 280px;
    }
}

@media (max-width: 1023px) {
    .carousel-card {
        width: 300px;
    }
}

@media (max-width: 767px) {
    .carousel-card {
        width: 320px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .card-links {
        flex-direction: column;
    }
    
    .card-link {
        text-align: center;
    }
    
    .carousel-prev, .carousel-next {
        padding: 10px 14px;
        font-size: 16px;
    }
}

@media (max-width: 479px) {
    .carousel-card {
        width: 280px;
    }
    
    .card-title {
        font-size: 1.1em;
    }
    
    .carousel-container {
        padding: 15px 0;
    }
}

/* Loading animation */
.custom-card-carousel.loading .carousel-card {
    opacity: 0.5;
}

.custom-card-carousel.loading .carousel-nav,
.custom-card-carousel.loading .carousel-dots {
    pointer-events: none;
}

/* Accessibility improvements */
.carousel-prev:focus, .carousel-next:focus, .carousel-dot:focus {
    outline: 2px solid #2ea3f2;
    outline-offset: 2px;
}

.carousel-card:focus {
    outline: 2px solid #2ea3f2;
    outline-offset: 2px;
}

/* Smooth scrolling for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .carousel-card {
        transition: none;
    }
    
    .carousel-prev, .carousel-next {
        transition: none;
    }
    
    .carousel-dot {
        transition: none;
    }
}