/*
Theme Name: Realty Plus Directory
Theme URI: https://realtyplus.com/
Author: Realty Plus
Author URI: https://realtyplus.com/
Description: A United States real estate professional directory theme using the Realty Plus logo colors, WooCommerce-powered $79 annual listings, state/county consumer search, front-end submissions, consumer pages, and professional categories.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: realty-plus-directory
Tags: directory, real-estate, woocommerce, custom-logo, custom-menu, featured-images
*/

:root {
    --rpd-bg: #f4f7fb;
    --rpd-panel: #ffffff;
    --rpd-panel-soft: #edf3f8;
    --rpd-ink: #132638;
    --rpd-muted: #64748b;
    --rpd-line: #d9e2ec;
    --rpd-navy: #1d3144;
    --rpd-navy-dark: #122335;
    --rpd-blue: #31546f;
    --rpd-pale: #eaf1f7;
    --rpd-accent: #ffffff;
    --rpd-shadow: 0 24px 70px rgba(29, 49, 68, 0.13);
    --rpd-shadow-soft: 0 12px 36px rgba(29, 49, 68, 0.08);
    --rpd-radius: 24px;
    --rpd-shell: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--rpd-bg);
    color: var(--rpd-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--rpd-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4 {
    color: var(--rpd-navy);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0 0 0.65em;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5.8rem);
}

h2 {
    font-size: clamp(1.85rem, 4vw, 3.1rem);
}

h3 {
    font-size: 1.35rem;
}

p {
    margin: 0 0 1.2rem;
}

.lead,
.rpd-page-content > p:first-child,
.rpd-article > p:first-child {
    color: var(--rpd-muted);
    font-size: clamp(1.08rem, 2vw, 1.32rem);
    line-height: 1.55;
}

.rpd-shell {
    width: min(var(--rpd-shell), calc(100% - 40px));
    margin-inline: auto;
}

.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    top: 12px;
    left: 12px;
    z-index: 10000;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: #fff;
    border-radius: 999px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: rgba(244, 247, 251, 0.94);
    border-bottom: 1px solid rgba(217, 226, 236, 0.95);
    backdrop-filter: blur(16px);
}

.rpd-nav-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    min-height: 92px;
}

.site-branding img,
.rpd-logo img,
.custom-logo-link img {
    width: min(290px, 56vw);
    max-height: 74px;
    object-fit: contain;
}

.main-navigation ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;
    padding: 10px 12px;
    border-radius: 999px;
    color: #334155;
    font-weight: 800;
    font-size: 0.92rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: #fff;
    color: var(--rpd-navy);
    box-shadow: 0 8px 28px rgba(29, 49, 68, 0.08);
}

.rpd-nav-cta,
.rpd-button,
button.rpd-button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rpd-navy), var(--rpd-blue));
    color: #ffffff !important;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 16px 38px rgba(29, 49, 68, 0.26);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.rpd-nav-cta {
    min-height: 54px;
    padding-inline: 28px;
    font-size: 1rem;
    box-shadow: 0 18px 46px rgba(29, 49, 68, .32);
}

.rpd-button:hover,
.rpd-nav-cta:hover,
button.rpd-button:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 48px rgba(29, 49, 68, 0.34);
}

.rpd-button-outline {
    background: #fff;
    color: var(--rpd-navy) !important;
    border: 1px solid var(--rpd-line);
    box-shadow: 0 10px 30px rgba(29, 49, 68, 0.08);
}

.rpd-button-white {
    background: #fff;
    color: var(--rpd-navy) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.rpd-menu-toggle {
    display: none;
    background: #fff;
    color: var(--rpd-navy);
    border: 1px solid var(--rpd-line);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
}

.site-main {
    min-height: 65vh;
}

.rpd-front-content {
    padding: 46px 0 78px;
}

.rpd-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: 38px;
    align-items: center;
    padding: clamp(42px, 7vw, 96px) 0 70px;
}

.rpd-hero-visual {
    position: relative;
}

.rpd-hero-visual img,
.rpd-wide-image {
    border-radius: 30px;
    box-shadow: var(--rpd-shadow);
    border: 1px solid var(--rpd-line);
    width: 100%;
}

