/* ============================================================
 * RealEstate Hub Pro — Premium child theme
 * assets/css/premium.css
 *
 * Loaded AFTER the parent theme + plugin CSS, so these rules win
 * without needing !important on most selectors.
 *
 * All brand colors reference CSS custom properties that the premium
 * Customizer writes inline (see inc/premium-customizer.php). Fallbacks
 * are provided so the theme looks right even before any Customizer save.
 * ============================================================ */

:root {
    --rehp-primary:        #28a3b3;
    --rehp-primary-dark:   #1f8694;
    --rehp-primary-light:  #34b8b8;
    --rehp-accent:         #3cc4d6;

    --rehp-ink:            #18222b;   /* near-black headings */
    --rehp-body:           #475569;   /* body text */
    --rehp-muted:          #94a3b8;   /* captions */
    --rehp-line:           #e8edf2;   /* hairlines */
    --rehp-surface:        #ffffff;
    --rehp-surface-2:      #f7fafb;

    --rehp-shadow-sm: 0 2px 10px rgba(16, 33, 41, 0.06);
    --rehp-shadow-md: 0 14px 40px rgba(16, 33, 41, 0.10);
    --rehp-shadow-lg: 0 28px 70px rgba(16, 33, 41, 0.16);

    --rehp-radius: 18px;
    --rehp-radius-lg: 26px;

    --rehp-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
    --rehp-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ===========================================================
 * TYPOGRAPHY — editorial headings
 * =========================================================== */
.rehp-premium h1,
.rehp-premium h2,
.rehp-premium h3,
.rehp-premium .reh-archive-title,
.rehp-premium .reh-homepage-about-name,
.rehp-premium .section-header h2 {
    font-family: var(--rehp-font-display);
    letter-spacing: -0.01em;
    color: var(--rehp-ink);
}

.rehp-premium .section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}
.rehp-premium .section-header h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    font-weight: 600;
    margin: 0 0 12px;
}
.rehp-premium .section-header p {
    color: var(--rehp-body);
    font-size: 1.05rem;
}

/* A refined kicker line above section titles */
.rehp-premium .section-header h2::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin: 18px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rehp-primary), var(--rehp-primary-light));
}

/* ===========================================================
 * BUTTONS — premium pill + sheen
 * =========================================================== */
