/* Card Repeater Widget Styles */

.card-repeater-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;
    direction: rtl;
    text-align: center;
}

/* Slider layout */
.card-repeater-slider {
    position: relative;
    width: 100%;
    padding: 20px;
    border-radius: 15px;
}

.card-repeater-slider .swiper { 
    width: 100%; 
    height: 100%; 
    padding: 20px 0;
}

.card-repeater-slider .swiper-slide { 
    display: flex; 
    align-items: stretch; 
    height: auto;
}

/* Navigation buttons */
.card-repeater-slider .swiper-button-next,
.card-repeater-slider .swiper-button-prev {
    position: absolute;
    top: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 16px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.card-repeater-slider .swiper-button-next {
    right: 20px;
}

.card-repeater-slider .swiper-button-prev {
    right: 70px;
}

.card-repeater-slider .swiper-button-next:hover,
.card-repeater-slider .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 1);
    transform: scale(1.1);
}

.card-repeater-slider .swiper-button-next:after,
.card-repeater-slider .swiper-button-prev:after {
    font-family: 'swiper-icons';
    font-size: 16px;
}

.card-repeater-slider .swiper-button-next:after {
    content: 'next';
}

.card-repeater-slider .swiper-button-prev:after {
    content: 'prev';
}

.card-item {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Special card with gradient background */
.card-item.card-special {
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    color: white;
}

.card-item.card-special .card-icon {
    color: white;
}

.card-item.card-special .card-title,
.card-item.card-special .card-subtitle {
    color: white;
}

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

.card-icon {
    font-size: 30px;
    color: #666666;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon i {
    display: inline-block;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.card-repeater-heading { 
    margin-bottom: 16px; 
    font-weight: 800; 
    color: white;
    text-align: center;
}

.card-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

.card-description {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666666;
    margin: 0 0 20px 0;
    line-height: 1.6;
    text-align: justify;
}

.card-link {
    display: inline-block;
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.card-link:hover {
    color: #e55a2b;
    text-decoration: none;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background-color: #ff6b35;
    transition: width 0.3s ease;
}

.card-link:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .card-repeater-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .card-repeater-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .card-item {
        padding: 15px 10px;
    }
    
    .card-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .card-repeater-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .card-item {
        padding: 12px 8px;
    }
    
    .card-icon {
        font-size: 25px;
        margin-bottom: 8px;
    }
    
    .card-title {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .card-subtitle {
        font-size: 0.7rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .card-repeater-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .card-item {
        padding: 15px 12px;
    }
    
    .card-icon {
        font-size: 30px;
        margin-bottom: 10px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .card-repeater-container {
        gap: 12px;
    }
    
    .card-item {
        padding: 18px 15px;
    }
    
    .card-icon {
        font-size: 30px;
        margin-bottom: 10px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-subtitle {
        font-size: 0.9rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
}

/* RTL Support */
[dir="rtl"] .card-repeater-container {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .card-icon {
	justify-content: center;
}

[dir="rtl"] .card-link::after {
    right: 0;
    left: auto;
}

/* LTR Support */
[dir="ltr"] .card-repeater-container {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .card-icon {
    justify-content: flex-start;
}

[dir="ltr"] .card-link::after {
    left: 0;
    right: auto;
}

/* Animation Effects */
.card-item {
    animation: fadeInUp 0.6s ease-out;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
.card-link:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
    border-radius: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card-item {
        border-width: 3px;
    }
    
    .card-title,
    .card-subtitle,
    .card-description {
        color: #000000;
    }
    
    .card-link {
        color: #0000ff;
        text-decoration: underline;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .card-item {
        animation: none;
        transition: none;
    }
    
    .card-item:hover {
        transform: none;
    }
    
    .card-link::after {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card-item {
        background: #2a2a2a;
        border-color: #ff6b35;
    }
    
    .card-title {
        color: #ff6b35;
    }
    
    .card-subtitle,
    .card-description {
        color: #cccccc;
    }
    
    .card-link {
        color: #ff6b35;
    }
    
    .card-link:hover {
        color: #ff8c5a;
    }
}

/* Print styles */
@media print {
    .card-repeater-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .card-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000000 !important;
    }
    
    .card-item:hover {
        transform: none !important;
    }
}

/* Custom border colors for individual cards */
.elementor-repeater-item-1 .card-item {
    border-color: #ff6b35;
}

.elementor-repeater-item-2 .card-item {
    border-color: #ff6b35;
}

.elementor-repeater-item-3 .card-item {
    border-color: #ff6b35;
}

.elementor-repeater-item-4 .card-item {
    border-color: #007cba;
}

/* Hover effects for different border colors */
.elementor-repeater-item-1 .card-item:hover,
.elementor-repeater-item-2 .card-item:hover,
.elementor-repeater-item-3 .card-item:hover {
    border-color: #e55a2b;
}

.elementor-repeater-item-4 .card-item:hover {
    border-color: #005a87;
}

/* Icon hover effects */
.card-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.card-item:hover .card-icon {
    transform: scale(1.1);
}

/* Loading state */
.card-repeater-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.card-repeater-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


