Natur Campeche
Início
Hotel
Pousada
Galeria
Serviços
Contato
Galeria de Fotos
Conheça nossos espaços através de imagens que capturam a essência do Natur Campeche.
Hotel
Pousada
Hotel
Pousada
function shuffleItems(items) { for (let i = items.length - 1; i > 0; i -= 1) { const j = Math.floor(Math.random() * (i + 1)); [items[i], items[j]] = [items[j], items[i]]; } } function shuffleGalleryItems() { const grid = document.getElementById('gallery-grid'); if (!grid) { return; } const hotelItems = Array.from(grid.querySelectorAll('.gallery-item.hotel')); const pousadaItems = Array.from(grid.querySelectorAll('.gallery-item.pousada')); const otherItems = Array.from(grid.children).filter( item => !item.classList.contains('hotel') && !item.classList.contains('pousada') ); if (hotelItems.length > 1) { shuffleItems(hotelItems); } if (pousadaItems.length > 1) { shuffleItems(pousadaItems); } const fragment = document.createDocumentFragment(); hotelItems.forEach(item => fragment.appendChild(item)); pousadaItems.forEach(item => fragment.appendChild(item)); otherItems.forEach(item => fragment.appendChild(item)); grid.appendChild(fragment); } document.addEventListener('DOMContentLoaded', shuffleGalleryItems); function filterGallery(category) { const items = document.querySelectorAll('.gallery-item'); items.forEach(item => { if (category === 'all' || item.classList.contains(category)) { item.classList.remove('hidden'); } else { item.classList.add('hidden'); } }); const gallerySection = document.getElementById('galeria'); if (gallerySection) { gallerySection.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }