/* ==========================================================
       CONTENTOR E AVISO STICKY DINÂMICO COM ANIMAÇÃO FADE-IN
       ========================================================== */
.sticky-warning-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: auto;
    left: auto;
    pointer-events: none;
    z-index: 100;
    /* Z-Index elevado para flutuar acima dos cartões */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 767px) {
    .sticky-warning-container {
        top: 0 !important;
        /* Em telemóveis o topo volta ao normal */
    }
}

.illustrations-warning-box {
    position: -webkit-sticky;
    position: sticky;
    top: 110px;
    /* Margem segura abaixo do header */
    margin-top: 0;
    /* Alinhado ao topo das tabelas, abaixo do título */
    margin-right: 15px;

    /* Ajuste dinâmico ao texto */
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    max-width: 300px;

    background-color: rgba(22, 22, 22, 0.94);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-left: 3px solid #c5a059;

    /* Estado Inicial (Invisível para o efeito de entrada) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        visibility 0.5s ease;
}

/* Classe ativada por JavaScript quando a secção fica ativa no menu */
.illustrations-warning-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.close-warning-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.close-warning-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================================
       OTIMIZAÇÃO RESPONSIVA PARA TELEMÓVEL (SEM SOBREPOSIÇÕES)
       ========================================================== */
@media (max-width: 767px) {

    /* Força os contentores a fluírem naturalmente nos espaços vazios do HTML */
    .sticky-warning-container {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        /* Centraliza o popup no ecrã */
        margin: 15px 0 !important;
        /* Espaçamento equilibrado acima e abaixo */
        z-index: 10 !important;
    }

    /* Torna os popups mais compactos e elegantes para ecrãs pequenos */
    .illustrations-warning-box {
        position: relative !important;
        top: auto !important;
        margin: 0 auto !important;
        padding: 8px 12px !important;
        /* Padding mais apertado */
        font-size: 9px !important;
        /* Letra mais pequena e sofisticada */
        gap: 8px !important;
        max-width: calc(100vw - 30px) !important;
        width: -webkit-max-content !important;
        width: -moz-max-content !important;
        width: max-content !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    /* Ícone de fechar proporcional ao novo tamanho */
    .close-warning-btn {
        font-size: 11px !important;
    }
}

/* ==========================================================
       DISTINTIVO DE LOCALIZAÇÃO (TOTALMENTE NO CANTO DIREITO)
       ========================================================== */
.banner-location-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    /* Mudado de left para right */
    left: auto;
    /* Garante a anulação de heranças à esquerda */
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background-color: rgba(22, 22, 22, 0.75);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.banner-location-badge:hover {
    background-color: rgba(197, 160, 89, 0.9);
    border-color: #c5a059;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.35);
}

.banner-location-badge .badge-icon {
    font-size: 24px;
    color: #c5a059;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.banner-location-badge:hover .badge-icon {
    color: #ffffff;
}

.banner-location-badge .badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    text-align: left;
}

.banner-location-badge .badge-text .street {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.banner-location-badge .badge-text .city {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #c5a059;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.banner-location-badge:hover .badge-text .city {
    color: #ffffff;
}

/* Ajustes para Tablets */
@media (max-width: 991px) {
    .banner-location-badge {
        bottom: 20px;
        right: 20px;
        /* Acompanha o alinhamento à direita */
        left: auto;
        padding: 10px 16px;
    }
}

/* Ajustes para Telemóvel (Mantém a centralização perfeita) */
@media (max-width: 575px) {
    .banner-location-badge {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        /* Remove o alinhamento à direita em ecrãs móveis */
        margin: 0;
        width: -webkit-max-content;
        width: -moz-max-content;
        width: max-content;
        max-width: calc(100vw - 40px);
        padding: 8px 14px;
        gap: 10px;
    }
}

@media (max-width: 575px) {
    .banner-luxury-content {
        margin-top: 40px !important;
        /* Espaço reduzido em mobile para encaixar na tela */
        text-align: center !important;
        padding-bottom: 80px !important;
        /* Margem de segurança para o badge de localização absoluto */
    }

    .banner-luxury-content h1 {
        font-size: 26px !important;
        /* Escala o título proporcionalmente */
        max-width: 100% !important;
    }
}

.stats-premium-grid .stat-content {
    padding-left: 30px !important;
}

/* Anulação do recuo especificamente em telemóveis (Abaixo de 767px) */
@media (max-width: 767px) {
    .stats-premium-grid .stat-content {
        padding-left: 0 !important;
    }
}