/* ============================================================
   PropertyDesk Africa — Main Stylesheet
   Brand: #2C2D9E (primary indigo), #5254C7 (light), #1A1B6B (dark)
   Accent: #5254C7, CTA blue: #3B4FE4
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:        #2C2D9E;
    --primary-light:  #5254C7;
    --primary-dark:   #1A1B6B;
    --primary-soft:   #EEF0FF;
    --accent:         #3B4FE4;
    --success:        #16a34a;
    --danger:         #dc2626;
    --warning:        #d97706;
    --info:           #0ea5e9;

    --text-dark:      #0F0F1A;
    --text-body:      #374151;
    --text-muted:     #6B7280;
    --text-light:     #9CA3AF;

    --bg-page:        #FFFFFF;
    --bg-soft:        #F8F9FF;
    --bg-section:     #F4F5FF;
    --border:         #E5E7EB;
    --border-focus:   #5254C7;

    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      16px;
    --radius-xl:      24px;

    --shadow-sm:      0 1px 3px rgba(44,45,158,.08);
    --shadow:         0 4px 20px rgba(44,45,158,.12);
    --shadow-lg:      0 8px 40px rgba(44,45,158,.16);

    --nav-height:     72px;
    --font:           'Inter', 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    color: var(--text-dark);
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p  { color: var(--text-body); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s ease;
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44,45,158,.35);
}
.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-1px);
}
.btn-white {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
}
.btn-white:hover {
    background: #f0f0ff;
    color: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: .875rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ── Badge / Pill ────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-muted   { background: #f3f4f6; color: var(--text-muted); }

/* ── Container ────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.container-sm { max-width: 880px; }

/* ── Section utilities ────────────────────────────────────── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-title {
    text-align: center;
    margin-bottom: 48px;
}
.section-title h2 { margin-bottom: 12px; }
.section-title p  { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.section-divider {
    width: 48px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 12px auto;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow .2s;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
}
.navbar-logo img { width: 36px; height: 36px; object-fit: contain; }
.navbar-logo span { color: var(--primary); display: block; font-size: .75rem; font-weight: 600; margin-top: -2px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-body);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all .2s;
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
}
.nav-dropdown-menu a:hover { background: var(--bg-soft); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-divider { width: 1px; height: 28px; background: var(--border); }

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-dark);
    font-size: 24px;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    overflow: hidden;
    position: relative;
}
.hero-content { padding: 60px 0 60px 0; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.hero-title .accent { color: var(--primary); }
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 16px 0 36px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-trust {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.hero-trust p {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 16px;
}
.trust-logos {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.trust-logos span {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: .02em;
}

.hero-image-wrap {
    position: relative;
    height: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
}
.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    max-height: 700px;
}

/* ── Features Section ────────────────────────────────────── */
.features { background: #fff; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.feature-card {
    text-align: center;
    padding: 36px 24px;
}
.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-soft);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
    transition: all .3s;
}
.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    transform: translateY(-4px);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.feature-card p  { font-size: .9rem; color: var(--text-muted); line-height: 1.7; }

