/* Main Site Styles */
:root {
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --bg-body: #f9f9f9;
    --bg-header: #ffffff;
    --bg-footer: #343a40;
    --bg-content: #ffffff;
    --text-main: #333333;
    --text-light: #555555;
    --text-muted: #666666;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Native smooth scrolling for anchors */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover {
    background: #0056b3;
    /* Hard to make var-based without calc(), keeping as is or use filter */
    filter: brightness(90%);
}

/* Header */
header {
    background: var(--bg-header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-light);
}

nav ul li a:hover {
    color: #007bff;
}

/* Banner Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #333;
    max-width: 1160px;
    margin: 0 auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Start hidden by opacity */
    visibility: hidden;
    background-size: cover;
    background-position: center;
    z-index: 1;

    /* Modern Transitions */
    transition: opacity 1.5s ease-in-out, transform 6s linear;
    transform: scale(1);
}

.slide.active {
    opacity: 1;
    /* Fade in */
    visibility: visible;
    z-index: 2;
    transform: scale(1.1);
    /* Subtle zoom effect */
}

/* Dark overlay for better text contrast */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 20px 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    text-align: center;
    z-index: 3;

    /* Text Animation */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    transition-delay: 0.3s;
}

.slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-content h2 {
    margin: 0 0 10px;
    font-size: 2.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.slide-content p {
    font-size: 1.3rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background 0.3s, transform 0.2s;
    backdrop-filter: blur(5px);
}

.prev:hover,
.next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* Featured Properties */
#featured-properties {
    margin-top: 120px;
}

#featured-properties .section-title {
    margin-bottom: 70px;
}

.section-title {
    text-align: center;
    margin: 50px 0 30px;
    font-size: 2rem;
    color: var(--text-main);
    scroll-margin-top: 100px;
    /* Improve scroll anchor with header height */
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.property-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-content);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.property-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 10px 0;
    min-height: 4.5em;
    /* Approx 3 lines */
    max-height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.property-info h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.price {
    font-size: 1.3rem;
    color: var(--success);
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.location {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.location::before {
    content: '📍';
    margin-right: 5px;
}

.property-info .btn {
    margin-top: auto;
}

/* About Section */
.about-section {
    background: var(--bg-content);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 50px;
    scroll-margin-top: 120px;
    /* 70px header + 50px buffer */
}

/* Contact Section */
.contact-section {
    padding: 20px 0 60px;
    scroll-margin-top: 120px;
    /* Offset for smooth scroll */
    margin-bottom: 150px;
    /* User requested 150px margin/space */
    background: var(--bg-content);
}

.about-section h2 {
    margin-bottom: 20px;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Ensure full width in flex column layout */
header,
footer,
.hero-slider,
.about-section,
.container {
    width: 100%;
}

/* Footer */
footer {
    background: var(--bg-footer);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin: 0;
    opacity: 0.7;
}

.social-icons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 1.1rem;
}

.social-icon:hover {
    background: #007bff;
    color: white;
    transform: translateY(-3px);
}

/* Mobile Navigation Toggle (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #007bff;
    border-radius: 3px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {

    /* Header & Navigation */
    header .container {
        padding: 0 15px;
    }

    .menu-toggle {
        display: flex;
        /* Show hamburger on mobile */
    }

    .nav-menu {
        display: none;
        /* Hide default menu */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        /* Header height */
        left: 0;
        background: var(--bg-header);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        text-align: center;
        z-index: 99;
    }

    .nav-menu.active {
        display: flex;
        /* Show when active */
    }

    .nav-menu li {
        margin: 0;
        margin-bottom: 15px;
    }

    .nav-menu li a {
        display: block;
        padding: 10px;
        font-size: 1.2rem;
    }

    /* Hero Slider */
    .hero-slider {
        height: 60vh;
        /* Dynamic height */
        min-height: 300px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .slide-content {
        padding: 30px 15px;
    }

    .prev,
    .next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* General Layout */
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.5rem;
        margin: 30px 0 20px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 20px;
    }

    /* Property Details */
    .detail-header h1 {
        font-size: 1.5rem;
    }

    .detail-price {
        font-size: 1.5rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        /* Full width buttons for easier tapping */
        text-align: center;
        padding: 12px;
        /* Larger touch target */
    }
}