/* =====================================================
   FARMHOUSE BAZAR
   Premium Green / Luxury Real Estate Theme
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');


/* =====================================================
   ROOT
===================================================== */

:root {
    --forest: #17382a;
    --forest-dark: #0c2118;
    --forest-light: #315743;

    --cream: #f5f1e7;
    --cream-light: #fffdf8;

    --sage: #dfe6cf;
    --sage-dark: #cbd6b0;

    --gold: #d8dfad;
    --brown: #ad684c;

    --text: #17251e;
    --muted: #718078;

    --border: #d9ded5;

    --white: #ffffff;

    --shadow:
        0 25px 70px rgba(16, 42, 29, 0.12);

    --small-shadow:
        0 10px 35px rgba(16, 42, 29, 0.08);
}


/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "DM Sans", sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =====================================================
   TYPOGRAPHY
===================================================== */

h1,
h2,
h3 {
    font-family: "Playfair Display", serif;
    font-weight: 500;
}

h1,
h2 {
    letter-spacing: -0.035em;
}


/* =====================================================
   HEADER
===================================================== */

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    color: var(--white);

    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        color 0.35s ease;
}

header.is-scrolled {
    position: fixed;

    color: var(--text);

    background: rgba(255, 253, 248, 0.97);

    box-shadow:
        0 5px 30px rgba(0, 0, 0, 0.07);

    backdrop-filter: blur(15px);
}

header table {
    width: min(1180px, calc(100% - 50px));
    height: 90px;
    margin: auto;

    border-collapse: collapse;
}

header td {
    padding: 0;
}

header h1 {
    font-size: 24px;
    white-space: nowrap;
}

header h1::first-letter {
    color: var(--gold);
}

header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

header nav a {
    position: relative;

    font-size: 13px;
    font-weight: 600;

    transition:
        color 0.25s ease;
}

header nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -8px;

    width: 0;
    height: 1px;

    background: currentColor;

    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

header > table > tbody > tr > td:last-child {
    text-align: right;
}

header button {
    padding: 15px 23px;

    border: none;

    background: var(--gold);
    color: var(--forest-dark);

    font-size: 12px;
    font-weight: 700;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

header button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.12);
}


/* =====================================================
   HERO
===================================================== */

main > section:first-child {
    position: relative;

    min-height: 760px;

    padding:
        190px
        max(25px, calc((100% - 1180px) / 2))
        100px;

    overflow: hidden;

    color: white;

    background:
        url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2200&q=90")
        center / cover no-repeat;
}

main > section:first-child::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        rgba(7, 27, 18, 0.67);
}

main > section:first-child table {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 1180px;

    margin: auto;

    border-collapse: collapse;
}

main > section:first-child td {
    width: 50%;
    padding: 0;
}

main > section:first-child td:first-child {
    padding-right: 60px;
}

main > section:first-child h2 {
    max-width: 700px;

    margin: 20px 0;

    font-size:
        clamp(50px, 7vw, 86px);

    line-height: 0.98;
}

main > section:first-child p {
    max-width: 540px;

    color: rgba(255,255,255,0.8);

    font-size: 15px;
}

main > section:first-child p:first-child {
    color: var(--gold);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.18em;
}

main > section:first-child button {
    margin-top: 25px;

    padding: 15px 22px;

    border: 1px solid transparent;

    background: var(--gold);
    color: var(--forest-dark);

    font-size: 12px;
    font-weight: 700;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

main > section:first-child button:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(0,0,0,0.2);
}

main > section:first-child a:nth-of-type(2) button {
    margin-left: 8px;

    color: white;
    background: transparent;

    border-color: rgba(255,255,255,0.5);
}


/* =====================================================
   GENERAL SECTIONS
===================================================== */

main > section:not(:first-child) {
    width: min(1180px, calc(100% - 50px));

    margin: auto;

    padding: 100px 0;
}

main > section:not(:first-child) > h2 {
    margin-bottom: 12px;

    font-size:
        clamp(40px, 5vw, 62px);
}

main > section:not(:first-child) > p {
    color: var(--muted);

    font-size: 15px;
}


