/*
 * Páginas com conteúdo do Neve (Home, Sobre, Gestão de AL…): CSS portado do
 * neve-child-master (style.css 56–426 e 1741–fim; spotlight.css). Retirar o que
 * deixar de ser usado quando o conteúdo for convertido para blocos core.
 */

/* Sem espaço automático entre blocos do conteúdo (blockGap 0 em core/post-content no theme.json):
   cada bloco usa as suas próprias margens, como no Neve. */

/* Home: o header já está sobreposto (position absolute), não é preciso puxar o hero para cima. */
.hcs-header-sobreposto .home_section {
    margin-top: 0;
    min-height: calc(100vh + 76px);
}

/* Grelha genérica do neve-child-master (usada pelos shortcodes da Home). */
.grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    padding: 20px;
    background-color: #fff;
    margin: 0 auto;
}

.grid-row {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
}

.grid-item {
    flex: 1;
    height: auto;
    margin-right: 20px;
}




p.intro {
    color: var(--Home-Black, #3D3935);
    font-family: var(--uniL);
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
}


@media (max-width: 430px) {
    .image-wrapper,
    .home_section img,
    .image-wrapper::after,
    .home_section span.wp-block-cover__background {
        margin-top: 7.3068vh!important;
        min-height: 350px;
        max-height: 556px !important;
        transition: none;
    }


}


@media (min-width: 431px) and (max-width: 600px) {
        .image-wrapper,
    .home_section img,
    .image-wrapper::after,
    .home_section span.wp-block-cover__background {
        margin-top: 7.3068vh!important;
        min-height: 350px;
        max-height: 448px !important;
        transition: none;
    }

}

@media (min-width: 600px) and (max-width: 800px) {
        .image-wrapper,
    .home_section img,
    .image-wrapper::after ,
    .home_section span.wp-block-cover__background{
        margin-top: 0vh!important;
        min-height: 350px;
        max-height: 455px !important;
        transition: none;
    }
}

.site-footer .h3 {
    font-family: var(--h3fontfamily);
    font-size: var(--h3fontsize);
    font-weight: var(--h3fontweight);
    line-height: var(--h3lineheight);
    letter-spacing: var(--h3letterspacing);
    text-transform: var(--h3texttransform);
    margin-bottom: 30px;

}

/* Navbar Styles */
.navbar-toggle:focus {
    outline: 0px solid;
}

.navbar-toggle,
.navbar-toggle:hover {
    background: transparent;
}

/* Button Styles */
.button.button-primary {
    padding: 10px 30px !important;
    border-radius: 8px !important;
}

/* Header Styles */
.header--row-inner.header-main-inner {
    background: transparent;
}

nav[data-row-id] {
    background: transparent;
}

header {
    z-index: 1;
}

/* Main Content Styles */
main#content {
    z-index: 0;
}

/* Home Section Styles */
.home_section {
    min-height: 100vh;
    padding: 0px;
    margin-top: -76px;
    min-height: calc(76px + 100vh);
    transition: 0!important;
}

.home_section .alignwide {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.home_section .alignwide {
    margin: 68px 0 30px 0;
}

@media (min-width: 600px) {
    .home_section .alignwide {
        margin: 3vh 0 30px 0;
    }

    .hfg_header.site-header {
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .header--row-inner.header-main-inner {
        background: white;
    }
}

.home_section_content {
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 20px;
}

.home_section_bottom_loop {
    background-color: #F2FBFA;
}

@media (max-width: 800px) {
    .home_section_bottom_loop .grid-row {
        flex-direction: column;
        gap: 30px;
    }

    .home_section_bottom_loop .grid-item {
        margin-right: 0px;
    }
}


.home_section_bottom_loop .grid-container {
    background-color: transparent;
}

.home_section_bottom_loop .grid-item {
    position: relative;
}

.home_section_bottom_loop .grid-item:last-child {
    margin-right: 0px;
}


.home_section_bottom_loop .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 128, 117, 0.00) 55%, rgba(0, 128, 117, 0.85) 100%);
    /* Gradient overlay */
    pointer-events: none;
    /* Ensure the overlay does not interfere with interactions */
    border-radius: 8px;
}



