/* ==========================================================================
   Bahrain Classifieds - Homepage Welcome / Category Exploration Popup Modal
   ========================================================================== */

:root {
    --popup-scale: 1;
}

.bh-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.bh-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bh-popup-card {
    position: relative;
    background: #ffffff;
    width: 1040px;
    min-width: 1040px; /* Lock exact desktop 2-column design and dimensions */
    border-radius: 28px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 1px 1px rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: 46% 54%;
    overflow: hidden; /* Clean rounded card edges */
    flex-shrink: 0;
    transform-origin: center center;
    transform: scale(calc(var(--popup-scale, 1) * 0.92)) translateY(15px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.bh-popup-backdrop.active .bh-popup-card {
    transform: scale(var(--popup-scale, 1)) translateY(0);
    opacity: 1;
}

/* Floating Round Close Button */
.bh-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    z-index: 50;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

.bh-popup-close:hover {
    transform: scale(1.08) rotate(90deg);
    background: #f8fafc;
    color: #e11d48;
}

.bh-popup-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.4;
}

/* --------------------------------------------------------------------------
   LEFT COLUMN: Visual Showcase with curved split & glassmorphic badges
   -------------------------------------------------------------------------- */
.bh-popup-visual {
    position: relative;
    border-top-left-radius: 28px;
    border-bottom-left-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 560px;
    background: #0f172a;
}

/* Visual Panel Top: Property */
.bh-visual-section {
    position: relative;
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.bh-visual-section.property {
    background-image: url('../assets/popup_property.jpg');
}

.bh-visual-section.car {
    background-image: url('../assets/popup_car.jpg');
}



/* Wavy white divider between top and bottom sections */
.bh-section-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 38px;
    z-index: 10;
    pointer-events: none;
}

.bh-section-wave path {
    fill: #ffffff;
}

/* Organic curved wave on the right edge dividing visual from text column */
.bh-visual-right-curve {
    position: absolute;
    top: 0;
    right: -1px;
    width: 45px;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

.bh-visual-right-curve path {
    fill: #ffffff;
}


/* --------------------------------------------------------------------------
   RIGHT COLUMN: Content, Cards & Bottom Badges
   -------------------------------------------------------------------------- */
.bh-popup-content {
    padding: 34px 38px 24px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border-top-right-radius: 28px;
    border-bottom-right-radius: 28px;
}

.bh-popup-header {
    margin-bottom: 18px;
}

.bh-popup-eyebrow {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.bh-popup-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.1;
    color: #0f172a;
}

.bh-popup-title span {
    color: #e11d48;
}

.bh-popup-pill-accent {
    width: 44px;
    height: 4px;
    background: #e11d48;
    border-radius: 9999px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.bh-popup-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* --------------------------------------------------------------------------
   CARDS: Bahrain Properties & Bahrain Cars
   -------------------------------------------------------------------------- */
.bh-popup-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.bh-explore-card {
    position: relative;
    border-radius: 20px;
    padding: 16px 20px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    display: block;
}

.bh-explore-card:hover {
    transform: translateY(-2px);
}

/* Properties Card */
.bh-explore-card.property-card {
    background: #f0f7ff;
    border: 1.5px solid #dbeafe;
}

.bh-explore-card.property-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 28px -6px rgba(2, 132, 199, 0.16);
}

/* Cars Card */
.bh-explore-card.car-card {
    background: #fef2f2;
    border: 1.5px solid #fee2e2;
}

.bh-explore-card.car-card:hover {
    border-color: #fca5a5;
    box-shadow: 0 12px 28px -6px rgba(225, 29, 72, 0.16);
}

/* Card Header */
.bh-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

.bh-card-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.property-card .bh-card-icon-box {
    background: #dbeafe;
    color: #0284c7;
}

.car-card .bh-card-icon-box {
    background: #fee2e2;
    color: #e11d48;
}

.bh-card-icon-box svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
}

.bh-card-title-group {
    flex: 1;
}

.bh-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.bh-card-arrow-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.property-card .bh-card-arrow-circle {
    border: 1px solid #bfdbfe;
    color: #0284c7;
}

.car-card .bh-card-arrow-circle {
    border: 1px solid #fecdd3;
    color: #e11d48;
}

.bh-explore-card:hover .bh-card-arrow-circle {
    transform: translateX(3px);
}

.property-card:hover .bh-card-arrow-circle {
    background: #0284c7;
    color: #ffffff;
}

.car-card:hover .bh-card-arrow-circle {
    background: #e11d48;
    color: #ffffff;
}

.bh-card-arrow-circle svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.bh-card-body-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 14px 0;
    position: relative;
    z-index: 2;
    max-width: 88%;
}

/* Explore Pill Button */
.bh-card-action {
    position: relative;
    z-index: 2;
}

.bh-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-card .bh-action-pill {
    background: #0072ea;
}

.property-card:hover .bh-action-pill {
    background: #0060c4;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 114, 234, 0.3);
}

.car-card .bh-action-pill {
    background: #e11d48;
}

.car-card:hover .bh-action-pill {
    background: #be123c;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.3);
}

.bh-action-pill svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.bh-explore-card:hover .bh-action-pill svg {
    transform: translateX(3px);
}

/* Card Watermark SVG illustrations */
.bh-card-watermark {
    position: absolute;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.22;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bh-explore-card:hover .bh-card-watermark {
    opacity: 0.32;
    transform: scale(1.03);
}

.property-card .bh-card-watermark {
    height: 95px;
    width: auto;
}

.car-card .bh-card-watermark {
    height: 80px;
    width: auto;
    right: 6px;
}

/* --------------------------------------------------------------------------
   FOOTER: 3 Trust Badges
   -------------------------------------------------------------------------- */
.bh-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.bh-footer-item {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
}

.bh-footer-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2563eb;
    background: #eff6ff;
}

.bh-footer-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.25;
}

.bh-footer-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 10px;
    flex-shrink: 0;
}


