/* Modern CSS with responsive design while preserving original aesthetic */

:root {
    /* Color variables based on original color scheme */
    --primary-brown: #7f634d;
    --dark-brown: #4e3827;
    --accent-brown: #9b5e3e;
    --light-brown: #faf6e6;
    --highlight-color: #FF6600;
    --text-color: #000000;
    --light-text: #ffffff;
    --nav-bg: #d5c6a9;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

html {
    font-size: 62.5%; /* Preserves the original sizing approach */
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, serif;
    background-color: var(--primary-brown);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.6rem;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    border: none;
    display: block;
}

a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-brown);
}

h1, h2, h3, p {
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: normal;
}

h2 {
    font-size: 2rem;
}

p {
    font-size: 1.6rem;
}

ul {
    list-style: none;
}

li {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

/* Container for responsive layout */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden; /* Prevent any content from causing horizontal scrolling */
}

/* Header styles */
#header {
    width: 100%;
    max-width: 1032px;
    min-height: 132px;
    margin: 0 auto;
    padding: 0;
    background: url(images/header_bg.jpg) no-repeat 70% top;
    background-size: cover;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#logo {
    width: auto;
    max-width: 60%;
    height: auto;
    float: none;
    margin: 20px;
    overflow: hidden;
    text-align: center;
}

#logo img {
    max-height: 60px;
    width: auto;
    height: auto;
}

/* Navigation styles */
#nav-bar {
    width: 100%;
    max-width: 1032px;
    height: auto;
    padding: 0 20px;
    background: url(images/navbar_bg.jpg) no-repeat left top;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    clear: both;
}

#global-nav {
    width: 100%;
    height: auto;
    clear: both;
    overflow: hidden;
    padding: 0 20px;
    position: relative;
}

/* Mobile navigation toggle - hidden in new mobile-first approach */
.nav-toggle {
    display: none;
}

#global-nav ul, #global-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#global-nav li {
    display: inline-block;
    margin-right: 20px;
}

#global-nav ul li a {
    font-family: arial;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 23px;
    padding: 10px;
}

#global-nav ul li a:hover, #global-nav ul li a.current {
    color: #9b5e3e;
}

/* Banner styles */
#banner-wrapper {
    width: 100%;
    height: auto;
    background: url(images/banner_bg.jpg) repeat-x left top;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#banner {
    width: 100%;
    max-width: 1032px;
    height: auto;
    padding: 20px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

#banner div.text-image {
    width: 100%;
    max-width: 435px;
    padding-left: 5px;
    margin: 20px auto;
    text-align: center;
    overflow: hidden;
    color: #CCCCCC;
    font-size: x-large;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-family: Georgia, serif;
}

#banner div.banner-image {
    width: 100%;
    max-width: 440px;
    height: auto;
    float: none;
    text-align: center;
    overflow: hidden;
    margin: 20px auto;
}

#banner div.banner-image img {
    max-width: 100%;
    height: auto;
}

.banner-text-img {
    max-width: 100%;
    height: auto;
}

/* We now use brown-banner consistently across all pages */