/* Nome da casa: largura toda do cartão, alinhado à esquerda em baixo (antes centrado a meia largura). */
.home_section_bottom_loop .grid-item span {
    position: absolute !important;
    left: 24px;
    right: 24px;
    bottom: 20px !important;
    text-align: left;
    color: var(--Home-White, #FFF);
    font-family: var(--uniB);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration: none;
}


.home_section_bottom_loop .post-thumbnail .aspect {
    width: 100%;
    padding-bottom: 66.66%;
    margin-bottom: 0px;
}

/* Destaques Home Styles */
.destaques-home .o-posts-grid-post-category {
    font-size: 20px !important;
    font-weight: var(--h5fontweight);
    line-height: var(--h5lineheight);
    letter-spacing: var(--h5letterspacing);
    text-transform: none !important;
    font-family: var(--headingsfontfamily), var(--nv-fallback-ff);
    text-overflow: ellipsis;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    max-width: 250px;
}

.destaques-home .o-posts-grid-post {
    display: flex;
    gap: 20px;
    flex: 1;
}

.destaques-home .o-posts-grid-post-category {color:#3D3935}


.destaques-home .o-posts-grid-post-category a {
    text-decoration: none;
    transition: all .15s ease 0s;
    font-size: var(--title-text-size);
    color: var(--text-color);
}

.destaques-home .o-posts-grid-post-title {
    font-size: var(--meta-text-size);
    color: var(--nv-primary-accent);
    margin: 0;
}

/* Título é h2 (SEO) com o aspeto do h5 original. */
.destaques-home h2.o-posts-grid-post-title {
    font-family: var(--wp--preset--font-family--uni-neue-bold);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.5px;
    text-transform: none;
}

.destaques-home .o-posts-grid-post-image{
    display: block;
    width: 160px;
    min-width: 160px;
}


.destaques-home .o-posts-grid-post-image a {
    width: 100%;
    aspect-ratio: 4 / 3; /* default = 4:3 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}


.destaques-home .o-posts-read-more {
    display: none;
}

.destaques-home .o-posts-grid-post {
    display: flex;
    gap: 20px;
}

@media (min-width: 960px) {

    .home .nav-ul li.menu-item-object-page a,
    .home .nav-ul li a .dd-title{
        color: white;
    }

}

.home_section_content .o-posts-custom-field {
    color: #3D3935;
}

.home [data-show-on="mobile"] a.brand img {
  transition: opacity 0.4s ease;
}


@media (max-width: 800px) {
    .wp-block-themeisle-blocks-posts-grid .is-list .o-posts-grid-post .o-posts-grid-post-image {
        flex-basis: 100%;
        padding: 0;
        width: 100%;
        min-width: 100%;

    }

    .wp-block-themeisle-blocks-posts-grid .is-list .o-posts-grid-post .o-posts-grid-post-body {
        flex-basis: 100%;
        padding: 0;
        min-width: 100%;
    }

    .wp-block-themeisle-blocks-posts-grid .is-list .o-posts-grid-post {
        flex-direction: column;
        padding: 10px;
    }

    .destaques-home .o-posts-grid-post-image{
        display: block;
        width: 100%;
        min-width: 100%;
    }


    .destaques-home .o-posts-grid-post-blog.o-posts-grid-post-plain {
        display: flex;
        padding: 20px;
        justify-content: center;
    }


    .destaques-home .o-posts-grid-post-image a {
    aspect-ratio: 1 / 1; /* default = 4:3 */
    }

    .destaques-home .o-posts-grid-post-category {
    text-overflow: unset;
    }
}

.destaques-home .o-posts-grid-post-blog.o-posts-grid-post-plain {
    display: flex;
    padding: 20px;
    justify-content: left;
    align-items: center;
    gap: 30px;
    border-radius: 8px;
    background: var(--Home-White, #FFF);
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.10);
    margin-bottom: 22px;
}

.wp-block-themeisle-blocks-posts-grid .is-list {
    margin: 0;
    position: absolute;
    top: 100%;
    transform: translateY(-95%);
}

@media (max-width: 800px) {
    .wp-block-themeisle-blocks-posts-grid .is-list {
        margin-top: 0px;
        position: relative;
        top: unset;
        transform: none;
    }

    .hide_block {
        display: none;
    }
}

.home-left-heading-holder {
    align-self: flex-start !important;
    height: 100%;
    flex-direction: column;
    display: flex;
    justify-content: flex-end;
    padding-bottom: 30px;
}

/* Alojamento Styles */

.wp-block-themeisle-blocks-advanced-columns{
    transition: none;
}
/* spotlight.css (bloco ACF "Home Spotlight") */
.house-item-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0 auto;
    --columns-width: 1280px;
    min-height: auto;
    max-width: 1280px;
}


.house-item-block h2{
    color: var(--wp--preset--color--accent-1);
    padding-bottom:0px;
}

