/* ================================================================
   MTAA PUBLIC DIRECTORY FINISH
   Categories, locations and business cards
================================================================ */

:root {
    --mtaa-green: #198754;
    --mtaa-green-dark: #116b43;
    --mtaa-ink: #10251b;
    --mtaa-muted: #64748b;
    --mtaa-soft: #f4faf7;
    --mtaa-line: rgba(15, 23, 42, .08);
}

/* ========================= CATEGORIES ========================= */
.directory-page {
    min-height: 65vh;
}

.directory-page-header {
    max-width: 780px;
    margin: 0 auto 38px;
    text-align: center;
}

.directory-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(25, 135, 84, .09);
    color: var(--mtaa-green-dark);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.directory-page-header h1 {
    margin: 15px 0 10px;
    font-family: Poppins, sans-serif;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -.04em;
    color: var(--mtaa-ink);
}

.directory-page-header p {
    margin: 0;
    color: var(--mtaa-muted);
    font-size: 1rem;
}

.directory-search-wrap {
    max-width: 680px;
    margin: 0 auto 42px;
}

.directory-search {
    position: relative;
}

.directory-search > i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mtaa-green);
    z-index: 2;
}

.directory-search input {
    height: 58px;
    padding: 0 22px 0 52px;
    border: 1px solid rgba(25, 135, 84, .14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .08);
    font-size: .95rem;
}

.directory-search input:focus {
    border-color: rgba(25, 135, 84, .45);
    box-shadow: 0 0 0 4px rgba(25, 135, 84, .08), 0 16px 42px rgba(15, 23, 42, .09);
}

.directory-section-label {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.directory-section-label h2 {
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: 1.35rem;
    letter-spacing: -.02em;
}

.directory-section-label span {
    color: var(--mtaa-muted);
    font-size: .82rem;
}

.category-item {
    transition: opacity .2s ease, transform .2s ease;
}

.category-market-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--mtaa-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .055);
    color: var(--mtaa-ink);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.category-market-card:hover {
    color: var(--mtaa-ink);
    text-decoration: none;
    transform: translateY(-6px);
    border-color: rgba(25, 135, 84, .22);
    box-shadow: 0 22px 46px rgba(15, 23, 42, .11);
}

.category-visual {
    position: relative;
    height: 148px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f7ef, #f7fbf9);
}

.category-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.category-market-card:hover .category-visual img {
    transform: scale(1.07);
}

.category-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .22));
}

.category-icon-tile {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--mtaa-green);
    font-size: 42px;
    background: radial-gradient(circle at center, rgba(32, 201, 151, .17), transparent 58%);
}

.category-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 19px 20px 20px;
}

.category-card-body h3 {
    margin: 0 0 7px;
    font-size: 1.02rem;
    font-weight: 800;
}

.category-card-body p {
    margin: 0;
    color: var(--mtaa-muted);
    font-size: .82rem;
    line-height: 1.55;
}

.category-explore {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 17px;
    color: var(--mtaa-green);
    font-size: .82rem;
    font-weight: 800;
}

.category-market-card:hover .category-explore i {
    transform: translateX(3px);
}

.category-explore i { transition: transform .2s ease; }

/* ========================== LOCATIONS ========================== */
.location-directory-grid {
    align-items: stretch;
}

.county-location-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--mtaa-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
}

.county-location-header {
    position: relative;
    padding: 22px 22px 20px;
    background: linear-gradient(135deg, #0f5132, #198754);
    color: #fff;
}

.county-location-header::after {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    right: -40px;
    top: -70px;
    border-radius: 50%;
    background: rgba(255,255,255,.09);
}

.county-location-header .county-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,.68);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.county-location-header h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: 1.25rem;
}

.county-location-header i {
    margin-right: 7px;
    color: #ffe082;
}

.city-location-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, .055);
    color: var(--mtaa-ink);
    text-decoration: none;
    transition: background .2s ease, padding-left .2s ease;
}

.city-location-link:last-child { border-bottom: 0; }

