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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Container Styles */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 102;
    padding: 50px;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: none;
    overflow: visible;
    display: block;
}

/* Ensure scrolled state doesn’t interfere */
.header-container.scrolled {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container.scrolled + .hamburger {
    color: #5D5D5D;
}

/* Hamburger Menu Styles */
.hamburger {
    font-size: 30px;
    cursor: pointer;
    position: fixed;
    top: 25px;
    right: 20px;
    z-index: 105;
    color: #5D5D5D;
    background: none;
    border: none;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* Logo Styles (Aligned with about.css and plan-b.css) */
.header-container .logo {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 103;
    width: 120px;
    height: auto; /* Maintain aspect ratio (120x62.47px) */
}

.header-container .logo:hover {
    opacity: 0.8;
    cursor: pointer;
}

.header-container .logo:focus {
    outline: 2px solid #228B22;
    outline-offset: 2px;
}

/* Ensure <a> doesn’t take up space */
.header-container a {
    display: inline-block;
}

/* Navigation Menu Styles */
.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 0;
    background-color: #ffffff;
    z-index: 103;
    transition: width 0.5s;
    padding-top: 60px;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    overflow-x: hidden;
    display: block;
}

.header-container.scrolled + .hamburger + .nav-menu {
    padding-top: 110px;
}

.nav-menu a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 18px;
    color: #000000;
    display: block;
    transition: 0.3s;
    margin: 0;
    line-height: 1;
}

/* Highlight active link */
.nav-menu a.active {
    background-color: #f1f1f1;
    color: #3B3B3C;
}

.nav-menu a:hover {
    color: #f1f1f1;
}

/* Media Container Styles (for index.html) */
.media-container {
    position: relative;
    height: 90vh;
    overflow: hidden;
    margin-bottom: 115px;
    background-color: transparent;
    z-index: 1;
}

.media-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: opacity 2s;
}

#initialImage {
    display: block;
    opacity: 1;
}

#backgroundVideo {
    display: none;
    opacity: 1;
}

/* Featured Section Styles (for index.html) */
.featured-section {
    position: relative;
    width: 100%;
    height: 1000px;
    overflow: hidden;
    margin-bottom: 50px;
}

.featured-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 5;
}

.featured-slide.active {
    opacity: 1;
    z-index: 10;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
}

.featured-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    width: 90%;
    max-width: 500px;
    z-index: 15;
}

.featured-text h2 {
    font-size: 2.5em;
    margin-bottom: -5px;
}

.featured-text h1 {
    font-size: 2.0em;
    margin-bottom: 5px;
}

.decorative-line {
    border: none;
    border-top: 2px solid #ffffff;
    width: 60%;
    margin: 10px auto;
    opacity: 1;
}

.featured-text .see-more {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2em;
    cursor: pointer;
}

.featured-text .see-more:hover {
    color: #e6e6e6;
}

/* Custom Positioning for Slide 2 */
.featured-text-2 {
    top: 76.8%;
    left: 82%;
    width: 30%;
    color: #3B3B3C;
    text-align: center;
}

.featured-text-2 .decorative-line {
    border-top: 2px solid #3B3B3C;
}

.featured-text-2 .see-more {
    color: #3B3B3C;
}

.featured-text-2 .see-more:hover {
    color: #5D5D5D;
}

/* Custom Positioning for Slide 3 */
.featured-text-3 {
    top: 80%;
    left: 17%;
    width: 30%;
    color: #3B3B3C;
    text-align: center;
}

.featured-text-3 .decorative-line {
    border-top: 2px solid #3B3B3C;
}

.featured-text-3 .see-more {
    color: #3B3B3C;
}

.featured-text-3 .see-more:hover {
    color: #5D5D5D;
}

/* Map Container Styles (for communities.html) */
.map-container {
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#map {
    width: 100%;
    height: 100%;
}

/* Community Section Styles (for communities.html) */
.community-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 30px;
    color: #000000;
}

.community-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-height: 100%;
}

.community-item.highlighted {
    border: 3px solid #228B22;
    box-shadow: 0 0 10px rgba(34, 139, 34, 0.5);
}

.community-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

a .community-image {
    transition: opacity 0.3s ease;
}

a .community-image:hover {
    opacity: 0.8;
    cursor: pointer;
}

