/* ======================================================
Project : Sridevi Enterprises
File    : categories.css

Author  : Srikar
====================================================== */

/* ===========================================
   Categories Section
=========================================== */

.categories-section {

    padding: 80px 0;

    background: #F5F7FA;

}

/* ===========================================
   Section Heading
=========================================== */

.section-heading {

    margin-bottom: 50px;

}

.section-heading h2 {

    font-family: 'Poppins', sans-serif;

    font-size: 2.3rem;

    color: #1E4FA3;

    font-weight: 700;

}

.section-heading p {

    color: #666;

    max-width: 650px;

    margin: auto;

}

/* ===========================================
   Featured Categories Slider
=========================================== */

.featured-categories-slider-wrapper {

    position: relative;

    display: flex;

    align-items: center;

    gap: 14px;

}

.featured-categories-slider {

    display: flex;

    gap: 20px;

    flex: 1;

    overflow-x: auto;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    padding: 4px 0 12px;

    scrollbar-width: none;

}

.featured-categories-slider::-webkit-scrollbar {

    display: none;

}

/* ===========================================
   Category Slide
=========================================== */

.category-slide {

    scroll-snap-align: start;

    flex: 0 0 calc(100% - 8px);

    display: flex;
    flex-direction: column;

    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);

    transition: box-shadow .2s ease, transform .2s ease;

}

.category-slide:hover {

    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    transform: translateY(-2px);

}

.category-slide img {

    width: 100%;

    height: 220px;

    object-fit: cover;

}

.category-slide-body {

    padding: 20px;

    display: flex;
    flex-direction: column;
    flex: 1;

}

.category-slide-body h3 {

    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;

}

.category-slide-body p {

    color: #667085;
    font-size: .9rem;
    margin-bottom: 16px;

}

.category-slide-body .btn {

    margin-top: auto;
    align-self: flex-start;

}

/* ===========================================
   Slider Arrows
=========================================== */

.slider-arrow {

    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #D0D5DD;
    border-radius: 50%;
    background: #ffffff;
    color: #1E4FA3;

    cursor: pointer;

    transition: background .2s ease, color .2s ease, opacity .2s ease;

}

.slider-arrow:hover:not(:disabled) {

    background: #1E4FA3;
    color: #ffffff;

}

.slider-arrow:disabled {

    opacity: .35;
    cursor: default;

}

/* No scrolling possible (few categories): hide arrows entirely. */

.featured-categories-slider-wrapper.slider-no-overflow .slider-arrow {

    display: none;

}

/* ===========================================
   Responsive Breakpoints
=========================================== */

@media (min-width: 576px) {

    .category-slide {

        flex-basis: calc(50% - 10px);

    }

}

@media (min-width: 768px) {

    .category-slide {

        flex-basis: calc(33.333% - 14px);

    }

    .category-slide img {

        height: 240px;

    }

}

@media (min-width: 1200px) {

    .category-slide {

        flex-basis: calc(25% - 15px);

    }

}

@media (max-width: 768px) {

    .section-heading h2 {

        font-size: 2rem;

    }

    .slider-arrow {

        width: 36px;
        height: 36px;

    }

}

/* ===========================================
   Categories Page — Hero
=========================================== */

.categories-page-hero {

    padding: 90px 0 60px;

    background: linear-gradient(135deg, #1E4FA3 0%, #0F2E6E 100%);

    color: #ffffff;

    text-align: center;

}

.categories-hero-eyebrow {

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 16px;

    border-radius: 999px;
    background: rgba(255, 255, 255, .12);

    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .3px;

    margin-bottom: 18px;

}

.categories-page-hero h1 {

    font-family: 'Poppins', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;

    margin-bottom: 14px;

}

.categories-page-hero p {

    max-width: 620px;

    margin: 0 auto 32px;

    color: #E5EAF5;
    font-size: 1.05rem;

}

/* ===========================================
   Categories Page — Search
=========================================== */

.categories-search {

    max-width: 480px;

    margin: 0 auto;

}

.categories-search .input-group-text {

    background: #ffffff;
    border-right: none;
    color: #1E4FA3;

}

.categories-search .form-control {

    border-left: none;

    box-shadow: none;

}

.categories-search .input-group-text,
.categories-search .form-control {

    padding: 12px 16px;

}

.categories-search .form-control:focus {

    box-shadow: none;

}

/* ===========================================
   Categories Page — Grid Section
=========================================== */

.categories-grid-section {

    padding: 70px 0 90px;

    background: #F5F7FA;

}

.category-grid {

    display: grid;

    grid-template-columns: 1fr;

    gap: 28px;

}

@media (min-width: 576px) {

    .category-grid {

        grid-template-columns: repeat(2, 1fr);

    }

}

@media (min-width: 992px) {

    .category-grid {

        grid-template-columns: repeat(3, 1fr);

    }

}

@media (min-width: 1200px) {

    .category-grid {

        grid-template-columns: repeat(4, 1fr);

    }

}

/* ===========================================
   Categories Page — Grid Card
=========================================== */

.category-grid-card {

    display: flex;
    flex-direction: column;

    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;

    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);

    transition: box-shadow .25s ease, transform .25s ease;

}

.category-grid-card:hover {

    box-shadow: 0 18px 36px rgba(0, 0, 0, .16);
    transform: translateY(-6px);

}

.category-grid-card-image {

    position: relative;

    overflow: hidden;

    height: 260px;

}

.category-grid-card-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .4s ease;

}

.category-grid-card:hover .category-grid-card-image img {

    transform: scale(1.08);

}

.category-grid-card-image::after {

    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(to top, rgba(15, 46, 110, .55) 0%, rgba(15, 46, 110, 0) 55%);

    opacity: 0;

    transition: opacity .3s ease;

}

.category-grid-card:hover .category-grid-card-image::after {

    opacity: 1;

}

.category-grid-card-body {

    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 26px;

}

.category-grid-card-body h2 {

    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1F2937;

    margin-bottom: 6px;

}

.category-grid-card-body p {

    color: #667085;
    font-size: .95rem;

    margin-bottom: 20px;

}

.category-grid-card-body .btn {

    margin-top: auto;
    align-self: flex-start;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    transition: gap .2s ease, transform .2s ease;

}

.category-grid-card-body .btn i {

    transition: transform .2s ease;

}

.category-grid-card-body .btn:hover {

    transform: translateX(2px);

}

.category-grid-card-body .btn:hover i {

    transform: translateX(3px);

}

/* ===========================================
   Categories Page — Empty State
=========================================== */

.categories-grid-section .empty-state {

    color: #667085;
    text-align: center;

    padding: 40px 0;

}

/* ===========================================
   Categories Page — Mobile
=========================================== */

@media (max-width: 768px) {

    .categories-page-hero {

        padding: 60px 0 40px;

    }

    .categories-page-hero h1 {

        font-size: 2rem;

    }

    .category-grid-card-image {

        height: 200px;

    }

}
