/**
 * Liz Gunderson Homes - Main Stylesheet
 * Modern, responsive design inspired by contemporary real estate sites
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-color: #dfb98b;
    --primary-dark: #c9a071;
    --secondary-color: #000000;
    --accent-color: #8b6f47;
    --dark-bg: #2b2520;
    --light-bg: #faf8f6;
    --gray-100: #f5f3f0;
    --gray-200: #e8e4df;
    --gray-300: #d4cdc4;
    --gray-400: #b8afa3;
    --gray-500: #9a8f82;
    --gray-600: #6d6459;
    --gray-700: #504840;
    --gray-800: #3a342e;
    --gray-900: #2b2520;

    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Breakpoints */
    --screen-sm: 576px;
    --screen-md: 768px;
    --screen-lg: 1024px;
    --screen-xl: 1440px;

    /* Effects */
    --transition-speed: 0.3s;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ===== Reset & Base Styles ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: var(--line-height-base);
    color: var(--gray-900);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-light { color: var(--light-bg); }
.text-dark { color: var(--secondary-color); }
.text-muted { color: var(--gray-600); }
.text-primary { color: var(--primary-color); }

/* ===== Layout & Grid System ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: 900px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-md) * -0.5);
}

.col {
    flex: 1;
    padding: 0 calc(var(--spacing-md) * 0.5);
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Grid Utilities */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Sections ===== */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-sm {
    padding: var(--spacing-xl) 0;
}

.section-lg {
    padding: calc(var(--spacing-xxl) * 1.5) 0;
}

.section-dark {
    background-color: var(--secondary-color);
    color: var(--light-bg);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
    color: var(--light-bg);
}

.section-gray {
    background-color: var(--gray-100);
}

/* ===== Header & Navigation ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--secondary-color);
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-bg);
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
}

.logo:hover {
    color: var(--primary-color);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav-link {
    color: var(--light-bg);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed) ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-bg);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--light-bg);
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--spacing-xl);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--light-bg);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-bg);
}

.btn-primary:hover {
    background-color: #c13426;
    color: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-bg);
}

.btn-secondary:hover {
    background-color: var(--gray-800);
    color: var(--light-bg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-bg);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
}

/* ===== Cards ===== */
.card {
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-5px);
}

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

.card-content {
    padding: var(--spacing-md);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.card-text {
    color: var(--gray-700);
    margin-bottom: var(--spacing-md);
}

/* ===== Property Cards ===== */
.property-card {
    position: relative;
}

.property-card .property-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.property-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

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

.property-status {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color: var(--primary-color);
    color: var(--light-bg);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.property-details {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
    color: var(--gray-600);
    font-size: 0.9rem;
}

.property-detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--gray-800);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color var(--transition-speed) ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 62, 45, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.form-row .form-group {
    flex: 1;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--secondary-color);
    color: var(--light-bg);
    padding: var(--spacing-xxl) 0 var(--spacing-md);
}

.footer a {
    color: var(--light-bg);
}

.footer a:hover {
    color: var(--primary-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--light-bg);
    margin-bottom: var(--spacing-md);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--gray-500);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-bg);
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--light-bg);
    transform: translateY(-3px);
}

/* ===== Utilities ===== */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); }
.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-3 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-4 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-5 { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--secondary-color);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--box-shadow);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .col-6,
    .col-4,
    .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .form-row {
        flex-direction: column;
    }

    /* Center welcome section content on mobile */
    .welcome-section .row .col-6 {
        text-align: center;
    }

    .welcome-section .row .col-6 .btn {
        margin-bottom: var(--spacing-xl);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-lg) auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Instagram Feed ===== */
/* Instagram Parallax Section */
.instagram-parallax-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

.instagram-parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.instagram-section-overlay {
    position: relative;
    background: transparent;
    padding: var(--spacing-xxl) 0;
    z-index: 2;
}

.instagram-section-overlay h2 {
    color: var(--light-bg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.instagram-section-overlay .text-muted {
    color: var(--light-bg) !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.instagram-btn {
    border-color: var(--light-bg);
    color: var(--light-bg);
    background-color: transparent;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.instagram-btn:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    text-shadow: none;
}

.instagram-feed-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.instagram-feed-container iframe {
    min-height: 400px;
    border-radius: 8px;
}

/* Instagram Grid (if using custom implementation) */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.instagram-post {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease;
}

.instagram-post:hover {
    transform: scale(1.02);
}

.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    color: white;
    font-size: 1.2rem;
    gap: var(--spacing-md);
}

.instagram-post:hover .instagram-post-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .instagram-feed-container iframe {
        min-height: 300px;
    }

    /* Disable parallax on mobile for better performance */
    .instagram-parallax-section {
        background-attachment: scroll;
    }
}
