/**
 * CPB Theme - Tools Cards Carousel Component Styles
 * 
 * Strict Typography: 'Inter', sans-serif
 * Features:
 * - Category pill tab navigation bar
 * - Swiper card carousel with equal-height slides
 * - Action button with circular right arrow
 * - Minimal hover micro-interactions
 * - Responsive breakpoints
 */

.cpb-tools-cards-section {
    font-family: 'Inter', sans-serif;
    padding: 48px 0 54px;
    background: transparent;
    position: relative;
    box-sizing: border-box;
}

.cpb-tools-cards-section *,
.cpb-tools-cards-section *::before,
.cpb-tools-cards-section *::after {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.cpb-tools-container {
    width: 100%;
    max-width: 1296px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ==========================================================================
   Section Header
   ========================================================================== */
.cpb-tools-header {
    text-align: center;
    margin-bottom: 22px;
}

.cpb-tools-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .cpb-tools-title {
        font-size: 32px;
    }
}

/* ==========================================================================
   Category Pills Navigation Bar
   Figma Specs: Inter 700 Bold, Size 12.75px, Line-height 18.22px, Letter-spacing 0px
   ========================================================================== */
.cpb-tools-tabs-nav-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 4px;
}

.cpb-tools-tabs-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 5px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.cpb-tools-tabs-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.cpb-tools-tab-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12.75px;
    font-weight: 700;
    line-height: 18.22px;
    letter-spacing: 0px;
    text-align: center;
    color: #4b5563;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cpb-tools-tab-btn:hover:not(.active) {
    color: #111827;
    background: #f3f4f6;
}

.cpb-tools-tab-btn.active {
    background: #00a859;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 168, 89, 0.35);
}

/* ==========================================================================
   Carousel & Tab Panes
   Figma Specs: Frame Width 1,296px, Height Hug 446.24px
   ========================================================================== */
.cpb-tools-tabs-content {
    position: relative;
    width: 100%;
}

.cpb-tools-tab-pane {
    display: none !important;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cpb-tools-tab-pane.active {
    display: block !important;
    opacity: 1;
}

.cpb-tools-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1296px;
    min-height: 446.24px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cpb-tools-swiper {
    padding: 10px 4px 6px 4px;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 382px;
}

.cpb-tools-swiper .swiper-wrapper {
    align-items: stretch;
    height: 100%;
}

.cpb-tools-swiper .swiper-slide {
    width: 363.24px;
    max-width: calc(100vw - 40px);
    height: 361.6px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   Tool Card Component & Minimal Hover Effects
   Figma Specs: Width 363.24px, Height 361.6px, Radius 16.77px
   ========================================================================== */
.cpb-tool-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 363.24px;
    max-width: 100%;
    height: 361.6px;
    min-height: 361.6px;
    max-height: 361.6px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16.77px;
    padding: 28px 29.18px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.35s ease;
    position: relative;
    box-sizing: border-box;
}

/* Minimal hover interaction on card */
.cpb-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
    border-color: #a7f3d0;
    /* subtle mint accent */
}

.cpb-tool-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

/* Figma Specs: Inter 700 Bold, 23.01px, Line-height 24.65px, Letter-spacing -1.42px, Color #1D4F45 */
.cpb-tool-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 23.01px;
    font-weight: 700;
    line-height: 24.65px;
    letter-spacing: 0px;
    color: #1D4F45;
    margin: 0 0 14px 0;
    width: 304.89px;
    max-width: 100%;
    transition: color 0.25s ease;
}

/* Figma Specs: Inter 400 Regular, 13.15px, Line-height 27.72px, Letter-spacing 0%, Width 304.89px, Height 160px */
.cpb-tool-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13.15px;
    font-weight: 400;
    line-height: 27.72px;
    letter-spacing: 0;
    color: #374151;
    margin: 0;
    width: 304.89px;
    max-width: 100%;
    min-height: 160px;
    max-height: 160px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    box-sizing: border-box;
}

/* Card Action / Button - Figma Specs: Inter 500 Medium, 13.42px, Line-height 17.61px, Green underline as in Screenshot 1 */
.cpb-tool-card-footer {
    margin-top: auto;
    padding-top: 14px;
    flex-shrink: 0;
    width: 100%;
}