.city-location-link:hover {
    background: var(--mtaa-soft);
    color: var(--mtaa-green-dark);
    padding-left: 24px;
    text-decoration: none;
}

.city-location-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(25, 135, 84, .09);
    color: var(--mtaa-green);
}

.city-location-copy { flex: 1; min-width: 0; }
.city-location-copy strong { display: block; font-size: .9rem; }
.city-location-copy small { color: var(--mtaa-muted); font-size: .72rem; }

.city-location-count {
    min-width: 34px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef8f2;
    color: var(--mtaa-green-dark);
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
}

/* ======================= SEARCH BUSINESS CARD ================== */
.directory-result-card {
    position: relative;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    min-height: 250px;
    overflow: hidden;
    border: 1px solid var(--mtaa-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, .065);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.directory-result-card:hover {
    transform: translateY(-4px);
    border-color: rgba(25, 135, 84, .18);
    box-shadow: 0 22px 50px rgba(15, 23, 42, .11);
}

.result-card-image {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    background: #eaf5ef;
}

.result-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.directory-result-card:hover .result-card-image img { transform: scale(1.045); }

.result-image-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.22));
}

.result-card-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 26px;
}

.result-card-topline { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.result-category-label { color: var(--mtaa-green); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.result-distance { white-space: nowrap; color: var(--mtaa-muted); font-size: .75rem; font-weight: 700; }
.result-distance i { color: var(--mtaa-green); }

.result-business-name { margin: 8px 0 9px; font-size: 1.4rem; line-height: 1.18; letter-spacing: -.025em; }
.result-business-name a { color: var(--mtaa-ink); text-decoration: none; }
.result-business-name a:hover { color: var(--mtaa-green-dark); }

.result-rating-row { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: .82rem; }
.result-stars { color: #f2b01e; letter-spacing: 1px; }
.result-review-count { color: var(--mtaa-muted); }
.result-location { display: flex; align-items: flex-start; gap: 8px; color: #475569; font-size: .8rem; line-height: 1.45; }
.result-location i { color: var(--mtaa-green); margin-top: 2px; }
.result-description { margin: 12px 0 0; color: var(--mtaa-muted); font-size: .82rem; line-height: 1.6; }

.result-ai-match {
    width: fit-content;
    margin-top: 13px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef9f3;
    color: var(--mtaa-green-dark);
    font-size: .7rem;
    font-weight: 800;
}

.result-ai-match.related { background: #f4f7fb; color: #64748b; }
.result-ai-match i { margin-right: 4px; }

.result-card-actions { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 18px; }
.result-view-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 12px; background: var(--mtaa-green); color: #fff; font-size: .78rem; font-weight: 800; text-decoration: none; box-shadow: 0 8px 18px rgba(25,135,84,.15); }
.result-view-btn:hover { background: var(--mtaa-green-dark); color: #fff; text-decoration: none; }
.result-icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--mtaa-line); border-radius: 12px; color: var(--mtaa-green-dark); background: #fff; text-decoration: none; }
.result-icon-btn:hover { background: var(--mtaa-soft); color: var(--mtaa-green); }

.result-featured, .result-verified { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.result-featured { top: 14px; left: 14px; background: #fff4c9; color: #795b00; }
.result-verified { top: 14px; right: 14px; background: rgba(255,255,255,.94); color: var(--mtaa-green-dark); }
.result-image-placeholder { width: 100%; height: 100%; min-height: 250px; display: grid; place-items: center; color: rgba(25,135,84,.45); font-size: 48px; background: linear-gradient(135deg,#edf8f2,#dcefe5); }

@media (max-width: 767.98px) {
    .directory-page-header { margin-bottom: 28px; }
    .directory-search-wrap { margin-bottom: 30px; }
    .directory-section-label { align-items: center; }
    .directory-result-card { grid-template-columns: 1fr; }
    .result-card-image, .result-image-placeholder { min-height: 205px; height: 205px; }
    .result-card-content { padding: 19px; }
    .result-business-name { font-size: 1.2rem; }
    .result-card-actions { flex-wrap: wrap; }
    .result-view-btn { flex: 1; }
}

.result-open-status {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    font-size: .68rem;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
}
.result-open-status i { font-size: .42rem; }
.result-open-status.is-open { color: #16834f; }
.result-open-status.is-open i { color: #21b36b; }
.result-open-status.is-closed { color: #9a4d4d; }
.result-open-status.is-closed i { color: #c56b6b; }
.result-whatsapp-btn:hover { color: #16834f; background: #eef9f3; }

/* ================================================================
   CATEGORY DETAIL V8
================================================================ */
.category-page{background:#f7f9f8;min-height:60vh}
.category-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#083d2b 0%,#0b6b49 58%,#16a06b 100%);color:#fff;padding:64px 0!important}
.category-hero:before,.category-hero:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.category-hero:before{width:360px;height:360px;right:-120px;top:-170px}.category-hero:after{width:260px;height:260px;left:-120px;bottom:-170px}
.category-hero .container{position:relative;z-index:1}.category-hero .text-muted{color:rgba(255,255,255,.72)!important}
.category-icon{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2);font-size:30px;backdrop-filter:blur(8px);box-shadow:0 12px 30px rgba(0,0,0,.12)}
.category-hero h1{font-family:Poppins,Inter,sans-serif;letter-spacing:-.03em}.category-hero .lead{max-width:760px;font-size:1.05rem;line-height:1.75}
.category-hero .btn{border-color:rgba(255,255,255,.5);color:#fff;border-radius:12px;padding:.7rem 1rem;background:rgba(255,255,255,.08)}
.category-hero .btn:hover{background:#fff;color:#087f52;border-color:#fff}
.category-businesses{padding-top:34px!important}.category-toolbar{background:#fff;border:1px solid #e6ece9;border-radius:18px;padding:14px 16px;box-shadow:0 8px 28px rgba(19,53,40,.06)}
.category-search{border:1px solid #dce6e1;border-radius:13px;min-height:48px;box-shadow:none!important}.category-search:focus{border-color:#15966a;box-shadow:0 0 0 .2rem rgba(21,150,106,.12)!important}
.category-result-grid .business-card{border:1px solid #e5ece8!important;border-radius:18px!important;overflow:hidden;box-shadow:0 8px 25px rgba(17,48,37,.07)!important;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;background:#fff}
.category-result-grid .business-card:hover{transform:translateY(-5px);box-shadow:0 18px 38px rgba(17,48,37,.12)!important;border-color:#cfe2d9!important}
.category-result-grid .business-card-image{height:190px!important;position:relative;background-color:#eaf2ee!important;background-size:cover!important}
.category-result-grid .business-card-image:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.22));pointer-events:none}
.category-result-grid .card-body{padding:18px 18px 10px}.category-result-grid .card-title{font-family:Poppins,Inter,sans-serif;letter-spacing:-.02em;margin-bottom:8px}.category-result-grid .card-title a:hover{color:#087f52!important}
.category-result-grid .card-footer{padding:8px 18px 18px!important}.category-result-grid .btn-success{border:0;border-radius:11px;padding:.72rem 1rem;font-weight:700;background:#0b8a5b}
.category-result-grid .badge{border-radius:999px;padding:.42rem .62rem;font-weight:700}.category-result-grid .text-warning{letter-spacing:1px}
.category-empty{background:#fff;border:1px solid #e6ece9;border-radius:22px;padding:70px 25px;box-shadow:0 10px 32px rgba(17,48,37,.06)}
.category-empty-icon{width:86px;height:86px;margin:0 auto 20px;border-radius:26px;display:grid;place-items:center;background:#eaf7f1;color:#0b8a5b;font-size:34px}
.category-empty .btn{border-radius:11px;padding:.75rem 1.1rem;font-weight:700}
@media (max-width:767.98px){.category-hero{padding:42px 0!important}.category-icon{width:58px;height:58px;border-radius:18px;font-size:24px}.category-hero h1{font-size:2rem}.category-hero .lead{font-size:.96rem}.category-toolbar{padding:12px}.category-result-grid .business-card-image{height:175px!important}}
