/* Color Variables */
:root {
    /* Main Colors - New Color Scheme */
    --primary: #006D77;    /* Dark Blue - 25% usage */
    --accent: #C38264;     /* Cupru - 10% usage */
    --neutral: #2C3E50;    /* Text Color - 10% usage */
    --background: #F5F5F5; /* Light Gray - 55% usage */
    --accent-hover: #E8AA89; /* Cupru deschis - pentru hover */
    
    /* Derived Colors */
    --text-dark: var(--neutral);
    --text-medium: rgba(44, 62, 80, 0.7);
    --white: #FFFFFF;
    --shadow: rgba(27, 54, 93, 0.1);
    
    /* Typography */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Montserrat Medium', 'Montserrat', sans-serif;
    --button-font: var(--body-font);
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Montserrat:wght@400;500;600&family=Baskervville&display=swap');

body {
    background-color: var(--white); 
    font-family: var(--body-font);
}

/* Apartments Header Styles */
.apartments-header {
    position: relative;
    padding: clamp(60px, 8vw, 100px) 0 clamp(60px, 8vw, 120px);
    margin-top: 80px; /* Exact înălțimea navbar-ului */
    overflow: hidden;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.header-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 min(20px, 5%);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(20px, 5vw, 40px);
    align-items: center;
    box-sizing: border-box;
    margin-top: 20px; /* Spațiu suplimentar între marginea de sus și conținut */
}

.header-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mega-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: clamp(15px, 3vw, 24px);
    color: var(--primary);
    font-weight: 600;
    font-family: var(--heading-font);
    text-align: left;
}

.mega-title .accent-text {
    color: var(--accent);
}

.header-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-medium);
    margin-bottom: clamp(20px, 4vw, 32px);
    text-align: left;
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 3vw, 24px);
    margin-top: clamp(20px, 5vw, 40px);
    width: 100%;
}

.stat-item {
    text-align: center;
    padding: clamp(10px, 2.5vw, 20px);
    background: var(--white);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.stat-number {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: clamp(5px, 1vw, 8px);
    font-family: var(--heading-font);
}

.stat-label {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: #666;
}

.header-image {
    height: clamp(300px, 50vw, 700px);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(15px, 3vw, 30px);
    box-shadow: 0 clamp(10px, 2vw, 20px) clamp(20px, 4vw, 40px) rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    display: block;
    backface-visibility: hidden;
    max-width: 100%;
}

.header-image:hover img {
    transform: scale(1.02);
    border-color: var(--accent-hover);
}

/* Buildings Section Styles */
.buildings-section {
    padding: 60px 0;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.building-category {
    margin-bottom: 80px;
    width: 100%;
}

.building-category h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    font-family: var(--heading-font);
}

.building-category h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #2c3e50;
    border-radius: 2px;
}

.apartment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.apartment-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.apartment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(232, 170, 137, 0.2);
}

.apartment-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.apartment-info {
    padding: 24px;
}

.apartment-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-family: var(--heading-font);
}

.apartment-info p {
    color: var(--text-medium);
    margin-bottom: 20px;
}

.apartment-features {
    color: var(--text-medium);
}

.apartment-price {
    color: var(--primary);
    font-weight: bold;
}

.apartment-status {
    background: var(--accent);
    color: var(--white);
}

.view-details {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
    font-family: var(--body-font);
}

.view-details:hover {
    background: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .apartments-header {
        min-height: auto;
        padding: clamp(50px, 7vw, 80px) clamp(10px, 3vw, 20px) clamp(30px, 6vw, 60px);
        margin-top: 80px;
    }

    .header-container {
        grid-template-columns: 1fr;
        gap: clamp(20px, 5vw, 40px);
        width: 100%;
        max-width: min(800px, 90%);
        margin: 0 auto;
        justify-items: center;
    }

    .header-content {
        padding-right: 0;
        margin: 0 auto;
        width: 100%;
        max-width: min(600px, 90%);
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }

    .mega-title {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .header-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 90%;
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    }

    .header-stats {
        justify-content: center;
        margin: clamp(15px, 3vw, 30px) auto 0;
        max-width: min(600px, 90%);
        width: 100%;
    }

    .header-image {
        height: clamp(300px, 50vw, 500px);
        margin: 0 auto;
        max-width: min(700px, 90%);
        width: 100%;
    }
}

/* Adaugă suport specific pentru tablete în orientarea landscape */
@media (min-width: 769px) and (max-width: 992px) and (orientation: landscape) {
    .header-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: center;
        max-width: 900px;
        padding: 0 20px;
        margin: 0 auto;
    }
    
    .header-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .mega-title,
    .header-description {
        text-align: left;
        width: 100%;
    }
    
    .header-image {
        height: 450px;
        width: 100%;
    }
}