.cpb-tool-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif;
    font-size: 13.42px;
    font-weight: 500;
    line-height: 17.61px;
    letter-spacing: 0;
    color: #00a859;
    transition: color 0.25s ease;
}

.cpb-tool-action-text {
    flex: 1;
    padding-right: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13.42px;
    font-weight: 500;
    line-height: 17.61px;
    letter-spacing: 0;
    color: #00a859;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.cpb-tool-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00a859;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        background-color 0.3s ease;
}

/* Minimal hover effect on action button */
.cpb-tool-card:hover .cpb-tool-action-icon,
.cpb-tool-card-action:hover .cpb-tool-action-icon {
    transform: translateX(5px);
    background-color: #008f4c;
}

.cpb-tool-card:hover .cpb-tool-action-text,
.cpb-tool-card-action:hover .cpb-tool-action-text,
.cpb-tool-card-action:hover,
.cpb-tool-card-action:focus {
    color: #008f4c;
    text-decoration: none !important;
}

/* ==========================================================================
   Single Card Centered Alignment
   When only 1 card is present, align perfectly to center
   ========================================================================== */
.cpb-tools-carousel-wrapper.has-single-card,
.cpb-tools-tab-pane.active.has-single-card {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    min-height: 446.24px;
}

.cpb-tools-carousel-wrapper.has-single-card .cpb-tools-swiper,
.cpb-tools-swiper.has-single-card {
    width: 100%;
    max-width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 4px;
    height: auto;
    overflow: visible;
}

.cpb-tools-carousel-wrapper.has-single-card .swiper-wrapper,
.cpb-tools-swiper.has-single-card .swiper-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    transform: none !important;
    margin: 0 auto !important;
}

.cpb-tools-carousel-wrapper.has-single-card .swiper-slide,
.cpb-tools-swiper.has-single-card .swiper-slide {
    width: 363.24px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    transform: none !important;
}

.cpb-tools-carousel-wrapper.has-single-card .cpb-tool-card,
.cpb-tools-swiper.has-single-card .cpb-tool-card {
    margin: 0 auto !important;
}

.cpb-tools-carousel-wrapper.has-single-card .cpb-tools-nav-btn,
.cpb-tools-carousel-wrapper.has-single-card .cpb-tools-pagination,
.cpb-tools-swiper.has-single-card .cpb-tools-nav-btn,
.cpb-tools-swiper.has-single-card .cpb-tools-pagination {
    display: none !important;
}

/* ==========================================================================
   Navigation Arrow & Pagination (Figma Specs: Frame Height 446.24px)
   ========================================================================== */
.cpb-tools-nav-btn {
    position: absolute;
    top: 191px;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    transition: all 0.25s ease;
    outline: none;
    padding: 0;
}

.cpb-tools-prev {
    left: 4px;
}

.cpb-tools-next {
    right: 4px;
}

.cpb-tools-nav-btn:hover {
    background: #f9fafb;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    color: #111827;
    transform: translateY(-50%) scale(1.05);
}

.cpb-tools-nav-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.cpb-tools-nav-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pagination Dots */
.cpb-tools-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 6px;
    height: 14px;
    position: static !important;
}

.cpb-tools-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    opacity: 1;
    margin: 0 !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cpb-tools-pagination .swiper-pagination-bullet-active {
    background: #00a859;
    width: 20px;
    height: 8px;
    border-radius: 4px;
    transform: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 640px) {
    .cpb-tools-cards-section {
        padding: 40px 0 50px;
    }

    .cpb-tools-tab-btn {
        font-size: 13px;
        padding: 7px 14px;
    }

    .cpb-tool-card {
        padding: 24px 20px 20px;
        height: auto;
        min-height: 340px;
        max-height: none;
    }

    .cpb-tool-card-title {
        font-size: 20px;
        line-height: 23px;
        letter-spacing: -1px;
        width: 100%;
    }

    .cpb-tool-card-desc {
        font-size: 13px;
        line-height: 24px;
        width: 100%;
        min-height: auto;
        max-height: none;
    }

    .cpb-tools-nav-btn {
        width: 38px;
        height: 38px;
        right: 0px;
    }
}