/* =========================================
   Stats Wrapper Modern Redesign 
   (Our Services)
   ========================================= */

.swfs-stats-modern-section {
    background: #ffffff;
    max-width: 100%;
    margin: 0 auto;
    padding: 70px 0px 70px 0px;
    box-sizing: border-box;
    height: auto;
    font-family: 'Noto Sans', system-ui, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.swfs-stats-modern-header {
    margin-bottom: 25px;
}

.swfs-stats-modern-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #3E72DD;
    border-radius: 50px;
    padding: 6px 16px;
    margin-bottom: 20px;
}

/* Force internal drupal fields to display inline so icon and text sit on the same line */
.swfs-stats-modern-badge .field,
.swfs-stats-modern-badge .field__items,
.swfs-stats-modern-badge .field__item,
.swfs-stats-modern-badge .badge-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.swfs-stats-modern-badge .field--name-field-badge-text,
.swfs-stats-modern-badge .badge-text .field,
.swfs-stats-modern-badge .badge-inner,
.swfs-stats-modern-badge {
    color: #3E72DD !important;
    font-weight: 500;
    font-size: 14px;
}

.swfs-stats-modern-title,
.swfs-stats-modern-title .field--name-field-service-heading,
.swfs-stats-modern-title * {
    color: #1348C3 !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    line-height: 1.3;
    margin: 0 0 9px 0 !important;
    max-width: 600px;
    font-family: 'Noto Sans', sans-serif !important;
}

.swfs-stats-modern-desc,
.swfs-stats-modern-desc .field--name-field-service-desc,
.swfs-stats-modern-desc * {
    color: #373434 !important;
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    font-family: 'Noto Sans', sans-serif !important;
}

/* Cards (paragraph--spfo-stats-section.html.twig) */
.swfs-stats-modern-card {
    background: #F8FBFF;
    border: 1px solid #e0e4f0 !important;
    border-radius: 12px;
    padding: 24px;
    margin: 10px;
    /* spacing for slider */
    box-shadow: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.swfs-stats-modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-top-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.stats-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: #E8F1FF;
}

.swfs-stats-modern-card .stats-name h3 {
    color: #1E3A8A;
    font-size: 20px !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.swfs-stats-modern-card .stats-description p {
    color: #353535 !important;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Keep the normal slider slick-track spacing nice */
.stats-slider .slick-slide {
    height: auto;
}

.stats-slider .slick-track {
    display: flex;
}

.stats-slider .slick-list {
    padding-top: 10px;
    padding-bottom: 20px;
    padding-right: 10px;
    margin: -10px -10px 0 -10px;
}

/* =========================================
   Bottom Controls (View More & Arrows)
   ========================================= */
.swfs-stats-bottom-controls {
    margin-top: 30px;
}

.swfs-stats-view-more .btn-view-more,
.swfs-stats-view-more a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3E72DD;
    font-size: 0.9rem !important;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #3E72DD;
    padding: 11px 28px !important;
    border-radius: 50px !important;
    transition: all 0.3s ease;
}

.swfs-stats-view-more .btn-view-more::after,
.swfs-stats-view-more a::after {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E72DD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.swfs-stats-view-more .btn-view-more:hover,
.swfs-stats-view-more a:hover {
    background-color: #1348C3;
    color: #ffffff;
    border-color: #1348C3;
    box-shadow: 0 4px 12px rgba(19, 72, 195, 0.15);
}

.swfs-stats-view-more .btn-view-more:hover::after,
.swfs-stats-view-more a:hover::after {
    transform: translateX(4px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
}

/* Custom Slick Slider Navigation Arrows */
.stats-custom-arrows {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stats-custom-arrows .slick-arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 36px;
    height: 36px;
    background: transparent !important;
    border: 1px solid #1348C3 !important;
    border-radius: 50%;
    color: #1348C3 !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    z-index: 10;
    padding: 0 !important;
}

/* Remove default slick arrow pseudo-elements that offset the centering */
.stats-custom-arrows .slick-arrow::before {
    content: none !important;
    display: none !important;
}

/* Guarantee exact centering for the font-awesome icon */
.stats-custom-arrows .slick-arrow i {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.stats-custom-arrows .slick-arrow:hover {
    background: #1348C3 !important;
    color: #ffffff !important;
}

.stats-custom-arrows .slick-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #A0AEC0 !important;
    color: #A0AEC0 !important;
}

/* Mobile Adjustments */
@media (max-width: 1300px) {
    .swfs-stats-modern-section {
        /* Relies on standard .container padding */
    }
}

@media (max-width: 768px) {
    .swfs-stats-modern-header {
        text-align: left;
    }

    .swfs-stats-modern-title,
    .swfs-stats-modern-title .field--name-field-service-heading,
    .swfs-stats-modern-title * {
        font-size: 24px !important;
        text-align: left !important;
    }

    .swfs-stats-modern-desc,
    .swfs-stats-modern-desc * {
        text-align: left !important;
        font-size: 15.2px !important;
    }

    .swfs-stats-bottom-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 15px;
    }
}

@media (max-width: 575px) {
    .swfs-stats-modern-section {
        min-height: auto;
        padding: 40px 0;
    }

    .swfs-stats-modern-title,
    .swfs-stats-modern-title .field--name-field-service-heading,
    .swfs-stats-modern-title * {
        font-size: 24px !important;
    }
}

/* =========================================
   DARK MODE
   ========================================= */

[data-theme="dark"] .swfs-stats-modern-section {
    background: transparent;
}

[data-theme="dark"] .swfs-stats-modern-title,
[data-theme="dark"] .swfs-stats-modern-title .field--name-field-service-heading,
[data-theme="dark"] .swfs-stats-modern-title * {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .swfs-stats-modern-desc,
[data-theme="dark"] .swfs-stats-modern-desc .field--name-field-service-desc,
[data-theme="dark"] .swfs-stats-modern-desc * {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .swfs-stats-modern-card {
    background: #1e2a3b;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .swfs-stats-modern-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .stats-icon-wrapper img,
.dark-mode .stats-icon-wrapper img {
    filter: none;
    background: transparent;
}

[data-theme="dark"] .swfs-stats-modern-card .stats-name h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .swfs-stats-modern-card .stats-description p {
    color: #94a3b8 !important;
}

[data-theme="dark"] .swfs-stats-view-more .btn-view-more,
[data-theme="dark"] .swfs-stats-view-more a {
    color: #F1F5F9 !important;
    border-color: #F1F5F9 !important;
}

[data-theme="dark"] .swfs-stats-view-more .btn-view-more::after,
[data-theme="dark"] .swfs-stats-view-more a::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F1F5F9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") !important;
}

[data-theme="dark"] .swfs-stats-view-more .btn-view-more:hover,
[data-theme="dark"] .swfs-stats-view-more a:hover {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

[data-theme="dark"] .stats-custom-arrows .slick-arrow {
    border-color: #F1F5F9 !important;
    color: #F1F5F9 !important;
}

[data-theme="dark"] .stats-custom-arrows .slick-arrow:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}