.rpd-wide-image {
    margin: 0 0 30px;
}

.rpd-eyebrow,
.rpd-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rpd-blue);
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .78rem;
    margin-bottom: 18px;
}

.rpd-eyebrow::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--rpd-blue);
}

.rpd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.rpd-location-search {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    margin: 28px 0 12px;
    border: 1px solid var(--rpd-line);
    border-radius: 28px;
    background: rgba(255,255,255,.88);
    box-shadow: var(--rpd-shadow-soft);
}

.rpd-location-search-hero {
    margin-top: 32px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(29, 49, 68, 0.18);
}

.rpd-county-field {
    display: none;
}

.rpd-county-field.is-visible {
    display: block;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: var(--rpd-ink);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(49, 84, 111, .18);
    border-color: var(--rpd-blue);
}

.rpd-form input[type="file"] {
    padding: 12px;
    min-height: auto;
    background: #fff;
}

.rpd-form small {
    display: block;
    margin-top: 6px;
    color: var(--rpd-muted);
    font-weight: 700;
    line-height: 1.45;
}

.rpd-section {
    padding: 54px 0;
}

.rpd-section-heading {
    max-width: 860px;
    margin-bottom: 24px;
}

.rpd-grid-3,
.rpd-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.rpd-card,
.rpd-listing-card,
.rpd-empty,
.rpd-submission-form {
    border: 1px solid var(--rpd-line);
    border-radius: var(--rpd-radius);
    background: var(--rpd-panel);
    box-shadow: var(--rpd-shadow-soft);
}

.rpd-card,
.rpd-empty {
    padding: 26px;
}

.rpd-card h2,
.rpd-card h3 {
    margin-top: 0;
}

.rpd-category-card {
    display: block;
    min-height: 260px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.rpd-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rpd-shadow);
}

.rpd-category-card span {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--rpd-pale);
    color: var(--rpd-navy);
    font-weight: 950;
    margin-bottom: 28px;
}

.rpd-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(30px, 5vw, 54px);
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 15%, rgba(255,255,255,.18), transparent 24%),
        linear-gradient(135deg, var(--rpd-navy-dark), var(--rpd-blue));
    box-shadow: var(--rpd-shadow);
}

.rpd-band h2,
.rpd-band p,
.rpd-band .rpd-eyebrow {
    color: #fff;
}

.rpd-band .rpd-eyebrow::before {
    background: #fff;
}

.rpd-band p {
    max-width: 760px;
    color: rgba(255,255,255,.82);
}

.rpd-page-hero,
.rpd-listing-hero {
    padding: clamp(54px, 7vw, 96px) 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(49,84,111,.18), transparent 28%),
        linear-gradient(135deg, #eef4f9, #fff);
    border-bottom: 1px solid var(--rpd-line);
}

.rpd-page-hero h1,
.rpd-listing-hero h1 {
    max-width: 1000px;
}

.rpd-page-content,
.rpd-content-area {
    padding: 52px 0 78px;
}

.rpd-page-content > * {
    max-width: 900px;
}

.rpd-page-content .rpd-grid-3,
.rpd-page-content .rpd-listing-grid,
.rpd-page-content .rpd-location-search,
.rpd-page-content .rpd-submission-form,
.rpd-page-content .rpd-card,
.rpd-page-content .rpd-wide-image {
    max-width: none;
}

.rpd-listing-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rpd-card-cover {
    display: flex;
    height: 180px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rpd-navy), var(--rpd-blue));
    color: #fff;
    font-size: 4rem;
    font-weight: 950;
}

.rpd-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rpd-listing-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.rpd-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--rpd-pale);
    color: var(--rpd-navy);
    font-size: .78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

.rpd-place {
    color: var(--rpd-blue);
    font-weight: 850;
    margin-bottom: .6rem;
}

.rpd-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.rpd-card-links a,
.rpd-text-link {
    color: var(--rpd-blue);
    font-weight: 950;
}

.rpd-form {
    padding: 24px;
}

.rpd-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rpd-form-grid p {
    margin: 0;
}