.rehp-premium .btn,
.rehp-premium .btn-primary,
.rehp-premium .btn-view-details,
.rehp-premium .reh-search-form button[type="submit"],
.rehp-premium .reh-homepage-about-cta,
.rehp-premium .reh-archive-cta {
    background: linear-gradient(135deg, var(--rehp-primary) 0%, var(--rehp-primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.35s var(--rehp-ease), box-shadow 0.35s var(--rehp-ease), filter 0.35s var(--rehp-ease);
    box-shadow: 0 10px 26px rgba(40, 163, 179, 0.30);
}
.rehp-premium .btn:hover,
.rehp-premium .btn-primary:hover,
.rehp-premium .btn-view-details:hover,
.rehp-premium .reh-search-form button[type="submit"]:hover,
.rehp-premium .reh-homepage-about-cta:hover,
.rehp-premium .reh-archive-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(40, 163, 179, 0.40);
    filter: brightness(1.03);
}

/* ===========================================================
 * SOLD / SIGNATURE BANNER — shows the FULL image uncropped
 * (its own full-width section above the Meet bio)
 * =========================================================== */
.rehp-sold-banner {
    position: relative;        /* anchor for the overlaid search */
    width: 100%;
    margin: 0;
    line-height: 0;            /* kill inline-image gap */
    background: #0d141e;       /* fills any sub-pixel edges; matches dark sky */
    overflow: hidden;
}
.rehp-sold-banner img {
    display: block;
    width: 100%;
    height: auto;              /* natural aspect — nothing cropped */
    margin: 0;
}

/* Search overlaid on the lower part of the banner, in a frosted panel.
   Sits below the image's SOLD badge + "Don't Wait" tagline so nothing's
   covered. The whole image still shows. */
.rehp-banner-search {
    position: absolute;
    left: 50%;
    top: 40%;                  /* upper-middle: visible on load, over open sky */
    transform: translate(-50%, -50%);
    width: min(1120px, 92%);
    z-index: 2;
    line-height: normal;
    /* Frosted transparent-gray glass that blends into the image */
    background: rgba(34, 39, 49, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    backdrop-filter: blur(12px) saturate(1.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.40);
}
/* The plugin search form ships its own light card chrome (the .reh-search-form
   wrapper is #f8f9fa, .reh-search-form-modern is #fff). Strip ALL of those
   so the form blends into the frosted gray panel — only the input pills +
   teal button keep a surface. */
.rehp-banner-search .reh-search-form-modern,
.rehp-banner-search .reh-search-form,
.rehp-banner-search .search-form-container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Make the input pills read as glass too — translucent white instead of the
   solid #f5f7fa, with light text/placeholder, so the whole bar looks frosted. */
.rehp-banner-search .reh-search-form-modern .filter-item input,
.rehp-banner-search .reh-search-form-modern .filter-item input[type="text"],
.rehp-banner-search .reh-search-form-modern .filter-item input[type="number"],
.rehp-banner-search .reh-search-form-modern .filter-item select {
    background-color: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}
.rehp-banner-search .reh-search-form-modern .filter-item input::placeholder {
    color: rgba(255, 255, 255, 0.82) !important;
}
.rehp-banner-search .reh-search-form-modern .filter-item i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Small prompt line above the search (context without competing with the
   image's headline). */
.rehp-banner-search-prompt {
    margin: 0 0 14px 6px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
    opacity: 0.96;
}

/* === Premium search layout: bigger search box, taller inputs, even pills === */
.rehp-banner-search .search-main-filters {
    gap: 12px !important;
    align-items: stretch !important;
}
/* The keyword box gets the most room */
.rehp-banner-search .filter-keyword {
    flex: 2.4 1 320px !important;
    min-width: 260px !important;
}
/* Dropdown pills share the rest evenly instead of fixed widths */
.rehp-banner-search .filter-item:not(.filter-keyword):not(.filter-sort) {
    flex: 1 1 140px !important;
}
.rehp-banner-search .filter-sort {
    flex: 1 1 150px !important;
}
/* Taller, more premium controls */
.rehp-banner-search .reh-search-form-modern .filter-item input,
.rehp-banner-search .reh-search-form-modern .filter-item select {
    height: 54px !important;
    width: 100% !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
}
.rehp-banner-search .filter-item i {
    font-size: 1rem !important;
}
/* Prominent search button matching the input height, grows to fill its slot */
.rehp-banner-search .btn-search {
    height: 54px !important;
    flex: 1 1 160px !important;
    padding: 0 34px !important;
    border-radius: 12px !important;
    font-size: 1.02rem !important;
    letter-spacing: 0.04em !important;
}
/* On smaller screens the tall image leaves little room — let the panel sit
   just under the image instead of floating, so the search is always usable. */
@media (max-width: 880px) {
    .rehp-sold-banner {
        background: #0d141e;
    }
    .rehp-banner-search {
        position: static;
        transform: none;
        width: 100%;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}

/* ===========================================================
 * MEET THE AGENT — full-bleed background image + overlay
 * (.reh-homepage-about is rendered by the plugin; we restyle it)
 * NOTE: the image-as-background path (.rehp-has-meet-bg) is now DORMANT —
 * the body class isn't added anymore (image shows as the banner above).
 * The Meet section renders clean/light with the headshot + readable bio.
 * =========================================================== */
.rehp-premium .reh-homepage-about {
    position: relative;
    background: var(--rehp-surface-2);
    overflow: hidden;
    padding: clamp(56px, 8vw, 110px) 0;
}

/* When a Meet background image is set via Customizer, paint it full-bleed
   with a readable gradient scrim and flip the copy to light.
   NOTE: the parent plugin styles .reh-homepage-about::before as a decorative
   floating blob (width:70%; height:200%; border-radius:50%; top:-50%;
   right:-20%; animation). We must RESET all of that so the image fills the
   whole section as a clean rectangle instead of an off-center ellipse. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about::before {
    content: '';
    position: absolute;
    inset: 0;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    animation: none !important;
    background-image:
        linear-gradient(rgba(10, 18, 24, 0.30), rgba(10, 18, 24, 0.30)),
        var(--rehp-meet-bg);
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
    /* Anchor TOP so the SOLD badge + branding stay in view; only a light
       scrim now — readability comes from the frosted panel behind the text. */
    background-position: center top, center top;
    z-index: 0;
}
/* Consistent minimum height so framing doesn't swing with bio length. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about {
    min-height: 640px;
    display: flex;
    align-items: center;
}
/* Frosted gray-transparent panel behind the Meet text, shifted RIGHT so it
   clears the image's left-side SOLD / burned-in branding (which now shows
   clearly through the light scrim). Bio stays fully readable in the panel. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-container {
    max-width: 660px;
    margin-left: auto;
    margin-right: 4%;
    background: rgba(13, 20, 30, 0.74);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: 22px;
    padding: 46px 50px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}
@media (max-width: 782px) {
    .rehp-premium.rehp-has-meet-bg .reh-homepage-about-container {
        margin-right: auto;
        margin-left: auto;
        padding: 32px 26px;
    }
}
/* Hide the plugin's SECOND decorative blob so it doesn't tint the photo. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about::after {
    display: none !important;
}
/* The SOLD image already includes burned-in agent branding, so hide the
   section's redundant headshot — lets the image's SOLD badge breathe and
   the bio take the full readable width. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-photo {
    display: none !important;
}
.rehp-premium.rehp-has-meet-bg .reh-homepage-about > * {
    position: relative;
    z-index: 1;
}
/* Light text over the dark scrim. !important because the plugin sets the
   bio to #4a5568 gray; we also add a soft shadow for legibility over imagery. */
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-name,
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-bio,
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-bio p,
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-bio strong,
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-bio li {
    color: #fff !important;
}
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-name,
.rehp-premium.rehp-has-meet-bg .reh-homepage-about-bio {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.40);
}
.rehp-premium.rehp-has-meet-bg .reh-label-text {
    color: #ffffff !important;
    opacity: 0.92;
}
/* Frame the agent photo elegantly on the photo background */
.rehp-premium .reh-homepage-about-photo-frame {
    border-radius: var(--rehp-radius-lg);
    box-shadow: var(--rehp-shadow-lg);
    overflow: hidden;
}

/* ===========================================================
 * STATS BAND — animated counters (premium-only section,
 * injected by the homepage override)
 * =========================================================== */
.rehp-stats-band {
    background: linear-gradient(135deg, var(--rehp-primary-dark) 0%, var(--rehp-primary) 100%);
    color: #fff;
    padding: clamp(40px, 6vw, 72px) 0;
}
.rehp-stats-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.rehp-stat-value {
    font-family: var(--rehp-font-display);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1;
}
.rehp-stat-label {
    margin-top: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}
@media (max-width: 768px) {
    .rehp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}

/* ===========================================================
 * PROPERTY CARDS — elevated + image zoom on hover
 * =========================================================== */
.rehp-premium .reh-property-card-modern,
.rehp-premium .reh-featured-card {
    border-radius: var(--rehp-radius);
    box-shadow: var(--rehp-shadow-sm);
    transition: transform 0.4s var(--rehp-ease), box-shadow 0.4s var(--rehp-ease);
    overflow: hidden;
    background: var(--rehp-surface);
}
.rehp-premium .reh-property-card-modern:hover,
.rehp-premium .reh-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rehp-shadow-lg);
}
.rehp-premium .reh-property-card-modern .property-image,
.rehp-premium .reh-featured-card-image {
    overflow: hidden;
}
.rehp-premium .reh-property-card-modern .property-image img,
.rehp-premium .reh-featured-card-image img {
    transition: transform 0.7s var(--rehp-ease);
}
.rehp-premium .reh-property-card-modern:hover .property-image img,
.rehp-premium .reh-featured-card:hover .reh-featured-card-image img {
    transform: scale(1.07);
}
.rehp-premium .property-price,
.rehp-premium .reh-featured-price {
    color: var(--rehp-primary);
    font-weight: 700;
}

