/* =========================================================
   RESET & GLOBAL
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

/* FRONT PAGE SECTIONS */

.front-page section {
    padding: 2rem 1.5rem;
}

.front-page .categories {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #fff;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    min-height: 20vh;
    max-height: 350px;
       width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

.hero-background{
    position:absolute;
    inset:0;

    background-size:cover;
    background-repeat:no-repeat;

    background-position:var(--hero-pos, center center);

    z-index:0;
}

.hero-background::after{
    content:"";
    position:absolute;
    inset:0;

    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,.25) 0%,
            rgba(0,0,0,.05) 40%,
            rgba(0,0,0,.35) 100%
        );
}

.hero-inner {
    position: relative;
    z-index: 3;
    max-width: 600px;
   
    padding-bottom: 10px;
    background: rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(1px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 
    0 2px 4px rgba(0,0,0,0.6),
    0 6px 12px rgba(0,0,0,0.4);
}

.hero p {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    
    color: #fff;

    text-shadow: 
    0 2px 4px rgba(0,0,0,0.6),
    0 6px 12px rgba(0,0,0,0.4);
}

/* HERO SEARCH */

.hero-search {
    display: flex;
    background: #fff;
    border-radius: 999px;
    padding: 0.25rem;
    max-width: 560px;
    margin: 0 auto;
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
}

.hero-search button {
    background: none;
    border: none;
    padding: 0 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: #333;
}


/* =========================================================
   CATEGORY ICON NAV
========================================================= */

.categories {
    background: #233264;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.category-grid {
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.3rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    text-align: center;
    transition: 0.2s ease;
}

.category-card:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-4px);
}

.category-icon {
    width: 110px;
    height: 110px;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
}

.category-icon img {
    max-width: 100%;
   
    object-fit: contain;
}

.category-name {
    font-weight: 600;
    font-size: 0.9rem;
}


/* =========================================================
   CATEGORY SECTION
========================================================= */

.category-section {
    padding: 1.5rem 1.5rem 5rem;
    scroll-margin-top: 120px;
    background: #1f2a44;
}



.category-header-block {
    grid-column: 1 / -1;
}
.category-block {
    grid-column: 1 / -1;
    border-radius: 14px;
    padding: 0.75rem 1rem 1.25rem;
    margin-top: 1.25rem;

    border: 1px solid rgba(35,50,100,0.12);
}

/* slightly cool blue */
.business-grid > .category-block:nth-of-type(odd) {
    background: #eef3ff;
}

/* a bit deeper blue */
.business-grid > .category-block:nth-of-type(even) {
    background: #e3ebff;
}
.category-heading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
}

.category-heading-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-heading-icon {
    width: 120px;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.category-heading-icon img {
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
}

.category-heading-description {
    margin-top: 10px;
    font-size: 1.1rem;
    max-width: 60%;   /* 👈 was 45% */
    line-height: 1.4;
}

/* =========================================
   LIGHTBOX
========================================= */

.company-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.company-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

.company-lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}


/* =========================================================
   BUSINESS GRID
========================================================= */

.business-grid {
    max-width: 1800px;
    margin: 0 auto;
    background: #233264;
    border-radius: 16px;
    padding: 1rem 2rem 2em;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));

        align-items: stretch;
}

.business-card {
    display: flex;
    flex-direction: column;
    background: #1f2a44;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.25);
}

.business-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.business-media {
    height: 100px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.business-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-card h3 {
    font-size: 1.05rem;
    margin: 0;
    padding: 1.25rem;
    color: #fff;
}

.business-card p {
    font-size: 0.9rem;
    padding: 0 1.25rem 1.25rem;
    color: #fff;

    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    /* Standard future-proof property */
    line-clamp: 3;
}

.business-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 1.25rem 1.25rem;
    margin-top: auto;
}

.business-card-category {
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}

.business-card {
    height: 100%;
    }


/* =========================================================
   SUBCATEGORY BAR
========================================================= */

.subcategory-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.75rem 0;
    background: #f3f4f8;
    border-top: 1px solid rgba(124,102,158,0.3);
    border-bottom: 1px solid rgba(124,102,158,0.3);
}

.subcategory-link {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(35,50,100,0.08);
    border: 1px solid rgba(35,50,100,0.25);
    color: #233264;
    text-decoration: none;
    transition: 0.2s ease;
}

.subcategory-link:hover {
    background: rgba(35,50,100,0.18);
    transform: translateY(-2px);
}

.subcategory-link.is-active {
    background: #233264;
    color: #fff;
    border-color: #233264;
}

