/* ============================================
   BuildEra Developer Site - Premium Styles
   Modern, Dynamic, Luxury Real Estate
   Colors from buildera.ae - White & Green theme
   ============================================ */

/* === CSS Variables === */
:root {
    /* Colors - BuildEra brand palette (white bg, green accents) */
    --primary: #ffffff;
    --primary-light: #f8faf9;
    --primary-dark: #f0f4f2;
    --accent: #2d5a45;
    --accent-light: #3d7a5d;
    --accent-dark: #1d4a35;
    --accent-gold: #2d5a45;
    --green: #2d5a45;
    --green-light: #e8f0ec;
    --white: #ffffff;
    --black: #1a1a1a;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Secondary colors */
    --success: #22c55e;
    --error: #ef4444;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: 120px;
    --container-width: 1280px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* === Preloader === */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    animation: loading 1.5s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === Container === */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-normal);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    z-index: 10;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(45, 90, 69, 0.3);
}

.btn-primary.large {
    padding: 18px 36px;
    font-size: 15px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--green-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid var(--accent);
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid var(--accent);
    transition: all var(--transition-normal);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-outline.large {
    padding: 16px 32px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.btn-icon {
    font-size: 16px;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 249, 0.75) 100%);
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 24px;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(45, 90, 69, 0.1);
    border: 1px solid rgba(45, 90, 69, 0.3);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 32px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    color: var(--black);
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 8px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--gray-300);
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* === Animations === */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(45, 90, 69, 0.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
    max-width: 600px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* === About Section === */
.about {
    background: var(--green-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 40px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.about-feature:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 14px;
    color: var(--gray-600);
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(26, 26, 46, 0.6) 100%);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 140px;
    height: 140px;
    background: var(--accent);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.exp-number {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.exp-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

/* === Apartments Section === */
.apartments-filters {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    padding: 24px 32px;
    background: var(--gray-100);
    border-radius: 16px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    border-radius: 50px;
    border: 1px solid var(--gray-300);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.filter-range {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-range input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.filter-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
}

/* Apartments Grid */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.apartments-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-600);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

/* Apartment Card */
.apartment-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
}

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

.apartment-card.highlighted {
    animation: highlight-pulse 2s ease-in-out;
    box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg);
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg); }
    50% { box-shadow: 0 0 0 8px rgba(45, 90, 69, 0.3), var(--shadow-lg); }
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.apartment-card:hover .card-image img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
}

.card-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.card-favorite:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.card-content {
    padding: 24px;
}

.card-complex {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.card-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--gray-600);
    font-size: 14px;
}

.card-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.price-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.price-per-sqm {
    font-size: 13px;
    color: var(--gray-500);
}

.card-action {
    padding: 12px 24px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-fast);
}

.card-action:hover {
    background: var(--accent);
    color: var(--white);
}

.apartments-footer {
    text-align: center;
    margin-top: 48px;
}

.apartments-count {
    margin-top: 20px;
    color: var(--gray-600);
    font-size: 14px;
}

/* === Apartment Modal === */
.apartment-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.apartment-modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9) translateY(40px);
    transition: all var(--transition-slow);
}

.apartment-modal.open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.5);
    color: var(--white);
    font-size: 28px;
    border-radius: 50%;
    z-index: 10;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent);
    color: var(--primary);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 90vh;
}

.modal-gallery {
    position: relative;
    height: 100%;
    min-height: 500px;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 40px;
    overflow-y: auto;
}

.modal-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(45, 90, 69, 0.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.modal-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.modal-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.spec-item {
    padding: 16px;
    background: var(--gray-100);
    border-radius: 12px;
    text-align: center;
}

.spec-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.spec-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-top: 4px;
}

.modal-price {
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.modal-price-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.modal-price-label {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    gap: 16px;
}

.modal-actions .btn-primary {
    flex: 1;
    justify-content: center;
}

/* === Features Section === */
.features {
    background: var(--accent);
    color: var(--white);
}

.features .section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.features .section-title {
    color: var(--white);
}

.features .section-subtitle {
    color: rgba(255,255,255,0.8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.4);
}

.feature-card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--white);
}

.feature-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

/* === Gallery Section === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
}

/* === Contacts Section === */
.contacts {
    background: var(--gray-100);
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-text p,
.contact-text a {
    font-size: 16px;
    color: var(--gray-900);
}

.contact-text a:hover {
    color: var(--accent);
}

.contact-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--gray-700);
    transition: color var(--transition-fast);
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.social-link:hover svg {
    color: var(--primary);
}

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 400px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === Footer === */
.footer {
    background: var(--accent);
    color: var(--white);
    padding: 60px 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand p {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-copy p {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

/* === Page Transition === */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--primary);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 24px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 16px 16px;
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .nav-link {
        padding: 16px 0;
        color: var(--gray-800);
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: var(--accent);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-actions {
        margin-right: 8px;
    }
    
    .nav-actions .btn-primary {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-image iframe {
        max-width: 100%;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-gallery {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    .hero-content {
        padding: 0 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .apartments-grid {
        grid-template-columns: 1fr;
    }
    
    .apartments-filters {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .about-text {
        font-size: 15px;
        margin-bottom: 28px;
    }
    
    .about-features {
        gap: 16px;
    }
    
    .about-feature {
        padding: 16px;
        gap: 14px;
    }
    
    .feature-icon {
        font-size: 26px;
    }
    
    .feature-text h4 {
        font-size: 16px;
    }
    
    .contact-item {
        padding: 16px;
        gap: 14px;
    }
    
    .map-wrapper {
        height: 280px;
    }
    
    .section-title {
        font-size: clamp(26px, 5vw, 48px);
    }
    
    .modal-content {
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 48px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .hero-badge {
        font-size: 11px;
        padding: 8px 16px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .hero-scroll {
        display: none;
    }
    
    .about-image iframe {
        height: 480px !important;
    }
    
    .modal-info {
        padding: 20px;
    }
    
    .modal-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .card-content {
        padding: 18px;
    }
    
    .card-details {
        gap: 12px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .price-value {
        font-size: 20px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .footer {
        padding: 40px 0;
    }
    
    .footer-content {
        gap: 24px;
    }
}

/* === Smooth Section Scroll Highlight === */
.section-highlight {
    animation: section-glow 1s ease-out;
}

@keyframes section-glow {
    0% { box-shadow: inset 0 0 0 4px var(--accent); }
    100% { box-shadow: inset 0 0 0 0 transparent; }
}
