/* 
   Single Listing Layout CSS 
*/

/* Hide theme's default entry-header / post header if any, to remove the 'title panel' */
.single-realplus_listing .entry-header,
.single-realplus_listing .page-header,
.single-realplus_listing header.entry-header {
    display: none !important;
}

/* Ensure theme header is above gallery */
.site-header,
#masthead,
header.site-header {
    z-index: 9999;
    position: relative;
}

.rp-single-post {
    padding: 0 !important;
    margin: 0 !important;
}

.rp-boxed-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.rp-gallery-container {
    position: relative;
    width: 100%;
}

.rp-single-gallery-top {
    width: 100%;
    height: 100vh;
    min-height: 400px;
    background: #000;
}

.rp-single-gallery-top .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-single-gallery-thumbs {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    z-index: 10;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.rp-single-gallery-thumbs .swiper-slide {
    aspect-ratio: 16 / 10;
    height: auto;
    opacity: 0.5;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.rp-single-gallery-thumbs .swiper-slide-thumb-active,
.rp-single-gallery-thumbs .swiper-slide:hover {
    opacity: 1;
    border-color: #fff;
}

.rp-single-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Full Screen Toggle Button */
.rp-gallery-fullscreen-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.rp-gallery-fullscreen-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #fff;
    transform: scale(1.1);
}

/* Fullscreen Mode */
.rp-gallery-container.rp-is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    background: #000;
}

.rp-gallery-container.rp-is-fullscreen .rp-single-gallery-top {
    height: 100vh;
}

.rp-gallery-container.rp-is-fullscreen .rp-single-gallery-thumbs {
    bottom: 30px;
}