.community-content {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.community-content h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-price {
    font-size: 1.2em;
    color: #3B3B3C;
    font-weight: bold;
    margin: 10px 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-description {
    font-size: 1em;
    margin-bottom: 15px;
    color: #333333;
    line-height: 1.5;
    flex-grow: 1;
}

.community-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    font-size: 0.9em;
    color: #333333;
}

.detail-item.square-feet {
    white-space: nowrap;
}

.detail-item.lot-size {
    white-space: nowrap;
}

.detail-label {
    font-weight: bold;
    margin-right: 5px;
}

.learn-more {
    display: inline-block;
    padding: 8px 16px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    border-radius: 5px;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
}

.learn-more:hover {
    background: #228B22;
}

.learn-more.disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer Styles */
footer {
    background-color: #fff;
    color: #000;
    text-align: center;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

.footer-links {
    margin: 0;
}

.footer-links a {
    color: #000;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: #e6e6e6;
}

.footer-links .instagram-icon {
    vertical-align: middle;
    width: 16px;
    height: 16px;
    transition: opacity 0.3s;
}

.footer-links a:hover .instagram-icon {
    opacity: 0.8;
}

/* Main Content Styles (for communities.html) */
.main-content {
    padding: 20px;
    padding-top: 115px;
    text-align: center;
    color: #000000;
}

.main-content h1 {
    font-size: 2.5em;
    margin-bottom: 40px;
}

/* Slideshow Divider and Disclaimer Styles (for index.html) */
.slideshow-divider {
    border: none;
    border-top: 2px solid #000000;
    width: 80%;
    margin: 0 auto;
}

.disclaimer {
    text-align: center;
    color: #000000;
    font-size: 0.9em;
    margin: 20px 0 20px 0;
}

/* Contact Form Styles */
.contact-section {
    padding: 20px;
    text-align: center;
    color: #333333;
}

.contact-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    color: #333333;
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    display: inline-block;
    padding: 10px 20px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

.contact-form button:hover {
    background: #333333;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .header-container {
        padding: 15px;
        min-height: 100px;
    }

    .header-container .logo {
        width: 80px;
        height: auto; /* Maintain aspect ratio */
        left: 15px;
    }

    .hamburger {
        top: 25px;
        right: 20px;
        font-size: 24px;
    }

    .media-container {
        height: 50vh;
        margin-bottom: 50px;
    }

    .media-item {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .featured-section {
        height: 60vh;
        margin-bottom: 30px;
    }

    .featured-slide {
        height: 100%;
    }

    .featured-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% 50%;
    }

    .featured-text,
    .featured-text-2,
    .featured-text-3 {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        max-width: 300px;
        color: #ffffff;
        text-align: center;
    }

    .featured-text h2 {
        font-size: 1.8em;
        margin-bottom: 0;
    }

    .featured-text h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }

    .featured-text .see-more {
        font-size: 1em;
        color: #ffffff;
    }

    .featured-text .see-more:hover {
        color: #e6e6e6;
    }

    .decorative-line {
        border-top: 2px solid #ffffff;
        width: 50%;
        margin: 8px auto;
    }

    .featured-text-2 .decorative-line,
    .featured-text-3 .decorative-line {
        border-top: 2px solid #ffffff;
    }

    .featured-text-2 .see-more,
    .featured-text-3 .see-more {
        color: #ffffff;
    }

    .featured-text-2 .see-more:hover,
    .featured-text-3 .see-more:hover {
        color: #e6e6e6;
    }

    .map-container {
        height: 300px;
    }

    .community-item {
        max-width: 100%;
    }

    .community-image {
        height: 200px;
    }

    .community-content h2 {
        font-size: 1.4em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .community-price {
        font-size: 1.1em;
        margin: 8px 0;
    }

    .community-description {
        font-size: 0.9em;
    }

    .community-details {
        grid-template-columns: 1fr;
    }

    .learn-more {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px;
        min-height: 100px;
    }

    .header-container .logo {
        width: 80px; /* Scale proportionally for mobile */
        height: auto; /* Maintain aspect ratio (80x41.64px) */
        left: 20px;
    }

    .hamburger {
        top: 25px;
        right: 20px;
        font-size: 20px;
    }

    /* High-DPI adjustment */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        .header-container .logo {
            width: 85px; /* Slight increase for high-DPI */
            height: auto; /* Maintain aspect ratio (85x44.22px) */
        }

        .hamburger {
            font-size: 24px;
        }
    }

    .featured-section {
        height: 50vh;
    }

    .featured-text,
    .featured-text-2,
    .featured-text-3 {
        width: 90%;
        max-width: 250px;
    }

    .featured-text h2 {
        font-size: 1.5em;
    }

    .featured-text h1 {
        font-size: 1.2em;
    }

    .featured-text .see-more {
        font-size: 0.9em;
    }

    .decorative-line {
        width: 40%;
        margin: 5px auto;
    }
}

@media (min-width: 768px) {
    .featured-text {
        top: 40%;
        left: 70%;
        width: 40%;
    }

    .featured-text-2 {
        top: 76.8%;
        left: 82%;
        width: 40%;
        color: #3B3B3C;
    }

    .featured-text-2 .decorative-line {
        border-top: 2px solid #3B3B3C;
    }

    .featured-text-2 .see-more {
        color: #3B3B3C;
    }

    .featured-text-2 .see-more:hover {
        color: #5D5D5D;
    }

    .featured-text-3 {
        top: 80%;
        left: 17%;
        width: 40%;
        color: #3B3B3C;
    }

    .featured-text-3 .decorative-line {
        border-top: 2px solid #3B3B3C;
    }

    .featured-text-3 .see-more {
        color: #3B3B3C;
    }

    .featured-text-3 .see-more:hover {
        color: #5D5D5D;
    }
}

@media (min-width: 1024px) {
    .community-section {
        gap: 40px;
    }

    .community-item {
        max-width: 360px;
    }

    .featured-text {
        top: 30%;
        left: 70%;
        width: 30%;
    }

    .featured-text-2 {
        top: 76.8%;
        left: 82%;
        width: 30%;
        color: #3B3B3C;
    }

    .featured-text-2 .decorative-line {
        border-top: 2px solid #3B3B3C;
    }

    .featured-text-2 .see-more {
        color: #3B3B3C;
    }

    .featured-text-2 .see-more:hover {
        color: #5D5D5D;
    }

    .featured-text-3 {
        top: 80%;
        left: 17%;
        width: 30%;
        color: #3B3B3C;
    }

    .featured-text-3 .decorative-line {
        border-top: 2px solid #3B3B3C;
    }

    .featured-text-3 .see-more {
        color: #3B3B3C;
    }

    .featured-text-3 .see-more:hover {
        color: #5D5D5D;
    }
}