/* ================================================= */
/* ==  ROOT VARIABLES (Customize Your Site Here)  == */
/* ================================================= */
:root {
    /* Change your main brand colors here */
    --primary-color: #0A1931;   /* Dark Navy Blue (Professional) */
    --secondary-color: #E6B980; /* Gold/Mustard (Luxury/Earth) */
    
    /* Background colors */
    --bg-light: #F8F8F8;       /* Very light gray for alternating sections */
    --bg-dark: #FFFFFF;        /* Pure white */
    
    /* Text colors */
    --text-dark: #333333;      /* Dark gray for most text */
    --text-light: #F8F8F8;     /* Light text for dark backgrounds (like hero/footer) */
    
    /* Fonts (Loaded in HTML) */
    --font-heading: 'Playfair Display', serif; /* Elegant, bold headings */
    --font-body: 'Montserrat', sans-serif;    /* Clean, modern body text */
}

/* ================================================= */
/* ==  GLOBAL STYLING & RESETS                    == */
/* ================================================= */

/* A simple reset for consistent box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Makes anchor links (#home) scroll smoothly */
    font-size: 16px;         /* Base font size */
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-dark);
    line-height: 1.6; /* Spacing between lines of text */
}

/* This is the main content container */
.container {
    max-width: 1100px; /* Max width of content */
    margin: 0 auto;    /* Centers the content */
    padding: 0 20px;   /* 20px padding on left/right (for mobile) */
}

/* Base heading styles */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Section titles (H2) */
h2 {
    font-size: 2.5rem;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color); /* Gold underline */
    display: inline-block;
    margin-bottom: 40px;
}

p {
    margin-bottom: 15px; /* Spacing below paragraphs */
}