.house-thumbnail-block {
  width: 100%;
    max-width: 896px;
    height: auto;
    aspect-ratio: 896 / 474;
    mask-image: url("data:image/svg+xml,%3Csvg width='896' height='474' viewBox='0 0 896 474' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M891.726 218.897L885.628 212.798C879.024 206.194 868.312 206.194 861.692 212.798L855.641 218.913C849.985 224.569 840.822 224.569 835.166 218.913L674.773 58.5199C672.055 55.8025 668.374 54.2858 664.535 54.2858H545.947C541.46 54.2858 537.163 56.0711 533.987 59.2467L458.404 134.83C453.617 139.617 444.485 142.382 436.08 138.369C433.441 137.516 431.624 140.691 433.457 142.508C446.712 155.764 617.501 326.552 617.501 326.552C618.449 327.5 618.449 329.048 617.501 329.996L609.048 338.449C603.392 344.105 594.229 344.105 588.573 338.449L460.963 210.839C458.246 208.122 397.261 147.137 388.145 138.021L254.342 4.23416C251.625 1.51672 247.944 0 244.105 0H124.505C120.666 0 116.985 1.53251 114.267 4.23416L5.23769 113.264C-1.36634 119.868 -1.36634 130.58 5.23769 137.2L9.61405 141.576C16.2181 148.18 26.9299 148.18 33.5497 141.576L39.6482 135.477C45.3043 129.821 54.4678 129.821 60.1238 135.477L394.338 469.692C397.056 472.409 400.737 473.926 404.576 473.926H524.176C528.015 473.926 531.696 472.394 534.413 469.692L647.519 356.586C647.993 356.112 648.641 355.859 649.305 355.875C649.431 355.875 769.315 355.875 769.315 355.875C773.154 355.875 776.835 354.343 779.553 351.641L891.758 239.388C897.414 233.732 897.414 224.569 891.758 218.913L891.726 218.897Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='896' height='474' viewBox='0 0 896 474' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M891.726 218.897L885.628 212.798C879.024 206.194 868.312 206.194 861.692 212.798L855.641 218.913C849.985 224.569 840.822 224.569 835.166 218.913L674.773 58.5199C672.055 55.8025 668.374 54.2858 664.535 54.2858H545.947C541.46 54.2858 537.163 56.0711 533.987 59.2467L458.404 134.83C453.617 139.617 444.485 142.382 436.08 138.369C433.441 137.516 431.624 140.691 433.457 142.508C446.712 155.764 617.501 326.552 617.501 326.552C618.449 327.5 618.449 329.048 617.501 329.996L609.048 338.449C603.392 344.105 594.229 344.105 588.573 338.449L460.963 210.839C458.246 208.122 397.261 147.137 388.145 138.021L254.342 4.23416C251.625 1.51672 247.944 0 244.105 0H124.505C120.666 0 116.985 1.53251 114.267 4.23416L5.23769 113.264C-1.36634 119.868 -1.36634 130.58 5.23769 137.2L9.61405 141.576C16.2181 148.18 26.9299 148.18 33.5497 141.576L39.6482 135.477C45.3043 129.821 54.4678 129.821 60.1238 135.477L394.338 469.692C397.056 472.409 400.737 473.926 404.576 473.926H524.176C528.015 473.926 531.696 472.394 534.413 469.692L647.519 356.586C647.993 356.112 648.641 355.859 649.305 355.875C649.431 355.875 769.315 355.875 769.315 355.875C773.154 355.875 776.835 354.343 779.553 351.641L891.758 239.388C897.414 233.732 897.414 224.569 891.758 218.913L891.726 218.897Z' fill='white'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    display: block;
    margin: auto 20px;
}

.house-content-block {
    text-align: left;
    margin: 0;
    margin-top: 0px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    flex-basis: 100%;
    padding: 0px 25px;
    min-width: 80%;
}
.house-content-block p{
    max-width: 50%;
}
@media (max-width: 960px) {
    .house-content-block{
        text-align: left;
        margin: auto 10px -90px 10px;
        margin-top: -30px;
        display: flex
;
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .house-content-block p{
        max-width: 100%;
    }
}

@media (max-width: 960px) {
    .house-thumbnail-block {
        width: 94%;
        margin: auto 20px;
    }
}
/* CSS adicional do Personalizador do tema antigo (custom_css "neve-child-master") */
.img-borders img {
    border-radius: 8px;
    object-fit: cover;
}

.img-borders a {
    opacity: 1;
}

/* Margens que o core dá aos blocos nos temas clássicos (o layout "flow" dos temas de blocos anula-as). */
.hcs-conteudo-neve .wp-block-post-content .wp-block-columns {
    margin-bottom: 1.75em;
}

.hcs-conteudo-neve .wp-block-post-content .wp-block-file {
    margin-bottom: 1.5em;
}

/* Alinhamentos "wide" e "full" do Neve no conteúdo das páginas (o core usa wideSize/root padding). */
.hcs-conteudo-neve .wp-block-post-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 7.5px;
    padding-right: 7.5px;
}

.hcs-conteudo-neve .wp-block-post-content .wp-block-image.alignfull {
    padding: 0;
}

/* Abaixo de 960px: largura do conteúdo (no Neve eram 98vw, que encostava imagens e fundos às margens no telemóvel). */
.hcs-conteudo-neve .wp-block-post-content .alignwide:not(.home_section *) {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 960px) {
    .hcs-conteudo-neve .wp-block-post-content .alignwide:not(.home_section *) {
        width: 70vw;
        max-width: 70vw;
        margin-left: calc(50% - 35vw) !important;
        margin-right: calc(50% - 35vw) !important;
    }
}

.hcs-conteudo-neve .wp-block-post-content :is(.wp-block-themeisle-blocks-advanced-columns:not(.has-1-columns), .wp-block-columns:has(.alignfull, .alignwide)) :is(.alignfull, .alignwide) {
    width: 100%;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Dentro de grupos "full", os filhos não ficam limitados à largura de conteúdo (como no Neve, sem contentSize). */
.hcs-conteudo-neve .wp-block-post-content .alignfull.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide)) {
    max-width: none;
}