/* Brown banner with scroll - used on all pages */
.brown-banner {
    background-color: var(--dark-brown);
    background-image: url('images/banner_bg.jpg');
    background-repeat: repeat-x;
    padding: 25px 0;
    text-align: left;
    margin: 5px 0 0 0;
    width: 100%;
    overflow: visible;
    border-bottom: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.brown-banner .container {
    padding: 0 70px 0 62px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 90%;
    max-width: 1032px;
}

.banner-heading {
    color: #d4c88f; /* Match home page gold text */
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: left;
}

.banner-subheading {
    color: var(--light-text); /* White, matching homepage subheading */
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    text-align: left;
}

/* Main content styles with vertical scroll */
main {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Content wrapper with vertical scroll backgrounds */
#content-wrapper {
    width: 100%;
    max-width: 1032px;
    margin: 0 auto;
    background: url(images/content_bg_left.jpg) repeat-y left top;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#content-wrapper-inside {
    width: 100%;
    max-width: 1032px;
    margin: 0 auto;
    background: url(images/content_bg_right.jpg) repeat-y right top;
    overflow: hidden;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

#content-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #faf6e6;
    border-top: 7px solid #9b5e3e;
    overflow: hidden;
}

/* Project grid */
.project-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.project-item {
    flex: 1;
    text-align: center;
    min-width: 280px;
}

.responsive-img {
    width: 100%;
    max-width: 422px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Content text styling */
.content-text {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

.contact-email {
    text-align: center;
    margin: 20px 0;
}

.contact-email a {
    color: #FF6600;
    text-decoration: underline;
    font-size: 1.8rem;
    font-weight: bold;
    display: inline-block;
    padding: 5px 10px;
}

/* Investment info section */
.investment-info {
    text-align: center;
    padding: 20px 0;
}

.highlight {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-brown);
}

/* Footer styles - see consolidated styles below */

/* Project styles for current and past projects pages */
.project-title {
    color: #8B4513;
    font-family: Georgia, serif;
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.project-address {
    color: #000000;
    font-family: Georgia, serif;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.project-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure all cards have the same height */
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent-brown);
}

.project-image {
    height: 200px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 3px;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image:hover img {
    transform: scale(1.05);
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image:hover::after {
    opacity: 1;
}

.project-description {
    flex-grow: 1;
    font-size: 1.5rem;
    line-height: 1.6;
}

.project-description p {
    margin-bottom: 1rem;
}

.project-description ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.project-description li {
    margin-bottom: 0.5rem;
}

.project-description a {
    color: var(--highlight-color);
    text-decoration: underline;
}

@media (min-width: 481px) and (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-image {
        height: 180px;
    }
}

@media (min-width: 769px) {
    .projects-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .project-image {
        height: 180px; /* Slightly smaller on larger screens for better grid layout */
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 1.8rem;
    }

    .project-address {
        font-size: 1.4rem;
    }

    .project-card {
        padding: 1rem;
    }

    .project-image {
        height: 160px; /* Smaller on mobile */
    }
    
    /* Extra small device navigation adjustments */
    #global-nav ul li a {
        padding: 10px 8px;
        font-size: 1.2rem;
    }
    
    #global-nav ul {
        padding: 2px 0;
    }
    
    /* Improve text readability on small screens */
    .highlight {
        font-size: 1.6rem;
        line-height: 1.5;
    }
    
    .content-text {
        padding: 0 5px;
    }
    
    .social-icons {
        margin: 15px 0;
    }
    
    .social-icons i {
        font-size: 24px;
        margin: 0 10px;
    }
    
    .contact-email a {
        font-size: 1.6rem;
        padding: 8px;
    }
}

/* Utility classes */
.darkbrown-text {
    color: var(--dark-brown);
}

.brown-text {
    color: var(--primary-brown);
}

.bannertopleft {
    color: var(--light-text);
    font-size: x-large;
}

/* Footer and social styles */
.social-icons {
    text-align: center;
    margin: 20px 0;
}

.social-icons a {
    margin: 0 15px;
    display: inline-block;
}

.social-icons i {
    font-size: 28px;
    color: #333;
    transition: color 0.3s ease;
}

.social-icons i:hover {
    color: #FF6600;
}

.copyright {
    text-align: center;
    margin: 15px 0;
    font-size: 1.4rem;
    color: var(--dark-brown);
}

.copyright p {
    margin: 0.5rem 0;
}

footer {
    background-color: var(--primary-brown);
    color: var(--light-brown);
    padding: 2rem 0;
    text-align: center;
    margin-top: 0;
    border-top: none;
}

footer .container {
    padding: 0 1rem;
    max-width: 900px;
}

footer p {
    margin: 0.5rem 0;
    font-size: 1.4rem;
}

footer a {
    color: var(--light-brown);
    text-decoration: underline;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FF6600;
}

/* Touch-friendly buttons and links */
button,
.button,
.cta-links a,
.floor-plan-nav a,
.back-to-top {
    min-height: 44px;
    min-width: 44px;
    padding: 1.2rem 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 1.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 0.5rem;
    touch-action: manipulation;
}

/* Touch device specific styles */
.touch-device .main-nav a {
    padding: 15px 20px;
}

.touch-device .project-card:hover {
    transform: none;
}

.touch-device .project-image:hover img {
    transform: none;
}

/* Improved form elements for mobile */
input,
select,
textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 1.2rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Media queries for responsive design */
@media (max-width: 1032px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    #header {
        background-position: 70% top;
    }

    #global-nav {
        padding: 0 15px;
    }

    .content {
        width: 95%;
        max-width: 840px;
    }

    .content-wrapper {
        background-position: -30px top;
    }

    .content-wrapper-inside {
        background-position: calc(100% + 30px) top;
    }

    #banner-wrapper {
        height: auto;
    }

    #banner {
        height: auto;
        padding: 5px 15px;
    }

    .brown-banner .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    #header {
        height: 100px;
        background-position: 80% 0;
    }

    #logo {
        float: none;
        width: auto;
        padding: 15px 0;
        text-align: center;
        margin: 20px auto;
    }

    #logo img {
        margin: 0 auto;
    }

    #nav-bar {
        height: auto;
        background-size: cover;
        background-position: center;
    }

    #global-nav {
        height: auto;
        position: relative;
        padding: 0;
    }

    /* Always show navigation menu on mobile */
    #global-nav ul {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        background-color: var(--nav-bg);
        padding: 5px 0;
        margin: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        position: static;
    }

    #global-nav li {
        display: inline-block;
        width: auto;
        margin: 0;
        padding: 0;
        border: none;
        text-align: center;
    }

    #global-nav ul li a {
        display: block;
        padding: 12px 15px;
        font-size: 1.4rem;
        line-height: 1;
        text-align: center;
        background-color: transparent;
        color: #000;
        font-weight: bold;
        border: none;
        white-space: nowrap;
    }

    #global-nav ul li a:hover,
    #global-nav ul li a.current {
        background-color: var(--accent-brown);
        color: #fff;
        border-radius: 4px;
    }

    #banner-wrapper {
        height: auto;
    }

    #banner {
        height: auto;
        flex-direction: column;
        padding: 15px;
    }

    #banner div.text-image,
    #banner div.banner-image {
        width: 100%;
        height: auto;
        float: none;
        text-align: center;
        margin: 10px 0;
    }

    .project-grid {
        flex-direction: column;
    }

    .project-item {
        width: 100%;
    }

    .responsive-img {
        max-width: 100%;
        margin: 0 auto;
    }

    .banner-heading {
        font-size: 2.4rem;
    }

    .banner-subheading {
        font-size: 1.8rem;
    }

.brown-banner {
    background-color: var(--dark-brown);
    background-image: url('images/banner_bg.jpg');
    background-repeat: repeat-x;
    padding: 10px 0;
    text-align: left;
    margin: -5px 0 0 0;
    width: 100%;
    overflow: visible;
    border-bottom: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 10;
}

    #logo {
        margin: 15px auto;
    }

    #nav-bar {
        background-size: 200% 100%;
    }

    #global-nav ul li a {
        font-size: 1.4rem;
        padding: 12px;
    }

    .content {
        padding: 20px 15px;
    }

    .banner-heading {
        font-size: 2rem;
    }

    .banner-subheading {
        font-size: 1.6rem;
    }

    .brown-banner {
        padding: 1rem 0;
    }

    .brown-banner .container {
        padding: 0 1rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .nav-toggle,
    .main-nav,
    footer {
        display: none;
    }

    .content {
        border: none;
        padding: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