/* Tablete mari în orientare portrait */
@media (min-width: 769px) and (max-width: 992px) and (orientation: portrait) {
    .header-image {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .apartments-header {
        padding: clamp(40px, 6vw, 60px) clamp(10px, 3vw, 20px) clamp(40px, 6vw, 60px);
        margin-top: 80px; /* Menține aceeași distanță ca navbar-ul */
        width: 100%;
    }

    .header-container {
        grid-template-columns: 1fr;
        gap: clamp(15px, 4vw, 30px);
        padding: 0 clamp(5px, 3vw, 15px);
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mega-title {
        font-size: clamp(1.6rem, 5vw, 2.5rem);
        text-align: center;
        margin-bottom: clamp(10px, 3vw, 20px);
        padding: 0;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .header-description {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
        text-align: center;
        margin: 0 auto clamp(15px, 4vw, 30px);
        width: 100%;
        max-width: 90%;
        box-sizing: border-box;
    }

    .header-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(8px, 2vw, 15px);
        margin: 0 auto;
        width: 100%;
        max-width: 90%;
        box-sizing: border-box;
    }

    .stat-item {
        padding: clamp(8px, 2vw, 15px) clamp(5px, 1.5vw, 10px);
    }

    .stat-number {
        font-size: clamp(1.4rem, 3vw, 2rem);
    }

    .stat-label {
        font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    }

    .header-image {
        height: clamp(200px, 45vw, 400px);
        margin: 0 auto;
        width: 90%;
        display: flex;
        justify-content: center;
    }

    .buildings-section {
        padding: 40px 15px;
        width: 100%;
    }

    .container {
        width: 90%;
        max-width: 600px;
        margin: 0 auto;
        padding: 0;
    }

    .building-category {
        margin-bottom: 60px;
        width: 100%;
    }

    .building-category h2 {
        font-size: 2rem;
        margin-bottom: 30px;
        text-align: center;
    }

    .apartment-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
        width: 100%;
    }

    .apartment-card {
        width: 100%;
        margin: 0 auto;
        max-width: 400px;
    }

    .apartment-info {
        text-align: center;
        padding: 20px;
    }

    .view-details {
        width: 100%;
        display: block;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .apartments-header {
        padding: clamp(40px, 6vw, 60px) clamp(8px, 2vw, 15px) clamp(35px, 5vw, 50px);
        margin-top: 80px;
        width: 100%;
    }
    
    .header-container {
        width: 100%;
        padding: 0 clamp(5px, 1.5vw, 10px);
        box-sizing: border-box;
    }
    
    .mega-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        line-height: 1.3;
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        text-align: center;
    }
    
    .header-description {
        font-size: clamp(0.85rem, 2vw, 1.05rem);
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        text-align: center;
    }
    
    .header-image {
        height: clamp(180px, 60vw, 350px);
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .apartments-header {
        padding: clamp(35px, 5vw, 50px) clamp(5px, 1.5vw, 10px) clamp(30px, 5vw, 40px);
        margin-top: 80px;
        width: 100%;
    }

    .header-container {
        padding: 0 clamp(5px, 1.5vw, 10px);
        width: 100%;
        box-sizing: border-box;
    }

    .header-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .mega-title {
        font-size: clamp(1.4rem, 5.5vw, 2rem);
        line-height: 1.3;
        letter-spacing: -0.01em;
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .header-description {
        font-size: clamp(0.8rem, 3vw, 1rem);
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .header-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(5px, 2vw, 10px);
        width: 100%;
        box-sizing: border-box;
        margin: clamp(10px, 4vw, 20px) auto;
    }

    .stat-item {
        padding: clamp(6px, 2vw, 12px) clamp(4px, 1.5vw, 8px);
    }

    .stat-number {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    .stat-label {
        font-size: clamp(0.6rem, 2vw, 0.8rem);
    }

    .header-image {
        height: clamp(150px, 55vw, 300px);
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .buildings-section {
        padding: 30px 10px;
    }

    .container {
        width: 90%;
    }

    .building-category {
        margin-bottom: 40px;
    }

    .building-category h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .apartment-grid {
        gap: 15px;
        margin-top: 25px;
    }

    .apartment-card {
        max-width: 100%;
    }
}

@media (max-width: 375px) {
    .apartments-header {
        padding: clamp(30px, 5vw, 45px) clamp(5px, 1.5vw, 10px) clamp(25px, 4vw, 35px);
        margin-top: 80px;
        width: 100%;
    }
    
    .header-container {
        width: 100%;
        padding: 0 clamp(2px, 1vw, 5px);
        box-sizing: border-box;
    }
    
    .mega-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        line-height: 1.3;
        margin-bottom: clamp(8px, 2vw, 15px);
        text-align: center;
        width: 100%;
        padding: 0;
    }
    
    .header-description {
        font-size: clamp(0.75rem, 2.5vw, 0.95rem);
        line-height: 1.5;
        margin-bottom: clamp(10px, 3vw, 20px);
        text-align: center;
        width: 100%;
        padding: 0;
    }
    
    .header-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(4px, 1.5vw, 8px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .stat-item {
        padding: clamp(5px, 1.5vw, 10px) clamp(2px, 1vw, 5px);
    }
    
    .stat-number {
        font-size: clamp(1.1rem, 4vw, 1.6rem);
        margin-bottom: clamp(2px, 1vw, 5px);
    }
    
    .stat-label {
        font-size: clamp(0.6rem, 2vw, 0.75rem);
    }
    
    .header-image {
        height: clamp(130px, 50vw, 250px);
        width: 100%;
        max-width: 100%;
        margin: clamp(10px, 3vw, 20px) auto 0;
    }
}

/* Media query pentru orientarea landscape pe mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .apartments-header {
        padding: clamp(30px, 5vw, 45px) clamp(8px, 2vw, 15px) clamp(25px, 4vw, 35px);
        margin-top: 80px;
        width: 100%;
    }
    
    .header-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(10px, 2.5vw, 20px);
        align-items: center;
        width: 100%;
        padding: 0 clamp(5px, 1.5vw, 10px);
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .mega-title {
        font-size: clamp(1.5rem, 4vw, 2.2rem);
        text-align: left;
        margin-bottom: clamp(5px, 1.5vw, 10px);
        width: 100%;
    }
    
    .header-description {
        font-size: clamp(0.8rem, 1.8vw, 1rem);
        text-align: left;
        margin-bottom: clamp(8px, 2vw, 15px);
        width: 100%;
    }
    
    .header-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(5px, 1.5vw, 10px);
        margin-top: clamp(8px, 2vw, 15px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .header-image {
        height: clamp(180px, 40vw, 350px);
        width: 100%;
        max-width: 100%;
    }
}

/* Media query pentru dispozitive foarte mici (< 320px) */
@media (max-width: 320px) {
    .apartments-header {
        padding: clamp(25px, 4vw, 35px) clamp(4px, 1vw, 8px) clamp(15px, 3vw, 25px);
        margin-top: 80px;
    }
    
    .mega-title {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
        line-height: 1.25;
    }
    
    .header-description {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
        line-height: 1.4;
        margin-bottom: clamp(8px, 2vw, 15px);
    }
    
    .header-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(5px, 2vw, 10px);
    }
    
    .stat-item {
        padding: clamp(5px, 2vw, 10px);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
    }
    
    .stat-number {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
        margin-bottom: 0;
        margin-right: clamp(5px, 2vw, 10px);
    }
    
    .stat-label {
        font-size: clamp(0.6rem, 2vw, 0.8rem);
    }
    
    .header-image {
        height: clamp(100px, 40vw, 180px);
    }
}

/* Animație pentru stats pentru o experiență vizuală mai bună pe toate dispozitivele */
.stat-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Ajustări pentru imagini pe dispozitive cu pixel ratio mare (retina)  */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .header-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Lightbox Styles */
.lightbox {position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {opacity: 1;
    visibility: visible;}

.lightbox-content {position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: 20px;}

.lightbox-content img {max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);}

.lightbox-title {color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.5rem;}

.lightbox-close {position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;}

.lightbox-close:hover {background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);}

.lightbox-nav {position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;}

.lightbox-prev,
.lightbox-next {background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: auto;}

.lightbox-prev:hover,
.lightbox-next:hover {background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);}

.lightbox-counter {position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1rem;
    font-weight: 500;}

.filters-section {
    background: var(--white);
    border-bottom: 1px solid var(--shadow);
}

.filter-button {background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);}

.filter-button:hover,
.filter-button.active {background: var(--accent-hover);
    color: var(--white);
    border-color: var(--accent-hover);}

/* Media query pentru orientare portrait pe toate dispozitivele */
@media (orientation: portrait) {
    .header-container {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    
    .header-content {
        align-items: center;
        text-align: center;
        order: 1;
        max-width: min(600px, 90%);
    }
    
    .header-image {
        order: 2;
        margin: 0 auto;
        height: clamp(250px, 60vw, 500px);
    }
    
    .mega-title, .header-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .header-stats {
        justify-content: center;
    }
}

/* Accentuează centrarea pe telefoane mici în orice orientare */
@media (max-width: 480px) {
    .header-content, .header-image {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .mega-title, .header-description {
        text-align: center;
        width: 100%;
        padding: 0;
    }
    
    .header-stats {
        width: 100%;
        justify-content: center;
        margin: 20px auto;
    }
}

/* Modificare pentru a îmbunătăți spațierea pe dispozitive mari */
@media (min-width: 1600px) {
    .apartments-header {
        padding-top: clamp(80px, 10vw, 120px);
    }
    
    .header-container {
        margin-top: 30px;
        max-width: 1600px;
    }
    
    .mega-title {
        font-size: 4rem;
    }
    
    .header-description {
        font-size: 1.4rem;
        max-width: 90%;
    }
}

/* Ajustare pentru height-ul imaginii pe dispozitive foarte mari */
@media (min-width: 2000px) {
    .header-image {
        height: 800px;
        max-width: 900px;
    }
} 