﻿/* ===================================
   MATERIAL DESIGN 3 - INMOBILIARIA RETA
   Sistema de diseño completo
   ===================================*/

/* Material Design 3 - Color Tokens */
:root {
    /* Primary Colors - Teal/Green Corporate */
    --md-primary: #16a085;
    --md-on-primary: #ffffff;
    --md-primary-container: #b2dfdb;
    --md-on-primary-container: #004d40;
    
    /* Secondary Colors */
    --md-secondary: #26a69a;
    --md-on-secondary: #ffffff;
    --md-secondary-container: #b2dfdb;
    --md-on-secondary-container: #00695c;
    
    /* Tertiary Colors */
    --md-tertiary: #ff9800;
    --md-on-tertiary: #ffffff;
    --md-tertiary-container: #ffe0b2;
    --md-on-tertiary-container: #e65100;
    
    /* Error Colors */
    --md-error: #ba1a1a;
    --md-on-error: #ffffff;
    --md-error-container: #ffdad6;
    --md-on-error-container: #410002;
    
    /* Surface Colors */
    --md-surface: #fafdfb;
    --md-on-surface: #191c1b;
    --md-surface-variant: #dbe5e0;
    --md-on-surface-variant: #3f4946;
    --md-surface-container-lowest: #ffffff;
    --md-surface-container-low: #f1f4f2;
    --md-surface-container: #ebeeec;
    --md-surface-container-high: #e5e8e6;
    --md-surface-container-highest: #dfe2e0;
    
    /* Outline */
    --md-outline: #6f7975;
    --md-outline-variant: #bfc9c4;
    
    /* Background */
    --md-background: #f8faf9;
    --md-on-background: #191c1b;
    
    /* Shadows - Material 3 Elevation */
    --md-elevation-1: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-elevation-2: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --md-elevation-4: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px 0 rgba(0, 0, 0, 0.3);
    --md-elevation-5: 0 8px 12px 6px rgba(0, 0, 0, 0.15), 0 4px 4px 0 rgba(0, 0, 0, 0.3);
    
    /* Motion - Material 3 Easing */
    --md-easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --md-easing-emphasized: cubic-bezier(0.2, 0.0, 0, 1);
    --md-easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --md-easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
    
    /* Duration */
    --md-duration-short: 200ms;
    --md-duration-medium: 300ms;
    --md-duration-long: 400ms;
    
    /* Border Radius - Material 3 Shape */
    --md-shape-corner-none: 0px;
    --md-shape-corner-extra-small: 4px;
    --md-shape-corner-small: 8px;
    --md-shape-corner-medium: 12px;
    --md-shape-corner-large: 16px;
    --md-shape-corner-extra-large: 28px;
    --md-shape-corner-full: 9999px;
}

/* Material Design 3 - Typography Scale */
.md-display-large {
    font-size: 3.5625rem;
    line-height: 4rem;
    font-weight: 400;
    letter-spacing: -0.015625rem;
}

.md-display-medium {
    font-size: 2.8125rem;
    line-height: 3.25rem;
    font-weight: 400;
}

.md-display-small {
    font-size: 2.25rem;
    line-height: 2.75rem;
    font-weight: 400;
}

.md-headline-large {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 400;
}

.md-headline-medium {
    font-size: 1.75rem;
    line-height: 2.25rem;
    font-weight: 400;
}

.md-headline-small {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 400;
}

.md-title-large {
    font-size: 1.375rem;
    line-height: 1.75rem;
    font-weight: 500;
}

.md-title-medium {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.009375rem;
}

.md-title-small {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.00625rem;
}

.md-body-large {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.03125rem;
}

.md-body-medium {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.015625rem;
}

.md-body-small {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 400;
    letter-spacing: 0.025rem;
}

.md-label-large {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.00625rem;
}

.md-label-medium {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: 0.03125rem;
}

.md-label-small {
    font-size: 0.6875rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: 0.03125rem;
}

/* Material Design 3 - Cards */
.md-card {
    background: var(--md-surface-container-low);
    border-radius: var(--md-shape-corner-large);
    box-shadow: var(--md-elevation-1);
    transition: box-shadow var(--md-duration-medium) var(--md-easing-standard);
    overflow: hidden;
}

.md-card-elevated {
    background: var(--md-surface-container-low);
    box-shadow: var(--md-elevation-2);
}

.md-card-filled {
    background: var(--md-surface-container-highest);
    box-shadow: none;
}

.md-card-outlined {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    box-shadow: none;
}

.md-card:hover {
    box-shadow: var(--md-elevation-3);
}

/* Material Design 3 - Buttons */
.md-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--md-shape-corner-full);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.00625rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--md-duration-short) var(--md-easing-standard);
    position: relative;
    overflow: hidden;
    min-height: 40px;
}

.md-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.md-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Filled Button */
.md-button-filled {
    background: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-1);
}