body.rp-no-scroll {
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .rp-single-gallery-top {
        height: 50vh;
        min-height: 300px;
    }
    
    .rp-single-gallery-thumbs {
        bottom: 20px;
        width: calc(100% - 20px);
        padding: 5px;
    }
    
    .rp-gallery-fullscreen-toggle {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* 2. Header Section */
.rp-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.rp-header-left {
    max-width: 70%;
}

.rp-address-title {
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.rp-address-subtitle {
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.rp-price-main {
    margin: 0;
}

.rp-header-right {
    display: flex;
    gap: 40px;
    align-items: center;
    border-left: 1px solid #eaeaea;
    padding-left: 40px;
}

.rp-quick-stat {
    text-align: center;
}

.rp-quick-stat i {
    font-size: 24px;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

.rp-quick-stat span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3. Description Section */
.rp-desc-section {
    color: inherit;
    margin-bottom: 60px;
}

.rp-desc-section ul {
    margin-top: 15px;
    padding-left: 20px;
}

.rp-desc-section li {
    margin-bottom: 8px;
}

/* 4. Agent Profile Section */
.rp-agent-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.rp-agent-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.rp-agent-info h3 {
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rp-agent-details {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
    font-size: 13px;
}

.rp-agent-details div {
    display: flex;
    flex-direction: column;
}

.rp-agent-details strong {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 5px;
}

.rp-agent-contact-btn {
    display: inline-block;
    border: 1px solid #9d7515;
    color: #9d7515;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
    transition: all 0.3s;
    padding: 15px 45px;
    margin-top: 10px;
}

.rp-agent-contact-btn:hover {
    background: #9d7515;
    color: #fff;
}

/* 5. Features Grid */
.rp-features-section {
    margin-bottom: 60px;
}

.rp-section-title {
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rp-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.rp-feature-block h4 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rp-feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rp-feature-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.rp-feature-item span:first-child {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

.rp-feature-item span:last-child {
    font-weight: 600;
}

/* 6. Schedule a Showing */
.rp-schedule-section {
    display: flex;
    background: #fdfdfd;
    margin-bottom: 60px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.rp-schedule-image {
    flex: 1;
}

.rp-schedule-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-schedule-form-container {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rp-schedule-form-container h3 {
    text-align: center;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
}

.rp-schedule-form-container>p {
    text-align: center;
    color: inherit;
    margin-bottom: 40px;
}

.rp-schedule-days {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.rp-schedule-day {
    flex: 1;
    border: 1px solid #ddd;
    text-align: center;
    padding: 15px 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.rp-schedule-day.active {
    border-color: #9d7515;
    background: #fdfaf3;
}

.rp-schedule-day span {
    display: block;
}

.rp-schedule-day-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.rp-schedule-day-num {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 5px;
}

.rp-schedule-day-month {
    font-size: 12px;
    color: #666;
}

.rp-schedule-time {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    font-size: 14px;
    background: #fff;
}

.rp-schedule-types {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.rp-meeting-type-btn {
    flex: 1;
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rp-meeting-type-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* 7. Mortgage Calculator */
.rp-mortgage-section {
    display: flex;
    gap: 80px;
    background: #fff;
    padding: 60px;
    margin-bottom: 60px;
    border-radius: 12px;
}

.rp-mortgage-left {
    flex: 1.2;
}

.rp-calc-title {
    margin: 0 0 25px 0 !important;
    font-size: 32px;
    color: #333;
    text-transform: uppercase;
}

.rp-mortgage-left p {
    color: #666;
    margin-bottom: 40px;
    font-size: 15px;
    line-height: 1.6;
}

.rp-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.rp-calc-field {
    display: flex;
    flex-direction: column;
}

.rp-calc-field label {
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-calc-field label i {
    font-size: 12px;
    color: #ccc;
    cursor: pointer;
}

.rp-calc-input {
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    padding: 10px 0 !important;
    background: transparent !important;
    font-size: 16px !important;
    outline: none !important;
    border-radius: 0 !important;
    color: #333 !important;
    width: 100%;
}

.rp-calc-input:focus {
    border-bottom-color: #9d7515 !important;
}

/* Custom Dropdown Arrow */
.rp-select-wrapper {
    position: relative;
}

.rp-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #333;
    pointer-events: none;
}

.rp-calc-input select {
    appearance: none;
    -webkit-appearance: none;
}

/* Down Payment with Pct */
.rp-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.rp-input-suffix {
    position: absolute;
    right: 0;
    font-size: 14px;
    color: #666;
    padding-bottom: 5px;
}

.rp-calc-actions {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.rp-calc-link-action {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.rp-calc-link-action:hover {
    color: #9d7515;
    border-color: #9d7515;
}

.rp-mortgage-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
}

.rp-chart-container {
    width: 100%;
    max-width: 260px;
    height: 260px;
    position: relative;
    margin-bottom: 40px;
}

.rp-chart-legend {
    width: 100%;
    max-width: 300px;
}

.rp-legend-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    align-items: center;
}

.rp-legend-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.rp-legend-color.pi {
    background: #9d7515;
}

.rp-legend-color.tax {
    background: #b38b2d;
}

.rp-legend-color.hoa {
    background: #c9a347;
}

.rp-legend-color.ins {
    background: #dfbc62;
}

.rp-legend-item>div:first-child {
    display: flex;
    align-items: center;
}

.rp-legend-value {
    font-weight: 400;
}

.rp-legend-pct {
    color: #888;
    margin-left: 5px;
    font-weight: 400;
    font-size: 13px;
}

/* Share Section */
.rp-calc-share {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.rp-share-label {
    font-size: 14px;
    color: #666;
}

.rp-share-icons {
    display: flex;
    gap: 15px;
}

.rp-share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 16px;
}

.rp-share-btn:hover {
    border-color: #9d7515;
    color: #9d7515;
    background: #fdfaf3;
}

/* 8. Map Section */
.rp-map-section {
    width: 100%;
    height: 500px;
    margin-bottom: 80px;
    background: #e5e3df;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.rp-map-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--rp-primary);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   Responsive: Tablet (max-width: 991px)
   ========================================== */
@media (max-width: 991px) {
    .rp-header-section {
        flex-direction: column;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .rp-header-left {
        max-width: 100%;
    }

    .rp-header-right {
        border-left: none;
        padding-left: 0;
        margin-top: 20px;
        justify-content: flex-start;
    }

    .rp-agent-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .rp-features-grid {
        grid-template-columns: 1fr;
    }

    .rp-schedule-section {
        flex-direction: column;
    }

    .rp-mortgage-section {
        flex-direction: column;
        padding: 30px;
        gap: 40px;
    }

    .rp-map-section {
        height: 350px;
    }
}

/* ==========================================
   Responsive: Mobile (max-width: 767px)
   ========================================== */
@media (max-width: 767px) {

    /* Gallery */
    .rp-single-gallery-top {
        height: 40vh !important;
        min-height: 250px !important;
    }

    .rp-single-gallery-thumbs {
        bottom: 10px;
        padding: 5px;
        max-width: 95%;
    }

    .rp-gallery-section {
        margin-top: 0;
    }

    /* Header Section */
    .rp-header-section-wrapper {
        padding: 0 15px;
    }

    .rp-address-title {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }

    .rp-address-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .rp-price-main {
        font-size: 22px !important;
    }

    .rp-header-right {
        gap: 20px;
        padding-top: 15px;
        border-top: 1px solid #eaeaea;
    }

    .rp-content-grid-wrapper,
    .rp-video-section-wrapper,
    .rp-agent-section-wrapper,
    .rp-features-section-wrapper,
    .rp-schedule-section-wrapper,
    .rp-mortgage-section-wrapper {
        padding: 0 15px;
    }

    .rp-schedule-section-wrapper .rp-container-1400 {
        padding: 30px 0px;
    }

    /* Content Grid - Stack sections vertically */
    .rp-content-grid {
        flex-direction: column;
    }

    .rp-main-content,
    .rp-stats-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .rp-stats-sidebar {
        padding: 10px 0;
        background: #fafafa;
    }

    /* Description */
    .rp-desc-section {
        margin-bottom: 30px;
        font-size: 15px !important;
        line-height: 1.7 !important;
    }

    /* Header Section */
    .rp-header-section-wrapper .rp-container-1400 {
        padding: 0 20px;
    }

    .rp-address-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .rp-address-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .rp-price-main {
        font-size: 24px;
    }

    .rp-header-right {
        gap: 20px;
        padding-top: 15px;
        border-top: 1px solid #eaeaea;
    }

    .rp-content-grid-wrapper,
    .rp-video-section-wrapper,
    .rp-agent-section-wrapper,
    .rp-features-section-wrapper,
    .rp-schedule-section-wrapper,
    .rp-mortgage-section-wrapper {
        padding: 0 15px;
    }

    /* Description */
    .rp-desc-section {
        margin-bottom: 30px;
        font-size: 14px;
        line-height: 1.7;
    }

    /* Agent Section */
    .rp-agent-content-col {
        padding: 20px 0px 0px;
    }

    .rp-agent-profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rp-agent-photo-col {
        margin-bottom: 0;
    }

    .rp-agent-photo-col img {
        width: 180px;
        height: auto;
        margin: 0 auto;
    }

    .rp-agent-name {
        margin-bottom: 10px;
        text-align: center;
    }

    .rp-agent-detail {
        min-width: 100%;
        align-items: start;
        gap: 0px;
        margin-bottom: 10px;
    }

    .rp-agent-details-grid {
        gap: 10px;
        align-items: center;
        margin-bottom: 0;
        padding: 15px 0 5px;
    }

    .rp-agent-cta-row {
        text-align: center;
        width: 100%;
    }

    .rp-agent-contact-btn {
        display: block;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    /* Features Grid */
    .rp-features-section {
        margin-bottom: 0px;
    }

    .rp-section-title {
        font-size: 20px;
        margin-bottom: 30px;
        letter-spacing: 1px;
    }

    .rp-features-grid {
        gap: 30px;
    }

    .rp-feature-block h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .rp-feature-list {
        gap: 10px;
    }

    .rp-feature-item {
        font-size: 12px;
    }

    /* Schedule a Showing */
    .rp-schedule-form-container {
        padding: 25px 15px;
    }

    .rp-schedule-form-container h3 {
        font-size: 18px;
    }

    .rp-schedule-form-container>p {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .rp-schedule-days {
        gap: 6px;
    }

    .rp-schedule-day {
        padding: 10px 3px;
    }

    .rp-schedule-day-num {
        font-size: 18px;
    }

    .rp-schedule-day-name,
    .rp-schedule-day-month {
        font-size: 10px;
    }

    .rp-schedule-types {
        flex-direction: column;
    }

    /* Mortgage Calculator */
    .rp-mortgage-section {
        padding: 25px 15px;
        gap: 30px;
    }

    .rp-calc-title {
        font-size: 22px !important;
    }

    .rp-mortgage-left p {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .rp-calc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rp-calc-actions {
        flex-direction: column;
        gap: 15px;
    }

    .rp-chart-container {
        max-width: 200px;
        height: 200px;
        margin-bottom: 25px;
    }

    .rp-legend-item {
        font-size: 12px;
    }

    .rp-calc-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Video Section */
    .rp-video-section {
        height: 250px;
        margin: 20px 0;
    }

    .rp-video-play-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    /* Map Section */
    .rp-map-section {
        height: 300px;
        margin-bottom: 40px;
    }

    /* Info Popup */
    .rp-info-popup {
        max-width: 260px;
    }
}

/* ==========================================
   Responsive: Small Mobile (max-width: 480px)
   ========================================== */
@media (max-width: 480px) {
    .rp-single-gallery-top {
        height: 40vh;
        min-height: 220px;
    }

    .rp-single-gallery-thumbs {
        display: none;
    }

    .rp-address-title {
        font-size: 18px;
    }

    .rp-price-main {
        font-size: 20px;
    }

    .rp-schedule-day {
        padding: 8px 2px;
    }

    .rp-schedule-day-num {
        font-size: 16px;
    }

    .rp-mortgage-section {
        padding: 20px 12px;
    }

    .rp-chart-container {
        max-width: 180px;
        height: 180px;
    }

    .rp-video-section {
        height: 200px;
    }

    .rp-map-section {
        height: 250px;
    }
}

/* Prevent horizontal scroll from the 100vw gallery breakout */
/* Info Tooltip Popup */
.rp-info-popup {
    position: absolute;
    z-index: 1000;
    padding: 16px;
    background-color: #f4f4f4;
    border: 1px solid #c4c4c4;
    border-radius: 2px;
    max-width: 300px;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.rp-info-title {
    color: #000000;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    font-weight: 400;
}

.rp-info-desc {
    color: #848484;
    line-height: 1.6;
}

.rp-info-close {
    position: absolute;
    top: 8px;
    right: 10px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: color 0.2s;
}

.rp-info-close:hover {
    color: #000;
}

.rp-calc-info {
    transition: color 0.2s;
}

.rp-calc-info:hover {
    color: #9d7515 !important;
}