/* Hide mobile card on desktop */
.business-card-mobile {
    display: none;
}


/* =========================================================
   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;
    }

   

/* =====================================
   MOBILE BUSINESS CARD (NEW VERSION)
===================================== */




    /* 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;   /* 👈 ADD THIS */
}

    .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 {
        width: 70px;
        height: 70px;
        padding: 0.5rem;
        background: #fff;
        border-radius: 10px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .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-left {
    display: flex;
    align-items: center;     /* ⬅ key for vertical centering */
    gap: 0.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;
}
}

/* =========================================================
   NO RESULTS MESSAGE
========================================================= */

.no-results-message {
    max-width: 1800x;
    margin: 2rem auto;
    padding: 3rem 2rem;
    text-align: center;

    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(35, 50, 100, 0.15);

    font-size: 1.1rem;
    font-weight: 500;
    color: #233264;

    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.no-results-message::before {
    content: "🔍";
    display: block;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ==============================
   MEMBER BADGE
============================== */

.business-card {
    position: relative;   /* 👈 REQUIRED */
}

/* badge container */
.business-member {
    position: absolute;
    top: 120px;
    right: 3px;
    z-index: 10;
    pointer-events: none; /* badge should not block card click */
}

/* badge image */
.member-badge {
    width: 35px;
    height: auto;
    display: block;
    filter: invert(1);
}

.business-media {
    position: relative;
    z-index: 1;
}



/* slightly smaller on mobile */
@media (max-width: 768px) {
   

/* 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;
}

/* badge under logo */
.business-member-mobile {
    display: block;
    margin-top: 10px;
    

}


.business-member-mobile {
    position: absolute;
    top: 6px;
    right: 8px;

    z-index: 10;
    pointer-events: none;
}

.business-member-mobile .member-badge {
    width: 34px;
    height: auto;
    display: block;
      filter: invert(1);
}


    .category-show-more {
        display: none !important;
    }

    


}

.business-card-wrapper.is-hidden {
    display: none;
}

.subcategory-bar.is-hidden-initial {
    display: none;
}



.category-content {
    grid-column: 1 / -1;
}

.category-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1rem 1.75rem;
}

.category-show-more {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    position: relative;
}

.category-show-more::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}

.show-more-btn {
    position: relative;
    z-index: 1;
}

.show-more-btn {
    font-size: 0.9rem;
    font-weight: 600;

    padding: 5px 5px;
    border-radius: 999px;

    background: #233264;
    color: #fff;
    border: none;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.show-more-btn:hover {
    background: #2c3f7c;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .category-items {
        display: block;
        gap: 0;
    }

    .business-card-wrapper {
        margin-bottom: 0.4rem;
    }
}

/* =========================
   FLAT SEARCH GRID
========================= */

body.is-searching .category-block {
    display: contents;
}

body.is-searching .category-content {
    display: contents;
}

body.is-searching .category-items {
    display: contents;
}

/* Hide category UI */
body.is-searching .category-header-block,
body.is-searching .subcategory-bar,
body.is-searching .category-show-more {
    display: none !important;
}

/* =========================
   SEARCH MODE - GROUP BACKGROUND
========================= */

body.is-searching .business-grid {
    background: #fff; /* same as category-block */
    border: 1px solid rgba(35,50,100,0.08);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 1.25rem;

    display: grid;
    gap: 1rem; /* match your normal spacing */
}

/* Remove card-level backgrounds */
body.is-searching .business-card-wrapper {
    background: none;
    border: none;
    padding: 0;
}

/* Keep flattening */
body.is-searching .category-block,
body.is-searching .category-content,
body.is-searching .category-items {
    display: contents;
}

/* Hide category UI */
body.is-searching .category-header-block,
body.is-searching .subcategory-bar,
body.is-searching .category-show-more {
    display: none !important;
}

/* =========================
   FIX HERO (WITHOUT BREAKING FOOTER)
========================= */

@media (max-width: 768px) {

    /* 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;
    }
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;

    margin-top: 1.25rem;
    padding: 0.9rem 1.4rem;

    background: linear-gradient(135deg, #1f3c88, #2952cc);
    color: #fff;

    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;

    box-shadow: 0 10px 25px rgba(41,82,204,0.18);
    transition: all 0.2s ease;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(41,82,204,0.25);
    color: #fff;
}

.back-home-btn i {
    font-size: 0.95rem;
}

.redirect-search-data {
    display: none;
    margin-top: 2rem;
}

.redirect-page.is-searching .redirect-search-data {
    display: block;
}

.redirect-page .business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 1.5rem;
}