
/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
   

    .category-block {
        display: contents;
    }

    .front-page section {
    padding: 0.8rem 0.8rem;
}

    .categories {
        display: none;
    }

    /* Compact hero */
    .hero {
        min-height: 200px;
        max-height: none;
        padding: 1rem 0.75rem;
        border-top: none;
    }

    .front-page {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    .hero {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    .hero-inner {
        margin-top: 0;
        padding: 0;
        background: transparent;
        border: none;
    }

    .hero h1 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .hero p {
        display: none;
    }

    .hero-search input {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    /* Expandable categories */
    .category-content {
        display: none;
    }

.business-grid {
    padding: 0rem 0.5rem 0.5rem;
    display: block;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
background-color: whitesmoke;
    gap: 0rem 1.25rem;   /* ⬅ reduce vertical gap */
}

.category-header-block {
    margin: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #162038; /* darker than #1f2a44 */
}
.category-content.active {
    display: block; /* Remove grid */
}

    .subcategory-bar {
        display: none;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .subcategory-bar.active {
        display: flex;
    }

    /* Smaller cards */
    

    .business-media {
        height: 70px;
        padding: 0.5rem;
    }


    /* Hide desktop card */
    .business-card--desktop {
        display: none;
    }

    /* Show mobile card */
  .business-card-mobile {
    display: block;
    background: #1f2a44;
    border-radius: 12px;
    padding: 0.3rem;
    margin-bottom: 0.2rem;
    margin-top: 0.2rem;

    position: relative;   
}

    .business-card-mobile-link {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        text-decoration: none;
        color: #fff;
    }

    /* Title */
    .business-card-mobile-title {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
    }

    /* Body layout */
    .business-card-mobile-body {
        display: flex;
        gap: 0.75rem;
        align-items: flex-start;
    }

    /* Logo */
    

    .business-card-mobile-media img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* Text content */
    .business-card-mobile-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Text content */
    .business-card-mobile-content p{
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .business-card-mobile-description {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .business-card-mobile-categories {
        display: none;
    }

    .business-card-mobile-category {
        font-size: 0.6rem;
        padding: 3px 8px;
        border-radius: 999px;
        background: rgba(255,255,255,0.15);
    }


    

    /* =========================
   MOBILE – CATEGORY HEADING
========================= */
.category-heading {
    font-size: 1.15rem;      /* ⬅ slightly bigger */
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;     /* vertical center */
    justify-content: space-between;
}

.category-heading-content {
    display:flex;
    align-items:center;
    gap:.45rem;
}

.category-heading-icon {
    width: 65px;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-heading-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-heading-text {
    display: flex;
    align-items: center;
}

/* Hide long description */
.category-heading-description {
    display: none;
}

/* Cleaner dropdown arrow */
.category-heading::after {
    content: "▾";
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.category-heading.active::after {
    transform: rotate(180deg);
}

.no-results-message {
    margin: 1rem 0.5rem;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
}



/* MOBILE logo column */
.business-card-mobile-media-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    flex-shrink: 0;
}

/* keep existing logo box */
.business-card-mobile-media {
    width: 70px;
    height: 70px;
    padding: 0.5rem;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}






.business-member-mobile {
    position: absolute;
    top: 6px;
    right: 8px;

    z-index: 10;
    pointer-events: none;
     display: block;
    margin-top: 10px;
}

.business-member-mobile .member-badge {
    width: 34px;
    height: auto;
    display: block;
      filter: invert(1);
}


    .category-show-more {
        display: none !important;
    }

  .category-items {
        display: block;
        gap: 0;
    }

    .business-card-wrapper {
        margin-bottom: 0.4rem;
    }
    




/* =========================
   FIX HERO (WITHOUT BREAKING FOOTER)
========================= */



    /* Keep full page height so footer stays at bottom */
    body.is-searching .front-page {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    /* Stop hero from stretching */
    body.is-searching .hero {
        flex: 0 0 auto;
        min-height: auto;
    }

    /* Let content take remaining space */
    body.is-searching .category-section {
        flex: 1;
    }


    .category-heading-banner{
        display: none;
    }

    .category-banner-mobile {
    padding: 0;
    overflow: hidden;
}

.category-banner-mobile img {
    display: block;
    width: 100%;
    height: auto;
}
}
