/**
 * Elementor Enhanced Card Carousel CSS
 */

.enhanced-card-carousel-container {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: 0 auto;
}

/* Owl Carousel Styles */
.enhanced-card-carousel-container .owl-carousel {
    position: relative;
}

.enhanced-card-carousel-container .owl-stage-outer {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.enhanced-card-carousel-container .owl-stage {
    position: relative;
    -ms-touch-action: pan-Y;
    touch-action: manipulation;
    -moz-backface-visibility: hidden;
}

.enhanced-card-carousel-container .owl-item {
    position: relative;
    min-height: 1px;
    float: left;
    -webkit-backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.enhanced-card-carousel-container .owl-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}


.card-carousel-arrow-prev{
    left:5px;
}


.card-carousel-arrow-next{
    right:5px;
}

.enhanced-card-carousel-container .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:0;
}

.enhanced-card-carousel-container .owl-nav button:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.enhanced-card-carousel-container .owl-nav .owl-prev {
    left: -25px;
}

.enhanced-card-carousel-container .owl-nav .owl-next {
    right: -25px;
}

/* Custom navigation arrow styling */
.card-carousel-arrow-prev,
.card-carousel-arrow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

.card-carousel-arrow-prev:hover,
.card-carousel-arrow-next:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.card-carousel-arrow-prev {
    left: -25px;
}

.card-carousel-arrow-next {
    right: -25px;
}

.enhanced-card-carousel-container .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.enhanced-card-carousel-container .owl-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enhanced-card-carousel-container .owl-dot.active,
.enhanced-card-carousel-container .owl-dot:hover {
    background: #007cba;
    transform: scale(1.2);
}

/* Layout Styles */
.card-layout-default .card-carousel-item {
    display: flex;
    flex-direction: column;
}

.card-layout-overlay .card-carousel-item {
    position: relative;
    overflow: hidden;
}

.card-layout-overlay .card-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #ffffff;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.card-layout-overlay .card-carousel-item:hover .card-carousel-content {
    transform: translateY(0);
}

.card-layout-minimal .card-carousel-item {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 10px;
}

.card-layout-minimal .card-carousel-content {
    text-align: center;
}

.card-layout-featured .card-carousel-item {
    position: relative;
    overflow: hidden;
}

.card-layout-featured .card-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.1), rgba(0, 124, 186, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card-layout-featured .card-carousel-item:hover::before {
    opacity: 1;
}

.card-layout-masonry .card-carousel-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    transform: none !important;
}

.card-layout-masonry .card-carousel-item {
    height: auto;
    min-height: 200px;
}

/* Hover Effects */
.hover-effect-lift .card-carousel-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-effect-scale .card-carousel-item:hover {
    transform: scale(1.05);
}

.hover-effect-slide .card-carousel-item:hover {
    transform: translateX(10px);
}

.hover-effect-glow .card-carousel-item:hover {
    box-shadow: 0 0 30px rgba(0, 124, 186, 0.5);
}

/* Icon Styles */
.card-carousel-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
}

.card-carousel-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: all 0.3s ease;
}

.card-carousel-item:hover .card-carousel-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #007cba, #005a87);
    color: #ffffff;
}

/* HTML Content Styles */
.card-carousel-html-content {
    line-height: 1.6;
}