/* =====================================================
   SEARCH SECTION
===================================================== */

main > section:nth-of-type(2) {
    width: 100%;
    max-width: none;

    padding:
        90px
        max(25px, calc((100% - 900px) / 2));

    background: var(--cream-light);
}

main > section:nth-of-type(2) h2 {
    text-align: center;
}

main > section:nth-of-type(2) > p {
    text-align: center;

    margin-bottom: 35px;
}


/* =====================================================
   FORMS
===================================================== */

form table {
    width: 100%;

    border-collapse: collapse;

    background: var(--white);

    border: 1px solid var(--border);
}

form td {
    padding: 20px;

    border-right: 1px solid var(--border);
}

form td:last-child {
    border-right: none;
}

label {
    display: block;

    margin-bottom: 7px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.06em;
}

input,
select,
textarea {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid var(--border);

    outline: none;

    background: white;
    color: var(--text);

    font-size: 13px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--forest);

    box-shadow:
        0 0 0 3px rgba(23,56,42,0.08);
}

form button {
    padding: 13px 20px;

    border: none;

    background: var(--forest);
    color: white;

    font-size: 12px;
    font-weight: 700;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

form button:hover {
    transform: translateY(-3px);

    box-shadow: var(--small-shadow);
}


/* =====================================================
   ABOUT
===================================================== */

#about {
    width: 100%;
    max-width: none;

    padding:
        110px
        max(25px, calc((100% - 1180px) / 2));

    background: var(--sage);
}

#about table {
    width: 100%;
    max-width: 1180px;

    margin: auto;

    border-collapse: collapse;
}

#about td {
    width: 50%;

    padding: 0 35px;
}

#about td:first-child {
    padding-left: 0;
}

#about td:last-child {
    padding-right: 0;
}

#about img {
    width: 100%;
    height: 480px;

    object-fit: cover;

    box-shadow: var(--shadow);
}

#about td > p:first-child {
    color: var(--brown);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.16em;
}

#about h2 {
    margin: 18px 0;

    font-size:
        clamp(40px, 5vw, 60px);
}

#about td > p:not(:first-child) {
    color: var(--muted);

    font-size: 14px;
}


/* =====================================================
   STATISTICS
===================================================== */

main > section:nth-of-type(4) {
    width: 100%;
    max-width: none;

    padding: 45px 0;

    color: white;

    background: var(--forest);
}

main > section:nth-of-type(4) table {
    width: min(900px, calc(100% - 50px));

    margin: auto;

    border-collapse: collapse;
}

main > section:nth-of-type(4) td {
    text-align: center;
}

main > section:nth-of-type(4) h2 {
    margin-bottom: 2px;

    color: var(--gold);

    font-size: 38px;
}

main > section:nth-of-type(4) p {
    color: rgba(255,255,255,0.7);

    font-size: 11px;
}


/* =====================================================
   FEATURED PROPERTIES
   IMPORTANT FIX FOR YOUR SCREENSHOT
===================================================== */

#properties {
    width: min(1180px, calc(100% - 50px));

    background: var(--cream);
}


/* Heading */

#properties > h2 {
    text-align: center;

    margin-bottom: 10px;
}

#properties > p {
    text-align: center;

    margin-bottom: 55px;
}


/* ---------------------------------------------
   Convert the old table layout into a GRID
--------------------------------------------- */

#properties > table {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;
}

#properties > table > tbody {
    display: block;

    width: 100%;
}

#properties > table > tbody > tr {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

    width: 100%;
}


/* ---------------------------------------------
   PROPERTY CARD
--------------------------------------------- */

#properties > table td {
    display: block;

    width: 100% !important;

    min-width: 0;

    padding: 0 0 28px;

    overflow: hidden;

    vertical-align: top;

    background: var(--cream-light);

    border: 1px solid var(--border);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

#properties > table td:hover {
    transform: translateY(-10px);

    box-shadow: var(--shadow);
}


/* ---------------------------------------------
   PROPERTY IMAGE
--------------------------------------------- */

