/* css/gallery.css - ESTILOS OTIMIZADOS (247 linhas - VERSÃO ATUALIZADA) */

/* ANIMAÇÕES */
@keyframes pulseVideo {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.8; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* GALERIA NO CARD */
.property-gallery-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

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

.property-gallery-image:hover { transform: scale(1.02); }

.gallery-indicator-mobile {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

.gallery-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
    padding: 0 10px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-dot.active { background: white; transform: scale(1.2); }

/* ========== SETAS DE NAVEGAÇÃO LIQUID GLASS ========== */
.gallery-nav-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    z-index: 25 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.gallery-nav-prev {
    left: 10px !important;
}

.gallery-nav-next {
    right: 10px !important;
}

.gallery-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.gallery-nav-arrow:active {
    transform: translateY(-50%) scale(0.95) !important;
}

/* ========== CONTADOR DE VISUALIZAÇÕES (ÍCONE APENAS - SEM FUNDO) ========== */
.gallery-view-counter {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    background: transparent !important;           /* Fundo totalmente transparente */
    backdrop-filter: none !important;             /* Remove o efeito glassmorphism */
    -webkit-backdrop-filter: none !important;     /* Remove para WebKit */
    border-radius: 0 !important;                 /* Remove borda arredondada */
    border: none !important;                      /* Remove completamente a borda */
    padding: 0 !important;                        /* Remove padding - container menor */
    margin: 0 !important;                         /* Remove margens */
    font-size: 0.75rem !important;                /* Mantém tamanho original */
    color: white !important;
    display: inline-flex !important;              /* Container se ajusta ao conteúdo */
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;                            /* Remove gap entre ícone e número */
    z-index: 20 !important;
    box-shadow: none !important;                  /* Remove sombra */
    transition: all 0.3s ease !important;
    cursor: default !important;
    width: auto !important;                       /* Largura automática */
    height: auto !important;                      /* Altura automática */
    min-width: 0 !important;                      /* Remove largura mínima */
    min-height: 0 !important;                     /* Remove altura mínima */
}

/* Estilo específico para o ícone (olho) em negrito */
.gallery-view-counter i {
    font-weight: 900 !important;                  /* Negrito máximo no ícone */
    font-size: 1rem !important;                   /* Mantém tamanho original (ou ajuste) */
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5) !important; /* Sombra leve para destacar */
}

/* Estilo para o número de visualizações (opcional - também em negrito) */
.gallery-view-counter span {
    font-weight: 700 !important;                  /* Negrito no número */
    margin-left: 2px !important;                  /* Pequeno espaçamento */
}

/* Remove hover effects que não são mais necessários */
.gallery-view-counter:hover {
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.gallery-view-counter:hover i {
    transform: none !important;
}

/* INDICADOR DE VÍDEO */
.video-indicator {
    position: absolute;
    top: 35px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    animation: pulseVideo 2s infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
}

.video-indicator i { color: #FFD700; font-size: 14px; }

/* MODAL */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    touch-action: pan-y pinch-zoom;
    animation: fadeIn 0.3s ease;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    touch-action: manipulation;
}

.gallery-modal-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10;
    padding: 0 20px;
}

.gallery-modal-btn, .gallery-modal-close {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}

.gallery-modal-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    z-index: 10002 !important; /* GARANTIR clique */
    pointer-events: auto !important;
    cursor: pointer !important;
}

.gallery-modal-btn:active, .gallery-modal-close:active {
    transform: scale(0.95);
    background: white;
}

.gallery-counter {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0,0,0,0.5);
    padding: 6px 12px;
    border-radius: 20px;
    min-width: 70px;
    text-align: center;
}

.gallery-expand-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 5;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.gallery-expand-icon:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.gallery-swipe-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* RESPONSIVIDADE */
@media (min-width: 768px) {
    .gallery-indicator-mobile { top: 15px; right: 15px; padding: 6px 12px; font-size: 0.8rem; }
    .video-indicator { top: 40px; right: 15px; }
    .gallery-controls { bottom: 15px; gap: 10px; }
    .gallery-dot { width: 10px; height: 10px; }
    .gallery-modal-btn { width: 50px; height: 50px; font-size: 1.3rem; }
    .gallery-modal-close { width: 50px; height: 50px; font-size: 1.5rem; top: 30px; right: 30px; }
    .gallery-counter { font-size: 1rem; padding: 8px 16px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .gallery-modal-image { max-height: 85vh; }
    .gallery-modal-controls { bottom: 10px; }
}

.gallery-modal-btn:focus,
.gallery-modal-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