.card-carousel-html-content h1,
.card-carousel-html-content h2,
.card-carousel-html-content h3,
.card-carousel-html-content h4,
.card-carousel-html-content h5,
.card-carousel-html-content h6 {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.card-carousel-html-content p {
    margin: 0 0 15px 0;
}

.card-carousel-html-content p:last-child {
    margin-bottom: 0;
}

.card-carousel-html-content ul,
.card-carousel-html-content ol {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.card-carousel-html-content li {
    margin-bottom: 5px;
}

.card-carousel-html-content a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-carousel-html-content a:hover {
    color: #005a87;
    text-decoration: underline;
}

.card-carousel-html-content blockquote {
    margin: 15px 0;
    padding: 15px 20px;
    border-left: 4px solid #007cba;
    background: #f8f9fa;
    font-style: italic;
}

.card-carousel-html-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.card-carousel-html-content pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.card-carousel-html-content pre code {
    background: none;
    padding: 0;
}

/* Legacy support for old class names */
.card-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.card-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.card-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.card-carousel-item {
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: auto;
    position: relative;
    overflow: visible;
    width: 100%;
}

.card-carousel-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.card-carousel-image img {
    width: auto;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
    border-radius: 12px;
    filter: brightness(1.05) contrast(1.1);
}

.card-carousel-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 12px;
    z-index: 1;
    pointer-events: none;
}

/* Custom card slide image sizing */
.card-slide .custom-card img {
    height: auto;
    width: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.1);
    display: block;
    margin: 0 auto;
}

.card-slide .custom-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.15) saturate(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Custom card text wrapping and line breaks */
.card-carousel .custom-card h1,
.card-carousel .custom-card h2,
.card-carousel .custom-card h3,
.card-carousel .custom-card h4,
.card-carousel .custom-card h5,
.card-carousel .custom-card h6,
.card-slide .custom-card h1,
.card-slide .custom-card h2,
.card-slide .custom-card h3,
.card-slide .custom-card h4,
.card-slide .custom-card h5,
.card-slide .custom-card h6 {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: break-word;
}

.card-carousel .custom-card p,
.card-slide .custom-card p {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: break-word;
}

.card-carousel .custom-card,
.card-slide .custom-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-carousel-item:hover .card-carousel-image img {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.15) saturate(1.1);
}

.card-carousel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-carousel-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
    text-align: left;
}

.card-carousel-description {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
    flex-grow: 1;
    hyphens: auto;
    text-align: left;
}

.card-carousel-button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
    align-self: flex-start;
    margin-top: auto;
}

.card-carousel-button:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* Loading State */
.card-carousel-container.loading .card-carousel-track {
    opacity: 0.5;
}

.card-carousel-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: card-carousel-spin 1s linear infinite;
    z-index: 100;
}