/* Base style for all content sections */
.content-section {
    padding: 80px 0; /* 80px top/bottom padding */
    
    /* This is for the fade-in animation (see script.js) */
    opacity: 1;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* This class is added by JavaScript when the section is scrolled into view */
.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* This centers the H2 and the content grid below it */
.content-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Helper class for light background sections */
.bg-light {
    background-color: var(--bg-light);
}

/* Main Call-to-Action (CTA) button style */
.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

/* CTA button hover effect */
.cta-button:hover {
    background-color: transparent;
    color: var(--secondary-color);
    transform: translateY(-3px); /* Slight lift */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ================================================= */
/* ==  DESKTOP HEADER (Top Nav)                   == */
/* ================================================= */
.header-desktop {
    background-color: #ffffff;
    padding: 15px 0;
    position: fixed; /* Sticks to the top */
    width: 100%;
    top: 0;
    z-index: 1000; /* Stays on top of other content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: top 0.3s; /* For hide-on-scroll (if you add that JS) */
}

.header-desktop .container {
    display: flex;
    justify-content: space-between; /* Logo on left, nav on right */
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Desktop nav links */
.nav-desktop a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

/* Underline animation on hover */
.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* Starts at 0 width */
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-desktop a:hover::after {
    width: 100%; /* Expands to 100% on hover */
}

/* ================================================= */
/* ==  MOBILE NAVIGATION (Bottom Bar)             == */
/* ================================================= */
.nav-mobile {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
    z-index: 999; /* High z-index but below header popups (if any) */
}

/* ================================================= */
/* ==  HERO SECTION                               == */
/* ================================================= */
.hero {
    min-height: 100vh; /* Takes full viewport height */
    background-image: url('images/hero-bg.jpg'); /* Your image here */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--text-light);
}

/* Dark overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 49, 0.7); /* Dark blue overlay */
}

/* Content (text/button) */
.hero-content {
    position: relative; /* Sits on top of the overlay */
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

/* Hero animations (defined at the bottom) */
.animate-hero-title {
    animation: fadeInDown 1s ease-out 0.2s backwards;
}
.animate-hero-subtitle {
    animation: fadeInUp 1s ease-out 0.5s backwards;
}
.hero .cta-button {
    animation: fadeInUp 1s ease-out 0.8s backwards;
    /* Overwrite default CTA colors for hero */
    background-color: var(--secondary-color);
    color: var(--primary-color);
}
.hero .cta-button:hover {
    background-color: transparent;
    color: var(--secondary-color);
}


/* ================================================= */
/* ==  LISTINGS SECTION (Cards)                   == */
/* ================================================= */
.listings-grid {
    display: grid;
    /* Creates responsive columns:
       - Try to fit columns of 300px
       - If space, they grow (1fr)
       - If no space, they wrap to the next line
    */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Space between cards */
    width: 100%;
    margin-top: 30px;
}

.listing-card {
    background-color: var(--bg-dark);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden; /* Keeps image corners rounded */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card hover effect */
.listing-card:hover {
    transform: translateY(-10px); /* Lifts the card up */
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.listing-card img {
    width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: cover; /* Prevents image stretching */
    display: block;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* "500 x 300 Hectares" */
.card-spec {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.card-button {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}

.card-button:hover {
    color: var(--secondary-color);
}

/* ================================================= */
/* ==  REVIEWS SECTION                            == */
/* ================================================= */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 30px;
    width: 100%;
}

.review-item {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary-color); /* Accent line */
}

.review-item p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.review-item span {
    font-weight: 700;
    color: var(--primary-color);
}

/* ================================================= */
/* ==  Q&A SECTION (Accordion)                    == */
/* ================================================= */
.qa-container {
    width: 100%;
    max-width: 800px;
}

.qa-item {
    background-color: #fff;
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.qa-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.qa-question i {
    transition: transform 0.3s ease; /* For rotating the '+' icon */
    color: var(--secondary-color);
}

/* The answer panel (hidden by default) */
.qa-answer {
    max-height: 0; /* This hides it */
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.qa-answer p {
    padding: 0 20px 20px 20px;
    margin: 0;
}

/* This class is added by JavaScript when clicked */
.qa-item.active .qa-answer {
    max-height: 200px; /* Reveals the answer. Increase if answer is long. */
}

.qa-item.active .qa-question i {
    transform: rotate(45deg); /* Rotates '+' to 'x' */
}

/* ================================================= */
/* ==  CONTACT SECTION (Form)                     == */
/* ================================================= */
.contact-form {
    width: 100%;
    max-width: 700px;
    display: grid;
    gap: 20px;
}

.form-group {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body); /* Ensures form uses correct font */
    font-size: 1rem;
}

.contact-form button {
    cursor: pointer;
    font-size: 1rem;
}

/* ================================================= */
/* ==  FOOTER                                     == */
/* ================================================= */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    /* Margin at the bottom to make space for the mobile nav */
    margin-bottom: 80px; /* Adjust if mobile nav height changes */
}

.social-icons {
    margin-bottom: 20px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-color); /* Change to gold on hover */
    transform: scale(1.2); /* Slight zoom */
}

/* ================================================= */
/* ==  ANIMATION KEYFRAMES                        == */
/* ================================================= */

/* Fades in and slides down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fades in and slides up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ================================================= */
/* ==  RESPONSIVE DESIGN (Mobile)                 == */
/* ================================================= */

/* This code applies only to screens 768px wide or smaller */
@media (max-width: 768px) {
    
    body {
        font-size: 15px; /* Slightly smaller font on mobile */
    }

    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Hide the top desktop nav */
    .header-desktop {
        display: none;
    }

    /* Show the bottom mobile nav */
    .nav-mobile {
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
    }

    .nav-mobile-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-light);
        text-decoration: none;
        font-size: 0.75rem; /* Small text for labels */
        padding: 5px;
        border-radius: 5px;
        transition: background-color 0.3s;
    }
    
    /* Active/hover state for mobile nav buttons */
    .nav-mobile-link:hover,
    .nav-mobile-link.active { /* You can add 'active' class with JS */
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-mobile-link i {
        font-size: 1.3rem;
        margin-bottom: 4px; /* Space between icon and text */
    }
    
    .nav-mobile-link span {
        display: block; /* Ensures text is on its own line */
    }

    /* Adjust Hero */
    .hero {
        /* Parallax 'fixed' doesn't work well on mobile, so turn it off */
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Stack grid items on mobile */
    .listings-grid,
    .review-grid {
        grid-template-columns: 1fr; /* Make them full-width */
    }
    
    .content-section {
        padding: 60px 0; /* Reduce section padding */
    }
    
    footer {
        /* Ensure footer content isn't hidden by the mobile nav */
        /* This padding should be slightly more than the mobile nav height */
        padding-bottom: 100px;
    }

}