/* ── Split / CTA Banner ──────────────────────────────────── */
.split-section {
    background: var(--bg-section);
    overflow: hidden;
}
.split-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    min-height: 400px;
}
.split-content { padding: 60px 48px; }
.split-eyebrow {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    margin-bottom: 16px;
}
.split-content h2 { margin-bottom: 20px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.split-content p  { color: var(--text-muted); margin-bottom: 32px; line-height: 1.75; }
.split-image { height: 420px; overflow: hidden; }
.split-image img { width: 100%; height: 100%; object-fit: cover; }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials { background: #fff; }
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.testimonial-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: box-shadow .3s;
}
.testimonial-card:hover { box-shadow: var(--shadow); }
.testimonial-quote {
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
    font-weight: 900;
}
.testimonial-card p {
    font-size: .95rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 24px;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-soft);
}
.testimonial-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.testimonial-author h4 { font-size: .9rem; margin-bottom: 2px; }
.testimonial-author p  { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ── CTA Block ────────────────────────────────────────────── */
.cta-block {
    background: var(--primary);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: 0 24px;
}
.cta-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}
.cta-text h3 { color: #fff; font-size: 1.35rem; margin-bottom: 6px; }
.cta-text p  { color: rgba(255,255,255,.8); font-size: .9rem; margin: 0; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: #0F0F2D;
    color: rgba(255,255,255,.7);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .navbar-logo { margin-bottom: 16px; color: #fff; }
.footer-brand p { font-size: .875rem; line-height: 1.7; max-width: 240px; }
.footer-socials { display: flex; gap: 12px; margin-top: 24px; }
.footer-social-link {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    font-size: 16px;
    transition: all .2s;
    text-decoration: none;
}
.footer-social-link:hover {
    background: var(--primary);
    color: #fff;
}

.footer-col h5 {
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.footer-col a {
    display: block;
    font-size: .875rem;
    color: rgba(255,255,255,.6);
    margin-bottom: 10px;
    transition: color .2s;
}
.footer-col a:hover { color: #fff; }

.footer-newsletter p {
    font-size: .875rem;
    margin-bottom: 16px;
    line-height: 1.6;
}
.newsletter-form {
    display: flex;
    gap: 8px;
}
.newsletter-form input {
    flex: 1;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: .875rem;
    outline: none;
    transition: border .2s;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { border-color: rgba(255,255,255,.4); }
.newsletter-form button {
    padding: 11px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.newsletter-form button:hover { background: var(--primary-light); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 28px;
    font-size: .825rem;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: #fff; }
.footer-heart { color: #ef4444; }

/* ── Alert messages ───────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 20px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ── Form elements ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    color: var(--text-dark);
    background: #fff;
    outline: none;
    transition: border .2s, box-shadow .2s;
}
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(82,84,199,.15);
}
.form-control::placeholder { color: var(--text-light); }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 5px; }

/* ── Cards (property cards) ───────────────────────────────── */
.property-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .3s, transform .2s;
}
.property-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.property-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.property-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.property-card:hover .property-card-img img { transform: scale(1.04); }
.property-card-badge {
    position: absolute;
    top: 12px; left: 12px;
}
.property-card-save {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    border: none;
    font-size: 17px;
}
.property-card-save:hover { background: #fff; color: #ef4444; }
.property-card-body { padding: 20px; }
.property-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.property-card-price span { font-size: .8rem; font-weight: 400; color: var(--text-muted); }
.property-card-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.property-card-location {
    display: flex; align-items: center; gap: 4px;
    font-size: .8rem; color: var(--text-muted);
    margin-bottom: 14px;
}
.property-card-meta {
    display: flex; gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.property-meta-item {
    display: flex; align-items: center; gap: 5px;
    font-size: .8rem; color: var(--text-muted);
}

/* ── Grid layouts ─────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-primary{ color: var(--primary); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.mt-4   { margin-top: 16px; }
.mt-8   { margin-top: 32px; }
.mb-4   { margin-bottom: 16px; }
.mb-8   { margin-bottom: 32px; }
.gap-4  { gap: 16px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .features-grid  { grid-template-columns: repeat(2, 1fr); }
    .footer-grid    { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand   { grid-column: 1 / -1; }
    .footer-newsletter { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .hero             { grid-template-columns: 1fr; min-height: auto; }
    .hero-image-wrap  { min-height: 340px; border-radius: var(--radius-xl); }
    .hero-image-wrap img { border-radius: var(--radius-xl); max-height: 380px; }
    .split-inner      { grid-template-columns: 1fr; }
    .split-image      { height: 300px; order: -1; }
    .split-content    { padding: 40px 24px; }
    .testimonials-grid{ grid-template-columns: 1fr; }
    .cta-block        { flex-direction: column; text-align: center; margin: 0; border-radius: var(--radius-lg); }
    .grid-4, .grid-3  { grid-template-columns: repeat(2, 1fr); }
    .grid-2           { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .nav-hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        background: #fff;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 16px;
        z-index: 999;
    }
    .nav-actions.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: calc(var(--nav-height) + 200px);
        left: 0; right: 0;
        background: #fff;
        padding: 0 24px 24px;
        z-index: 999;
    }
    .hero-content { padding: 40px 0; }
    .section      { padding: 56px 0; }
    .features-grid{ grid-template-columns: 1fr; }
    .footer-grid  { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .cta-block    { padding: 32px 24px; }
    .newsletter-form { flex-direction: column; }
    .footer-grid  { grid-template-columns: 1fr; }
}