@keyframes card-carousel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
}

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .card-carousel-image {
        height: 180px;
    }
    
    .card-carousel-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .card-carousel-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .card-carousel-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .card-carousel-icon {
        width: 70px;
        height: 70px;
    }
    
    .card-carousel-icon-wrapper {
        padding: 18px;
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .card-carousel-image {
        height: 160px;
    }
    
    /* Mobile: Force 1 slide per row */
    .card-carousel-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 25px;
        box-sizing: border-box;
    }
    
    
    /* Ensure content is fully visible */
    .card-carousel-content {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .card-carousel-title,
    .card-carousel-description {
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Mobile content adjustments */
    .card-carousel-title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .card-carousel-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .card-carousel-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .card-carousel-icon {
        width: 60px;
        height: 60px;
    }
    
    .card-carousel-icon-wrapper {
        padding: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .card-carousel-image {
        height: 140px;
    }
    
    /* Extra small mobile: Force 1 slide per row with better padding */
    .card-carousel-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    
    /* Ensure content is fully visible on small screens */
    .card-carousel-content {
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    .card-carousel-title,
    .card-carousel-description {
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Extra small mobile content adjustments */
    .card-carousel-title {
        font-size: 0.95rem;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    
    .card-carousel-description {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .card-carousel-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .card-carousel-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-carousel-icon-wrapper {
        padding: 12px;
        margin-bottom: 8px;
    }
}

/* Accessibility */
.card-carousel-container:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}


/* High contrast mode support */
@media (prefers-contrast: high) {
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .card-carousel-track {
        transition: none;
    }
    
    .card-carousel-image img {
        transition: none;
        filter: none;
    }
    
    .card-carousel-button {
        transition: none;
    }
    
}

/* Print styles */
@media print {
    
    .card-carousel-track {
        transform: none !important;
        display: block;
    }
    
    .card-carousel-item {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
}

/* Elementor Editor Styles */
.elementor-editor .card-carousel-container {
    min-height: 200px;
}

.elementor-editor .card-carousel-track {
    transform: none !important;
}

.elementor-editor .card-carousel-item {
    flex: 0 0 auto;
    width: calc(100% / 3);
}

/* Custom animations */
.card-carousel-item {
    animation: card-carousel-fade-in 0.6s ease-out;
}

@keyframes card-carousel-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling for better UX */
.card-carousel-container {
    scroll-behavior: smooth;
}

/* Focus management for keyboard navigation */
.card-carousel-container[tabindex] {
    cursor: pointer;
}

.card-carousel-container[tabindex]:focus {
    cursor: default;
}

/* Enhanced Animations */
.card-carousel-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-carousel-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}



/* Enhanced Hover States */
.card-carousel-item.enhanced-hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-layout-overlay .card-carousel-content.overlay-visible {
    transform: translateY(0);
}

/* Touch Active State */
.enhanced-card-carousel-container.touch-active {
    cursor: grabbing;
}

.enhanced-card-carousel-container.touch-active .card-carousel-track {
    transition: none;
}

/* Staggered Animation */
.card-carousel-item:nth-child(1) { animation-delay: 0.1s; }
.card-carousel-item:nth-child(2) { animation-delay: 0.2s; }
.card-carousel-item:nth-child(3) { animation-delay: 0.3s; }
.card-carousel-item:nth-child(4) { animation-delay: 0.4s; }
.card-carousel-item:nth-child(5) { animation-delay: 0.5s; }
.card-carousel-item:nth-child(6) { animation-delay: 0.6s; }

/* Loading Animation */
.enhanced-card-carousel-container.loading {
    position: relative;
}

.enhanced-card-carousel-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: enhanced-spin 1s linear infinite;
    z-index: 100;
}

@keyframes enhanced-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .card-layout-masonry .card-carousel-track {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .card-layout-masonry .card-carousel-track {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .card-carousel-icon {
        width: 60px;
        height: 60px;
    }
    
    .card-carousel-icon-wrapper {
        padding: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .card-layout-masonry .card-carousel-track {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .card-carousel-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-carousel-icon-wrapper {
        padding: 10px;
        margin-bottom: 8px;
    }
}

/* Enhanced Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .enhanced-card-carousel-container .card-carousel-icon {
        background: linear-gradient(135deg, #2c2c2c, #404040);
        color: #ffffff;
    }
    
    .enhanced-card-carousel-container .card-carousel-item:hover .card-carousel-icon {
        background: linear-gradient(135deg, #4a9eff, #007cba);
    }
    
    .enhanced-card-carousel-container .card-carousel-html-content {
        color: #cccccc;
    }
    
    .enhanced-card-carousel-container .card-carousel-html-content h1,
    .enhanced-card-carousel-container .card-carousel-html-content h2,
    .enhanced-card-carousel-container .card-carousel-html-content h3,
    .enhanced-card-carousel-container .card-carousel-html-content h4,
    .enhanced-card-carousel-container .card-carousel-html-content h5,
    .enhanced-card-carousel-container .card-carousel-html-content h6 {
        color: #ffffff;
    }
    
    .enhanced-card-carousel-container .card-carousel-html-content a {
        color: #4a9eff;
    }
    
    .enhanced-card-carousel-container .card-carousel-html-content a:hover {
        color: #66b3ff;
    }
}

/* Infinite Carousel Cloned Items */
.carousel-clone {
    pointer-events: none;
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: auto;
    position: relative;
    overflow: hidden;
}


/* Enhanced Print Styles */
@media print {
    
    .enhanced-card-carousel-container .card-carousel-track {
        transform: none !important;
        display: block;
    }
    
    .enhanced-card-carousel-container .card-carousel-item {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        page-break-inside: avoid;
        opacity: 1;
        transform: none;
    }
    
    .enhanced-card-carousel-container .card-carousel-icon {
        background: #f0f0f0;
        color: #333333;
    }
    
}

