/* Reset box-sizing and ensure no accidental overflow */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; }

/* Page Container */
.contact-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: "Poppins", sans-serif;
}

.page-title {
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 45px;
    color: #0A2A54;
}

/* Navbar */
.navbar {
    background-color: #183B4E;
    padding: 12px 0;
    color: #fff;
    font-family: Arial, sans-serif;
    width: 100%;
    overflow: hidden; /* keep things tidy */
}

.navbar .container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    gap: 18px;
}

/* Default nav (desktop): horizontal items */
.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar .nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
    padding: 8px 10px;
}

.navbar .nav-links li a:hover {
    color: #ffcc00;
}

/* Small-screen toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.08);
    color: #fff;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* Main Wrapper */
.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

/* Contact Info Card */
.contact-info-box {
    flex: 1;
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.contact-info-box h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #000000;
    font-weight: 700;
}

.contact-info-box p {
    font-size: 15px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.contact-info-box i {
    color: #959595;
    font-size: 17px;
}

/* Chat Button */
.chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #E8F1FF;
    color: #183B4E;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #183B4E;
    margin-top: 18px;
    transition: 0.2s ease-in-out;
}

.chat-btn i {
    font-size: 20px;
}

.chat-btn:hover {
    background: #183B4E;
    color: white;
}

/* Map */
.map-container {
    width: 100%;
    margin-top: 22px;
    border-radius: 10px;
    overflow: hidden;
    height: 260px;
}

/* Form Box */
.contact-form-box {
    flex: 1.3;
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.contact-form-box h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #000000;
    text-align: center;
    font-weight: 700;
}

/* Inputs */
.contact-form-box input,
.contact-form-box textarea {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1.6px solid #d4dce6;
    font-size: 15px;
    outline: none;
    background: #FAFAFB;
}

.contact-form-box input:focus,
.contact-form-box textarea:focus {
    border-color: #0056d3;
    background: #fff;
    box-shadow: 0 0 6px rgba(0,86,211,0.2);
}

/* Submit Button */
.send-btn {
    background: #183B4E;
    color: white;
    padding: 14px;
    border: none;
    width: 100%;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    transition: 0.2s;
}

.send-btn:hover {
    background: #183B4E;
}

.response-text {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    color: #666;
}

/* ---- Responsive: Mobile / Tablet: compact single-line core links + inline toggle ---- */

@media (max-width: 900px) {
    /* Container: keep items in a single row and allow horizontal scroll if needed */
    .navbar .container {
        justify-content: flex-start;
        gap: 8px;
        padding-left: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Show the toggle button inline */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 6px;
        flex: 0 0 auto;
    }

    /* Nav links: single horizontal row with no wrapping */
    .navbar .nav-links {
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        margin: 0;
        padding: 0;
        flex-wrap: nowrap;         /* do not wrap to new line */
        overflow-x: auto;          /* allow horizontal scroll if items overflow */
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure each <li> doesn't shrink to 0 and stays on one line */
    .navbar .nav-links li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .navbar .nav-links li a {
        padding: 6px 8px;
        display: inline-block;
        font-size: 15px;
    }

    /* CORE links keep visible inline (Sale, Rental, Land) */
    .navbar .nav-links li:not(.nav-extra) {
        display: inline-block;
    }

    /* Extra links (Our Services, Wanted, ContactUs when marked .nav-extra) are hidden by default */
    .navbar .nav-links li.nav-extra {
        display: none;
    }

    /* When JS toggles .show-extra on the UL, reveal the extras inline */
    .navbar .nav-links.show-extra li.nav-extra {
        display: inline-block;
    }

    /* keep colors consistent */
    .navbar .nav-links li a { color: #fff; }

    /* Make contact layout stack nicely on small screens */
    .contact-wrapper { flex-direction: column; }
}

/* Desktop: keep toggle hidden */
@media (min-width: 901px) {
    .nav-toggle { display: none; }
}