/* Equal height for all slides */
.spec-slider .swiper-slide {
    height: auto !important;
}

/* Creative Hover & Center Active Effect */
.spec-slider .service-card-items-2 {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(44, 66, 97, 0.1);
}

.spec-slider .service-card-items-2 .content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.spec-slider .service-card-items-2 .read-more-btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Slide-in Background Animation using ::before */
.spec-slider .service-card-items-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    /* Solid navy blue overlay for active state */
    background-color: #2c4261 !important;
    z-index: 0 !important;
    /* Above the white card background, but below the text/content */
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
    visibility: visible !important;
    border: none !important;
}

/* Make sure content is above the new background */
.spec-slider .service-card-items-2>* {
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

/* Decorative inset frame inside the card */
.spec-slider .service-card-items-2::after {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    border: 1px dashed rgba(208, 174, 107, 0.6);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}



/* Hover and Center Active State */
.spec-slider .swiper-slide-active .service-card-items-2 {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(44, 66, 97, 0.4);
}

/* Trigger the background animation from bottom */
.spec-slider .swiper-slide-active .service-card-items-2::before {
    transform: scaleY(1);
}

/* Title text color */
.spec-slider .swiper-slide-active .service-card-items-2 .content .title a {
    color: #ffffff !important;
    background-image: linear-gradient(180deg, #d0ae6b 0%, #d0ae6b 100%);
}

/* Paragraph text color */
.spec-slider .swiper-slide-active .service-card-items-2 .content p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Add bullet icon to specification points */
.spec-slider .service-card-items-2 .content p {
    position: relative;
    padding-left: 20px;
}

.spec-slider .service-card-items-2 .content p::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: #d0ae6b;
    font-size: 14px;
}

/* Base Icon size */
.spec-slider .service-card-items-2 .icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Icon animation and color */
.spec-slider .swiper-slide-active .service-card-items-2 .icon img {
    animation: wobble 1.5s ease-in-out;
    filter: brightness(0) invert(1);
}

/* Pagination Dots */
.spec-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d0ae6b;
    opacity: 0.4;
}

.spec-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 10px;
}

/* Specification Read More Styles */
.spec-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 120px;
    transition: max-height 0.5s ease-in-out;
}

.spec-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none !important;
    overflow: visible;
}

.read-more-btn {
    background: none;
    border: none;
    color: #d0ae6b;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
    font-size: 14px;
    transition: color 0.3s ease;
    text-decoration: none;
    z-index: 5;
    position: relative;
}

.read-more-btn:hover {
    color: #b39250;
    text-decoration: underline;
}

.spec-slider .swiper-slide-active .service-card-items-2 .read-more-btn,
.spec-slider .service-card-items-2:hover .read-more-btn {
    color: #d0ae6b !important;
}

/* Expanded card styling to support dynamic height */
.spec-slider .service-card-items-2.expanded {
    height: auto !important;
    overflow: visible !important;
    z-index: 10 !important;
}

.spec-slider .service-card-items-2.expanded::before {
    transform: scaleY(1) !important;
}

.spec-slider .service-card-items-2.expanded .content .title a {
    color: #ffffff !important;
    background-image: linear-gradient(180deg, #d0ae6b 0%, #d0ae6b 100%) !important;
}

.spec-slider .service-card-items-2.expanded .content p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.spec-slider .service-card-items-2.expanded .icon img {
    filter: brightness(0) invert(1) !important;
}