.md-button-filled:hover {
    background: color-mix(in srgb, var(--md-primary) 92%, black);
    box-shadow: var(--md-elevation-2);
    color: var(--md-on-primary);
}

/* Outlined Button */
.md-button-outlined {
    background: transparent;
    color: var(--md-primary);
    border: 1px solid var(--md-outline);
}

.md-button-outlined:hover {
    background: color-mix(in srgb, var(--md-primary) 8%, transparent);
    color: var(--md-primary);
}

/* Text Button */
.md-button-text {
    background: transparent;
    color: var(--md-primary);
    box-shadow: none;
}

.md-button-text:hover {
    background: color-mix(in srgb, var(--md-primary) 8%, transparent);
    color: var(--md-primary);
}

/* Tonal Button */
.md-button-tonal {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

.md-button-tonal:hover {
    background: color-mix(in srgb, var(--md-secondary-container) 92%, black);
    box-shadow: var(--md-elevation-1);
    color: var(--md-on-secondary-container);
}

/* FAB - Floating Action Button */
.md-fab {
    width: 56px;
    height: 56px;
    border-radius: var(--md-shape-corner-large);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    box-shadow: var(--md-elevation-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all var(--md-duration-short) var(--md-easing-standard);
}

.md-fab:hover {
    box-shadow: var(--md-elevation-4);
}

.md-fab-extended {
    width: auto;
    padding: 0 20px;
    gap: 12px;
}

/* Material Design 3 - Chips */
.md-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--md-shape-corner-small);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--md-outline);
    background: transparent;
    color: var(--md-on-surface-variant);
    transition: all var(--md-duration-short) var(--md-easing-standard);
    cursor: pointer;
}

.md-chip:hover {
    background: color-mix(in srgb, var(--md-on-surface-variant) 8%, transparent);
}

.md-chip-elevated {
    border: none;
    background: var(--md-surface-container-low);
    box-shadow: var(--md-elevation-1);
}

.md-chip-assist {
    border-color: var(--md-outline);
}

.md-chip-filter {
    border-color: var(--md-outline);
}

.md-chip-filter.selected {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
    border-color: var(--md-secondary-container);
}

/* Material Design 3 - Navigation Bar */
.md-navbar {
    background: var(--md-surface-container);
    box-shadow: var(--md-elevation-2);
    padding: 0.75rem 0;
}

.md-nav-item {
    color: var(--md-on-surface-variant);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--md-shape-corner-full);
    transition: all var(--md-duration-short) var(--md-easing-standard);
    font-weight: 500;
    font-size: 0.875rem;
}

.md-nav-item:hover,
.md-nav-item.active {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

/* Material Design 3 - Property Card */
.md-property-card {
    background: var(--md-surface-container-low);
    border-radius: var(--md-shape-corner-extra-large);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
    transition: all var(--md-duration-medium) var(--md-easing-emphasized);
    cursor: pointer;
    text-decoration: none;
    color: var(--md-on-surface);
    display: block;
}

.md-property-card:hover {
    box-shadow: var(--md-elevation-3);
    transform: translateY(-4px);
    color: var(--md-on-surface);
}

.md-property-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--md-surface-variant);
}

.md-property-card-content {
    padding: 1.25rem;
}

.md-property-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--md-on-surface);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.md-property-card-subtitle {
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.md-property-card-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--md-primary);
    margin-bottom: 0.75rem;
}

.md-property-card-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.md-property-card-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
}

/* Material Design 3 - Hero Section */
.md-hero {
    background: linear-gradient(135deg, var(--md-primary-container) 0%, var(--md-surface) 100%);
    padding: 6rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.md-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2316a085' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.md-hero-content {
    position: relative;
    z-index: 1;
}

/* Material Design 3 - Section Headers */
.md-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.md-section-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--md-on-surface);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.md-section-subtitle {
    font-size: 1rem;
    color: var(--md-on-surface-variant);
    max-width: 600px;
    margin: 0 auto;
}

/* Utility Classes */
.md-surface {
    background: var(--md-surface);
}

.md-surface-variant {
    background: var(--md-surface-variant);
}

.md-text-primary {
    color: var(--md-primary);
}

.md-text-on-surface {
    color: var(--md-on-surface);
}

.md-text-on-surface-variant {
    color: var(--md-on-surface-variant);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .md-display-large { font-size: 2.5rem; line-height: 3rem; }
    .md-display-medium { font-size: 2rem; line-height: 2.5rem; }
    .md-display-small { font-size: 1.75rem; line-height: 2.25rem; }
    .md-headline-large { font-size: 1.75rem; line-height: 2.25rem; }
    .md-headline-medium { font-size: 1.5rem; line-height: 2rem; }
    
    .md-hero {
        padding: 4rem 0 3rem 0;
    }
    
    .md-section-title {
        font-size: 1.75rem;
    }
    
    .md-property-card-image {
        height: 180px;
    }
}
