/* ==========================================================================
   Vivienda NAVIGATION HEADER SYSTEM & CORE LAYOUT
   ========================================================================== */

:root {
    --primary-color: #0f172a; /* Sleek Slate/Navy */
    --accent-color: #10b981;  /* Emerald Green accent */
    --text-color: #334155;
    --bg-light: #f8fafc;
    
    /* Contact Page Specific Design System Tokens */
    --contact-primary: #2563eb;
    --contact-primary-hover: #1d4ed8;
    --contact-surface: #ffffff;
    --contact-section-bg: #f8fafc;
    --contact-border: #e2e8f0;
    --contact-text-main: #1e293b;
    --contact-text-muted: #64748b;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    padding-bottom: 70px; /* Offset spacing for the fixed mobile bottom-nav */
}

main {
    flex: 1; /* Pushes footer neatly down to the screen baseline */
}

header {
    background-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.logo strong {
    color: var(--accent-color);
    font-weight: 800;
}

nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 4px 0;
}

nav a:hover, 
nav a.active {
    color: #ffffff;
}

/* Underline link animation for desktop views */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.2s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Mobile Hamburger Toggle Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Layout Responsive Breakpoint */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none; /* Hidden on mobile viewports by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 20px;
        gap: 15px;
        border-top: 1px solid #1e293b;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    nav.mobile-open {
        display: flex; /* Displayed smoothly when hamburger toggle transitions */
    }

    nav a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 16px;
    }
    
    nav a::after {
        display: none; /* Disables underline graphic transitions on touch views */
    }
}

/* ==========================================================================
   NEW DYNAMIC SLIDER & INTEGRATED SEARCH STYLES
   ========================================================================== */

.hero-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; 
    max-height: 500px;
    overflow: hidden;
    background: #0f172a;
}

.slide-node {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide-node img, 
.slide-node video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fixed: kept cover for beautiful banner cropping */
    object-position: center;
    display: block; /* Removes baseline spacing gaps */
}

.slide-node.active-slide {
    opacity: 1;
}

/* The dark overlay that makes hero text readable */
.slide-overlay-scrim {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1;
}

.slide-content-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

/* SEARCH BAR INTEGRATION */
.hero-search-bar {
    display: flex;
    background: #ffffff;
    padding: 8px;
    border-radius: 9999px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    max-width: 650px;
    margin: 20px auto 0 auto;
}

.hero-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 24px;
    font-size: 1rem;
    color: #1e293b;
    background: transparent;
}

.hero-search-bar button {
    background: #1e3a8a;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 9999px;
    cursor: pointer;
}

/* Slider Navigation Arrows */
.slider-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.slider-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.arrow-prev { left: 20px; }
.arrow-next { right: 20px; }


/* ==========================================================================
   Vivienda PROPERTY DETAILS SCREEN DESIGN SYSTEM
   ========================================================================== */

.details-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.property-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.property-header-block h1 {
    margin: 5px 0;
    font-size: 2rem;
    color: #0f172a;
}

.badge-status-tag {
    background-color: #10b981;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.location-marker {
    color: #64748b;
    margin: 5px 0 0;
    font-size: 15px;
}

