/* ── Reset & Modern Base ─────────────────────────── */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
html, body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: #f8fafc; /* Softer slate gray backdrop */
    color: #1e293b; /* Premium slate color over absolute black */
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}

/* ── Typography & Section Headers ────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #1684FF; /* Signature corporate bright blue accent */
    text-transform: uppercase;
    margin-bottom: 8px;
}
.section-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e1b4b; /* Distinct luxury dark navy shade */
    letter-spacing: -0.5px;
}
.section-sub {
    font-size: 15px;
    color: #64748b;
    margin-top: 6px;
}

/* ── Topbar Navigation (Clean Header Styling) ───── */
.topbar {
    background: linear-gradient(135deg, #31116E, #1684FF);
    padding: 0 40px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 25px rgba(49, 17, 110, 0.15);
}
.topbar-logo img { height: 40px; }
.topbar-nav { display: flex; gap: 32px; }
.topbar-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color .2s;
}
.topbar-nav a:hover { color: #ffffff; }

/* ── Hero Search Engine Panel ─────────────────────── */
.hero {
    background: linear-gradient(rgba(30, 27, 75, 0.55), rgba(30, 27, 75, 0.75)), url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 40px 20px;
}
.hero-content { max-width: 800px; }
.hero-title {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 35px;
}
.hero-search {
    background: #ffffff;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    max-width: 650px;
    margin: 0 auto;
}
.search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding-left: 6px;
}
.search-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s;
}
.search-tab.active {
    background: #e0f2fe;
    color: #1684FF;
}
.search-row {
    display: flex;
    gap: 10px;
}
.search-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 0 16px;
    font-size: 14px;
    font-family: inherit;
    border-radius: 12px;
    outline: none;
    color: #1e293b;
}
.search-input:focus { border-color: #1684FF; }
.search-btn {
    background: linear-gradient(135deg, #31116E, #1684FF);
    color: #fff;
    border: none;
    padding: 0 26px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-radius: 12px;
    cursor: pointer;
    height: 48px;
    transition: opacity .2s;
}
.search-btn:hover { opacity: 0.95; }

/* ── Call To Action (CTA Strip) ──────────────────── */
.cta-strip {
    background: #ffffff;
    padding: 24px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    max-width: 1200px;
    margin: -30px auto 40px;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.cta-strip h3 { font-size: 18px; font-weight: 800; color: #1e1b4b; }
.cta-strip p { font-size: 14px; color: #64748b; margin-top: 2px; }
.btn-cta {
    background: #1684FF;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 10px;
    transition: transform 0.2s, background-color 0.2s;
}
.btn-cta:hover {
    background-color: #0275f0;
    transform: translateY(-1px);
}

/* ── Premium Real Estate Listing Cards ───────────── */
.props-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 50px;
}
.prop-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.prop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(49, 17, 110, 0.06);
}
.prop-card-body { padding: 20px; }
.prop-card-price {
    font-size: 22px;
    font-weight: 800;
    color: #1684FF;
    margin-bottom: 8px;
}
.prop-card-info {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    height: 62px;
    overflow: hidden;
    margin-bottom: 12px;
}
.prop-card-city {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
}
.prop-card-city i { color: #ff6b6b; margin-right: 4px; }
.prop-card-meta {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

/* ── Hub Categorization Distribution Blocks ──────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.cat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(22, 132, 255, 0.06);
}
.cat-icon {
    font-size: 32px;
    color: #31116E;
    background: #f1f0ff;
    width: 64px;
    height: 64px;
    line-height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
}
.cat-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 8px;
}
.cat-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 62px;
    overflow: hidden;
}
.btn-cat {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
}
.cat-card:hover .btn-cat {
    background: #31116E;
    border-color: #31116E;
    color: #fff;
}

/* ── Modern Dynamic Photo Galleries ──────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    aspect-ratio: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(30, 27, 75, 0.85));
    display: flex;
    align-items: flex-end;
    padding: 10px;
}
.gallery-item-title {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

/* ── Market Insights & Articles ──────────────────── */
.news-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}
@media (min-width: 576px) {
    .news-card { flex-direction: row; }
}
.news-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}
@media (min-width: 576px) {
    .news-img { width: 40%; max-height: none; }
}
.news-body { padding: 24px; flex: 1; }
.news-date {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}
.news-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 8px;
    line-height: 1.4;
}
.news-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}
.news-link {
    color: #1684FF;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}
.news-link i { margin-left: 4px; transition: transform .2s; }
.news-link:hover i { transform: translateX(3px); }

/* ── Sidebar System Filters & GIS Panels ─────────── */
.sidebar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    margin-bottom: 25px;
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}
.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: #1684FF;
    border-radius: 2px;
}
.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 14px;
    font-family: inherit;
    outline: none;
    color: #334155;
    transition: all .2s;
}
.form-control:focus {
    background: #ffffff;
    border-color: #1684FF;
    box-shadow: 0 0 0 3px rgba(22, 132, 255, 0.1);
}
.btn-search {
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 132, 255, 0.2);
    transition: transform .2s, opacity .2s;
}
.btn-search:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* ── Interactive Newsletters Conversion Engine ───── */
.newsletter-card {
    background: linear-gradient(135deg, #1e1b4b, #31116E);
    color: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 10px 30px rgba(49, 17, 110, 0.15);
}
.newsletter-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.newsletter-card p { font-size: 13px; color: #cbd5e1; line-height: 1.5; }
.newsletter-row {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
}
.newsletter-input::placeholder { color: #94a3b8; }
.newsletter-btn {
    background: #1684FF;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .2s;
}
.newsletter-btn:hover { background-color: #0275f0; }

/* ── Footer Branding Components ─────────────────── */
.footer-wrapper {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 60px 0 20px;
    margin-top: 60px;
}
/* ── Mobile Responsive ───────────────────────────── */

/* Tablet — 768px */
@media (max-width: 768px) {

    /* Hero */
    .hero { min-height: 380px; padding: 40px 16px; }
    .hero-title { font-size: 28px; letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 24px; }
    .hero-search { padding: 8px; }
    .search-row { flex-wrap: wrap; gap: 8px; }
    .search-input { height: 44px; font-size: 13px; }
    .search-btn { width: 100%; height: 44px; }

    /* Section titles */
    .section-title { font-size: 24px; }

    /* Props grid — 1 column */
    .props-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px 40px;
    }

    /* Category grid — 1 column */
    .cat-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Countries grid — 2 columns */
    div[style*="grid-template-columns:repeat(4"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    /* Gallery grid — 3 columns */
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

    /* News card — stack */
    .news-card { flex-direction: column !important; }
    .news-img { width: 100% !important; max-height: 180px !important; }

    /* Main wrapper padding */
    .main-wrapper { padding: 40px 0; }
    .container-custom { padding: 0 16px; }

    /* Footer SEO grid — 2 columns */
    .ftr-seo-grid { grid-template-columns: 1fr 1fr !important; gap: 24px; }
    .ftr-main-grid { grid-template-columns: 1fr !important; gap: 24px; }
}

/* Phone — 480px */
@media (max-width: 480px) {

    /* Hero */
    .hero { min-height: 320px; padding: 32px 16px; }
    .hero-title { font-size: 22px; }
    .hero-subtitle { font-size: 13px; }

    /* Search row — full stack */
    .search-row select,
    .search-row .search-input { flex: none !important; width: 100% !important; height: 44px; }

    /* Section title */
    .section-title { font-size: 20px; }
    .section-sub { font-size: 13px; }

    /* Props grid — 1 column */
    .props-grid { grid-template-columns: 1fr; }

    /* Countries — 1 column */
    div[style*="grid-template-columns:repeat(4"] {
        grid-template-columns: 1fr !important;
    }

    /* Gallery — 2 columns */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* Cat card padding */
    .cat-card { padding: 20px 16px; }
    .cat-desc { height: auto; }

    /* Footer SEO — 1 column */
    .ftr-seo-grid { grid-template-columns: 1fr !important; }

    /* Section header */
    .section-header { margin-bottom: 28px; }
}

/* ── Touch-friendly tap targets ──────────────────── */
@media (max-width: 768px) {
    .btn-cat, .btn-cta, .search-btn { min-height: 44px; }
    .hdr-social a { width: 40px; height: 40px; }
    .prop-card-meta span { font-size: 11px; }
}

/* ── Hero search mobile fix ──────────────────────── */
@media (max-width: 640px) {

    .hero-content { padding: 0 4px; }

    /* Title scale down */
    .hero-title {
        font-size: 26px !important;
        letter-spacing: -0.5px !important;
        line-height: 1.25 !important;
    }

    /* Search box — stack vertically */
    .hero-search {
        padding: 10px !important;
        border-radius: 14px !important;
        max-width: 100% !important;
    }
    .hero-search .search-row {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Kill all inline flex sizing — make every control full width */
    .hero-search .search-row select,
    .hero-search .search-row .search-input,
    .hero-search .search-row button,
    #sidebar_rent_sale,
    #sidebar_type,
    #sidebar_city {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    .hero-search .search-btn,
    .search-btn {
        width: 100% !important;
        flex: none !important;
        height: 46px !important;
        border-radius: 10px !important;
    }
}

/* Tablet — slightly compact title */
@media (max-width: 768px) and (min-width: 641px) {
    .hero-title { font-size: 32px !important; }
    .hero-search .search-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    #sidebar_rent_sale { flex: 0 0 120px !important; }
    #sidebar_type, #sidebar_city { flex: 1 1 120px !important; }
    .search-btn { flex: 0 0 auto !important; }
}

/* ── Hero search inline-style overrides for mobile ── */
@media (max-width: 640px) {
    .hero { min-height: auto !important; padding: 36px 16px 40px !important; }
    .hero-title { font-size: 26px !important; line-height: 1.2 !important; margin-bottom: 12px !important; }
    .hero-content > div:first-child div { font-size: 10px !important; letter-spacing: 1.5px !important; }

    .hero-search {
        max-width: 100% !important;
        padding: 8px !important;
        border-radius: 12px !important;
    }
    /* Force column stack — overrides inline flex */
    .hero-search .search-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    /* Override all inline flex/height/width on the selects and button */
    .hero-search .search-row select,
    .hero-search .search-row .search-input,
    #sidebar_rent_sale,
    #sidebar_type,
    #sidebar_city {
        flex: none !important;
        width: 100% !important;
        height: 44px !important;
        font-size: 14px !important;
    }
    .hero-search .search-row .search-btn,
    .hero-search .search-row button {
        flex: none !important;
        width: 100% !important;
        height: 44px !important;
        font-size: 14px !important;
    }
}

/* ── Card row override (replaces old price/info/city/meta stacked layout) ── */
.prop-card-body { padding: 12px 16px 14px !important; }
.prop-card-price, .prop-card-info, .prop-card-city, .prop-card-meta { display: none !important; }

/* ── btn-cat logo blue ── */
.btn-cat {
    border-color: #1684FF !important;
    color: #1684FF !important;
}
.cat-card:hover .btn-cat {
    background: #1684FF !important;
    border-color: #1684FF !important;
    color: #fff !important;
}
