.category-banner-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 8px 16px 24px 16px;
    overflow: hidden;
}

.categories {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 8px 4px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    text-align: center;
}

.vertical-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.vertical-scroll::-webkit-scrollbar {
    display: none;
}

.vertical-scroll2 {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 16px;
}

.vertical-scroll2::-webkit-scrollbar {
    display: none;
}

.scroll-free {
    display: grid;
    grid-template-rows: repeat(1, 1fr);
    grid-auto-flow: column;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-free::-webkit-scrollbar {
    display: none;
}

.scroll-free2 {
    display: grid;
    grid-template-rows: repeat(1, 80px);
    grid-auto-flow: column;
    gap: 12px;
    padding-bottom: 5px;
}

.scroll-free2::-webkit-scrollbar {
    display: none;
}

.scroll-free2 {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.company-logo-container {
    width: 80px;
    height: 80px;
    background-color: #fff;
}

.back-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.category-name {
    font-size: 0.75em;
    line-height: 1.2;
    margin-top: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.banner-container {
    margin-top: 8px;
    max-height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Added for conditional header display */
@media (max-width: 767.98px) { /* Small devices (landscape phones, less than 768px) */
    .d-md-none {
        display: block !important;
    }
    .d-md-block {
        display: none !important;
    }
    .back-image { /* Assuming x-header has its own background, or you want a plain one on mobile */
        background: #fff; /* Or your desired mobile background */
    }
}

@media (min-width: 768px) { /* Medium devices (tablets, 768px and up) */
    .d-md-none {
        display: none !important;
    }
    .d-md-block {
        display: block !important;
    }
}

/* Desktop Category Section */
.category-section {
    padding: 20px 0;
}

.category-slider {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    margin: 0 40px; /* Add margin for the navigation buttons */
}

.category-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
    will-change: transform;
}

.category-item {
    flex: 0 0 auto;
    width: 120px; /* Fixed width for consistent sizing */
    padding: 5px;
}

.category-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-circle:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-icon2 {
    width: 40px;
    height: 40px;
}

.category-title {
    width: 100px;
    margin-top: 8px;
    font-size: 12px;
    color: #333;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    border: none;
}

.nav-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-50%) scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

.category-section-title2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
    text-align: left;
    color: #333;
    position: relative;
}

.blue-section {
    background-color: #1a73e8;
    width: 100%;
}

.feature-card {
    background-color: hsla(0, 0%, 100%, .03);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.card-content {
    color: white;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}
@media (max-width:576px) {
    .category-banner-card{
        background-color: F0F3F5;
    }

    .categories {
        width: 65px;
        height: 65px;
        border-radius: 16px;
        padding: 8px 4px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        text-align: center;
    }

    .scroll-free {
        grid-template-rows: repeat(2, 1fr);
        gap: 12px;
    }

    .scroll-free2 {
        grid-template-rows: repeat(2, 80px);
    }

    .back-image {
        background: #fff;
    }

    .vertical-scroll2 {
        padding: 0 8px;
    }
}

.category-scroll-container {
    position: relative;
    width: 100%;
}

.scroll-btn {
    position: absolute;
    top: -50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.scroll-btn.active {
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    opacity: 1;
}

.scroll-btn.active:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.scroll-btn.active i {
    color: #333;
}

.scroll-btn.inactive {
    background: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    opacity: 0.5;
}

.scroll-btn.inactive:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: none;
}

.scroll-btn.inactive i {
    color: #999;
}

.scroll-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.scroll-left {
    right: 50px;
}

.scroll-right {
    right: 10px;
}

.scroll-btn i {
    color: #333;
    font-size: 16px;
}

/* RTL Styles for Farsi locale */
[dir="rtl"] .scroll-left,
.vazir .scroll-left {
    right: auto;
    left: 50px;
}

[dir="rtl"] .scroll-right,
.vazir .scroll-right {
    right: auto;
    left: 10px;
}

/* Optional: Flip chevron icons in RTL */
[dir="rtl"] .scroll-left i,
.vazir .scroll-left i {
    transform: scaleX(-1);
}

[dir="rtl"] .scroll-right i,
.vazir .scroll-right i {
    transform: scaleX(-1);
}