#properties > table td img {
    display: block;

    width: 100% !important;

    height: 280px;

    object-fit: cover;

    transition:
        transform 0.7s
        cubic-bezier(0.2,0.7,0.2,1);
}

#properties > table td:hover img {
    transform: scale(1.05);
}


/* ---------------------------------------------
   PROPERTY CARD CONTENT
--------------------------------------------- */

#properties > table td > p,
#properties > table td > h3,
#properties > table td > a,
#properties > table td > button {
    margin-left: 25px;
    margin-right: 25px;
}

#properties > table td > p:first-of-type {
    margin-top: 23px;
    margin-bottom: 10px;

    color: var(--brown);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

#properties > table td h3 {
    margin-top: 8px;
    margin-bottom: 12px;

    font-size: 27px;

    line-height: 1.05;
}

#properties > table td > p:not(:first-of-type) {
    color: var(--muted);

    font-size: 12px;
}

#properties > table td button {
    margin-top: 12px;

    padding: 11px 15px;

    border: none;

    background: var(--forest);
    color: white;

    font-size: 11px;
    font-weight: 700;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

#properties > table td button:hover {
    transform: translateY(-2px);

    background: var(--forest-dark);
}


/* ---------------------------------------------
   SEARCH FILTER
--------------------------------------------- */

#properties > table td.is-filtered {
    display: none !important;
}


/* =====================================================
   FARMLAND
===================================================== */

#farmland {
    width: 100%;
    max-width: none;

    padding:
        100px
        max(25px, calc((100% - 1180px) / 2));

    background: var(--cream-light);
}

#farmland > h2,
#farmland > p {
    max-width: 1180px;

    margin-right: auto;
    margin-left: auto;
}

#farmland table {
    width: 100%;

    margin-top: 40px;

    border-collapse: collapse;

    background: white;

    border: 1px solid var(--border);
}

#farmland th {
    padding: 16px 20px;

    text-align: left;

    background: var(--sage);

    color: var(--muted);

    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#farmland td {
    padding: 18px 20px;

    border-top: 1px solid var(--border);

    font-size: 13px;
}

#farmland td:nth-child(5) {
    color: var(--forest);

    font-weight: 700;
}

#farmland button {
    padding: 9px 13px;

    background: var(--forest);
    color: white;

    font-size: 11px;
}


/* =====================================================
   FARMHOUSES
===================================================== */

#farmhouses {
    width: 100%;
    max-width: none;

    padding:
        110px
        max(25px, calc((100% - 1180px) / 2));

    background: var(--sage);
}

#farmhouses table {
    width: 100%;
    max-width: 1180px;

    margin: auto;

    border-collapse: collapse;
}

#farmhouses td {
    width: 50%;

    padding: 0 35px;
}

#farmhouses td:first-child {
    padding-left: 0;
}

#farmhouses td:last-child {
    padding-right: 0;
}

#farmhouses img {
    width: 100%;
    height: 480px;

    object-fit: cover;

    box-shadow: var(--shadow);
}

#farmhouses h2 {
    margin: 18px 0;

    font-size:
        clamp(40px, 5vw, 60px);
}

#farmhouses td > p {
    color: var(--muted);

    font-size: 14px;
}

#farmhouses ul {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin: 25px 0;
    padding-left: 18px;

    color: var(--muted);

    font-size: 12px;
}

#farmhouses button {
    padding: 12px 17px;

    background: var(--forest);
    color: white;

    font-size: 11px;
    font-weight: 700;
}

#farmhouses button:last-child {
    margin-left: 7px;

    color: var(--forest);

    background: transparent;

    border: 1px solid var(--forest);
}


/* =====================================================
   LOCATIONS
===================================================== */

#locations {
    background: var(--cream);
}

#locations table {
    width: 100%;

    margin-top: 40px;

    border-collapse: collapse;

    background: var(--cream-light);

    border: 1px solid var(--border);
}

#locations td {
    width: 25%;

    padding: 28px 25px;

    border-right: 1px solid var(--border);

    transition:
        background 0.25s ease;
}

#locations td:last-child {
    border-right: none;
}

#locations td:hover {
    background: white;
}

#locations h3 {
    margin-bottom: 7px;

    font-size: 23px;
}