.price-tag-large {
    font-size: 2.2rem;
    font-weight: 800;
    color: #10b981;
    background-color: #f0fdf4;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

/* Media Gallery Showcase */
.media-gallery-showcase {
    background-color: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    padding: 15px;
    margin-bottom: 35px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.hero-image-frame {
    height: 500px;
    width: 100%;
    background-color: #1e293b;
    border-radius: 8px;
    overflow: hidden;
}

.hero-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease-in-out;
}

.thumbnail-strip-ribbon {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-node {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thumb-node:hover, 
.selected-thumb {
    opacity: 1;
    border-color: #10b981;
}

/* Grid Presentation Split Blueprint */
.presentation-split-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 60px;
}

.main-narrative-panel {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.specifications-badge-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.spec-card {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.spec-card strong {
    display: block;
    font-size: 18px;
    color: #0f172a;
}

.spec-card span {
    font-size: 13px;
    color: #64748b;
}

.narrative-description-text h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin-top: 0;
}

.narrative-description-text p {
    line-height: 1.7;
    color: #475569;
    font-size: 16px;
}

/* Sidebar Lead Panel Widget */
.sticky-sidebar-panel {
    position: sticky;
    top: 100px; /* Aligns comfortably with sticky headers */
}

.agent-interaction-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.agent-interaction-card h3 {
    margin: 0 0 10px 0;
    color: #0f172a;
}

.agent-interaction-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.sidebar-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.sidebar-contact-form label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.sidebar-contact-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sidebar-contact-form input:focus {
    outline: none;
    border-color: #10b981;
}

.btn-primary-action {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-primary-action:hover {
    background-color: #1e293b;
}

/* Responsive Adaptive Property Sizing Overrides */
@media (max-width: 900px) {
    .presentation-split-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-image-frame {
        height: 350px;
    }
    
    .price-tag-large {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Vivienda PROPERTIES REGULAR GRID CATALOG & LISTINGS
   ========================================================================== */

.catalog-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.catalog-header {
    margin-bottom: 35px;
    border-left: 4px solid #10b981;
    padding-left: 15px;
}

.catalog-header h1 {
    margin: 0 0 5px 0;
    color: #0f172a;
    font-size: 2rem;
}

.catalog-header p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

.featured-listings h2 {
    text-align: center;
    margin: 40px 0 20px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #0f172a;
    font-size: 2rem;
}

/* Three Column Grid Setup */
.properties-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.property-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.property-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
}

/* Card Image Frame Container */
.card-image-box {
    position: relative;
    height: 220px;
    background-color: #e2e8f0;
    overflow: hidden; /* Standardizes image container bounds */
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #10b981;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-price-row {
    font-size: 1.4rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 8px;
}

/* Elegant text overflow truncation rules to prevent unaligned cards */
.card-title-text,
.property-details h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.card-location-text,
.property-location {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-amenities-row {
    display: flex;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 20px;
    font-size: 14px;
    color: #475569;
}

/* Card CTA Action Anchors */
.card-action-btn,
.btn-view {
    display: block;
    text-align: center;
    background-color: #0f172a;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto; /* Aligns card elements perfectly to standard limits */
    transition: background-color 0.2s ease !important;
}

.card-action-btn:hover {
    background-color: #10b981;
}

.btn-view:hover {
    background: #334155 !important;
}

.empty-catalog-alert {
    text-align: center;
    padding: 60px 20px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.empty-catalog-alert a {
    color: #10b981;
    text-decoration: none;
    font-weight: bold;
}

/* ==========================================================================
   CONTACT US PAGE STYLES
   ========================================================================== */

.contact-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--contact-text-main);
}

.contact-heading-block {
    text-align: center;
    margin-bottom: 50px;
}

.contact-heading-block h1 {
    font-size: 36px;
    color: var(--contact-text-main);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.contact-heading-block p {
    font-size: 16px;
    color: var(--contact-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Split-Grid Layout Engine */
.contact-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 50px;
    align-items: start;
}

/* Left Sidebar: Direct Touchpoints panel */
.contact-info-panel {
    background: var(--contact-section-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--contact-border);
}

.contact-info-panel h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--contact-text-main);
}

.contact-info-panel p {
    color: var(--contact-text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.info-channel-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.info-channel-icon {
    font-size: 20px;
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--contact-border);
    line-height: 1;
}

.info-channel-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--contact-text-main);
    font-weight: 600;
}

.info-channel-details a, 
.info-channel-details p {
    margin: 0;
    color: var(--contact-text-muted);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.info-channel-details a:hover {
    color: var(--contact-primary);
}

/* Right Sidebar: Dynamic Interactive Form */
.contact-form-panel {
    background: var(--contact-surface);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--contact-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Notification & System Feedback Alerts */
.status-alert-box,
.alert-success {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.status-alert-box.success,
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-family: sans-serif;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.5s ease;
}

.status-alert-box.success::before,
.alert-success::before {
    content: "✓ ";
    font-weight: bold;
}

.status-alert-box.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Input Form Controls */
.input-field-group {
    margin-bottom: 20px;
}

.input-field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--contact-text-main);
}

.input-field-group input, 
.input-field-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--contact-border);
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.input-field-group input:focus, 
.input-field-group textarea:focus {
    outline: none;
    border-color: var(--contact-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Action Form Submission Button */
.btn-submit-inquiry {
    background: var(--contact-primary);
    color: #ffffff;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

.btn-submit-inquiry:hover {
    background: var(--contact-primary-hover);
}

/* Responsive Mobile Layout Adaptations for Forms */
@media (max-width: 900px) {
    .contact-layout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact-heading-block h1 {
        font-size: 28px;
    }
    .contact-info-panel, 
    .contact-form-panel {
        padding: 30px 20px;
    }
}

/* ==========================================================================
   FOOTER MODULES & MOBILE FIXED NAVIGATION LINKS
   ========================================================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Footer layout container structure */
.footer {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

/* Conditional Navigation Element Queries */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important; /* Overrides component defaults on target viewport screens */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        z-index: 9999;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important; /* Hides system ribbon bars on clean desktop screens safely */
    }
}

/* Responsive responsive typography overrides for branding elements */
@media (max-width: 600px) {
    .brand-name {
        font-size: 14px;
        line-height: 1.2;
        max-width: 150px; /* Wraps clean layout strings smoothly */
        display: block;
    }
}



/* Custom Responsive Tune-Up for Vivienda Garden Hero Text */
@media (max-width: 600px) {
    /* 1. Ensure the slider container is tall enough to frame the paragraph */
    .hero-slider-container {
        aspect-ratio: 4 / 3 !important; /* Forces a taller mobile portrait landscape */
        min-height: 380px !important;    /* Guarantees baseline vertical space */
    }

    /* 2. Format the layout wrapper holding the text layers */
    .slide-content-box {
        width: 88% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* 3. Scale down the Vivienda Gardens header */
    .slide-content-box h1,
    .slide-content-box h2,
    .slide-content-box .banner-title { 
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    /* 4. Streamline the long garden description paragraph */
    .slide-content-box p,
    .slide-content-box .banner-text {
        font-size: 0.85rem !important; /* ~13.5px code fallback */
        line-height: 1.4 !important;
        color: #f1f5f9 !important;      /* Off-white color for ultra-high contrast readability */
        margin-bottom: 15px !important;
        max-width: 100% !important;
    }

    /* 5. Clean up your "Learn More" action link spacing */
    .slide-content-box a,
    .slide-content-box .btn-learn-more {
        display: inline-block !important;
        padding: 8px 20px !important;
        font-size: 0.85rem !important;
        margin-top: 5px !important;
    }
}