.rpd-form-grid .full {
    grid-column: 1 / -1;
}

.rpd-form label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 850;
}

.rpd-form-note,
.rpd-license-attestation {
    margin: 18px 0;
    padding: 15px 16px;
    border-radius: 18px;
    background: var(--rpd-pale);
    color: var(--rpd-navy);
}

.rpd-license-attestation {
    display: none;
    border: 1px solid #b8c9d8;
}

.rpd-license-attestation.is-visible {
    display: block;
}

.rpd-license-attestation label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 800;
}

.rpd-license-attestation input {
    width: auto;
    min-height: auto;
    margin-top: 6px;
}

.rpd-alert {
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: 18px;
    font-weight: 800;
}

.rpd-alert-success {
    background: #ecfdf3;
    color: #027a48;
}

.rpd-alert-error {
    background: #fef3f2;
    color: #b42318;
}

.rpd-pagination {
    margin-top: 32px;
}

.rpd-pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    margin: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--rpd-line);
    font-weight: 800;
}

.rpd-pagination .current,
.nav-links .current {
    background: var(--rpd-navy);
    color: #fff;
}

.rpd-listing-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 34px;
    align-items: center;
}

.rpd-profile-card {
    min-height: 220px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--rpd-shadow);
    background: #fff;
}

.rpd-profile-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.rpd-profile-initial {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rpd-navy), var(--rpd-blue));
    color: #fff;
    font-size: 6rem;
    font-weight: 950;
}

.rpd-listing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 58px 0 82px;
}

.rpd-listing-main,
.rpd-listing-sidebar .rpd-card {
    background: #fff;
    border: 1px solid var(--rpd-line);
    border-radius: var(--rpd-radius);
    padding: 28px;
    box-shadow: var(--rpd-shadow-soft);
}

.rpd-listing-sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

.rpd-details-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.rpd-details-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rpd-line);
}

.rpd-details-list dt {
    color: var(--rpd-muted);
    font-size: .8rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.rpd-details-list dd {
    margin: 4px 0 0;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.rpd-post-card img,
.rpd-featured-image img {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 18px;
}

.rpd-article {
    max-width: 930px;
}

.rpd-article ul,
.rpd-page-content ul {
    padding-left: 1.25rem;
}

.site-footer {
    padding: 56px 0 24px;
    background: var(--rpd-navy-dark);
    color: rgba(255,255,255,.72);
}

.site-footer a {
    color: rgba(255,255,255,.92);
}

.site-footer h3 {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0;
}

.site-footer .rpd-logo img,
.site-footer .custom-logo-link img {
    filter: brightness(0) invert(1);
}

.rpd-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr .65fr .65fr;
    gap: 34px;
    padding-bottom: 34px;
}

.rpd-footer-disclosure {
    max-width: 720px;
    font-size: .88rem;
    color: rgba(255,255,255,.64);
}

.rpd-footer-cta {
    display: inline-flex;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    font-weight: 900;
}

.rpd-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,.14);
    padding-top: 20px;
    font-size: .92rem;
}

.rpd-footer-bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    border-radius: 999px !important;
    background: var(--rpd-navy) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
}

.woocommerce div.product,
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .checkout,
.woocommerce-account .woocommerce {
    background: #fff;
    border-radius: var(--rpd-radius);
    padding: 24px;
    border: 1px solid var(--rpd-line);
}

@media (max-width: 1100px) {
    .main-navigation a {
        font-size: .86rem;
        padding-inline: 9px;
    }
}