#locations p {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 12px;
}

#locations a {
    color: var(--brown);

    font-size: 11px;
    font-weight: 700;
}


/* =====================================================
   HOW IT WORKS
===================================================== */

main > section:nth-of-type(9) {
    width: 100%;
    max-width: none;

    text-align: center;

    background: var(--cream-light);
}

main > section:nth-of-type(9) table {
    width: min(1000px, calc(100% - 50px));

    margin: 40px auto 0;

    border-collapse: collapse;
}

main > section:nth-of-type(9) td {
    padding: 25px;
}

main > section:nth-of-type(9) td > h2 {
    color: var(--brown);

    font-size: 32px;
}

main > section:nth-of-type(9) h3 {
    margin: 10px 0;

    font-size: 22px;
}

main > section:nth-of-type(9) p {
    color: var(--muted);

    font-size: 12px;
}


/* =====================================================
   SELL PROPERTY
===================================================== */

#sell {
    width: 100%;
    max-width: none;

    padding:
        75px
        max(25px, calc((100% - 1180px) / 2));

    color: white;

    background: var(--forest-dark);
}

#sell table {
    width: 100%;
    max-width: 1180px;

    margin: auto;

    border-collapse: collapse;
}

#sell td {
    width: 50%;
}

#sell td:last-child {
    text-align: right;
}

#sell h2 {
    margin-bottom: 12px;

    font-size: 48px;
}

#sell p {
    color: rgba(255,255,255,0.7);
}

#sell button {
    padding: 15px 22px;

    background: var(--gold);
    color: var(--forest-dark);

    font-size: 12px;
    font-weight: 700;
}


/* =====================================================
   SELLER FORM
===================================================== */

#seller-form {
    background: var(--cream);
}

#seller-form > form {
    width: min(800px, 100%);

    margin: 35px auto 0;
}

#seller-form table {
    border: 1px solid var(--border);
}

#seller-form td:first-child {
    width: 32%;

    color: var(--muted);

    font-size: 12px;
}

#seller-form textarea {
    min-height: 120px;

    resize: vertical;
}


/* =====================================================
   CONTACT
===================================================== */

#contact {
    background: var(--cream-light);
}

#contact table {
    width: min(800px, 100%);

    margin: 35px auto 0;

    border-collapse: collapse;

    background: white;

    border: 1px solid var(--border);
}

#contact td {
    padding: 20px;

    border-bottom: 1px solid var(--border);

    font-size: 13px;
}

#contact td:first-child {
    width: 35%;

    color: var(--muted);
}

#contact a {
    color: var(--brown);

    font-weight: 700;
}


/* =====================================================
   FOOTER
===================================================== */

footer {
    padding:
        70px
        max(25px, calc((100% - 1180px) / 2))
        25px;

    color: rgba(255,255,255,0.68);

    background: var(--forest-dark);
}

footer table {
    width: 100%;

    border-collapse: collapse;
}

footer h2 {
    color: white;

    font-size: 27px;
}

footer h3 {
    color: var(--gold);

    font-family: "DM Sans", sans-serif;

    font-size: 12px;
}

footer p {
    font-size: 12px;
}

footer a:hover {
    color: var(--gold);
}

footer hr {
    height: 1px;

    margin-top: 30px;

    border: none;

    background: rgba(255,255,255,0.14);
}


/* =====================================================
   SCROLL REVEAL
===================================================== */

.reveal {
    opacity: 0;

    transform:
        translateY(35px);

    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
    opacity: 1;

    transform:
        translateY(0);
}


/* =====================================================
   SUCCESS MESSAGE
===================================================== */

.form-success {
    animation:
        successPulse 0.45s ease;
}

button:disabled {
    cursor: default;

    opacity: 0.7;
}

