/* Interactive Neighborhood Search Styles */
.realplus-neighborhood-search-container {
    background: #fff;
    overflow: hidden;
    border: 1px solid #eee;
}

.rp-neighborhood-main-view {
    display: flex;
    height: 600px;
}

/* Sidebar: Neighborhood Grid */
.rp-neighborhood-sidebar {
    flex: 0 0 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    border-right: 1px solid #eee;
}

.rp-neighborhood-sidebar-header {
    padding: 0 0 25px 0;
}

.rp-neighborhood-sidebar-header h2 {
    margin: 0;
    text-transform: uppercase;
}

.rp-neighborhood-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 12px;
    flex: 1;
}

.rp-neighborhood-card {
    position: relative;
    min-height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rp-neighborhood-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rp-nb-card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.rp-nb-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-neighborhood-card.is-active .rp-nb-card-overlay {
    background: rgba(157, 117, 21, 0.7);
}

.rp-nb-card-content {
    text-align: center;
    padding: 0 10px;
}

.rp-nb-card-name {
    color: #fff;
    margin: 0;
}

.rp-nb-card-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.rp-neighborhood-card:hover .rp-nb-card-desc {
    opacity: 1;
    transform: translateY(0);
}

/* Map Content area */
.rp-neighborhood-map-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

#rp-neighborhood-map {
    flex: 1;
    width: 100%;
    filter: grayscale(100%) brightness(0.9) contrast(1.1);
}

.rp-ribbon-placeholder {
    display: none;
}

/* Mobile Views */
.rp-neighborhood-listings-view {
    display: none;
    width: 100%;
    padding: 20px;
}

.rp-nb-listings-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.rp-back-to-neighborhoods {
    background: none;
    border: 1px solid #9d7515;
    color: #9d7515;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.rp-back-to-neighborhoods:hover {
    background: #9d7515;
    color: #fff;
}

.rp-active-nb-name {
    margin: 0;
    font-size: 24px;
    text-transform: uppercase;
    color: #1a2a40;
}

.rp-nb-loading {
    text-align: center;
    padding: 60px 0;
}

