/* Expertise Slider CSS */

/* Desktop Layout (1025px+) */
.expertise-slider {
    display: flex;
    gap: 0px;
    position: relative;
    overflow: hidden;
    margin-left: -10px;
    transition: all 0.3s ease;
    width: calc(100% + 20px);
    min-height: var(--slider-height, 420px);
    box-sizing: border-box;
}

.swiper-slide {
    transition-property: inherit!important;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-card {
    font-family: inherit;;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    flex: 1;
    min-width: 20%;
    padding: 0 10px;
    margin-left: 10px;
    height: var(--slider-height, 420px) !important;
    min-height: var(--slider-height, 420px) !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* Inner wrapper for card content */
.slider-card .card-inner {
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    bottom: 0;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* Extra specificity for height enforcement */
.expertise-slider .slider-card[style*="height"] {
    height: var(--slider-height, 420px) !important;
}

.expertise-slider[data-height] .slider-card {
    height: var(--slider-height, 420px) !important;
    min-height: var(--slider-height, 420px) !important;
}

.slider-card.expanded {
    flex: 1.8;
    min-width: 36%;
}

.slider-card .card-inner {
    background-size: cover;
    background-position: 100% 50%;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.slider-card .card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1;
}

.slider-card.expanded .card-inner::before {
    background: rgba(0, 0, 0, 0);
}

/* Hide the img element since we're using background */
.slider-card img {
    display: none;
}

/* Card overlay */
.card-overlay {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 10px;
    margin: 20px 15px;
    color: white;
    border-radius: 20px;
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
    box-sizing: border-box;
}

.slider-card.expanded .card-overlay {
    background: rgba(58, 106, 175, 0.95);
    padding: 20px;
    transform: translateY(0);
}

.card-overlay h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    transform: translateY(-70px);
    transition: all 0.3s ease;
}

.slider-card.expanded .card-overlay h3 {
    transform: translateY(0);
}

.card-overlay p {
    margin: 0 0 20px 0;
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0;
    height: 0;
    transition: all 0.3s ease;
    transition-delay: 0.3s;
}

.slider-card.expanded .card-overlay p {
    opacity: 1;
    height: auto;
}

.card-overlay .btn {
    display: inline-block;
    background: transparent;
    color: white;
    padding:17px 37px;
    border: 1px solid white;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: inherit;
    opacity: 0;
    height: 0;
 
}

.slider-card.expanded .card-overlay .btn {
    opacity: 1;
    height: auto;
}

.card-overlay .btn:hover {
    background: white;
    color: #3a6aaf;
}

/* Arrow icon */
.arrow-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    transform: rotate(323deg);
    background: #3a6aaf;
    border: 4px solid #3a6aaf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
    z-index: 3;
}

.slider-card.expanded .arrow-icon {
    background:transparent;
    border: 2px solid white;
    color: white;
    right: 25px;
    top: 25px;
    opacity: 1;
    transform: rotate(90deg);
}

/* Hide Swiper navigation and pagination on desktop */
@media (min-width: 1025px) {
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
    
    .expertise-slider {
        transform: none !important;
    }
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .expertise-slider {
        margin-left: -10px;
        width: calc(100% + 20px);
        min-height: var(--slider-height, 420px);
    }
    
    .slider-card {
        padding: 0 10px;
        margin-left: 10px;
        height: var(--slider-height, 420px) !important;
        min-height: var(--slider-height, 420px) !important;
    }
    
    .slider-card .card-inner {
        left: 10px;
        right: 10px;
    }
    
    .card-overlay p,
    .card-overlay .btn {
        font-size: 18px;
    }
}

/* Tablet Layout (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .expertise-slider {
        display: block;
        margin-left: -10px;
        width: calc(100% + 20px);
    }
    
    .expertise-slider.swiper-container {
        padding-bottom: 60px;
        width: 100%;
        margin-left: 0;
    }
    
    .expertise-slider.swiper-container .swiper-wrapper {
        display: flex;
        align-items: stretch;
    }
    
    .expertise-slider.swiper-container .swiper-slide {
        width: 50%;
        flex-shrink: 0;
    }
    
    .slider-card,
    .slider-card.expanded {
        flex: none;
        padding: 0 10px;
        margin-left: 0;
        height: var(--slider-height, 420px) !important;
        min-height: var(--slider-height, 420px) !important;
        box-sizing: border-box;
    }
    
    .slider-card .card-inner {
        left: 10px;
        right: 10px;
    }
    
    .slider-card .card-overlay,
    .slider-card.expanded .card-overlay {
        background: rgba(58, 106, 175, 0.95);
        margin: 15px;
        padding: 15px;
        transform: translateY(0);
    }
    
    .slider-card .card-overlay h3,
    .slider-card.expanded .card-overlay h3 {
        transform: translateY(0) !important;
        font-size: 1.2rem;
    }
    
    .slider-card .card-overlay p,
    .slider-card .card-overlay .btn {
        opacity: 1;
        height: auto;
    }
    
    .slider-card .card-overlay p {
        font-size: 0.9rem;
    }
    
    .slider-card .card-inner::before {
        background: rgba(0, 0, 0, 0) !important;
    }
    
    .arrow-icon {
        background: transparent !important;
        height: 45px;
        width: 45px;
        right: 25px;
        top: 15px;
        opacity: 0;
    }
    
    .slider-card.expanded .arrow-icon {
        right: 25px;
        top: 20px;
        opacity: 0;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        top: 35% !important;
        color: #3a6aaf !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        margin-top: -20px !important;
    }
    
    .swiper-button-prev {
        left: -20px !important;
    }
    
    .swiper-button-next,
    .swiper-rtl .swiper-button-prev {
        right: -20px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px !important;
        font-weight: bold !important;
        color: #3a6aaf !important;
    }
    
    .swiper-pagination {
        bottom: 10px;
    }
    
    .swiper-pagination-bullet {
        background: #3a6aaf;
        opacity: 0.5;
    }
    
    .swiper-pagination-bullet-active {
        opacity: 1;
    }
}

/* Mobile Layout (767px and below) */
@media (max-width: 767px) {
    .expertise-slider {
        display: block;
        margin-left: 0;
        width: 100%;
    }
    
    .expertise-slider.swiper-container {
        padding-bottom: 60px;
        width: 100%;
        overflow: hidden;
    }
    
    .expertise-slider.swiper-container .swiper-wrapper {
        display: flex;
        align-items: stretch;
    }
    
    .expertise-slider.swiper-container .swiper-slide {
        width: 100%;
        flex-shrink: 0;
    }
    
    .slider-card,
    .slider-card.expanded {
        width: 100%;
        min-width: 100%;
        flex: none;
        padding: 0;
        margin-left: 0;
        height: var(--slider-height, 420px) !important;
        min-height: var(--slider-height, 420px) !important;
    }
    
    .slider-card .card-inner {
        left: 0;
        right: 0;
    }
    
    .slider-card .card-inner::before {
        background: rgba(0, 0, 0, 0) !important;
    }
    
    .card-overlay,
    .slider-card.expanded .card-overlay {
        transform: translateY(0);
        background: rgba(58, 106, 175, 0.95);
        position: relative;
        padding: 20px;
        margin: 10px;
        z-index: 2;
    }
    
    .card-overlay h3 {
        font-size: 1.3rem;
        line-height: 1.5rem;
        margin-bottom: 10px;
        transform: translateY(0) !important;
    }
    
    .card-overlay p {
        opacity: 1;
        height: auto;
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .card-overlay .btn {
        opacity: 1;
        height: auto;
        padding: 10px 30px 14px;
        font-size: 16px;
    }
    
    .card-overlay p {
        font-size: 18px;
    }
    
    .card-overlay .btn {
        font-size: 18px;
        padding: 10px 30px 14px;
    }
    
    .arrow-icon {
        display: none !important;
    }

    .swiper-button-next,
    .swiper-button-prev {
        top: 25% !important;
        color: #3a6aaf !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 35px !important;
        height: 35px !important;
        margin-top: -17.5px !important;
    }
    
    .swiper-button-prev {
        left: 10px !important;
    }
    
    .swiper-button-next,
    .swiper-rtl .swiper-button-prev {
        right: 10px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 14px !important;
        font-weight: bold !important;
        color: #3a6aaf !important;
    }
    
    .swiper-pagination {
        bottom: 10px;
    }
    
    .swiper-pagination-bullet {
        background: #3a6aaf;
        opacity: 0.5;
        width: 8px;
        height: 8px;
    }
    
    .swiper-pagination-bullet-active {
        opacity: 1;
    }
}

/* Swiper container styles */
.expertise-slider.swiper-container {
    overflow: hidden;
    position: relative;
}

.expertise-slider .swiper-wrapper {
    display: flex;
    box-sizing: content-box;
}

/* Override Elementor Pro CSS conflicts */
.expertise-slider.swiper-container .swiper-wrapper,
.expertise-slider.swiper .swiper-wrapper {
    overflow: visible !important;
    gap: normal !important;
}

/* Ensure high specificity to override Elementor */
.expertise-slider.swiper-container:not(.swiper-container-initialized) .swiper-wrapper,
.expertise-slider.swiper:not(.swiper-initialized) .swiper-wrapper {
    overflow: visible !important;
    display: flex !important;
    gap: normal !important;
}

/* Important: Ensure all slides are visible */
.expertise-slider.swiper-container .swiper-slide {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate3d(0px, 0px, 0px) !important;
}

/* Force all slides to be visible initially */
.expertise-slider.swiper-container .swiper-slide:not(.swiper-slide-active) {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Loading state */
.expertise-slider.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Accessibility improvements */
.btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card-overlay.animated {
    animation: slideUp 0.4s ease;
} 