/**
 * 2 Percent Realty - Main Stylesheet
 * =====================================================
 * Consolidated styles for property listing system
 * Using HSL color values and Google Fonts
 * Last Updated: February 25, 2026
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Poppins:wght@600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* =====================================================
   CSS Reset & Base Styles
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
   CSS Variables (HSL Color System)
   ===================================================== */
:root {
    /* Brand Colors */
    --primary-color: hsl(210, 29%, 24%);       /* #2c3e50 - Dark blue-gray */
    --primary-dark: hsl(210, 29%, 29%);        /* #34495e - Darker variant */
    --secondary-color: hsl(6, 78%, 57%);       /* #e74c3c - Accent red */
    --success-color: hsl(134, 61%, 41%);       /* #28a745 - Green */
    
    /* Neutral Colors */
    --text-color: hsl(0, 0%, 20%);             /* #333 - Dark gray text */
    --text-muted: hsl(210, 11%, 46%);          /* #6c757d - Muted gray */
    --text-light: hsl(210, 11%, 31%);          /* #495057 - Light description text */
    
    /* Background Colors */
    --bg-white: hsl(0, 0%, 100%);              /* White */
    --bg-light: hsl(210, 17%, 98%);            /* #f8f9fa - Light gray background */
    --bg-border: hsl(210, 14%, 89%);           /* #dee2e6 - Border color */
    
    /* Shadows */
    --shadow-sm: 0 2px 8px hsla(0, 0%, 0%, 0.1);
    --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.15);
    
    /* Spacing */
    --container-max-width: 1400px;
    --container-max-width-narrow: 1200px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 20px;
    --radius-full: 30px;
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* =====================================================
   Typography
   ===================================================== */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* =====================================================
   Layout Components
   ===================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-narrow {
    max-width: var(--container-max-width-narrow);
}

/* =====================================================
   Header & Navigation
   ===================================================== */
header {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: var(--spacing-lg) 0;
    box-shadow: var(--shadow-sm);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--bg-white);
    font-family: var(--font-heading);
}

.logo:hover {
    opacity: 0.9;
}

.back-link {
    color: var(--bg-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.back-link:hover {
    text-decoration: underline;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--bg-white);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: background 0.3s;
}

.nav-links a:hover {
    background: hsla(0, 0%, 100%, 0.1);
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.hero .hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.hero .hero-small p {
    font-size: 1.125rem;
}

.office-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--bg-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-top: var(--spacing-md);
    font-size: 1rem;
}

/* =====================================================
   Stats Bar
   ===================================================== */
.stats-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--bg-border);
    padding: var(--spacing-md) 0;
}

.stats-bar .container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   Property Grid (Listings)
   ===================================================== */
.properties-section {
    padding: var(--spacing-2xl) 0;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.property-card {
    background: var(--bg-white);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.property-card-wrapper {
    position: relative;
}

.property-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-light);
}

.property-content {
    padding: var(--spacing-lg);
}

.property-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-heading);
}

.property-address {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.property-location {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-md);
}

.property-stats {
    display: flex;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--bg-border);
    font-size: 0.875rem;
}

.property-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-badge {
    display: inline-block;
    background: var(--success-color);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
}

.no-properties {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    color: var(--text-muted);
}

/* =====================================================
   Property Detail Page
   ===================================================== */
.property-header {
    background: var(--bg-light);
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--bg-border);
}

.property-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.property-header .property-office {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0.75rem 0;
}

.property-header .property-office strong {
    color: var(--primary-color);
}

