/**
 * Elementor HTML Card Carousel CSS
 */

.html-card-carousel-container {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: 0 auto;
}

/* Owl Carousel Styles */
.html-card-carousel-container .owl-carousel {
    position: relative;
}

.html-card-carousel-container .owl-stage-outer {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.html-card-carousel-container .owl-stage {
    position: relative;
    -ms-touch-action: pan-Y;
    touch-action: manipulation;
    -moz-backface-visibility: hidden;
}

.html-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;
}

.html-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;
}

.html-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;
}

.html-card-carousel-container .owl-nav button:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.html-card-carousel-container .owl-nav .owl-prev {
    left: -25px;
}

.html-card-carousel-container .owl-nav .owl-next {
    right: -25px;
}

/* Custom navigation arrow styling */
.html-carousel-arrow-prev,
.html-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;
}

.html-carousel-arrow-prev:hover,
.html-carousel-arrow-next:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.html-carousel-arrow-prev {
    left: -25px;
}

.html-carousel-arrow-next {
    right: -25px;
}

.html-card-carousel-container .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.html-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;
}

.html-card-carousel-container .owl-dot.active,
.html-card-carousel-container .owl-dot:hover {
    background: #007cba;
    transform: scale(1.2);
}

.html-card-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.html-card-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.html-card-carousel-item {
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: visible;
    padding: 0 15px;
    width: 100%;
}

.html-card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

/* Default styling for custom cards */
.html-card-content .custom-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    min-height: 530px;
}

.html-carousel-arrow-prev{
    left:5px;
}


.html-carousel-arrow-next{
    right:5px;
}

.html-card-content .custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.html-card-content .custom-card img {
    width: auto;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 15px;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.1);
    display: block;
}

.html-card-content .custom-card:hover img {
    transform: scale(1.02);
    filter: brightness(1.1) contrast(1.15) saturate(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.html-card-content .custom-card h1,
.html-card-content .custom-card h2,
.html-card-content .custom-card h3,
.html-card-content .custom-card h4,
.html-card-content .custom-card h5,
.html-card-content .custom-card h6 {
    margin: 0 0 10px 0;
    color: #333333;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    overflow-wrap: break-word;
}

.html-card-content .custom-card p {
    margin: 0 0 15px 0;
    color: #666666;
    line-height: 1.6;
    flex-grow: 1;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.html-card-content .custom-card a.custom-button,
.html-card-content .custom-card .custom-button {
    display: inline-block;
    background: #007cba;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
    margin-top: auto;
    align-self: flex-start;
}

/* Global text wrapping for all HTML card content */
.html-card-content .custom-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.html-card-content .custom-card * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.html-card-content .custom-card a.custom-button:hover,
.html-card-content .custom-card .custom-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    text-decoration: none;
    color: #ffffff;
}


/* Loading State */
.html-card-carousel-container.loading .html-card-carousel-track {
    opacity: 0.5;
}

.html-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: html-carousel-spin 1s linear infinite;
    z-index: 100;
}

@keyframes html-carousel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom HTML Content Styling */
.html-card-content * {
    box-sizing: border-box;
}

.html-card-content ul,
.html-card-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.html-card-content li {
    margin-bottom: 5px;
    color: #666666;
    line-height: 1.5;
}

.html-card-content blockquote {
    border-left: 4px solid #007cba;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: #555555;
}

.html-card-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.html-card-content pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.html-card-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.html-card-content th,
.html-card-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.html-card-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
}

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .html-card-content .custom-card img {
        height: 180px;
    }
    
    .html-card-content .custom-card {
        padding: 18px;
    }
    
    .html-card-content .custom-card h1,
    .html-card-content .custom-card h2,
    .html-card-content .custom-card h3 {
        font-size: 1.2em;
        line-height: 1.3;
    }
    
    .html-card-content .custom-card p {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    .html-card-content .custom-card a.custom-button,
    .html-card-content .custom-card .custom-button {
        padding: 9px 18px;
        font-size: 0.95em;
    }
}

@media (max-width: 768px) {
    .html-card-content .custom-card img {
        height: 160px;
    }
    
    .html-card-carousel-item {
        padding: 0 10px;
    }
    
    .html-card-content .custom-card {
        padding: 15px;
    }
    
    /* Mobile: Force 1 slide per row */
    .html-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 */
    .html-card-content {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .html-card-content .custom-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Mobile content adjustments */
    .html-card-content .custom-card h1,
    .html-card-content .custom-card h2,
    .html-card-content .custom-card h3 {
        font-size: 1.1em;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .html-card-content .custom-card p {
        font-size: 0.9em;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .html-card-content .custom-card a.custom-button,
    .html-card-content .custom-card .custom-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .html-card-content .custom-card img {
        height: 140px;
    }
    
    .html-card-carousel-item {
        padding: 0 5px;
    }
    
    .html-card-content .custom-card {
        padding: 12px;
    }
    
    /* Extra small mobile: Force 1 slide per row with better padding */
    .html-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 */
    .html-card-content {
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    .html-card-content .custom-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Extra small mobile content adjustments */
    .html-card-content .custom-card h1,
    .html-card-content .custom-card h2,
    .html-card-content .custom-card h3 {
        font-size: 1.05em;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    
    .html-card-content .custom-card p {
        font-size: 0.85em;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .html-card-content .custom-card a.custom-button,
    .html-card-content .custom-card .custom-button {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

/* Accessibility */
.html-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) {
    .html-card-carousel-track {
        transition: none;
    }
    
    .html-card-content .custom-card {
        transition: none;
    }
    
    .html-card-content .custom-card img {
        transition: none;
        filter: none;
    }
    
}

/* Print styles */
@media print {
    
    .html-card-carousel-track {
        transform: none !important;
        display: block;
    }
    
    .html-card-carousel-item {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        page-break-inside: avoid;
        padding: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    
    .html-card-content .custom-card {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .html-card-content .custom-card h1,
    .html-card-content .custom-card h2,
    .html-card-content .custom-card h3,
    .html-card-content .custom-card h4,
    .html-card-content .custom-card h5,
    .html-card-content .custom-card h6 {
        color: #ffffff;
    }
    
    .html-card-content .custom-card p {
        color: #cccccc;
    }
}

/* Elementor Editor Styles */
.elementor-editor .html-card-carousel-container {
    min-height: 200px;
}

.elementor-editor .html-card-carousel-track {
    transform: none !important;
    display: flex;
    align-items: stretch;
}

.elementor-editor .html-card-carousel-item {
    flex: 0 0 auto;
    width: calc(100% / 3);
    display: flex;
    flex-direction: column;
}

/* Smooth scrolling for better UX */
.html-card-carousel-container {
    scroll-behavior: smooth;
}

/* Focus management for keyboard navigation */
.html-card-carousel-container[tabindex] {
    cursor: pointer;
}

.html-card-carousel-container[tabindex]:focus {
    cursor: default;
}

.html-card-carousel-container[data-autoplay="yes"] .html-card-carousel-track {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Pause autoplay on hover for better UX */
.html-card-carousel-container[data-pause-on-hover="yes"]:hover .html-card-carousel-track {
    transition-duration: 0.3s;
}