/* e-Pakistan Business Directory */

body.ep-bd-home-page .ep-main,
body.ep-bd-search-page .ep-main,
body.ep-bd-detail-page .ep-main {
    padding: 0;
}

/* ── Hero & Search ── */
.ep-bd-hero {
    position: relative;
    background: linear-gradient(rgba(0, 50, 25, .84), rgba(0, 50, 25, .84)),
        url('https://images.unsplash.com/photo-1556761175-b413da4baf72?w=1600&q=80') center/cover no-repeat;
    padding: 56px 0 64px;
    color: #fff;
}

.ep-bd-hero h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    margin: 0 0 8px;
}

.ep-bd-hero p {
    opacity: .92;
    margin: 0 0 28px;
    font-size: 15px;
}

.ep-bd-search-box,
.ep-pl-search {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    color: #222;
}

.ep-bd-search-box .form-label,
.ep-pl-search .form-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}

.ep-bd-search-box .form-control,
.ep-bd-search-box .form-select,
.ep-pl-search .form-control,
.ep-pl-search .form-select {
    height: 42px;
    font-size: 13px;
    border-radius: 6px;
    border-color: #ddd;
}

.ep-bd-search-box .form-control:focus,
.ep-bd-search-box .form-select:focus,
.ep-pl-search .form-control:focus,
.ep-pl-search .form-select:focus {
    border-color: #006633;
    box-shadow: 0 0 0 3px rgba(0, 102, 51, .12);
}

.ep-bd-btn-search,
.ep-bd-btn-primary,
.ep-pl-btn-search {
    min-height: 42px;
    padding: 10px 18px;
    background: #006633;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm.ep-bd-btn-primary,
.btn-sm.ep-bd-btn-search {
    min-height: 34px;
    padding: 8px 14px;
    font-size: 13px;
}

.ep-bd-btn-search:hover,
.ep-bd-btn-primary:hover,
.ep-pl-btn-search:hover {
    background: #004d26;
    color: #fff !important;
}

.ep-bd-btn-outline {
    border: 1px solid #006633;
    color: #006633;
    background: #fff;
}

.ep-bd-btn-outline:hover {
    background: #006633;
    color: #fff;
}

.ep-bd-cities,
.ep-pl-cities {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}

.ep-bd-cities a,
.ep-pl-cities a {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    padding: 4px 14px;
    border-radius: 20px;
    margin: 4px;
    font-size: 12px;
    display: inline-block;
    text-decoration: none;
}

.ep-bd-cities a:hover,
.ep-pl-cities a:hover {
    background: #fff;
    color: #006633;
}

/* ── Results / Sections ── */
.ep-bd-results,
.ep-pl-results {
    padding: 36px 0 48px;
    background: #f8faf8;
}

.ep-bd-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e4e8e4;
}

.ep-bd-section-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.ep-bd-section-head p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #888;
}

/* ── Category grid ── */
.ep-bd-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}

.ep-bd-cat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
    padding: 18px 12px;
    text-decoration: none;
    color: inherit;
    min-height: 118px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.ep-bd-cat-pill:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
    border-color: #cfe3d4;
    color: inherit;
}

.ep-bd-cat-pill i {
    font-size: 26px;
    color: #006633;
    margin-bottom: 8px;
}

.ep-bd-cat-pill strong {
    font-size: 13px;
    text-align: center;
    line-height: 1.35;
}

.ep-bd-cat-pill small {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* ── Grid cards (home / featured) ── */
.ep-bd-grid-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8ece8;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
}

.ep-bd-grid-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
    color: inherit;
}

.ep-bd-grid-card-media {
    position: relative;
    height: 180px;
    background: #eef2ee;
    overflow: hidden;
}

