/*
 * Layout Components
 * Grid systems, page layouts, and structural elements
 */

/* =============================================================================
   Grid Systems
   ============================================================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--grid-gap);
    margin-bottom: 2rem;
}

.apartments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    min-height: 400px; /* Prevent layout shift during loading */
}

.building-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Gallery grid variations for different image counts */
.building-gallery-grid:has(.gallery-item:nth-child(1):nth-last-child(1)) {
    grid-template-columns: 1fr;
    max-width: 600px;
}

.building-gallery-grid:has(.gallery-item:nth-child(2):nth-last-child(1)) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
}

.building-gallery-grid:has(.gallery-item:nth-child(3):nth-last-child(1)) {
    grid-template-columns: repeat(3, 1fr);
}

.building-gallery-grid:has(.gallery-item:nth-child(4):nth-last-child(1)) {
    grid-template-columns: repeat(2, 1fr);
}

.building-gallery-grid:has(.gallery-item:nth-child(5):nth-last-child(1)),
.building-gallery-grid:has(.gallery-item:nth-child(6):nth-last-child(1)) {
    grid-template-columns: repeat(3, 1fr);
}

/* =============================================================================
   Page Layouts
   ============================================================================= */

.site-content {
    min-height: 50vh;
}

.site-content-full-width {
    padding: 0;
}

.site-content-full-width .container {
    /* max-width: none; */
    padding: 0;
}

/* Page Header */
.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
    padding: 2rem 0;
}

.page-title {
    font-size: var(--font-size-h1);
    color: var(--blue-invest-dark);
    margin-bottom: 1rem;
}

.taxonomy-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    max-width: 800px;
    margin: 0 auto;
}

/* =============================================================================
   Building and Apartment Layouts
   ============================================================================= */

.building-display-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.building-main-image {
    position: relative;
}

.building-main-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
}

.apartment-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

/* Floor Display */
.floor-display-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.floor-plan-section {
    text-align: center;
}

.floor-plan-section img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
}

/* =============================================================================
   Interactive Elements
   ============================================================================= */

.building-interactive-container {
    position: relative;
    display: inline-block;
}

.building-interactive-container img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
}

/* Floor Hotspots */
.floor-hotspot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(26, 90, 156, 0.5);
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid rgba(219, 233, 247, 0.7);
}

.floor-hotspot:hover,
.floor-hotspot.active {
    background-color: rgba(165, 200, 231, 0.9);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(91, 155, 213, 0.5);
}

.floor-hotspot-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--blue-invest-dark);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-tooltip);
}

.floor-hotspot:hover .floor-hotspot-label,
.floor-hotspot.active .floor-hotspot-label {
    opacity: 1;
    visibility: visible;
}

/* Child Building Hotspots (SVG Polygon-based) */
.polygon-overlay {
    pointer-events: none;
}

.child-building-polygon {
    transition: all var(--transition-base);
    pointer-events: all;
}

.child-building-polygon:hover {
    filter: drop-shadow(0 0 8px rgba(91, 155, 213, 0.5));
}

.polygon-tooltip {
    position: absolute;
    background-color: var(--blue-invest-dark);
    color: var(--text-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-small);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: var(--z-tooltip);
}

/* =============================================================================
   Contact and Map Layouts
   ============================================================================= */

.contact-and-map-section {
    padding: var(--section-spacing) 0;
    /* background: linear-gradient(135deg, var(--background-light) 0%, var(--background-muted) 100%); */
    position: relative;
}

.contact-and-map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-invest-accent), transparent);
}

.contact-map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 3rem;
    min-height: 500px;
}

.map-half {
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-base);
}

.map-half:hover {
    transform: scale(1.02);
}

.map-container {
    width: 100%;
    height: 100%;
}

.map-container iframe {
    border-radius: var(--card-radius);
}

/* =============================================================================
   Section Layouts
   ============================================================================= */

.section-title {
    font-size: var(--font-size-h2);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--blue-invest-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-invest-medium), var(--blue-invest-light));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--line-height-relaxed);
}

/* Homepage sections */
.homepage-projects-section {
    padding: var(--section-spacing) 0;
}

/* =============================================================================
   Child Buildings and Projects Layouts
   ============================================================================= */

.child-buildings-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.child-buildings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.child-buildings-header h2 {
    color: var(--blue-invest-dark);
    margin: 0;
    font-size: 2rem;
}

.back-to-projects {
    color: var(--blue-invest-medium);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--blue-invest-medium);
    border-radius: 25px;
    transition: all var(--transition-base);
}

.back-to-projects:hover {
    background: var(--blue-invest-medium);
    color: var(--text-light);
}

.child-buildings-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
}

.child-buildings-image-container {
    position: relative;
}

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

/* =============================================================================
   Results and Listings
   ============================================================================= */

