﻿/* =========================================================
   Majales Ahvaz
   Categories
   ========================================================= */

.categories-page {
    min-height: 100vh;
    background: radial-gradient( circle at 10% 0%, rgba(16, 185, 129, 0.08), transparent 32% ), radial-gradient( circle at 90% 10%, rgba(5, 150, 105, 0.07), transparent 30% ), #f7faf9;
}


/* =========================================================
   HERO
   ========================================================= */

.categories-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 84px;
    background: linear-gradient( 135deg, #063f32 0%, #075c49 48%, #087f5b 100% );
    color: #ffffff;
}

    .categories-hero::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        top: -220px;
        right: -100px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        pointer-events: none;
    }

    .categories-hero::after {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        bottom: -210px;
        left: -80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
        pointer-events: none;
    }

.categories-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.categories-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.88rem;
    font-weight: 600;
}

.categories-hero-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
}

.categories-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.04em;
}

    .categories-hero h1 span {
        display: block;
        margin-top: 6px;
        color: #a7f3d0;
    }

.categories-hero p {
    max-width: 620px;
    margin: 20px auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 2;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.categories-container {
    position: relative;
    z-index: 2;
    padding-top: 34px;
    padding-bottom: 80px;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.categories-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.categories-result {
    display: flex;
    align-items: baseline;
    gap: 7px;
    white-space: nowrap;
    color: #64748b;
}

    .categories-result strong {
        color: #087f5b;
        font-size: 1.5rem;
        font-weight: 900;
    }

    .categories-result span {
        font-size: 0.9rem;
        font-weight: 600;
    }

.categories-search {
    position: relative;
    width: min(100%, 340px);
}

    .categories-search i {
        position: absolute;
        top: 50%;
        right: 17px;
        z-index: 1;
        transform: translateY(-50%);
        color: #94a3b8;
        pointer-events: none;
    }

    .categories-search input {
        width: 100%;
        height: 48px;
        padding: 0 48px 0 18px;
        border: 1px solid #e2e8f0;
        border-radius: 15px;
        outline: none;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: 0 8px 25px rgba(15, 23, 42, 0.04);
        color: #0f172a;
        font-family: inherit;
        font-size: 0.9rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

        .categories-search input::placeholder {
            color: #94a3b8;
        }

        .categories-search input:focus {
            border-color: rgba(8, 127, 91, 0.4);
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.08), 0 10px 30px rgba(15, 23, 42, 0.06);
        }


/* =========================================================
   GRID
   ========================================================= */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   CARD
   ========================================================= */

.category-card {
    min-width: 0;
}

.category-card-link {
    position: relative;
    display: block;
    min-height: 250px;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76) );
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: inherit;
    text-decoration: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

    .category-card-link::before {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        top: -100px;
        left: -70px;
        border-radius: 50%;
        background: rgba(16, 185, 129, 0.08);
        transition: transform 0.35s ease;
    }

    .category-card-link:hover {
        transform: translateY(-6px);
        border-color: rgba(16, 185, 129, 0.28);
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.09), 0 8px 25px rgba(8, 127, 91, 0.08);
    }

        .category-card-link:hover::before {
            transform: scale(1.35);
        }


/* =========================================================
   ICON
   ========================================================= */

.category-icon-wrapper {
    position: relative;
    display: inline-flex;
    margin-bottom: 23px;
}

.category-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 18px;
    background: linear-gradient( 145deg, #ecfdf5, #d1fae5 );
    color: #087f5b;
    font-size: 1.35rem;
    box-shadow: 0 10px 24px rgba(8, 127, 91, 0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-icon-glow {
    position: absolute;
    z-index: 1;
    width: 55px;
    height: 55px;
    top: 9px;
    right: -7px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.16);
    filter: blur(15px);
}

.category-card-link:hover .category-icon {
    transform: rotate(-4deg) scale(1.06);
    box-shadow: 0 14px 30px rgba(8, 127, 91, 0.16);
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.category-card-content {
    position: relative;
    z-index: 2;
}

.category-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.category-name {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.7;
    transition: color 0.2s ease;
}

.category-card-link:hover .category-name {
    color: #087f5b;
}

.category-arrow {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 1rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

.category-card-link:hover .category-arrow {
    transform: translateX(-4px);
    color: #087f5b;
}

.category-description {
    min-height: 48px;
    margin: 10px 0 20px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-description-empty {
    color: #94a3b8;
}


/* =========================================================
   META
   ========================================================= */

.category-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #eef2f0;
}

.category-audio-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

    .category-audio-count i {
        color: #087f5b;
    }

    .category-audio-count strong {
        color: #334155;
        font-weight: 800;
    }

.category-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #087f5b;
    font-size: 0.78rem;
    font-weight: 700;
}

    .category-more i {
        font-size: 0.7rem;
        transition: transform 0.2s ease;
    }

.category-card-link:hover .category-more i {
    transform: translateX(-3px);
}


/* =========================================================
   SEARCH EMPTY
   ========================================================= */

.categories-empty-search {
    display: none;
    padding: 70px 20px;
    text-align: center;
}

    .categories-empty-search.show {
        display: block;
    }

    .categories-empty-search .empty-icon,
    .categories-empty .empty-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        margin: 0 auto 20px;
        border-radius: 22px;
        background: #ecfdf5;
        color: #087f5b;
        font-size: 1.5rem;
    }

    .categories-empty-search h3 {
        margin: 0 0 8px;
        color: #1e293b;
        font-size: 1.15rem;
        font-weight: 800;
    }

    .categories-empty-search p {
        margin: 0;
        color: #94a3b8;
        font-size: 0.9rem;
    }


/* =========================================================
   EMPTY STATE
   ========================================================= */

.categories-empty {
    padding: 85px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

    .categories-empty h2 {
        margin: 0 0 10px;
        color: #1e293b;
        font-size: 1.3rem;
        font-weight: 800;
    }

    .categories-empty p {
        margin: 0 auto 25px;
        max-width: 520px;
        color: #64748b;
        line-height: 1.9;
    }

.empty-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 13px;
    background: #087f5b;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(8, 127, 91, 0.16);
    transition: transform 0.2s ease, background 0.2s ease;
}

    .empty-button:hover {
        background: #066b4d;
        color: #ffffff;
        transform: translateY(-2px);
    }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .categories-hero {
        padding: 60px 0 70px;
    }
}


@media (max-width: 767.98px) {

    .categories-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .categories-result {
        justify-content: center;
    }

    .categories-search {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-card-link {
        min-height: auto;
    }

    .categories-container {
        padding-top: 25px;
        padding-bottom: 60px;
    }
}


@media (max-width: 480px) {

    .categories-hero {
        padding: 48px 0 58px;
    }

    .categories-hero-badge {
        font-size: 0.78rem;
    }

    .categories-hero h1 {
        font-size: 1.85rem;
    }

    .categories-hero p {
        font-size: 0.88rem;
    }

    .category-card-link {
        padding: 20px;
        border-radius: 20px;
    }

    .category-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .category-name {
        font-size: 1rem;
    }

    .category-card-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}