(function () { 'use strict'; /* ===================================================== ELEMENTOS ===================================================== */ const gallery = document.getElementById( 'page-image-gallery' ); if ( !gallery || gallery.dataset.initialized === 'true' ) { return; } gallery.dataset.initialized = 'true'; const mainImage = gallery.querySelector( '.page-image-gallery__image' ); const imageWrapper = gallery.querySelector( '.page-image-gallery__image-wrapper' ); const counter = gallery.querySelector( '.page-image-gallery__counter' ); const thumbnails = gallery.querySelector( '.page-image-gallery__thumbnails' ); const closeControl = gallery.querySelector( '.page-image-gallery__close' ); const previousControl = gallery.querySelector( '.page-image-gallery__arrow--previous' ); const nextControl = gallery.querySelector( '.page-image-gallery__arrow--next' ); const stage = gallery.querySelector( '.page-image-gallery__stage' ); /* ===================================================== CONFIGURAÇÃO ===================================================== */ const EXCLUDED_SELECTOR = [ '#page-image-gallery', 'header', 'footer', 'nav', '.no-page-gallery', '.elementor-location-header', '.elementor-location-footer', '.elementor-widget-icon', '.elementor-widget-social-icons', '.elementor-widget-google_maps', '.elementor-lightbox', '.dialog-widget', '.leaflet-container' ].join(','); /* ===================================================== ESTADO ===================================================== */ let galleryItems = []; let currentIndex = 0; let previousFocusedElement = null; let touchStartX = 0; let refreshTimer = null; /* ===================================================== URL ===================================================== */ function normalizeURL(url) { if (!url) { return ''; } const clean = String(url) .trim() .replace( /^['"]|['"]$/g, '' ); try { return new URL( clean, window.location.href ).href; } catch (error) { return clean; } } function isImageURL(url) { if (!url) { return false; } const clean = String(url) .split('?')[0] .split('#')[0]; return /\.(avif|webp|jpe?g|png|gif|svg)$/i .test(clean); } /* ===================================================== DUPLICADOS ===================================================== */ function getDuplicateKey(url) { if (!url) { return ''; } try { const parsed = new URL( url, window.location.href ); let path = decodeURIComponent( parsed.pathname ).toLowerCase(); path = path .replace( /-\d+x\d+(?=(?:\.[a-z0-9]+){1,2}$)/i, '' ) .replace( /-scaled(?=(?:\.[a-z0-9]+){1,2}$)/i, '' ) .replace( /-rotated(?=(?:\.[a-z0-9]+){1,2}$)/i, '' ); return ( parsed.hostname.toLowerCase() + path ); } catch (error) { return String(url) .split('?')[0] .toLowerCase(); } } /* ===================================================== SRCSET ===================================================== */ function getLargestSrcsetImage( srcset ) { if (!srcset) { return ''; } const sources = srcset .split(',') .map( function (item) { const parts = item .trim() .split(/\s+/); return { url: parts[0] || '', width: parseFloat( parts[1] ) || 0 }; } ) .filter( function (item) { return item.url; } ) .sort( function ( a, b ) { return ( a.width - b.width ); } ); return sources.length ? sources[ sources.length - 1 ].url : ''; } /* ===================================================== SOURCE DA IMAGEM ===================================================== */ function getImageSource(image) { /* * Galeria Básica normalmente * coloca o ficheiro original no href. */ const link = image.closest( 'a[href]' ); if (link) { const href = link.getAttribute( 'href' ); if ( isImageURL( href ) ) { return normalizeURL( href ); } } const srcset = image.getAttribute( 'srcset' ) || image.getAttribute( 'data-srcset' ) || image.getAttribute( 'data-lazy-srcset' ); return normalizeURL( image.getAttribute( 'data-full' ) || image.getAttribute( 'data-large-file' ) || getLargestSrcsetImage( srcset ) || image.currentSrc || image.getAttribute( 'data-src' ) || image.getAttribute( 'data-lazy-src' ) || image.getAttribute( 'src' ) || '' ); } /* ===================================================== IGNORAR ELEMENTOS ===================================================== */ function shouldIgnore( element ) { if (!element) { return true; } return Boolean( element.matches( EXCLUDED_SELECTOR ) || element.closest( EXCLUDED_SELECTOR ) ); } /* ===================================================== HOLDER CORRETO DA IMAGEM ===================================================== */ function getImageHoverHolder( image ) { /* * GALERIA BÁSICA DO ELEMENTOR * * Aqui damos prioridade ao , * porque corresponde exatamente * às dimensões de cada fotografia. */ const basicGallery = image.closest( '.elementor-image-gallery, .elementor-widget-image-gallery, .gallery' ); if (basicGallery) { return ( image.closest( 'a' ) || image.closest( '.gallery-icon' ) || image.closest( '.gallery-item' ) ); } /* * Widget imagem normal */ return ( image.closest( 'a' ) || image.parentElement ); } /* ===================================================== SVG ===================================================== */ function createSearchIcon() { const icon = document.createElement( 'span' ); icon.className = 'page-gallery-hover-icon'; icon.innerHTML = ` `; return icon; } /* ===================================================== CRIAR HOVER ===================================================== */ function createHover( image ) { const holder = getImageHoverHolder( image ); if ( !holder || shouldIgnore(holder) ) { return; } /* * Evita duplicar. */ const existing = Array .from( holder.children ) .find( function (child) { return child .classList .contains( 'page-gallery-hover-overlay' ); } ); if (existing) { return; } const style = window.getComputedStyle( holder ); if ( style.position === 'static' ) { holder.style.position = 'relative'; } if ( style.display === 'inline' ) { holder.style.display = 'block'; } holder.classList.add( 'page-gallery-hover-target' ); const overlay = document.createElement( 'span' ); overlay.className = 'page-gallery-hover-overlay'; overlay.setAttribute( 'aria-hidden', 'true' ); overlay.appendChild( createSearchIcon() ); holder.appendChild( overlay ); } /* ===================================================== BACKGROUNDS ===================================================== */ function getBackgroundURL( element ) { const background = window .getComputedStyle( element ) .backgroundImage; if ( !background || background === 'none' ) { return ''; } const match = background.match( /url\(["']?(.*?)["']?\)/ ); if (!match) { return ''; } return normalizeURL( match[1] ); } function createBackgroundHover( element ) { if ( !element || shouldIgnore( element ) ) { return; } const existing = Array .from( element.children ) .find( function (child) { return child .classList .contains( 'page-gallery-hover-overlay' ); } ); if (existing) { return; } if ( window .getComputedStyle( element ) .position === 'static' ) { element.style.position = 'relative'; } element.classList.add( 'page-gallery-hover-target' ); const overlay = document.createElement( 'span' ); overlay.className = 'page-gallery-hover-overlay'; overlay.setAttribute( 'aria-hidden', 'true' ); overlay.appendChild( createSearchIcon() ); element.appendChild( overlay ); } /* ===================================================== RECOLHER TODAS AS IMAGENS ===================================================== */ function collectImages() { const items = []; const keys = new Set(); /* * IMAGENS NORMAIS + * GALERIA BÁSICA */ document .querySelectorAll( '.elementor img' ) .forEach( function (image) { if ( shouldIgnore( image ) ) { return; } const source = getImageSource( image ); if (!source) { return; } const key = getDuplicateKey( source ); if (!key) { return; } image.classList.add( 'page-gallery-clickable' ); image.setAttribute( 'data-page-gallery-key', key ); const holder = getImageHoverHolder( image ); if (holder) { holder.classList.add( 'page-gallery-clickable' ); holder.setAttribute( 'data-page-gallery-key', key ); } createHover( image ); /* * Evita repetidos * no lightbox. */ if ( keys.has( key ) ) { return; } keys.add( key ); items.push({ source: source, key: key }); } ); /* * BACKGROUNDS */ document .querySelectorAll( '.elementor .e-con, .elementor .elementor-element' ) .forEach( function (element) { if ( shouldIgnore( element ) ) { return; } const source = getBackgroundURL( element ); if (!source) { return; } const key = getDuplicateKey( source ); if (!key) { return; } element.classList.add( 'page-gallery-clickable' ); element.setAttribute( 'data-page-gallery-key', key ); createBackgroundHover( element ); if ( keys.has( key ) ) { return; } keys.add( key ); items.push({ source: source, key: key }); } ); return items; } /* ===================================================== ENCONTRAR IMAGEM CLICADA ===================================================== */ function findClickedIndex( element ) { const target = element.closest( '[data-page-gallery-key]' ); if (!target) { return -1; } const key = target.getAttribute( 'data-page-gallery-key' ); return galleryItems .findIndex( function (item) { return ( item.key === key ); } ); } /* ===================================================== MINIATURAS ===================================================== */ function createThumbnails() { thumbnails.innerHTML = ''; galleryItems.forEach( function ( item, index ) { const thumbnail = document.createElement( 'div' ); const image = document.createElement( 'img' ); thumbnail.className = 'page-image-gallery__thumbnail'; thumbnail.setAttribute( 'role', 'button' ); thumbnail.setAttribute( 'tabindex', '0' ); image.src = item.source; image.alt = ''; thumbnail.appendChild( image ); activateControl( thumbnail, function () { currentIndex = index; updateGallery(); } ); thumbnails.appendChild( thumbnail ); } ); } /* ===================================================== ATUALIZAR GALERIA ===================================================== */ function updateGallery() { if ( !galleryItems.length ) { return; } if ( currentIndex = galleryItems.length ) { currentIndex = 0; } const item = galleryItems[ currentIndex ]; mainImage.classList.add( 'is-changing' ); window.setTimeout( function () { mainImage.src = item.source; mainImage.alt = ''; mainImage.onload = function () { mainImage .classList .remove( 'is-changing' ); }; if ( mainImage.complete ) { mainImage .classList .remove( 'is-changing' ); } }, 80 ); counter.textContent = ( currentIndex + 1 ) + ' / ' + galleryItems.length; thumbnails .querySelectorAll( '.page-image-gallery__thumbnail' ) .forEach( function ( thumbnail, index ) { const active = index === currentIndex; thumbnail .classList .toggle( 'is-active', active ); if (active) { thumbnail.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' }); } } ); const multiple = galleryItems.length > 1; previousControl.hidden = !multiple; nextControl.hidden = !multiple; thumbnails.hidden = !multiple; } /* ===================================================== ABRIR ===================================================== */ function openGallery( element ) { galleryItems = collectImages(); const index = findClickedIndex( element ); if ( index < 0 ) { return; } currentIndex = index; previousFocusedElement = document.activeElement; createThumbnails(); updateGallery(); gallery.classList.add( 'is-open' ); gallery.setAttribute( 'aria-hidden', 'false' ); document .documentElement .classList .add( 'page-image-gallery-open' ); document .body .classList .add( 'page-image-gallery-open' ); closeControl.focus(); } /* ===================================================== FECHAR ===================================================== */ function closeGallery() { gallery.classList.remove( 'is-open' ); gallery.setAttribute( 'aria-hidden', 'true' ); document .documentElement .classList .remove( 'page-image-gallery-open' ); document .body .classList .remove( 'page-image-gallery-open' ); mainImage.removeAttribute( 'src' ); if ( previousFocusedElement && typeof previousFocusedElement.focus === 'function' ) { previousFocusedElement .focus(); } } /* ===================================================== NAVEGAÇÃO ===================================================== */ function previousImage() { currentIndex--; updateGallery(); } function nextImage() { currentIndex++; updateGallery(); } function activateControl( element, callback ) { element.addEventListener( 'click', callback ); element.addEventListener( 'keydown', function (event) { if ( event.key === 'Enter' || event.key === ' ' ) { event.preventDefault(); callback(); } } ); } activateControl( closeControl, closeGallery ); activateControl( previousControl, previousImage ); activateControl( nextControl, nextImage ); /* ===================================================== CLIQUE NAS IMAGENS ===================================================== */ document.addEventListener( 'click', function (event) { if ( document.body .classList .contains( 'elementor-editor-active' ) ) { return; } if ( gallery.contains( event.target ) ) { return; } const target = event.target.closest( '[data-page-gallery-key]' ); if (!target) { return; } event.preventDefault(); event.stopPropagation(); openGallery( target ); }, true ); /* ===================================================== CLIQUE FORA ===================================================== */ gallery.addEventListener( 'click', function (event) { if ( event.target === gallery || event.target === stage || event.target === imageWrapper ) { closeGallery(); } } ); /* ===================================================== TECLADO ===================================================== */ document.addEventListener( 'keydown', function (event) { if ( !gallery .classList .contains( 'is-open' ) ) { return; } if ( event.key === 'Escape' ) { closeGallery(); } if ( event.key === 'ArrowLeft' ) { previousImage(); } if ( event.key === 'ArrowRight' ) { nextImage(); } } ); /* ===================================================== SWIPE ===================================================== */ stage.addEventListener( 'touchstart', function (event) { touchStartX = event .changedTouches[0] .screenX; }, { passive: true } ); stage.addEventListener( 'touchend', function (event) { const end = event .changedTouches[0] .screenX; const difference = end - touchStartX; if ( Math.abs( difference ) 0 ) { previousImage(); } else { nextImage(); } }, { passive: true } ); /* ===================================================== INICIALIZAÇÃO ===================================================== */ function refresh() { galleryItems = collectImages(); } function scheduleRefresh() { window.clearTimeout( refreshTimer ); refreshTimer = window.setTimeout( refresh, 200 ); } if ( document.readyState === 'loading' ) { document.addEventListener( 'DOMContentLoaded', refresh ); } else { refresh(); } window.addEventListener( 'load', refresh ); window.setTimeout( refresh, 500 ); window.setTimeout( refresh, 1500 ); const observer = new MutationObserver( scheduleRefresh ); observer.observe( document.body, { subtree: true, childList: true, attributes: true, attributeFilter: [ 'src', 'srcset', 'style', 'data-src', 'data-srcset', 'data-e-bg-lazyload' ] } ); })();
Discover O Monte

A Country House characterized by Tradition

The Monte dos Avós is a typical country house used in rural tourism, with a strong connection to the roots and traditions of the region. This county house is typically Algarvian and is full of history.

Its origins date back to the grandparents of the current owner, Leonardo Guerreiro, when in the mid-1950s they built a typical country house that they used as a residence and as a support for agricultural work. Then, in 2001, Leonardo and his wife Clara restored the ruined house, making sure to preserve its traditional architectural layout, as well as the care and restoration of the surrounding spaces. Their intention was to perpetuate the memory of that old rural house, the house of their grandparents.

Monte dos Avós combines the simplicity of the rural environment with the comfort and hospitality of its hosts. Maintaining its original character, this former agricultural property, now a residential space, is decorated with the characteristic tones of the earth and its culture. Creating a rustic yet welcoming atmosphere, the spaces are filled with elements previously used in everyday rural life.

In addition to the indoor accommodations, the outdoor area features a swimming pool and various relaxation areas around it, such as sun loungers, benches, and hammocks, ideal for resting after a good swim or simply relaxing. They also have a barbecue area, which, along with the tables on the terrace, is perfect for socializing. Surrounded by the area’s natural vegetation, only the sounds of nature might disturb you. But nothing beats seeing it for yourself. Come and discover a place where you can rest in the tranquility of nature. A place of silence and peaceful moments. A place you’ll want to return to!

Our Vision

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Our Mission

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Jhon Doe

CEO Of Resorella
Years of Experience
0 +
Years of Experience
0 +
Years of Experience
0 +
Years of Experience
0 +
Our accommodations

Simple comforts for a relaxing stay

Whether you are spending your day by the pool, exploring the region or simply enjoying the silence of the countryside, Monte dos Avós provides everything you need for a comfortable and relaxing stay.

Breakfast

Start your day with a breakfast prepared mainly with fresh, seasonal and locally sourced products. Available upon advance request.

Wifi

Complimentary wireless internet is available throughout the property, keeping you connected whenever you need it.

Daily Cleaning

All rooms and apartments include daily housekeeping, allowing you to relax and enjoy your stay in complete comfort.

Parking Lot

Guests have access to convenient private parking within the property throughout their stay.

Pool

Enjoy peaceful moments by the outdoor swimming pool, surrounded by gardens, sun loungers, benches and hammocks.

Games Room

The property includes a children’s play area and a games room with billiards, table tennis and board games.

Common Living Room

Guests have access to convenient private parking within the property throughout their stay.

Garden

Enjoy peaceful moments by the outdoor swimming pool, surrounded by gardens, sun loungers, benches and hammocks.

Barbecue

The property includes a children’s play area and a games room with billiards, table tennis and board games.

Our Team

Meet Our Team

Welcome to our vibrant team, where passion meets creativity and dedication drives innovation. We are a diverse group of individuals united by a shared commitment to excellence and a love for what we do.

Jhon Doe

Founder & CEO

Ivy Rose

General Manager

Hunter Wolf

Reservation Manager

Testimonials

What our guests say about their stay

Each visit to Monte dos Avós creates a new story. Discover what our guests say about the tranquility, hospitality, and authentic Algarve experience they found during their stay.

DISCOVER THE ALGARVE

Ideas and Inspiration for Your Stay

Discover places to visit, local traditions, natural landscapes and authentic experiences to enjoy during your stay at Monte dos Avós.

No Content Available