/*
 * RHJ GeoDirectory Styles
 * Matches WDP directory listing card design
 * Colors: primary #64caf4, fonts: Open Sans (body), Roboto (headings)
 */

/* ============================================================
   Listing Wrapper
   ============================================================ */

.rhj-gd-wrapper {
    width: 100%;
}

.rhj-gd-listings {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rhj-gd-listing-item {
    margin: 0 0 1px 0;
    padding: 0;
}

/* ============================================================
   Listing Card
   ============================================================ */

.rhj-gd-listing {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.rhj-gd-listing:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.rhj-gd-listing-item.rhj-gd-featured .rhj-gd-listing {
    border-left: 3px solid #64caf4;
}

/* ============================================================
   Thumbnail
   ============================================================ */

.rhj-gd-thumb {
    flex: 0 0 200px;
    width: 200px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-right: 1px solid #e8e8e8;
}

.rhj-gd-thumb a {
    display: block;
    width: 100%;
}

.rhj-gd-thumb img {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ============================================================
   Body
   ============================================================ */

.rhj-gd-body {
    flex: 1 1 auto;
    padding: 18px 20px;
    position: relative;
    min-width: 0;
}

.rhj-gd-no-thumb {
    padding-left: 24px;
}

/* ============================================================
   Featured Badge
   ============================================================ */

.rhj-gd-featured-badge {
    display: inline-block;
    background: #64caf4;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 6px;
}

/* ============================================================
   Title & Categories
   ============================================================ */

.rhj-gd-title-wrap {
    margin-bottom: 10px;
}

.rhj-gd-title {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #232323;
    margin: 0 0 4px 0;
    padding: 0;
    border: none;
}

.rhj-gd-title a,
.rhj-gd-title a:visited {
    color: #232323;
    text-decoration: none;
}

.rhj-gd-title a:hover {
    color: #64caf4;
}

.rhj-gd-cats {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #7f7f7f;
    font-weight: 400;
}

/* ============================================================
   Meta Fields (address, phone, email, website)
   ============================================================ */

.rhj-gd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-bottom: 10px;
}

.rhj-gd-address,
.rhj-gd-phone,
.rhj-gd-email,
.rhj-gd-website {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
}

.rhj-gd-address i,
.rhj-gd-phone i,
.rhj-gd-email i,
.rhj-gd-website i {
    color: #64caf4;
    font-size: 13px;
    width: 14px;
    flex-shrink: 0;
}

.rhj-gd-phone a,
.rhj-gd-email a,
.rhj-gd-website a {
    color: #64caf4;
    text-decoration: none;
    font-weight: 500;
}

.rhj-gd-phone a:hover,
.rhj-gd-email a:hover,
.rhj-gd-website a:hover {
    text-decoration: underline;
}

/* ============================================================
   Excerpt
   ============================================================ */

.rhj-gd-excerpt {
    margin-bottom: 10px;
}

.rhj-gd-excerpt p {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   Read More Link
   ============================================================ */

.rhj-gd-readmore {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #64caf4;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rhj-gd-readmore:hover {
    text-decoration: underline;
}

/* ============================================================
   No Results
   ============================================================ */

.rhj-gd-no-results p {
    color: #232323;
    font-family: 'Open Sans', sans-serif;
}

/* ============================================================
   Single GD Place Page
   ============================================================ */

.rhj-single-gd-place .geodir-single-main,
.rhj-single-gd-place .geodir_post_detail {
    font-family: 'Open Sans', sans-serif;
}

.rhj-single-gd-place .gd-place-title,
.rhj-single-gd-place h1.geodir-entry-title {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #232323;
    border-bottom: 2px solid #64caf4;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Custom field labels */
.rhj-single-gd-place .geodir_post_meta .geodir-field-title,
.rhj-single-gd-place .gd-field-title {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hide GeoDirectory map on single pages (not needed for this directory) */
.rhj-single-gd-place .geodir-map-canvas,
.rhj-single-gd-place #geodir-main-map-canvas,
.gd_place .geodir-loop-map {
    display: none !important;
}

/* GeoDirectory single post images */
.rhj-single-gd-place .geodir-images-wrap img {
    max-width: 300px;
    height: auto;
}

/* ============================================================
   GeoDirectory Archive Page Overrides
   ============================================================ */

/* Hide map from archive pages for this listing type */
.post-type-archive-gd_place .geodir-loop-map,
.post-type-archive-gd_place .geodir-map,
.tax-gd_placecategory .geodir-loop-map {
    display: none !important;
}

/* ============================================================
   Responsive
   ============================================================ */

@media only screen and (max-width: 768px) {
    .rhj-gd-listing {
        flex-direction: column;
    }

    .rhj-gd-thumb {
        flex: 0 0 auto;
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }

    .rhj-gd-thumb img {
        max-height: 130px;
    }

    .rhj-gd-body {
        padding: 15px;
    }

    .rhj-gd-meta {
        flex-direction: column;
        gap: 6px;
    }

    .rhj-gd-title {
        font-size: 16px;
    }
}

@media only screen and (max-width: 480px) {
    .rhj-gd-thumb {
        height: 120px;
    }

    .rhj-gd-thumb img {
        max-height: 100px;
    }
}
