/*
 * Page stylesheet: home (below-the-fold sections)
 * This was the <style> block at the end of <body>; it is deferred like the theme CSS.
 */

/* Testimonials Slider Styles */
.testimonials-slider-wrapper {
    padding: 0 20px;
    margin-bottom: 30px;
}

.testimonials-slider {
    direction: rtl;
}

.testimonials-slider .slick-slide {
    opacity: 0.7;
    transition: all 0.3s ease;
    float: right;
    height: inherit;
    display: block !important;
}

.testimonials-slider .slick-slide.slick-active {
    opacity: 1;
}

.testimonials-slider .slick-slide > div {
    height: 100%;
}

.testimonials-slider .slick-track {
    display: flex !important;
    align-items: stretch;
}

.testimonials-slider .testimonial-slide {
    height: 100%;
    display: flex !important;
    align-items: stretch;
    width: 100%;
}

.testimonials-slider .testimonial-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.testimonials-slider .slick-list {
    overflow: hidden;
}

/* Ensure equal width for all slides */
.testimonials-slider .slick-slide {
    width: calc(100% / 3) !important;
}

@media (max-width: 1199px) {
    .testimonials-slider .slick-slide {
        width: calc(100% / 2) !important;
    }
}

@media (max-width: 767px) {
    .testimonials-slider .slick-slide {
        width: 100% !important;
    }
}

.testimonials-slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonials-slider .slick-arrow:hover {
    background: #F59E0B;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.testimonials-slider .slick-arrow i {
    font-size: 20px;
    color: #1E293B;
}

.testimonials-slider .slick-arrow:hover i {
    color: white;
}

.testimonials-slider .slick-prev {
    left: -25px;
    z-index: 100;
}

.testimonials-slider .slick-next {
    right: -25px;
    z-index: 100;
}

.testimonials-slider .slick-dots {
    bottom: -40px;
    display: flex !important;
    justify-content: center;
    gap: 8px;
}

.testimonials-slider .slick-dots li {
    width: 12px;
    height: 12px;
    margin: 0;
}

.testimonials-slider .slick-dots li button {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    background: #E2E8F0;
    border: none;
    transition: all 0.3s ease;
}

.testimonials-slider .slick-dots li button:before {
    display: none;
}

.testimonials-slider .slick-dots li.slick-active button {
    background: #F59E0B;
    width: 30px;
    border-radius: 6px;
}

/* Dark Mode Styles */
.active-dark-mode .testimonials-slider .slick-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.active-dark-mode .testimonials-slider .slick-arrow:hover {
    background: #F59E0B;
}

.active-dark-mode .testimonials-slider .slick-arrow i {
    color: #f8fafc;
}

.active-dark-mode .testimonials-slider .slick-dots li button {
    background: rgba(255, 255, 255, 0.2);
}

.active-dark-mode .testimonials-slider .slick-dots li.slick-active button {
    background: #F59E0B;
}

.active-dark-mode .testimonial-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.active-dark-mode .testimonial-card h5 {
    color: #f8fafc !important;
}

.active-dark-mode .testimonial-card p {
    color: #cbd5e1 !important;
}

@media (max-width: 1199px) {
    .testimonials-slider-wrapper {
        padding: 0 60px;
    }

    .testimonials-slider .slick-prev {
        left: 10px;
    }

    .testimonials-slider .slick-next {
        right: 10px;
    }
}

@media (max-width: 767px) {
    .testimonials-slider-wrapper {
        padding: 0 60px;
    }

    .testimonials-slider .slick-prev {
        left: 5px;
        width: 40px;
        height: 40px;
    }

    .testimonials-slider .slick-next {
        right: 5px;
        width: 40px;
        height: 40px;
    }

    .testimonials-slider .slick-arrow i {
        font-size: 16px;
    }
}

/* Article Cards Styles */
.article-card-link {
    cursor: pointer;
}

.article-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
}

.article-card-media {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.article-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    display: block;
}

.article-card-date {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.article-card-title {
    transition: color 0.25s ease;
}

.article-card-excerpt {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-cta {
    margin-top: auto;
    width: fit-content;
    position: relative;
    gap: 6px;
}

.article-card-cta::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.28s ease;
}

.article-card-link:hover .article-card {
    transform: translateY(-8px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    border-color: rgba(59, 130, 246, 0.22);
}

.article-card-link:hover .article-card-image {
    transform: scale(1.08);
}

.article-card-link:hover .article-card-title {
    color: #3B82F6 !important;
}

.article-card-link:hover .article-card-cta {
    transform: translateX(-5px);
}

.article-card-link:hover .article-card-cta::after {
    transform: scaleX(1);
}

/* Dark Mode Styles for Article Cards */
.active-dark-mode .article-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.active-dark-mode .article-card-media {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.active-dark-mode .article-card-date {
    background: rgba(59, 130, 246, 0.72) !important;
    border-color: rgba(147, 197, 253, 0.45);
}

.active-dark-mode .article-card-link:hover .article-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2) !important;
}

.active-dark-mode .article-card h4 {
    color: #f8fafc !important;
}

.active-dark-mode .article-card-link:hover h4 {
    color: #60A5FA !important;
}

.active-dark-mode .article-card p {
    color: #cbd5e1 !important;
}

.active-dark-mode .article-card span {
    color: #60A5FA !important;
}

.active-dark-mode .article-card-link:hover span {
    color: #93C5FD !important;
}

/* Section Dividers Styles */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: inherit;
    filter: blur(3px);
}

/* Dark Mode Section Dividers */
.active-dark-mode .section-divider {
    opacity: 0.6;
}

.active-dark-mode .section-divider::before {
    filter: blur(5px);
    opacity: 0.8;
}

/* Services Grid Styles - Match Why-Buy-Box Layout */
.services-grid {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.services-grid .heading {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.services-grid .heading .icon {
    flex-shrink: 0;
    margin-left: 15px;
}

.services-grid .heading .title {
    margin: 0;
}

.services-grid > p {
    margin: 0;
}

/* Add spacing between cards in Features section */
#features .col-xl-4,
#features .col-md-6 {
    margin-bottom: 30px;
}

/* Fix title color in Features section (dark background) */
#features .services-grid .heading .title {
    color: white !important;
}

#features .services-grid > p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Responsive Typography and Spacing */
@media (max-width: 1199px) {
    /* Tablet adjustments */
    .section-heading .title {
        font-size: 32px !important;
    }

    .section-heading p {
        font-size: 15px !important;
    }

    .section-heading .subtitle,
    .section-heading span {
        font-size: 12px !important;
        padding: 5px 15px !important;
    }

    .section-padding {
        padding: 60px 0 !important;
    }

    /* Tablet: Show 2 cards per row for "Why Choose" section */
    #why-choose .col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .services-grid,
    .why-buy-box {
        padding: 25px !important;
        margin-bottom: 25px !important;
    }

    .services-grid .thumbnail i,
    .why-buy-box .icon i {
        font-size: 38px !important;
        margin-bottom: 15px !important;
    }

    .services-grid .title,
    .why-buy-box .title {
        font-size: 17px !important;
        margin-bottom: 12px !important;
    }

    .services-grid p,
    .why-buy-box p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 991px) {
    /* Small tablet adjustments */
    .section-heading .title {
        font-size: 28px !important;
    }

    .section-heading p {
        font-size: 14px !important;
    }

    .section-padding {
        padding: 50px 0 !important;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 767px) {
    /* Mobile adjustments */
    .section-heading .title {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .section-heading h2 {
        font-size: 24px !important;
    }

    .section-heading p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .section-heading .subtitle,
    .section-heading span {
        font-size: 11px !important;
        padding: 4px 12px !important;
        margin-bottom: 12px !important;
    }

    .section-padding {
        padding: 40px 0 !important;
    }

    .section-heading {
        margin-bottom: 30px !important;
    }

    /* Mobile: Show 1 card per row for "Why Choose" and "Features" sections */
    #why-choose .col-xl-3,
    #features .col-xl-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .services-grid,
    .why-buy-box {
        padding: 30px !important;
        margin-bottom: 25px !important;
        text-align: center;
    }

    .services-grid .thumbnail,
    .why-buy-box .heading {
        text-align: center;
    }

    .services-grid .thumbnail i,
    .why-buy-box .icon i {
        font-size: 48px !important;
        margin-bottom: 20px !important;
    }

    .services-grid .title,
    .why-buy-box .title {
        font-size: 19px !important;
        margin-bottom: 15px !important;
        font-weight: 700 !important;
    }

    .services-grid p,
    .why-buy-box p {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }

    /* Article cards mobile */
    .article-card {
        margin-bottom: 20px;
    }

    .article-card h4 {
        font-size: 16px !important;
    }

    .article-card p {
        font-size: 13px !important;
    }

    .article-card-body {
        padding: 20px !important;
    }

    .article-card-excerpt {
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    /* Testimonials mobile */
    .testimonial-card {
        padding: 20px !important;
        margin: 10px 5px !important;
    }

    .testimonial-card h5 {
        font-size: 16px !important;
    }

    .testimonial-card p {
        font-size: 13px !important;
    }

    .testimonial-card > div:first-child > div:first-child {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        margin-left: 12px !important;
    }

    /* Pricing cards mobile */
    .pricing-card {
        margin-bottom: 30px;
    }

    .pricing-card h3 {
        font-size: 20px !important;
    }

    .pricing-card .price {
        font-size: 32px !important;
    }

    .pricing-card li {
        font-size: 13px !important;
        padding: 10px 0 !important;
    }

    /* Container padding mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons mobile */
    a.mobile-compact {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }

    /* Row spacing mobile */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 575px) {
    /* Extra small mobile */
    .section-heading .title {
        font-size: 22px !important;
    }

    .section-heading h2 {
        font-size: 22px !important;
    }

    .section-padding {
        padding: 35px 0 !important;
    }

    .services-grid .thumbnail i,
    .why-buy-box .icon i {
        font-size: 32px !important;
    }

    .article-card > div:first-child {
        height: 160px !important;
    }
}