/* ===========================================================
 * ARCHIVE HERO + badges → use brand vars
 * =========================================================== */
.rehp-premium .reh-archive-hero,
.rehp-premium .reh-about-hero {
    background: linear-gradient(135deg, var(--rehp-primary-light) 0%, var(--rehp-primary) 100%);
    border-radius: var(--rehp-radius-lg);
}
.rehp-premium .badge-status.status-active,
.rehp-premium .reh-property-card .property-status {
    background: linear-gradient(135deg, var(--rehp-primary) 0%, var(--rehp-primary-light) 100%);
}

/* ===========================================================
 * STICKY SHRINKING HEADER
 * =========================================================== */
.rehp-premium .site-header {
    transition: box-shadow 0.3s var(--rehp-ease), padding 0.3s var(--rehp-ease), background 0.3s var(--rehp-ease);
}
.rehp-premium.rehp-scrolled .site-header {
    box-shadow: var(--rehp-shadow-md);
    backdrop-filter: saturate(1.1) blur(6px);
    background: rgba(255, 255, 255, 0.92);
}

/* ===========================================================
 * SCROLL-REVEAL ANIMATION UTILITIES
 * Elements get .rehp-reveal; JS adds .rehp-in when in view.
 * =========================================================== */
/* Hidden state is gated on html.rehp-anim, which an inline <head> script adds
   BEFORE paint. If JS/premium.js never loads, the class is still added by the
   tiny head script; and html.rehp-anim-go (a 2.2s head-script failsafe) forces
   everything visible. Net: content is NEVER permanently invisible. */
