/* EMPREENDIMENTO DETAIL PAGE - GLightbox Gallery + Authority Design */
.empreendimento-detail-page {
    font-family: 'Helvetica', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

.section {
    padding: 70px 0;
}

.bg-light {
    background-color: #f8f9fa;
}

/* HERO SECTION */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(219,74,43,0.15) 0%, rgba(44,62,80,0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-location {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.location-badge, .location-name {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1.15rem;
    font-weight: 500;
}

.location-badge {
    background: #db4a2b;
}

.hero-description {
    font-size: 1.45rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* GALLERY CONTAINER */
.gallery-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* MOSAIC GALLERY (GLightbox Compatible) */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 30px;
    cursor: pointer;
}

.mosaic-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 4/3;
    display: block; /* Critical for GLightbox */
    text-decoration: none; /* Critical for GLightbox */
}

.mosaic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}

.mosaic-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mosaic-item:hover .mosaic-caption {
    transform: translateY(0);
}

/* NO PHOTOS FALLBACK */
.no-photos {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 40px auto;
}

.no-photos-text {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* PROJECT DETAILS */
.project-details {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.project-details h3 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.project-details ul {
    list-style: none;
    padding: 0;
}

.project-details li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    color: #444;
}

.project-details li:last-child {
    border-bottom: none;
}

.project-details strong {
    color: #2c3e50;
    margin-right: 8px;
}

/* LISTINGS GRID (Related) */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.listing-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-8px);
}

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.listing-content {
    padding: 20px;
}

.listing-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.listing-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.listing-content h3 a:hover {
    color: #db4a2b;
}

.listing-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #db4a2b;
    margin: 8px 0 12px;
}

.listing-location {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.view-details {
    display: inline-block;
    background: #db4a2b;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
    text-align: center;
}

.view-details:hover {
    background: #c0392b;
    text-decoration: none;
}

/* CTA SECTION */
.cta-section {
    background: linear-gradient(135deg, #db4a2b 0%, #c0392b 100%);
    color: white;
    text-align: center;
    padding: 90px 0;
}

.cta-box {
    max-width: 850px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2.6rem;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cta-subtitle {
    font-size: 1.45rem;
    opacity: 0.95;
    margin-bottom: 40px;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background: white;
    color: #db4a2b;
    font-weight: 700;
    padding: 16px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* INTERNAL LINKS */
.internal-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.link-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #eee;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #db4a2b;
}

.link-card h3 {
    font-size: 1.55rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.link-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.link-card h3 a:hover {
    color: #db4a2b;
}

.link-card p {
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* SECTION TITLE */
.section-title {
    font-size: 2.4rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 4px;
    background: #db4a2b;
    border-radius: 2px;
}

/* CONTENT BLOCK */
.content-block {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.8;
    color: #444;
}

.content-block p {
    margin-bottom: 20px;
}


/* UNIT TYPES / TYPOLOGIES */
.units-section {
    background: #ffffff;
}

.units-intro {
    max-width: 760px;
    margin: 0 auto 38px;
    text-align: center;
    color: #606770;
    font-size: 1.1rem;
    line-height: 1.7;
}

.units-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    align-items: stretch;
    justify-content: safe center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 18px;
    margin: 0 auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #c7c7c7 transparent;
}

/* One card stays centred instead of stretching across the page. */
.units-grid:has(.unit-card:only-child) {
    justify-content: center;
}

.units-grid::-webkit-scrollbar {
    height: 8px;
}

.units-grid::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 999px;
}

.units-grid::-webkit-scrollbar-track {
    background: transparent;
}

.unit-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    flex: 0 0 calc((100% - 72px) / 4);
    max-width: calc((100% - 72px) / 4);
    min-width: 0;
    scroll-snap-align: center;
}

.unit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(219, 74, 43, 0.45);
}

.unit-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.unit-card-link:hover,
.unit-card-link:focus {
    color: inherit;
    text-decoration: none;
}

.unit-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f1f3f5;
    overflow: hidden;
}

.unit-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.unit-card:hover .unit-card-image img {
    transform: scale(1.035);
}

.unit-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #db4a2b;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.unit-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

.unit-card-body h3 {
    margin: 0 0 13px;
    color: #2c3e50;
    font-size: 1.45rem;
    line-height: 1.3;
}

.unit-card-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.unit-card-facts span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f6f7f8;
    color: #5c636a;
    font-size: 0.88rem;
    line-height: 1.2;
}

.unit-card-description {
    margin: 0 0 20px;
    color: #666;
    line-height: 1.65;
    font-size: 0.98rem;
}

.unit-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #eeeeee;
}

.unit-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.unit-card-price small {
    color: #777;
    font-size: 0.8rem;
}

.unit-card-price strong {
    color: #db4a2b;
    font-size: 1.13rem;
    line-height: 1.25;
}

.unit-card-cta {
    color: #2c3e50;
    font-weight: 700;
    white-space: nowrap;
}

.unit-card:hover .unit-card-cta {
    color: #db4a2b;
}

.unit-parent-link {
    margin-bottom: 18px;
    text-align: center;
}

.unit-parent-link a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.92;
}

.unit-parent-link a:hover {
    text-decoration: underline;
    opacity: 1;
}

.unit-detail-price {
    margin: 18px 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #db4a2b;
}

.unit-detail-price small {
    display: block;
    margin-bottom: 3px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 992px) {
    .unit-card {
        flex-basis: calc((100% - 48px) / 3);
        max-width: calc((100% - 48px) / 3);
    }
}

@media (max-width: 768px) {
    .units-grid {
        justify-content: flex-start;
        gap: 16px;
        padding-left: 7vw;
        padding-right: 7vw;
        scroll-snap-type: x mandatory;
    }

    .units-grid:has(.unit-card:only-child) {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .unit-card {
        flex: 0 0 86vw;
        max-width: 340px;
        scroll-snap-align: center;
    }

    .unit-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .unit-card-cta {
        white-space: normal;
    }
}


/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.7rem;
    }
    
    .hero-description {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 90px 0 80px;
    }
    
    .hero-section h1 {
        font-size: 2.4rem;
    }
    
    .hero-location {
        flex-direction: column;
        align-items: center;
    }
    
    .location-badge, .location-name {
        font-size: 1.1rem;
        padding: 5px 15px;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2.1rem;
    }
    
    .gallery-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .mosaic-item {
        aspect-ratio: 3/2;
    }
    
    .cta-box h2 {
        font-size: 2.2rem;
    }
    
    .cta-subtitle {
        font-size: 1.3rem;
    }
    
    .btn-primary {
        padding: 14px 35px;
        font-size: 1.15rem;
        width: 100%;
        max-width: 350px;
    }
    
    .internal-links,
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .no-photos {
        padding: 40px 20px;
    }
    
    .no-photos-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.1rem;
    }
    
    .hero-description {
        font-size: 1.15rem;
    }
    
    .section-title {
        font-size: 1.95rem;
    }
    
    .content-block {
        font-size: 1.15rem;
    }
}