.ep-bd-grid-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ep-bd-grid-card-logo {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.ep-bd-grid-card-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.ep-bd-grid-card-flag.featured {
    background: #ffc107;
    color: #222;
}

.ep-bd-grid-card-body {
    padding: 14px 14px 16px;
}

.ep-bd-grid-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-bd-grid-card-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.ep-bd-grid-card-loc {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.ep-bd-grid-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ep-bd-grid-card-rating {
    font-size: 12px;
}

.ep-bd-grid-card-rating .bi {
    font-size: 11px;
}

.ep-bd-grid-card-verified {
    font-size: 11px;
    font-weight: 600;
    color: #006633;
    white-space: nowrap;
}

/* ── Search result list cards ── */
.ep-bd-result-card {
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.ep-bd-result-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .07);
}

.ep-bd-result-media {
    position: relative;
    display: block;
    height: 100%;
    min-height: 160px;
    background: #eef2ee;
}

.ep-bd-result-media img.ep-bd-result-cover {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    display: block;
}

.ep-bd-result-media img.ep-bd-result-logo {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.ep-bd-result-body {
    padding: 16px 18px;
}

.ep-bd-result-title {
    font-weight: 700;
    font-size: 17px;
    color: #1a1a1a;
    text-decoration: none;
}

.ep-bd-result-title:hover {
    color: #006633;
}

.ep-bd-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-bd-verified,
.ep-bd-verified-badge {
    color: #006633;
    font-size: 13px;
    font-weight: 600;
}

.ep-bd-open {
    color: #198754;
    font-size: 12px;
    font-weight: 600;
}

.ep-bd-closed {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
}

.ep-bd-open i,
.ep-bd-closed i {
    font-size: 7px;
    vertical-align: middle;
    margin-right: 4px;
}

.ep-bd-filters {
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
    padding: 16px;
}

.ep-bd-search-header {
    background: #fff;
    border-bottom: 1px solid #e8ece8;
}

/* ── Detail page ── */
.ep-bd-detail-cover {
    height: 260px;
    background-size: cover;
    background-position: center;
}

.ep-bd-detail-header {
    background: #f8faf8;
    padding: 0 0 28px;
    margin-top: -56px;
    position: relative;
    z-index: 2;
}

.ep-bd-detail-header-card {
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
}

.ep-bd-detail-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 12px;
    border: 3px solid #fff;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.ep-bd-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-bd-detail-body {
    background: #f8faf8;
}

.ep-bd-section {
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
    padding: 20px 22px;
}

.ep-bd-section h2 {
    font-size: 18px;
    margin-bottom: 14px;
}

.ep-bd-prose {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.ep-bd-prose p {
    margin-bottom: 12px;
}

.ep-bd-prose ul,
.ep-bd-prose ol {
    margin: 0 0 12px 1.2rem;
    padding: 0;
}

.ep-bd-prose li {
    margin-bottom: 6px;
}

.ep-bd-prose strong {
    color: #1a1a1a;
}

.ep-bd-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.ep-bd-gallery-trigger {
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
}

.ep-bd-gallery-modal .modal-content {
    background: rgba(0, 0, 0, .92);
    border: 0;
    border-radius: 12px;
}

.ep-bd-gallery-modal .modal-header {
    border: 0;
    padding: 12px 12px 0;
}

.ep-bd-gallery-modal .btn-close {
    filter: invert(1);
    opacity: .85;
}

.ep-bd-gallery-modal .modal-body {
    padding: 8px 16px 16px;
}

.ep-bd-gallery-modal img {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.ep-bd-sidebar-card {
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
    padding: 16px 18px;
}

.ep-bd-sidebar-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.ep-bd-map {
    border: 0;
    border-radius: 8px;
}

.ep-bd-rating .bi-star-fill,
.ep-bd-rating .bi-star-half {
    font-size: 13px;
}

.ep-bd-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px solid #e8ece8;
    border-radius: 12px;
}

@media (max-width: 767px) {
    .ep-bd-hero {
        padding: 40px 0 48px;
    }

    .ep-bd-search-box,
    .ep-pl-search {
        padding: 18px;
    }

    .ep-bd-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ep-bd-detail-cover {
        height: 180px;
    }

    .ep-bd-detail-header {
        margin-top: -32px;
    }

    .ep-bd-detail-logo {
        width: 72px;
        height: 72px;
    }

    .ep-bd-result-media {
        min-height: 180px;
    }

    .ep-bd-result-media img.ep-bd-result-cover {
        min-height: 180px;
    }
}
