:root {
    --primary-color: #0a2f5b; /* Deep Blue */
    --secondary-color: #f0ad4e; /* Gold/Orange */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

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

html {
     scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-gray);
    display: flex; /* Use flexbox for sticky footer */
    flex-direction: column; /* Stack elements vertically */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

main {
    flex-grow: 1; /* Allow main content to grow and push footer down */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none; /* Remove underline from logo link */
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    margin-right: 10px;
}

.logo h1 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0; /* Reset margin if any inherited */
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0; /* Reset default ul margin */
    padding: 0; /* Reset default ul padding */
    align-items: center; /* Align items vertically */
}

nav li {
    margin-left: 25px;
    position: relative; /* Needed for dropdown positioning */
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--secondary-color);
}

.dropdown .arrow {
    font-size: 0.7em;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.3s ease;
}
.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Position below parent */
    left: 0;
    background-color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    list-style: none;
    min-width: 150px; /* Adjust as needed */
    z-index: 1001; /* Above other content */
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu /* Show on focus for accessibility */
{
    display: block;
}

.dropdown-menu li {
    margin: 0; /* Reset margin for dropdown items */
}

.dropdown-menu li a {
    display: block;
    padding: 8px 15px;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap; /* Prevent wrapping */
     font-weight: normal; /* Override bold from main nav if needed */
}

.dropdown-menu li a:hover {
    background-color: var(--light-gray);
    color: var(--secondary-color); /* Match hover style */
}

.menu-toggle {
    display: none; /* Hidden by default, shown on small screens */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: url('hero-image.png') no-repeat center center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero::before { /* Overlay for better text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 47, 91, 0.6); /* Dark blue overlay */
}

.hero-content {
    position: relative; /* Ensure content is above the overlay */
    z-index: 1;
    max-width: 700px;
}

.hero h2 {
    font-family: var(--font-secondary);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Summary Section on Index */
.summary-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}
.summary-section h2 {
    text-align: center;
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.summary-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.summary-item:hover {
     transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.summary-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.summary-item .summary-logo {
    height: 80px; /* Adjust logo size */
    width: 80px;
    object-fit: contain;
}
.summary-item h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}
.summary-item p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1; /* Allow text to take space */
}
.summary-item .details-button {
    margin-top: auto; /* Push button to bottom */
     margin-left: 0; /* Override listing card margin */
     margin-right: 0;
     margin-bottom: 0;
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: var(--light-gray);
    text-align: center;
}

.about h2 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.page-section {
    padding: 4rem 0;
}
.page-section h2 {
    text-align: center;
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 2rem; /* Consistent bottom margin */
    font-size: 2.5rem;
}

/* Listings Section */
.listings {
    padding: 4rem 0;
}

.listings h2 {
    text-align: center;
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.property-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.property-card h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    padding: 1rem 1rem 0.5rem 1rem;
    font-size: 1.3rem;
}

.property-card p {
    padding: 0 1rem 1rem 1rem;
    color: #555;
    font-size: 0.9rem;
}

.property-card .price {
    display: block;
    padding: 0 1rem 1rem 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.details-button {
     display: inline-block;
     background-color: var(--primary-color);
     color: var(--white);
     padding: 8px 15px;
     margin: 0 1rem 1rem 1rem;
     border-radius: 4px;
     text-decoration: none;
     text-align: center;
     font-size: 0.9rem;
     transition: background-color 0.3s ease;
}

.details-button:hover {
    background-color: #082546; /* Darker blue */
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.contact h2 {
    text-align: center;
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.contact p {
     text-align: center;
     margin-bottom: 2rem;
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.contact input,
.contact textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
}

.contact textarea {
    resize: vertical;
}

.contact button[type="submit"] {
    width: auto;
    justify-self: center; /* Center the button within the grid cell */
}

.phone-contact {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.phone-contact a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.phone-contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-gray); /* Lighter text for better contrast */
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 0; /* Removed margin-top as main now grows */
    width: 100%; /* Ensure footer spans full width */
}

footer p {
    margin-bottom: 0.5rem; /* Space between lines */
}

footer a {
    color: var(--secondary-color); /* Make link stand out */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Property Detail Page */
.property-detail {
    padding: 4rem 0;
}
.property-detail .container {
    max-width: 900px; /* Slightly narrower for detail focus */
}
.property-detail h2 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-align: left; /* Align title left */
}
.property-detail .price {
     font-size: 1.8rem;
     font-weight: bold;
     color: var(--secondary-color);
     margin-bottom: 1.5rem;
     display: block; /* Make it take its own line */
}
.property-detail img.main-property-image {
    width: 100%;
    max-height: 500px; /* Limit height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.property-detail .description {
    margin-bottom: 2rem;
    line-height: 1.7;
}
.property-detail .features {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.property-detail .features h3 {
     font-family: var(--font-secondary);
     color: var(--primary-color);
     margin-bottom: 1rem;
     font-size: 1.5rem;
}
.property-detail .features ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive columns */
    gap: 0.8rem;
}
.property-detail .features li {
    position: relative;
    padding-left: 20px; /* Space for icon */
}
.property-detail .features li::before {
    content: '✓'; /* Checkmark icon */
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}
.property-detail .contact-prompt {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 8px;
}
.property-detail .contact-prompt h3 {
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
    font-size: 1.6rem;
}
.property-detail .contact-prompt p {
    margin-bottom: 1.5rem;
}
.property-detail .contact-button {
     background-color: var(--secondary-color);
     color: var(--primary-color);
     padding: 12px 25px;
     text-decoration: none;
     border-radius: 5px;
     font-weight: bold;
     transition: background-color 0.3s ease, color 0.3s ease;
     border: none;
     cursor: pointer;
     font-size: 1rem;
     display: inline-block;
}
.property-detail .contact-button:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.3rem;
    }

    nav ul { 
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        text-align: center;
    }

    nav ul.active {
        display: flex; /* Show when active */
    }

    nav li { 
        margin: 10px 0;
        margin-left: 0; /* Reset margin for vertical layout */
    }

    

    /* Hide dropdown behavior on mobile - show all links directly */
    .dropdown .arrow {
        display: none; /* Hide arrow */
    }
    .dropdown-menu {
        display: block; /* Always show dropdown items */
        position: static; /* Remove absolute positioning */
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        border: none;
    }
    .dropdown-menu li a {
        padding: 10px 15px; /* Adjust padding */
        font-weight: bold; /* Match other mobile links */
        color: var(--primary-color); /* Match other mobile links */
    }
     .dropdown-menu li a:hover {
        background-color: var(--light-gray);
        color: var(--secondary-color);
    }
    /* Add slight indent for sub-menu items */
     .dropdown-menu li {
        padding-left: 15px;
    }
     .dropdown > a { 
       color: var(--dark-gray); /* Make it look like a heading */
       font-weight: bold;
       pointer-events: none; /* Make it non-clickable */
    }

     .menu-toggle { 
        display: block; /* Show hamburger menu */
    }

    .hero {
        height: 50vh;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .property-grid {
       grid-template-columns: 1fr; /* Stack cards */
    }

    .about h2, .listings h2, .contact h2 {
        font-size: 2rem;
    }

    .page-section h2, .summary-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
     .logo h1 {
        font-size: 1.1rem;
    }
     .logo img {
         height: 30px;
     }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

     .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .page-section h2, .summary-section h2 {
        font-size: 1.8rem;
    }
}