/**
 * Homepage Sticky Hero - Compact Version
 * Sticky to top on scroll with minimal content
 *
 * @package Astra_Child_Main
 * @since 1.0.0
 */

/* Sticky Hero Container */
.hp-sticky-hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgb(52 152 219 / 98%) 50%, rgb(41 128 185 / 98%) 100%);
    box-shadow: 0 4px 20px rgb(0 0 0 / 15%);
    z-index: 999;
    transition: transform 0.3s ease;
    transform: translateY(-100%);
}

.hp-sticky-hero.visible {
    transform: translateY(0);
}

.hp-sticky-hero-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: visible;
}

/* Agent Image - Compact */
.hp-sticky-hero-image {
    position: relative;
    flex-shrink: 0;
}

.hp-sticky-hero-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgb(255 255 255 / 100%);
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}

/* Job Label - Compact Overlay */
.hp-sticky-job-label {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(52 152 219);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
    border: 2px solid rgb(255 255 255 / 100%);
}

/* Agent Info - Name */
.hp-sticky-hero-info {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hp-sticky-hero-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-sticky-realtor-name {
    color: rgb(255 255 255 / 85%);
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

/* CTA Buttons - Compact */
.hp-sticky-hero-ctas {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.hp-sticky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 3px solid white;
    white-space: nowrap;
}

.hp-sticky-btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgb(255 255 255 / 100%);
}

.hp-sticky-btn-secondary:hover {
    background: rgb(255 255 255 / 15%);
    border-color: rgb(255 255 255 / 100%);
}

.hp-sticky-btn-warning {
    background: #F4A261;
    color: #fff;
    border-color: white;
}

.hp-sticky-btn-warning:hover {
    background: #e89553;
    border-color: white;
}

/* ============================================
   Sticky Search (acs-s-section) inside Sticky Hero
   ============================================ */

/* Allow dropdown to overflow sticky hero containers */
.hp-sticky-hero .acs-s-section {
    flex: 1 1 200px;
    min-width: 0;
    overflow: visible;
    padding: 0;
    background: transparent;
    border-bottom: none;
}

.hp-sticky-hero .acs-s-container {
    max-width: none;
    padding: 0;
    position: relative;
}

.hp-sticky-hero .acs-s-search-wrapper {
    border-color: rgb(255 255 255 / 40%);
    background: rgb(255 255 255 / 15%);
}

.hp-sticky-hero .acs-s-search-wrapper:focus-within {
    border-color: rgb(255 255 255 / 80%);
    box-shadow: 0 0 0 3px rgb(255 255 255 / 15%);
}

.hp-sticky-hero .acs-s-search-input {
    color: #fff;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.hp-sticky-hero .acs-s-search-input::placeholder {
    color: #0274be;
}

.hp-sticky-hero .acs-s-dropdown-toggle {
    color: rgb(255 255 255 / 70%);
    border-left-color: rgb(255 255 255 / 20%);
    width: 40px;
}

.hp-sticky-hero .acs-s-dropdown-toggle:hover {
    background: rgb(255 255 255 / 15%);
    color: #fff;
}

.hp-sticky-hero .acs-s-tree-dropdown {
    left: 0;
    right: 0;
    z-index: 10000;
}

/* Hide sticky search inside sticky hero on mobile */
html[data-device="mobile"] .hp-sticky-hero .acs-s-section {
    display: none;
}

/* Hide standalone desktop search when sticky hero is visible (desktop only) */
html[data-device="desktop"] .hp-sticky-hero.visible ~ .acs-section {
    display: none;
}

/* ============================================
   Mobile Search Row (acs-m-section) inside Sticky Hero
   ============================================ */

/* Hidden by default on desktop */
html[data-device="desktop"] .hp-sticky-hero .acs-m-section {
    display: none;
}

/* Mobile: show when sticky is visible, flex-wrap the content */
html[data-device="mobile"] .hp-sticky-hero-content {
    flex-wrap: wrap;
}

html[data-device="mobile"] .hp-sticky-hero .acs-m-section {
    flex-basis: 100%;
    order: 4;
}

/* Mobile Responsive */
@media (width <= 768px) {
    .hp-sticky-hero-content {
        padding: 10px 15px;
        gap: 12px;
    }

    .hp-sticky-hero-image img {
        width: 50px;
        height: 50px;
        border: 2px solid rgb(255 255 255 / 100%);
    }

    .hp-sticky-job-label {
        font-size: 9px;
        padding: 2px 8px;
        bottom: -6px;
    }

    .hp-sticky-hero-name {
        font-size: 15px;
    }

    .hp-sticky-realtor-name {
        font-size: 11px;
    }

    .hp-sticky-btn {
        padding: 8px 16px;
        font-size: 12px;
        border-width: 2px;
    }
}

@media (width <= 480px) {
    .hp-sticky-hero-content {
        padding: 8px 10px;
        gap: 10px;
    }

    .hp-sticky-hero-image img {
        width: 45px;
        height: 45px;
    }

    .hp-sticky-job-label {
        font-size: 8px;
        padding: 2px 6px;
    }

    .hp-sticky-hero-name {
        font-size: 14px;
    }

    .hp-sticky-realtor-name {
        font-size: 10px;
    }

    .hp-sticky-hero-ctas {
        gap: 6px;
    }

    .hp-sticky-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}