.apartment-results-section {
    margin-top: 2.5rem;
    position: relative;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-header h3 {
    color: var(--blue-invest-dark);
    margin: 0;
    font-size: var(--font-size-h3);
}

.results-count {
    color: var(--text-muted);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
}

/* =============================================================================
   Gallery Layouts
   ============================================================================= */

.building-gallery-section {
    margin: 4rem 0;
    padding: 2rem 0;
    /* background: linear-gradient(135deg, var(--background-light) 0%, var(--background-muted) 100%); */
}

.gallery-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--blue-invest-dark);
    font-size: 2rem;
    font-weight: var(--font-weight-semibold);
}

/* =============================================================================
   Taxonomy and Archive Layouts
   ============════================================================================= */

.taxonomy-info {
        padding: 1.5rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
}

.taxonomy-info strong {
    color: var(--blue-invest-dark);
    font-weight: var(--font-weight-semibold);
}

.back-to-building {
    margin-bottom: 1.25rem;
}

.back-to-building a {
    color: var(--blue-invest-medium);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
    text-decoration: none;
}

.back-to-building a:hover {
    color: var(--blue-invest-dark);
}

.back-to-building a::before {
    content: "← ";
    margin-right: 0.25rem;
}

/* =============================================================================
   Loading States
   ============================================================================= */

.apartments-grid.loading {
    position: relative;
    opacity: 0.3;
    pointer-events: none;
}

.apartments-grid.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: var(--z-modal-backdrop);
}

.apartment-results-section .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    z-index: var(--z-modal);
    min-width: 200px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.75rem 1.25rem;
    color: var(--blue-invest-medium);
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid var(--background-light);
    border-top: 4px solid var(--blue-invest-medium);
    border-radius: var(--radius-round);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   Utility Layout Classes
   ============================================================================= */

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-visible { overflow: visible; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ==========================================================================
   TEAM PAGE STYLES
   ========================================================================== */

   .team-introduction {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.team-members-wrapper {
    margin-bottom: 4rem;
}

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.team-member-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.team-member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.member-photo {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-member-card:hover .member-image {
    transform: scale(1.05);
}

.member-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 4rem;
}

.member-info {
    padding: 2rem;
}

.member-name {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.member-position {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.member-department {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.member-bio {
    margin-bottom: 1.5rem;
}

.member-bio p {
    color: #495057;
    line-height: 1.6;
    margin: 0;
}

.member-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-btn i {
    font-size: 1rem;
}

.phone-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.phone-btn:hover {
    background: linear-gradient(135deg, #218838, #1ba085);
    transform: translateY(-2px);
}

.email-btn {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

.email-btn:hover {
    background: linear-gradient(135deg, #0056b3, #520dc2);
    transform: translateY(-2px);
}

.linkedin-btn {
    background: linear-gradient(135deg, #0077b5, #005885);
    color: white;
}

.linkedin-btn:hover {
    background: linear-gradient(135deg, #005885, #004060);
    transform: translateY(-2px);
}

.contact-info {
    font-size: 0.85rem;
    color: #6c757d;
    flex-grow: 1;
    text-align: right;
}

.quick-call-section {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.quick-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-call-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff8c00);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.no-team-members {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.team-statistics-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
}

.team-statistics-section .section-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.team-stat-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.team-stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.team-stat-item .stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f8f9fa;
}

.team-stat-item .stat-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .about-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text-column,
    .about-images-column {
        padding: 0;
    }
    
    .contact-map-section-full,
    .contact-form-section-full {
        margin-top: 2rem;
    }
    
    .team-members-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-info-section,
    .working-hours-section,
    .office-locations-section,
    .contact-form-section-full,
    .contact-map-section-full {
        padding: 1.5rem;
    }
    
    .working-day {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .contact-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .contact-info {
        text-align: left;
    }
    
    .statistics-grid,
    .team-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .member-info {
        padding: 1.5rem;
    }
    
    .member-photo {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1rem 0;
        margin-bottom: 0;
    }
    
    .about-introduction,
    .team-introduction {
        padding: 1.5rem;
    }
    
    .about-statistics,
    .team-statistics-section {
        padding: 2rem 1rem;
    }
    
    .stat-number,
    .team-stat-item .stat-number {
        font-size: 2rem;
    }
    
    .contact-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .quick-call-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}


/* ==========================================================================
   ABOUT PAGE STYLES
   ========================================================================== */

   .about-hero-section {
    margin-bottom: 3rem;
    text-align: center;
}

.about-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content-wrapper {
    margin-bottom: 4rem;
}

.about-introduction {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-text-column {
    padding-right: 1rem;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section .section-title {
    color: #3498db;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.about-images-column {
    padding-left: 1rem;
}

.about-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    /* height: 200px; */
    object-fit: cover;
}

.gallery-caption {
    padding: 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

.about-statistics {
    background-color: #2c3e50;
    color: white;
    padding: 3rem;
    border-radius: 10px;
    margin-top: 3rem;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-description {
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* =============================================================================
   Google Maps Styles
   ============================================================================= */

.building-location-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.map-container {
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    /* height: 400px; */
    position: relative;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--card-radius);
}