.property-header .property-address {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.property-header .property-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.property-header .property-stats {
    margin-top: var(--spacing-md);
    border-top: none;
    padding-top: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.stat-item strong {
    font-weight: 600;
}

.property-header .status-badge {
    position: static;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
}

/* =====================================================
   Gallery Section
   ===================================================== */
.gallery-section {
    margin: var(--spacing-xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =====================================================
   Content Sections
   ===================================================== */
.content-section {
    margin: var(--spacing-xl) 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--secondary-color);
}

.description {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
}

/* =====================================================
   Details Grid
   ===================================================== */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.detail-card {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
}

.detail-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.detail-card p {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* =====================================================
   Rooms Grid
   ===================================================== */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.room-card {
    background: var(--bg-white);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.room-card:hover {
    box-shadow: var(--shadow-sm);
}

.room-type {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.0625rem;
    margin-bottom: var(--spacing-sm);
}

.room-details {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.room-details span {
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* =====================================================
   Features & Tags
   ===================================================== */
.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.feature-tag {
    background: var(--bg-light);
    border: 1px solid var(--bg-border);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--text-color);
}

/* =====================================================
   Footer
   ===================================================== */
footer {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-3xl);
    text-align: center;
}

footer p {
    margin: 0;
}

footer p + p {
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
    opacity: 0.8;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar .container {
        gap: var(--spacing-lg);
    }
    
    .property-title {
        font-size: 1.5rem;
    }
    
    .property-header .property-price {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .property-header .property-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* =====================================================
   Filter Component
   ===================================================== */
.filters-container {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.filters-form {
    width: 100%;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.filter-separator {
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.filter-input,
.filter-select {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-color);
    background: white;
    transition: all var(--transition-base);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(210, 29%, 24%, 0.1);
}

.filter-input::placeholder {
    color: var(--text-muted);
}

.filter-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.filter-actions .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Responsive filters */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   Virtual Tours Section
   ===================================================== */
.virtual-tours {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.virtual-tour-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
}

.virtual-tour-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.virtual-tour-item .btn {
    margin-left: auto;
}

.virtual-tour-item .material-symbols-outlined {
    font-size: 1.5rem;
}

/* =====================================================
   Gallery Modal / Lightbox
   ===================================================== */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-nav.prev {
    left: 20px;
}

.gallery-modal-nav.next {
    right: 20px;
}

.gallery-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.gallery-item {
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: all var(--transition-base);
    pointer-events: none;
    z-index: 1;
}

.gallery-item:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 2;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .gallery-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .gallery-modal-nav.prev {
        left: 10px;
    }
    
    .gallery-modal-nav.next {
        right: 10px;
    }
    
    .gallery-modal-close {
        width: 45px;
        height: 45px;
        top: 10px;
        right: 10px;
    }
    
    .gallery-modal-counter {
        bottom: 20px;
        font-size: 0.875rem;
        padding: 8px 16px;
    }
}

/* =====================================================
   Material Symbols Icons (Optional Enhancement)
   ===================================================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
}

/* =====================================================
   Navigation Active States
   ===================================================== */
.nav-links a.active {
    background: hsla(0, 0%, 100%, 0.1);
}

/* =====================================================
   Office Cards
   ===================================================== */
.office-card-inactive {
    cursor: default;
    opacity: 0.6;
}

.office-card-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
}

.office-icon-emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.office-icon-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.office-name-header {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
}

.office-stats-section {
    border-top: 1px solid var(--bg-border);
    padding-top: 1rem;
    margin-top: 0.75rem;
}

.office-stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.office-stat-label {
    color: var(--text-muted);
}

.office-price-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-border);
}

.office-price-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.office-price-value {
    font-size: 1.25rem;
    margin: 0;
}

.office-inactive-badge {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.status-badge-inactive {
    background: #999;
}

/* =====================================================
   Footer Subtitle
   ===================================================== */
.footer-subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* =====================================================
   Filter Section
   ===================================================== */
.filter-section {
    margin-top: 2rem;
}

.filter-results-banner {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: hsl(210, 29%, 97%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-results-count {
    color: var(--primary-color);
}

.filter-results-summary {
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.property-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

/* Virtual Tours Section */
.virtual-tours-section {
    margin-top: 2rem;
}

.virtual-tour-item {
    margin-bottom: 1rem;
}

.tour-icon {
    vertical-align: middle;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.tour-link {
    text-decoration: none;
}

/* Features Categories */
.feature-category-title {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

/* Map Placeholder */
.map-placeholder {
    background: var(--light-gray);
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.map-placeholder-text {
    color: #6c757d;
}

.map-placeholder-note {
    color: #6c757d;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Footer */
.listing-id-footer {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}