.rp-nb-loading .rp-spinner {
    margin: 0 auto 15px;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #9d7515;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile adjustments */
@media (max-width: 1024px) {
    .rp-neighborhood-main-view {
        flex-direction: column;
        height: auto;
    }

    .rp-neighborhood-sidebar {
        flex: none;
        width: 100%;
        height: auto;
        padding: 20px;
        border-right: none;
    }

    .rp-neighborhood-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rp-neighborhood-map-content {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .rp-neighborhood-map-content {
        display: none;
        /* Hide map on mobile only */
    }
}

@media (max-width: 600px) {
    .rp-neighborhood-grid {
        grid-template-columns: 1fr;
    }
}

/* Full Width Neighborhood Grid */
.realplus-neighborhoods-grid-container {
    padding: 20px 0 60px;
    width: 100%;
}

.rp-neighborhoods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.rp-neighborhood-grid-card {
    position: relative;
    min-height: 500px;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rp-neighborhood-grid-card .rp-nb-card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.rp-neighborhood-grid-card:hover .rp-nb-card-image {
    transform: scale(1.1);
}

.rp-neighborhood-grid-card .rp-nb-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.rp-neighborhood-grid-card .rp-nb-card-content {
    width: 100%;
    text-align: center;
    position: relative;
}

.rp-neighborhood-grid-card .rp-nb-card-name {
    color: #fff;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    text-align: center !important;
    width: 100%;
}

.rp-neighborhood-grid-card .rp-nb-card-desc {
    color: #fff;
    font-size: 14px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.rp-neighborhood-grid-card:hover .rp-nb-card-desc {
    opacity: 1;
    height: auto;
    margin-top: 10px;
}

.rp-nb-card-btn {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 15px;
    padding: 15px 45px;
    border: 1px solid #fff;
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translate(-50%, 20px);
}

.rp-neighborhood-grid-card:hover .rp-nb-card-btn {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rp-nb-card-btn:hover {
    background: #fff;
    color: #9d7515;
}

/* Demographics Tab System */
.rp-demographics-wrapper {
    background: #fff;
    padding: 40px 0;
}

.rp-demographics-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    justify-content: flex-start;
}

.rp-tab-btn {
    padding: 7px 20px;
    border: 1px solid #9d7515;
    background: transparent;
    color: #9d7515;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rp-tab-btn.active {
    background: #9d7515;
    color: #fff;
}

.rp-tab-btn:hover:not(.active) {
    background: #34607b;
    color: #fff;
    border: 1px solid #34607b;
}

.rp-tab-panel {
    display: none;
}

.rp-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.rp-demo-summary {
    font-size: 15px;
    color: #888;
    margin-bottom: 30px;
    line-height: 1.5;
}

.rp-demo-highlights {
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.rp-demo-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid #eee;
}

.rp-demo-stat:last-child {
    border-right: none;
}

.rp-stat-val {
    display: block;
    font-size: 17px;
    color: #000;
    line-height: 1.7;
}

.rp-stat-lbl {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
}

.rp-demo-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

.rp-demo-chart-box h4 {
    font-size: 12px;
    font-family: "Urbanist";
    text-transform: uppercase;
    color: #999;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.rp-progress-group {
    margin-bottom: 20px;
}

.rp-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #000;
    margin-bottom: 8px;
}

.rp-progress-bar {
    height: 20px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rp-progress-fill {
    height: 100%;
    background: #9d7515;
    border-radius: 4px;
    transition: width 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .rp-demo-highlights {
        flex-wrap: wrap;
    }

    .rp-demo-stat {
        flex: 0 0 50%;
        margin-bottom: 20px;
        border-right: none;
    }

    .rp-demo-charts-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Neighborhood Guide */
.rp-guide-wrapper {
    background: #fff;
    padding: 10px 0;
}

.rp-educational-institutes-wrapper>.rp-demo-summary>p {
    margin: 0 0 0;
}

.rp-educational-institutes-wrapper>.rp-demo-summary {
    margin-bottom: 25px;
}

.rp-guide-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 20px;
}

.rp-guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.rp-guide-table th {
    text-align: left;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    background-color: transparent;
}

.rp-guide-table td {
    padding: 15px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    vertical-align: middle;
}

.rp-spot-name {
    display: flex;
    flex-direction: column;
}

.rp-spot-title {
    color: #000;
    font-weight: 600;
    font-size: 14px;
}

.rp-spot-address {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    text-decoration: underline;
    transition: color 0.3s;
}

.rp-spot-address i {
    margin-left: 5px;
}

.rp-spot-address:hover {
    color: #9d7515;
}

.rp-cat-badge {
    background: #445e6d;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rp-cell-distance,
.rp-cell-reviews {
    font-size: 15px;
    color: #555;
}

.rp-star-rating {
    color: #2c4a5c;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rp-star-rating i {
    color: #2c4a5c;
}

.rp-rating-text {
    margin-left: 8px;
    color: #333;
    font-weight: 500;
}

.rp-row-hidden {
    display: none;
}

.rp-guide-load-more {
    text-align: center;
    margin-top: 30px;
}

.rp-load-more-btn {
    padding: 15px 45px;
    background: transparent;
    color: #9d7515;
    border: 1px solid #9d7515;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.rp-load-more-btn:hover {
    background: #9d7515;
    color: #fff;
}

@media (max-width: 768px) {
    .rp-guide-table thead {
        display: none;
    }

    .rp-guide-table td {
        display: block;
        padding: 10px 15px;
        border-bottom: none;
    }

    .rp-guide-table tr {
        border-bottom: 1px solid #eee;
        padding: 10px 0;
        display: block;
    }
}


/* Tooltips */
.rp-info-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.rp-info-tooltip i {
    font-size: 12px;
    color: #34607b;
}

.rp-tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: #34607b;
    color: #fff;
    text-align: left;
    padding: 15px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    font-size: 12px;
}

.rp-tooltip-text strong {
    display: block;
    font-weight: 700;
    /* color: #9d7515; */
}

.rp-tooltip-text p {
    margin: 0 0 5px;
}

.rp-tooltip-text a {
    text-decoration: underline;
    color: #fff;
}

.rp-tooltip-text a:hover {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline !important;
}

.rp-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #34607b transparent transparent transparent;
}

.rp-info-tooltip:hover .rp-tooltip-text,
.rp-tooltip-text:hover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.rp-nb-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
}

.rp-nb-hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.rp-nb-hero .rp-back-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: inline-block;
    transition: opacity 0.3s;
}

.rp-nb-hero .rp-back-link:hover {
    opacity: 0.8;
}

.rp-nb-hero-title {
    font-size: 64px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 15px;
    letter-spacing: 2px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.rp-nb-hero-desc {
    font-size: 18px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .rp-nb-hero {
        height: 300px;
    }

    .rp-nb-hero-title {
        font-size: 42px;
    }

    .rp-nb-hero-desc {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .rp-demographics-tabs {
        flex-wrap: wrap;
    }

    .rp-demo-stat {
        flex: 0 0 100%;
    }

    .rp-stat-val {
        font-size: 26px;
    }
}

/* Neighborhood Lifestyle (Area Highlights) */
.rp-lifestyle-section {
    background: #fff;
    padding: 35px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.rp-lifestyle-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.rp-lifestyle-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 40px;
}

.rp-lifestyle-col:not(:last-child) {
    border-right: 1px solid #ddd;
}

.rp-score-circle-wrap {
    position: relative;
    width: 65px;
    height: 65px;
    flex-shrink: 0;
}

.rp-score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.rp-score-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 6;
}

.rp-score-fill {
    fill: none;
    stroke: #9d7515;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.rp-score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 17px;
    font-weight: 700;
    color: #000;
}

.rp-lifestyle-text {
    display: flex;
    flex-direction: column;
}

.rp-lifestyle-desc {
    font-family: "Urbanist";
    margin: 0;
    line-height: 1.5;
    font-size: 16px;
}

.rp-lifestyle-label-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rp-lifestyle-label {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 991px) {
    .rp-lifestyle-grid {
        flex-direction: column;
        gap: 40px;
    }

    .rp-lifestyle-col {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 40px;
        width: 100%;
    }

    .rp-lifestyle-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

@media (max-width: 600px) {
    .rp-lifestyle-col {
        flex-direction: column;
        text-align: center;
    }
}