@keyframes successPulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 950px) {

    header nav {
        gap: 16px;
    }

    #properties > table > tbody > tr {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    #properties > table td img {
        height: 260px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    /* HEADER */

    header table {
        width: calc(100% - 30px);
    }

    header nav {
        display: none;
    }

    header h1 {
        font-size: 21px;
    }


    /* HERO */

    main > section:first-child {

        min-height: 850px;

        padding:
            150px
            20px
            70px;
    }

    main > section:first-child table,
    main > section:first-child tbody,
    main > section:first-child tr,
    main > section:first-child td {

        display: block;

        width: 100%;
    }

    main > section:first-child td:first-child {
        padding: 0;
    }

    main > section:first-child h2 {
        font-size:
            clamp(48px, 14vw, 68px);
    }

    main > section:first-child td:last-child {
        margin-top: 50px;
    }


    /* GENERAL */

    main > section:not(:first-child) {

        width: calc(100% - 40px);

        padding:
            75px 0;
    }


    /* SEARCH FORM */

    main > section:nth-of-type(2) {

        padding:
            70px 20px;
    }

    main > section:nth-of-type(2) form table,
    main > section:nth-of-type(2) form tbody,
    main > section:nth-of-type(2) form tr,
    main > section:nth-of-type(2) form td {

        display: block;

        width: 100%;
    }

    main > section:nth-of-type(2) form td {

        border-right: none;

        border-bottom:
            1px solid var(--border);
    }

    main > section:nth-of-type(2) form button {

        width: 100%;
    }


    /* ABOUT */

    #about,
    #farmhouses {

        padding:
            75px 20px;
    }

    #about table,
    #about tbody,
    #about tr,
    #about td,
    #farmhouses table,
    #farmhouses tbody,
    #farmhouses tr,
    #farmhouses td {

        display: block;

        width: 100%;
    }

    #about td,
    #farmhouses td {

        padding: 0;
    }

    #about td + td,
    #farmhouses td + td {

        margin-top: 40px;
    }

    #about img,
    #farmhouses img {

        height: 320px;
    }


    /* STATS */

    main > section:nth-of-type(4) table,
    main > section:nth-of-type(4) tbody,
    main > section:nth-of-type(4) tr {

        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    main > section:nth-of-type(4) td {

        padding: 12px 5px;
    }


    /* PROPERTY CARDS */

    #properties {

        width: calc(100% - 40px);
    }

    #properties > table > tbody > tr {

        display: grid;

        grid-template-columns:
            1fr;

        gap: 25px;
    }

    #properties > table td {

        width: 100% !important;
    }

    #properties > table td img {

        height: 280px;
    }


    /* FARMLAND */

    #farmland {

        padding:
            75px 20px;

        overflow-x: auto;
    }

    #farmland table {

        min-width: 720px;
    }


    /* FARMHOUSE */

    #farmhouses ul {

        grid-template-columns:
            1fr;
    }


    /* LOCATIONS */

    #locations table {

        display: block;

        overflow-x: auto;
    }

    #locations tbody,
    #locations tr {

        display: flex;

        min-width: 700px;
    }

    #locations td {

        flex: 1;
    }


    /* SELL */

    #sell {

        padding:
            65px 20px;
    }

    #sell table,
    #sell tbody,
    #sell tr,
    #sell td {

        display: block;

        width: 100%;
    }

    #sell td:last-child {

        margin-top: 25px;

        text-align: left;
    }

    #sell h2 {

        font-size: 40px;
    }


    /* SELLER FORM */

    #seller-form form table,
    #seller-form form tbody,
    #seller-form form tr,
    #seller-form form td {

        display: block;

        width: 100%;
    }


    /* CONTACT */

    #contact table,
    #contact tbody,
    #contact tr,
    #contact td {

        display: block;

        width: 100%;
    }


    /* FOOTER */

    footer table,
    footer tbody,
    footer tr,
    footer td {

        display: block;

        width: 100%;
    }

    footer td {

        margin-bottom: 25px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 450px) {

    header h1 {
        font-size: 19px;
    }

    header button {

        padding:
            12px 15px;

        font-size: 10px;
    }

    main > section:first-child {

        min-height: 800px;
    }

    main > section:first-child h2 {

        font-size: 48px;
    }

    #properties > table td img {

        height: 240px;
    }

    #properties > table td h3 {

        font-size: 25px;
    }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;

        scroll-behavior:
            auto !important;
    }

}