html.rehp-anim .rehp-premium .rehp-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--rehp-ease), transform 0.7s var(--rehp-ease);
    will-change: opacity, transform;
}
html.rehp-anim .rehp-premium .rehp-reveal.rehp-in {
    opacity: 1;
    transform: none;
}
/* Failsafe: if the head-script timeout fires (premium.js dead), reveal all. */
html.rehp-anim-go .rehp-premium .rehp-reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* ===========================================================
 * COMPREHENSIVE BRAND-COLOR APPLICATION
 * Covers every plugin selector that ships hardcoded blue
 * (#3498db / #2980b9 family AND #2563eb / #1d4ed8 navy family),
 * re-pointing them at the themeable CSS vars. This is what lets
 * the Customizer color picker actually recolor the whole site —
 * no hand-written per-client CSS needed.
 * =========================================================== */

/* Buttons & button-like links */
.rehp-premium .reh-search-form button,
.rehp-premium .reh-search-submit,
.rehp-premium .reh-btn-success,
.rehp-premium .reh-contact-btn--primary,
.rehp-premium .reh-contact-channels .channel--booking,
.rehp-premium .reh-contact-btn--booking,
.rehp-premium .reh-testimonials-cta .btn-cta,
.rehp-premium .reh-testimonials-empty .btn-primary {
    background: linear-gradient(135deg, var(--rehp-primary) 0%, var(--rehp-primary-light) 100%) !important;
    color: #fff !important;
}
.rehp-premium .reh-search-form button:hover,
.rehp-premium .reh-contact-btn--primary:hover,
.rehp-premium .reh-contact-channels .channel--booking:hover,
.rehp-premium .reh-contact-btn--booking:hover,
.rehp-premium .reh-testimonials-cta .btn-cta:hover,
.rehp-premium .reh-btn-secondary:hover,
.rehp-premium .reh-btn-outline:hover,
.rehp-premium .reh-pagination-modern a:hover {
    background: var(--rehp-primary-dark) !important;
    color: #fff !important;
}

/* View toggle + pagination current */
.rehp-premium .view-btn:hover,
.rehp-premium .view-btn.active,
.rehp-premium .reh-pagination-modern .current {
    background: var(--rehp-primary) !important;
    color: #fff !important;
}

/* Badges */
.rehp-premium .reh-rental-badge,
.rehp-premium .verified-badge,
.rehp-premium .reh-featured-badge {
    background: linear-gradient(135deg, var(--rehp-primary) 0%, var(--rehp-primary-light) 100%) !important;
    color: #fff !important;
}

/* Prices (all variants) */
.rehp-premium .reh-sale-price,
.rehp-premium .property-detail-price {
    color: var(--rehp-primary) !important;
}
.rehp-premium .reh-property-price .price-value {
    background: linear-gradient(135deg, var(--rehp-primary) 0%, var(--rehp-primary-light) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* Meet section label + decorative lines */
.rehp-premium .reh-label-text { color: var(--rehp-primary) !important; }
.rehp-premium .reh-label-line,
.rehp-premium .reh-homepage-about-name::after {
    background: linear-gradient(90deg, var(--rehp-primary), var(--rehp-primary-light)) !important;
}
.rehp-premium .reh-homepage-about-photo::before { background: var(--rehp-primary) !important; }
.rehp-premium .reh-homepage-about-photo::after  { background: var(--rehp-primary-light) !important; }

/* When NO meet bg image: keep the agent name on-brand. With bg image the
   .rehp-has-meet-bg rule above flips it to white, which wins via specificity. */
.rehp-premium .reh-homepage-about-name { color: var(--rehp-primary); }

/* Contact page accents (navy family in the plugin) */
.rehp-premium .reh-contact-hero {
    background: linear-gradient(135deg, var(--rehp-primary-light) 0%, var(--rehp-primary) 100%) !important;
}
.rehp-premium .reh-contact-form-header .eyebrow { color: var(--rehp-primary) !important; }
.rehp-premium .reh-contact-form--styled input:focus,
.rehp-premium .reh-contact-form--styled textarea:focus,
.rehp-premium .reh-contact-form--styled select:focus {
    border-color: var(--rehp-primary) !important;
}
.rehp-premium .today-badge { background: var(--rehp-primary) !important; }
.rehp-premium .hours-row--today { border-left: 4px solid var(--rehp-primary) !important; }

/* Misc accents */
.rehp-premium .reh-sidebar-card:hover::before,
.rehp-premium .reh-carousel-dot:hover { background: var(--rehp-primary) !important; }
.rehp-premium .reh-testimonials-empty .empty-icon {
    background: linear-gradient(135deg, var(--rehp-primary), var(--rehp-primary-light)) !important;
}
.rehp-premium .market-stat-card::before {
    background: linear-gradient(90deg, var(--rehp-primary), var(--rehp-primary-light)) !important;
}
.rehp-premium .fas.fa-map-marker-alt,
.rehp-premium .reh-icon-primary,
.rehp-premium .reh-meta-item svg { color: var(--rehp-primary) !important; }

/* ===========================================================
 * ACCESSIBILITY — respect reduced motion
 * =========================================================== */
@media (prefers-reduced-motion: reduce) {
    .rehp-premium *,
    .rehp-premium *::before,
    .rehp-premium *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .rehp-premium .rehp-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