@media (max-width: 980px) {
    .rpd-nav-wrap {
        grid-template-columns: auto auto;
        justify-content: space-between;
        min-height: 82px;
    }

    .rpd-menu-toggle {
        display: inline-flex;
    }

    .main-navigation {
        grid-column: 1 / -1;
        display: none;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        display: grid;
        justify-content: stretch;
        gap: 8px;
        padding-bottom: 18px;
    }

    .rpd-nav-cta {
        grid-column: 1 / -1;
        justify-self: stretch;
        display: flex;
        margin-bottom: 14px;
    }

    .rpd-hero-grid,
    .rpd-listing-hero-grid,
    .rpd-listing-layout,
    .rpd-footer-grid {
        grid-template-columns: 1fr;
    }

    .rpd-location-search {
        grid-template-columns: 1fr 1fr;
    }

    .rpd-location-search button {
        grid-column: 1 / -1;
    }

    .rpd-grid-3,
    .rpd-listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .rpd-shell {
        width: min(100% - 28px, var(--rpd-shell));
    }

    .rpd-grid-3,
    .rpd-listing-grid,
    .rpd-form-grid,
    .rpd-location-search {
        grid-template-columns: 1fr;
    }

    .rpd-hero-grid {
        padding-top: 30px;
    }

    .rpd-band,
    .rpd-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .rpd-card,
    .rpd-listing-main,
    .rpd-listing-sidebar .rpd-card,
    .rpd-form {
        padding: 20px;
    }

    .site-branding img,
    .rpd-logo img,
    .custom-logo-link img {
        width: min(250px, 64vw);
    }
}

/* Version 1.2 county-search updates */
.rpd-top-search {
    padding: clamp(34px, 6vw, 72px) 0 clamp(28px, 5vw, 58px);
    background:
        radial-gradient(circle at 12% 20%, rgba(49,84,111,.18), transparent 28%),
        linear-gradient(135deg, #ffffff, #eef4f9);
    border-bottom: 1px solid var(--rpd-line);
}

.rpd-top-search .rpd-shell {
    max-width: 1040px;
}

.rpd-top-search h1 {
    margin-bottom: 16px;
}

.rpd-top-search .lead {
    max-width: 840px;
}

.rpd-directory-note,
.rpd-county-copy .rpd-card {
    margin-top: 30px;
}

.rpd-location-hero .rpd-location-search {
    max-width: 1020px;
}

.rpd-breadcrumbs {
    color: var(--rpd-muted);
    font-size: .92rem;
    font-weight: 800;
    margin-bottom: 22px;
}

.rpd-breadcrumbs a {
    color: var(--rpd-blue);
}

.rpd-location-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 54px 0 36px;
}

.rpd-location-main {
    min-width: 0;
}

.rpd-location-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.rpd-location-empty {
    grid-column: 1 / -1;
}

.rpd-county-link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rpd-county-link-grid a {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--rpd-line);
    color: var(--rpd-navy);
    font-weight: 850;
    box-shadow: 0 8px 22px rgba(29, 49, 68, 0.05);
}

.rpd-county-link-grid a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--rpd-navy), var(--rpd-blue));
}

.rpd-category-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.rpd-category-mini-grid > div {
    padding: 18px;
    border: 1px solid var(--rpd-line);
    border-radius: 18px;
    background: var(--rpd-pale);
}

.rpd-category-mini-grid h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.rpd-category-mini-grid p {
    margin-bottom: 0;
    color: var(--rpd-muted);
}

@media (max-width: 980px) {
    .rpd-location-layout {
        grid-template-columns: 1fr;
    }

    .rpd-county-link-grid,
    .rpd-category-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .rpd-county-link-grid,
    .rpd-category-mini-grid {
        grid-template-columns: 1fr;
    }
}

.rpd-state-link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rpd-state-link-grid a {
    display: flex;
    min-height: 50px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--rpd-line);
    color: var(--rpd-navy);
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(29, 49, 68, 0.05);
}

.rpd-state-link-grid a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--rpd-navy), var(--rpd-blue));
}

@media (max-width: 980px) {
    .rpd-state-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .rpd-state-link-grid {
        grid-template-columns: 1fr;
    }
}


/* Version 1.5 county page cleanup */
.rpd-location-actions {
    margin-top: 24px;
    justify-content: center;
}
.rpd-location-hero .rpd-actions .rpd-button-outline {
    background: #ffffff;
}

/* Version 1.6 county listing-first layout */
.rpd-county-hero {
    padding-bottom: clamp(26px, 4vw, 44px);
}
.rpd-county-layout {
    padding-top: 24px;
}
.rpd-county-layout .rpd-listing-grid {
    margin-top: 0;
}
