/*
|--------------------------------------------------------------------------
| REAL ESTATE PUBLIC WEBSITE
| Common / Global CSS
| Path: /assets/css/frontend.css
|--------------------------------------------------------------------------
*/


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #172033;
    font-family: "Inter", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

body.public-site {
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.25;
}


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {

    --primary: #1769ff;
    --primary-dark: #0d4dcc;
    --primary-light: #eef5ff;

    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #ecfdf5;

    --accent: #ff9f1c;
    --accent-light: #fff7e8;

    --dark: #172033;
    --dark-2: #263248;

    --text: #344054;
    --text-light: #667085;
    --muted: #98a2b3;

    --border: #e4e7ec;
    --border-light: #eef0f3;

    --white: #ffffff;
    --background: #f8fafc;
    --background-2: #f3f6fa;

    --success: #12b76a;
    --danger: #f04438;
    --warning: #f79009;

    --shadow-sm:
        0 2px 8px rgba(16, 24, 40, 0.05);

    --shadow:
        0 8px 30px rgba(16, 24, 40, 0.08);

    --shadow-lg:
        0 18px 50px rgba(16, 24, 40, 0.12);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;

    --container: 1200px;

    --transition:
        all 0.25s ease;

}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   MAIN
========================================================= */

.site-main {
    width: 100%;
    min-height: 400px;
}


/* =========================================================
   SECTIONS
========================================================= */

.section {
    position: relative;
    width: 100%;
    padding: 80px 0;
}

.section:nth-child(even) {
    background: var(--background);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 36px;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    color: var(--dark);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
}

.section-link:hover {
    color: var(--primary-dark);
    gap: 12px;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    transition: var(--transition);
}

.btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--dark-2);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-light {
    background: var(--white);
    border-color: var(--border);
    color: var(--dark);
}

.btn-light:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    min-height: 50px;
    padding: 13px 24px;
    font-size: 15px;
}


/* =========================================================
   FORM ELEMENTS
========================================================= */

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    outline: none;
    transition: var(--transition);
}

input,
select {
    height: 46px;
    padding: 0 14px;
}

textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(23, 105, 255, 0.10);
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   CARD
========================================================= */

.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}


/* =========================================================
   PROPERTY GRID
========================================================= */

.property-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}


/* =========================================================
   PROPERTY CARD
========================================================= */

.property-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.property-card:hover {
    transform: translateY(-5px);
    border-color: #d7e3f5;
    box-shadow: var(--shadow);
}

.property-card-image {
    position: relative;
    display: block;
    height: 235px;
    overflow: hidden;
    background: var(--background-2);
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card-image img {
    transform: scale(1.05);
}

.property-featured-badge,
.property-listing-badge {
    position: absolute;
    top: 14px;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    min-height: 28px;
    padding: 5px 10px;

    border-radius: 6px;

    font-size: 11px;
    font-weight: 800;
}

.property-featured-badge {
    left: 14px;
    background: var(--accent);
    color: var(--white);
}

.property-listing-badge {
    right: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--dark);
}

.property-card-body {
    padding: 18px;
}

.property-type-label {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.property-card-title {
    margin: 0 0 10px;
    color: var(--dark);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.4;
}

.property-card-title a:hover {
    color: var(--primary);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: var(--text-light);
    font-size: 13px;
}

.property-location img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
}

.property-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.property-price {
    color: var(--dark);
    font-size: 17px;
    font-weight: 800;
}

.property-view {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-public-state {
    padding: 45px 20px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    text-align: center;
}


/* =========================================================
   FLOATING WHATSAPP
========================================================= */

.whatsapp-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 48px;
    padding: 10px 17px;

    background: #25d366;
    color: var(--white);

    border-radius: 999px;

    box-shadow:
        0 8px 24px rgba(37, 211, 102, 0.28);

    font-size: 13px;
    font-weight: 800;

    transition: var(--transition);
}

.whatsapp-floating:hover {
    background: #1ebe5d;
    transform: translateY(-3px);
}

.whatsapp-floating img {
    width: 23px;
    height: 23px;
    object-fit: contain;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 86px;
    z-index: 998;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--white);
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.back-to-top img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}


/* =========================================================
   SEARCH AUTOCOMPLETE
========================================================= */

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;

    overflow: hidden;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    padding: 11px 13px;

    background: var(--white);
    border: 0;

    color: var(--text);
    text-align: left;

    cursor: pointer;
    transition: var(--transition);
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.autocomplete-item img {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}


/* =========================================================
   UTILITY
========================================================= */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .property-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .section {
        padding: 70px 0;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .container {
        width: min(
            calc(100% - 28px),
            var(--container)
        );
    }

    .section {
        padding: 55px 0;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 26px;
    }

    .section-title {
        font-size: 27px;
    }

    .property-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .property-card-image {
        height: 230px;
    }

    .whatsapp-floating {
        right: 15px;
        bottom: 15px;
        width: 48px;
        height: 48px;
        min-height: 48px;
        padding: 0;
        justify-content: center;
    }

    .whatsapp-floating span {
        display: none;
    }

    .back-to-top {
        right: 15px;
        bottom: 75px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .container {
        width: min(
            calc(100% - 22px),
            var(--container)
        );
    }

    .section-title {
        font-size: 24px;
    }

    .property-card-body {
        padding: 15px;
    }

}