/* Num tema clássico o "block gap" de cada bloco não é aplicado: as colunas usam o valor do core (2em). */
.hcs-conteudo-neve .wp-block-post-content .wp-block-columns {
    gap: 2em;
}

/* Separador e tabela do Neve */
.hcs-conteudo-neve .wp-block-post-content hr,
.hcs-conteudo-neve .wp-block-post-content .wp-block-separator {
    display: inline-block;
    width: 100%;
    height: 0;
    margin: 10px 0 20px !important;
    border: 0;
    border-top: 2px solid;
    color: inherit;
}

.hcs-conteudo-neve .wp-block-post-content .wp-block-separator.is-style-wide {
    border-top-width: 4px;
}

.hcs-conteudo-neve .wp-block-post-content .wp-block-separator.is-style-dots::before {
    content: "";
    display: block;
    border-top: 4px dotted;
}

/* Listas e citações no conteúdo, como no Neve (.nv-content-wrap) */
:root .hcs-conteudo-neve .wp-block-post-content :is(ul, ol):not([class*="menu"]) {
    margin: 30px 0;
    padding-left: 20px;
}

:root .hcs-conteudo-neve .wp-block-post-content li {
    margin-top: 10px;
}

:root .hcs-conteudo-neve .wp-block-post-content blockquote:not(.wp-block-pullquote blockquote) {
    margin: 40px 0;
    border: solid var(--nv-text-color);
    border-width: 0 0 0 4px;
}

/* Acordeão do Otter: margem vertical que tinha no Neve. */
:root .hcs-conteudo-neve .wp-block-post-content .wp-block-themeisle-blocks-accordion {
    margin-block: 20px;
}

/* Cover num tema clássico: sem padding global nem espaço automático entre os filhos. */
.hcs-conteudo-neve .wp-block-post-content .wp-block-cover__inner-container.has-global-padding {
    padding-left: 0;
    padding-right: 0;
}

:root :where(.hcs-conteudo-neve .wp-block-cover__inner-container) > * {
    margin-block-start: 0;
}

/* Home em mobile: header branco por cima do hero, que sobe a altura do header (como o JS do Neve child fazia). */
@media (max-width: 600px) {
    .hcs-header-sobreposto .wp-site-blocks > header {
        position: sticky; /* header fixo (hcs.css) */
        z-index: 100;
        background: #fff;
    }

    .hcs-header-sobreposto .home_section {
        margin-top: -71px; /* altura do header no telemóvel */
        min-height: calc(100vh + 71px);
    }
}

/* Media & text com colunas título/texto lá dentro (Gestão de Alojamento Local): o título fica por
   cima do texto em vez de numa coluna estreita onde as palavras partiam ("SuperHo-st"). */
.wp-block-media-text__content > .wp-block-columns {
	flex-direction: column;
	gap: 0 !important; /* o layout das colunas gera um gap de 2em com seletor mais forte */
}
.wp-block-media-text__content > .wp-block-columns > .wp-block-column {
	flex-basis: auto !important;
	width: 100%;
}
.wp-block-media-text__content > .wp-block-columns h2 {
	word-break: normal;
	overflow-wrap: normal;
	margin-bottom: 12px;
}

/* ---------- Telemóvel ---------- */
@media (max-width: 781px) {
	/* Grupos a toda a largura (com ou sem fundo): conteúdo a 20px das margens. */
	.wp-block-post-content .alignfull.has-global-padding {
		padding-left: 20px;
		padding-right: 20px;
	}
	/* Media & text empilhado: texto alinhado com a imagem e afastado dela. */
	.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
		padding: 20px 0 0;
	}
	/* Colunas vazias (ex. coluna do título sem título) não ocupam espaço quando empilhadas. */
	.wp-block-columns > .wp-block-column:empty {
		display: none;
	}
	/* Espaços de 69px entre secções das páginas de texto: mais curtos no telemóvel. */
	.wp-block-post-content > .wp-block-spacer[style*="69px"] {
		height: 32px !important;
	}
}
