:root {
    --black: #121212;
    --white: #FFFFFF;
    --grey: #dddddd;
    --greyDark: #707070;

    --marginSide: 100px;
    --gap10px: 10px;
    --gap20px: 20px;
    --gap40px: 40px;
    --gap100px: 100px;

    --border-radius: 15px;

    --section-highlight-background: #402441;
    --section-highlight-type: #F071A5;
}

/*general*/
* {
    margin: 0;
    padding: 0;
    text-wrap: pretty;
    overflow-wrap: break-word;
}

body {
    background-color: var(--white);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

main {
    position: relative;
}

.margin-side {
    margin: 0 var(--marginSide);
}

.main-margin {
    padding-top: calc(var(--gap100px) * 2);
}

.main-flex {
    display: flex;
    flex-direction: column;
    gap: var(--gap100px);
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: var(--gap20px);
    flex-wrap: wrap;
    align-items: start;
}

/*grid*/
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    row-gap: var(--gap20px);
    column-gap: var(--gap20px);
}

.span-1 {
    grid-column: span 1;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.span-5 {
    grid-column: span 5;
}

.span-6 {
    grid-column: span 6;
}

.span-7 {
    grid-column: span 7;
}

.span-8 {
    grid-column: span 8;
}

.span-9 {
    grid-column: span 9;
}

.span-10 {
    grid-column: span 10;
}

.span-11 {
    grid-column: span 11;
}

.span-12 {
    grid-column: span 12;
}

/*font*/
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../font/PlusJakartaSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../font/PlusJakartaSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

h1 {
    font-size: 80px;
    line-height: 85px;
}

h2 {
    font-size: 60px;
    line-height: 65px;
}

.h2,
.h2 p,
.h2>* {
    font-size: 60px;
    line-height: 65px;
}

h3 {
    font-size: 50px;
    line-height: 55px;
}

.h3,
.h3 p,
.h3>* {
    font-size: 50px;
    line-height: 55px;
}

p {
    font-size: 20px;
    line-height: 25px;
}

.p-big {
    font-size: 30px;
    line-height: 40px;
}

.p-small {
    font-size: 16px;
    line-height: 21px;
}

.bold {
    font-weight: 600;
}

.bold>* {
    font-weight: 600;
}

a {
    color: var(--black)
}

.category-cinema a {
    color: var(--white);
}

header .menu-item {
    font-size: 18px;
    line-height: 23px;
}

.logo-header-desktop p {
    font-size: 18px;
    line-height: 23px;
    font-weight: 600;
}




/*button*/
.button-header {
    background-color: none;
    width: fit-content;

    transform: translateY(0);
    transition: transform 0.25s ease;
}

.category-cinema .button-header {
    color: var(--black);
}


header .menu-item:hover {
    text-decoration: underline;
}

header .menu-item:hover {
    text-decoration: underline;
    text-decoration-color: var(--black);
}

.button-header-language {
    transform: translateY(0);
    transition: transform 0.25s ease;
}

.button-header-language:hover {
    transform: translateY(-5px);
    cursor: pointer;
}

button {
    padding: 4px 10px;
    border-radius: var(--border-radius);
    background-color: var(--grey);
    color: var(--black);
    width: fit-content;

    border: none;
    outline: none;
    box-shadow: none;
    appearance: none;

    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

button:hover {
    background-color: var(--greyDark);
}

.primary-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    list-style-type: none;
}

.button-header-mobile {
    display: none;
}

/*header*/
/* removes the blue/grey tap highlight on mobile */
header,
header * {
    -webkit-tap-highlight-color: transparent;
}

header a,
header button {
    -webkit-user-select: none;
    user-select: none;
}

/* no focus ring on tap/click, but keep it for keyboard users */
header a:focus:not(:focus-visible),
header button:focus:not(:focus-visible) {
    outline: none;
}

.logo-header-desktop {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

header a {
    text-decoration: none;
}




#header-logo {
    height: 35px;
    width: auto;
}

.header-desktop {
    display: block;
}

.header-mobile {
    display: none;
}

.header-index {
    position: fixed;
    top: 0;
    width: calc(100% - (var(--marginSide) * 2));
}

.header-fixed {
    position: fixed;
    top: 0;
    width: calc(100% - (var(--marginSide) * 2));
}

header {
   padding: 15px 25px 15px 15px;
    position: fixed;
    top: var(--gap20px);
    width: calc(100% - var(--marginSide) * 2 - (15px + 25px));
    z-index: 1000000;
    border-radius: 100px;
    background: rgba(221, 221, 221, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    align-content: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--black)
}

/* Página ativa no menu (desktop e mobile) */
.primary-menu .current-menu-item>a,
.primary-menu .current-menu-ancestor>a,
.primary-menu .current_page_item>a,
.primary-menu .current-page-ancestor>a {
    text-decoration: underline;
}

.header-nav {
    display: block;
}

.menu-mobile {
    display: none;
}

/*events*/
.event-image {
    aspect-ratio: 6/4;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    position: relative;
}

.event-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease, border-radius 0.5s ease;
}

.event-image--empty {
    background: linear-gradient(to top right,
            transparent calc(50% - 0.5px),
            var(--grey) calc(50% - 0.5px),
            var(--grey) calc(50% + 0.5px),
            transparent calc(50% + 0.5px));
}

.event-link {
    color: var(--black);
    text-decoration: none;
    height: max-content;
}

.event-link:hover .event-image img {
    border-radius: 0;
    transform: scale(1.05);
}

.event-link:hover .event-title {
    text-decoration: underline;
}


.event-state {
    position: absolute;
    top: var(--gap20px);
    right: var(--gap20px);
}

.event-state {
    padding: 3px 10px;
    border: 1px solid var(--white);
    color: var(--white);
    width: fit-content;
    border-radius: var(--border-radius);
}

.event-date-old {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Estado no canto superior direito do hero (single + slider da homepage), por baixo do header.
   Visual igual ao botão da categoria secundária (no hero). */
.event-state--hero {
    top: calc(var(--gap20px) + 65px + var(--gap20px)); /* top do header + altura do header + espaço */
    left: var(--marginSide);
    z-index: 3;
    background-color: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 3px 10px;
}

.hightlight-event-img.is-cancelled {
    background-color: var(--white);
}

.event-state--hero .p-small {
    line-height: 14px;
}

.event-link:hover {
    cursor: pointer;
}


.event-cancelled {
    opacity: 50%;
}



.event-details {
    margin-top: var(--gap10px);
    display: grid;
    flex-direction: column;
    row-gap: var(--gap10px);
}


.event-details div {
    grid-column: 1 / span 6;
}

.event-categories {
    display: flex;
    flex-direction: row;
    gap: var(--gap10px);
}

.category-main {
    padding: 5px 10px;
    border-radius: var(--border-radius);
    background-color: var(--black);
    color: var(--white);
    width: fit-content;
}

.category-secundary {
    padding: 5px 10px;
    border-radius: var(--border-radius);
    background-color: var(--white);
    color: var(--black);
    border: 1px solid var(--black);
    width: fit-content;
}

.event-category {
    display: flex;
    flex-direction: row;
    gap: var(--gap10px);
}

.event-category .p-small {
    line-height: 14px;
}

.evento-ficha-tecnica {
    color: var(--greyDark);
}


/*agenda*/
.agenda-grid {
    row-gap: var(--gap40px);
}

.agenda-month {
    display: flex;
    flex-direction: column;
    gap: var(--gap40px);
}

.agenda-month .grid {
    row-gap: calc(var(--gap20px) * 2);
}

.agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: var(--gap20px);
}

.agenda-heading-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);
}

.filter {
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);
    position: relative;
    border: 1px solid var(--greyDark);
    border-radius: 100px;
}

.filter:hover {
    background-color: var(--grey);
}

.filter-list {
    display: flex;
    flex-direction: row;
    gap: var(--gap20px);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.filter-list-container {
    display: flex;
    flex-direction: row;
    gap: var(--gap20px);
    flex-wrap: wrap;
}

.filter-title {
    display: flex;
    flex-direction: row;
    gap: var(--gap40px);
    padding: 5px 10px;
}

.filter img {
    width: 10px;
    height: auto;
    transition: transform 0.5s ease;
}

.filter:hover {
    cursor: pointer;
}

/* The native select stays in the DOM (the JS reads it) but is hidden */
.filter-select {
    display: none;
}

/* Custom dropdown: trigger */
.filter-title {
    align-items: center;
    border-radius: 100px;
    -webkit-tap-highlight-color: transparent;
}

.filter-title:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: 2px;
}

.filter.is-open {
    background-color: var(--grey);
}

.filter.is-open .filter-title img {
    transform: rotate(180deg);
}

/* Custom dropdown: panel */
.filter-menu {
    position: absolute;
    top: calc(100% + var(--gap10px));
    left: 0;
    z-index: 60;
    min-width: 100%;
    width: max-content;
    max-width: min(320px, calc(100vw - (var(--marginSide) * 2)));
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 6px;
    list-style: none;
    background-color: var(--grey);
    color: var(--black);
    border-radius: var(--border-radius);
}

.filter-menu[hidden] {
    display: none;
}

.filter-menu.is-right {
    left: auto;
    right: 0;
}

.filter-menu li {
    padding: 8px 12px;
    border-radius: calc(var(--border-radius) - 5px);
    font-size: 14px;
    line-height: 19px;
    color: var(--black);
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
}

.filter-menu li:hover,
.filter-menu li.is-focused {
    background-color: rgba(18, 18, 18, 0.08);
}

.filter-menu li[aria-selected="true"] {
    font-weight: 600;
}

.filter-searchbar {
    background-color: var(--grey);
    border: none;
    border-radius: var(--border-radius);
    padding: 5px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(var(--gap10px) / 2);
    height: fit-content;

    min-width: 200px;
    max-width: 400px;
}

.filter.filter-searchbar img {
    width: 15px;
    height: auto;
    flex-shrink: 0;
}

.filter-searchbar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    font-size: 14px;
    line-height: 19px;
}


.filter-searchbar input::placeholder {
    color: inherit;
    opacity: 0.7;
}

.filter-title p.p-small {
    white-space: nowrap;
}

/*agenda*/
.agenda-archive {
    --archive-width: min(420px, 85vw);
    position: fixed;
    right: calc(var(--marginSide) / 2);
    top: 50%;
    z-index: 999;
    transform: translate(50%, -50%) rotate(-90deg);
    /* on close: keep the z-index high until the panel has finished sliding out */
    transition: transform 0.5s ease, z-index 0s linear 0.5s;
}

.agenda-archive.is-open {
    transform: translate(50%, -50%) rotate(-90deg);
    z-index: 10000001;
    /* on open: jump above the panel immediately */
    transition: transform 0.5s ease, z-index 0s linear 0s;
}

.agenda-archive-toggle {
    cursor: pointer;
}

.label-close {
    display: none;
}

.agenda-archive.is-open .label-archive {
    display: none;
}

.agenda-archive.is-open .label-close {
    display: inline;
}

/* blur overlay: above the header (1000000), below the panel and button */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background-color: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body:has(.archive-panel.is-open)::after {
    opacity: 1;
    pointer-events: auto;
}

.archive-trimestre:hover {
    background-color: transparent;
}

.archive-panel {
    --archive-width: min(500px, 85vw);
    position: fixed;
    top: 50%;
    right: 0;
    height: 100%;
    height: calc(var(--vh, 1vh) * 100);
    width: var(--archive-width);
    z-index: 10000000;
    background-color: var(--grey);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%) translateY(-50%);
    visibility: hidden;
    transition: transform 0.5s ease, visibility 0s linear 0.5s;
    border-radius: var(--border-radius);
}

.archive-panel.is-open {
    transform: translateX(0) translateY(-50%);
    visibility: visible;
    transition: transform 0.5s ease, visibility 0s linear 0s;
}

.archive-panel-inner {
    display: flex;
    flex-direction: column;
    gap: var(--gap40px);
    padding: var(--gap100px) var(--gap40px) var(--gap40px) var(--gap40px);
}

.agenda-archive.is-open .agenda-archive-toggle {
    background-color: var(--greyDark);
}

/**/

.archive-year {
    display: flex;
    flex-direction: column;
    gap: var(--gap10px);
}

.archive-year-head {
    color: var(--greyDark);
}

.archive-trimestres {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap10px);
}

.archive-trimestre {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: var(--gap20px);
    cursor: pointer;
    color: var(--black);
}

.archive-trimestre-months {
    opacity: 0.5;
}

.archive-trimestre.is-current {
    text-decoration: underline;
}

.archive-panel.has-selection .archive-trimestre.is-current:not(.active):not(:hover) {
    text-decoration: none;
}

html.archive-open,
html.archive-open body {
    overflow: hidden;
}

.archive-trimestre:hover,
.archive-trimestre.active {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.archive-trimestre:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: 4px;
}

/*acolhimento*/
#agenda-acolhimento {
    margin-top: 100px;
}

#agenda-acolhimento .event-categories {
    justify-content: flex-end;
}

#agenda-acolhimento .event {
    padding-top: var(--gap40px);
    border-top: 1px solid var(--grey);
}

.agenda-container,
.agenda-acolhe-container {
    display: contents;
}

.agenda-container.is-loading>* {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

@keyframes agenda-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.agenda-container>*,
.agenda-acolhe-container>* {
    animation: agenda-fade-in 0.4s ease both;
}

@media (prefers-reduced-motion: reduce) {

    .agenda-container>*,
    .agenda-acolhe-container>* {
        animation: none;
    }
}

.filter.has-active {
    background-color: var(--grey);
}

.agenda-search::-webkit-search-cancel-button {
    cursor: pointer;
}

.agenda-heading {
    display: flex;
    flex-direction: column;
    gap: var(--gap10px);
}

.agenda-archive-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gap20px);
}

.agenda-archive-status[hidden] {
    display: none;
}

.agenda-show-current {
    all: unset;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    background-color: var(--grey);
    color: var(--black);
}

.agenda-show-current:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: 3px;
}

.agenda-acolhe-container .event {
    row-gap: var(--gap10px);
}


/*footer*/
footer {
    padding-top: var(--gap100px);
    margin: var(--gap20px) var(--marginSide) !important;
}

footer ul {
    list-style-type: none;
}

.footer-contacts {
    margin: calc(var(--gap20px) * 2) 0;
    padding-top: calc(var(--gap20px) * 2);
    border-top: 1px solid var(--grey);
}

.footer-socialmedia {
    display: flex;
    flex-direction: row;
    gap: var(--gap20px);
    justify-content: flex-end;
    text-align: right;
}

footer a {
    text-decoration: none;
    color: var(--black)
}

footer a:hover {
    text-decoration: underline;
}

.footer-social-menu {
    display: flex;
    flex-direction: row;
    gap: var(--gap20px);
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    list-style: none;
}


/* Footer newsletter: coloured block with the call to action next to the copy */
.footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap20px);
    padding: var(--gap40px);
    border-radius: var(--border-radius);
    background-color: var(--grey);
    color: var(--black);
}

.footer-newsletter-text {
    max-width: 720px;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.25;
}

.footer-newsletter-text strong {
    font-weight: 600;
}

.footer-newsletter-links .footer-social-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--gap10px);
}

.footer-newsletter-links a:hover {
    text-decoration: none;
}

.footer-newsletter-links button {
    background-color: var(--grey);
    border: 1px solid var(--black);
    color: var(var(--black));
    border-radius: 100px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-newsletter-links button:hover {
    background-color: var(--black);
    color: var(--grey);
}

@media (max-width: 640px) {
    .footer-newsletter {
        padding: var(--gap20px);
    }
}

/*index*/
.higlight-hero {
    margin-left: calc(-1 * var(--marginSide));
    width: calc(100% + var(--marginSide) * 2);
    ;
    height: calc(var(--vh, 1h)*100);
    ;
    position: relative;
}

.highlight-dots {
    position: absolute;
    z-index: 5;
    right: calc(var(--marginSide) / 2);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.highlight-dots .dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid var(--white);
    background-color: transparent;
    padding: 0;
    cursor: pointer;
    outline: none;
}

.highlight-dots .dot.active {
    background-color: var(--white);
}

.highlight-dots .dot:hover {
    background-color: rgba(225, 225, 225, 0.5);
}

.highlight-event {
    width: 100%;
    height: 100%;
    position: relative;
}

.highlight-event-credits {
    position: absolute;
    background-color: transparent;
    color: var(--white);
    width: fit-content;
    bottom: calc(var(--marginSide) / 2);
    right: calc(var(--marginSide));
}

.highlight-event a {
    text-decoration: none;
}




.hightlight-event-img {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hightlight-event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* fade-in quando a imagem acaba de carregar (o fundo preto do hero fica visível até lá) */
    opacity: 1;
    transition: opacity 0.8s ease;
}

.hightlight-event-img img.is-loaded {
    opacity: 1;
}

/* Evento cancelado: todo o hero (imagem, estado, créditos e texto) com menos opacidade.
   O fundo preto fica por baixo para a imagem não ficar "lavada". */

.hightlight-event-img.is-cancelled img,
.hightlight-event-img.is-cancelled img.is-loaded,
.hightlight-event-img.is-cancelled .highlight-event-layer,
.hightlight-event-img.is-cancelled .highlight-event-credits,
.highlight-info.is-cancelled .highlight-info-link,   /* slider da homepage */
.single-hero .highlight-event-info.is-cancelled {    /* single */
    opacity: 0.5;
}



@media (prefers-reduced-motion: reduce) {
    .hightlight-event-img img {
        transition: none;
    }
}

.highlight-event-info {
    position: absolute;
    bottom: calc(var(--marginSide) / 2);
    left: var(--marginSide);

    color: var(--white);
    pointer-events: none;
    z-index: 4;
}



/* No slider, o link cobre todo o .event-details; só o título sublinha no hover */
.highlight-info-link {
    display: block;
    pointer-events: auto;
    color: inherit;
    text-decoration: none;
}

.highlight-info-link:hover .slider-title h2 {
    text-decoration: underline;
}

.highlight-event-layer {
    background-color: rgba(35, 32, 31, 0.2);
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


/*highlight slider*/
.highlight-slides {
    position: absolute;
    inset: 0;
}

.highlight-slides .highlight-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
}

.highlight-slides .highlight-slide.is-prev {
    opacity: 1;
    z-index: 1;
}

.highlight-slides .highlight-slide.is-active {
    opacity: 1;
    z-index: 2;
    transition: opacity 0.9s ease;
}

.highlight-slide--empty {
    background-color: var(--black);
}

.highlight-event-info.highlight-info {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.highlight-event-info.highlight-info.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s ease, visibility 0s;
}

.higlight-hero .category-main,
.single-hero .category-main {
    background-color: var(--white);
    color: var(--black);
}

.higlight-hero .category-secundary,
.single-hero .category-secundary {
    border: 1px solid var(--white);
    background-color: transparent;
    color: var(--white);
}

/*single*/
body.category-cinema {
    background-color: var(--black);
    color: var(--white);
}

.highlight-event-info.no-image {
    position: static;
    bottom: auto;
    left: auto;
    color: inherit;
    pointer-events: auto;
}

.highlight-event-info.no-image .category-main {
    background-color: var(--black);
    color: var(--white);
}

.highlight-event-info.no-image .category-secundary {
    border: 1px solid var(--black);
    background-color: var(--white);
    color: var(--black);
}

.apoio-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);

    grid-column: 7 / span 6;
}

.apoio-logos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--gap20px);
}

.apoio-logos img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    object-position: center;
    display: block;

    -webkit-filter: grayscale(1);
    filter: grayscale(1);
}




/*cursor*/
@keyframes floatLoop {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-49.2%, -51.5%) rotate(0.4deg);
        /* Very subtle drift up/right */
    }

    50% {
        transform: translate(-50.8%, -48.8%) rotate(-0.3deg);
        /* Very subtle drift down/left */
    }

    75% {
        transform: translate(-49.5%, -51.2%) rotate(0.2deg);
        /* Minor recovery shift */
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

#cursor-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/*section highlight 1*/
.section-highlight {
    color: var(--section-highlight-type);
}

.section-highlight button {
    background-color: transparent;
    border: 1px solid var(--section-highlight-type);
    color: var(--section-highlight-type);

    transition: 0.5s ease all;
}

.section-highlight button:hover {
    background-color: var(--section-highlight-type);
    color: var(--section-highlight-background);
    border: 1px solid var(--section-highlight-background);
}


.section-highlight-flex {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.section-highlight.type-1 {
    margin-left: calc(-1 * var(--marginSide));
    width: calc(100% + var(--marginSide) * 2);
    min-height: calc(var(--vh, 1h)*70);
    ;

    position: relative;
    display: flex;
    justify-content: flex-end;
}

.section-highlight.type-1 img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.section-highlight.type-1 .section-text {
    position: relative;
    z-index: 1;
    width: calc(50% - var(--marginSide));
    box-sizing: border-box;
    background-color: var(--section-highlight-background);
    border-radius: var(--border-radius);
    margin: calc(var(--marginSide) / 2);
    padding: calc(var(--marginSide) / 2);

    display: flex;
    align-items: center;
}

.section-highlight.type-1 .section-text-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.section-highlight .section-text a {
    color: var(--section-highlight-type);
}

.section-text-container button:hover {
    background-color: var(--section-highlight-type);
}




/*section highlight 2*/
.section-highlight.type-2 {
    margin-left: calc(-1 * var(--marginSide));
    width: calc(100% + var(--marginSide) * 2);
    min-height: calc(var(--vh, 1h)*70);

    display: flex;
    justify-content: flex-end;
    align-items: stretch;

    background-color: var(--section-highlight-background);
}

.section-highlight.type-2 .section-image {
    width: calc(50%);
    margin: calc(var(--marginSide) / 2);
    display: flex;
    aspect-ratio: 6 / 4;
}

.section-highlight.type-2 .section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.section-highlight.type-2 .section-text {
    width: 50%;
    display: flex;
    align-items: center;
    margin: calc(var(--marginSide) / 2);
}

.section-highlight.type-2 .section-text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);
}



/*single*/
.single-hero {
    margin-left: calc(-1 * var(--marginSide));
    width: calc(100% + var(--marginSide) * 2);
    ;
    height: calc(var(--vh, 1h)*90);
}

.single-text {
    /*
    padding-top: var(--gap40px);
    border-top: 1px solid var(--grey);
    */
    margin-top: -60px !important;
}

.single-text-border {
    padding-top: var(--gap40px);
    border-top: 1px solid var(--grey);
}

.single-text-side {
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);
}

.event-local-block a {
    color: var(--black);
    text-decoration: underline;
}

.category-cinema .event-local-block a {
    color: var(--white);
    text-decoration: underline;
}

.category-cinema {
    background-color: var(--black);
}

.category-cinema main,
.category-cinema footer {
    background-color: var(--black);
    color: var(--white);
}


/*info page*/
.infopage-hero {
    margin-left: calc(-1 * var(--marginSide));
    width: calc(100% + var(--marginSide) * 2);
    height: calc(var(--vh, 1h)*90);
    ;
}

.infopage-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.infopage-text {
    row-gap: var(--gap40px);
    margin-top: -60px !important;
}

.infopage-stats-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.infopage-stats {
    width: calc(100% / 3);
    box-sizing: border-box;
    border-top: 1px solid var(--grey);
    border-right: 1px solid var(--grey);
    padding: var(--gap40px) var(--gap20px);
    display: flex;
    flex-direction: column;
    gap: var(--gap20px);
}

.infopage-stats:nth-child(3n) {
    border-right: none;
}

.infopage-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap40px);
}

.infopage-container-text {
    padding-top: var(--gap40px);
    border-top: 1px solid var(--grey);
}

/**/
.cmplz-cookiebanner .cmplz-title {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 500 !important;
}

.cmplz-message p {
    font-size: 14px !important;
    line-height: 19px !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    min-height: 0 !important;
    height: auto !important;
    width: fit-content !important;
    padding: 4px 10px !important;
    font-size: inherit !important;
    line-height: normal !important;
    font-family: inherit !important;
    border-radius: var(--border-radius) !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    font-size: 14px !important;
}

.cmplz-cookiebanner .cmplz-buttons {
    display: flex;
    gap: var(--gap10px) !important;
    justify-content: center !important;
}

.cmplz-cookiebanner .cmplz-close {
    display: none !important;
}

#cmplz-manage-consent .cmplz-manage-consent {
    display: none !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-always-active {
    color: var(--greyDark) !important;
}

.cmplz-cookiebanner svg {
    height: 14px;
    width: auto;
}

/* Laptop */
@media (max-width: 1800px) {
    :root {
        --marginSide: 70px;
    }

    /*font*/
    h1 {
        font-size: 60px;
        line-height: 65px;
    }

    h2 {
        font-size: 45px;
        line-height: 50px;
    }

    .h2,
    .h2 p,
    .h2>* {
        font-size: 45px;
        line-height: 50px;
    }

    h3 {
        font-size: 30px;
        line-height: 35px;
    }

    .h3,
    .h3 p,
    .h3>* {
        font-size: 30px;
        line-height: 35px;
    }

    p {
        font-size: 16px;
        line-height: 21px;
    }

    header .menu-item {
        font-size: 16px;
        line-height: 21px;
    }

    .logo-header-desktop p {
        font-size: 16px;
        line-height: 21px;
    }



    .p-big {
        font-size: 25px;
        line-height: 30px;
    }

    .p-small {
        font-size: 14px;
        line-height: 19px;
    }

    .cmplz-message p {
        font-size: 14px !important;
        line-height: 19px !important;
    }

    .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
        font-size: 14px !important;
    }

    .archive-panel {
        --archive-width: min(400px, 85vw);

    }

    /*agenda*/
    .filter-list {
        gap: var(--gap10px);
    }

    .filter-list-container {
        gap: var(--gap10px);
    }

    .filter-title {
        gap: var(--gap20px);
    }

    .filter-searchbar input {

        font-size: 14px;
        line-height: 19px;
    }

    /*header*/
    #header-logo {
        height: 30px;
        width: auto;
    }

}

/* Tablet */
@media (max-width: 1000px) {
    :root {
        --marginSide: 50px;
    }

    /*font*/
    h1 {
        font-size: 60px;
        line-height: 65px;
    }

    h2 {
        font-size: 45px;
        line-height: 50px;
    }

    .h2,
    .h2 p,
    .h2>* {
        font-size: 45px;
        line-height: 50px;
    }

    h3 {
        font-size: 30px;
        line-height: 35px;
    }

    .h3,
    .h3 p,
    .h3>* {
        font-size: 30px;
        line-height: 35px;
    }

    header .menu-item {
        font-size: 16px;
        line-height: 21px;
    }

    .logo-header-desktop p {
        font-size: 16px;
        line-height: 21px;
    }

    p {
        font-size: 16px;
        line-height: 21px;
    }


    .p-big {
        font-size: 25px;
        line-height: 30px;
    }

    .p-small {
        font-size: 14px;
        line-height: 19px;
    }

    .cmplz-message p {
        font-size: 14px !important;
        line-height: 19px !important;
    }

    .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
        font-size: 14px !important;
    }

    /**/

    .grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        row-gap: var(--gap20px);
        column-gap: var(--gap20px);
    }

    .span-t-0 {
        display: none;
    }

    .span-t-1 {
        grid-column: span 1;
    }

    .span-t-2 {
        grid-column: span 2;
    }

    .span-t-3 {
        grid-column: span 3;
    }

    .span-t-4 {
        grid-column: span 4;
    }

    .span-t-5 {
        grid-column: span 5;
    }

    .span-t-6 {
        grid-column: span 6;
    }

    /*header*/
    

    header {
        padding: var(--gap10px) 15px var(--gap10px) var(--gap10px) ;
        width: calc(100% - (10px + 15px) - var(--marginSide) * 2);
    }

    #header-logo {
        height: 25px;
    }

    /*footer*/
    .footer-socialmedia {
        justify-content: flex-start;
        text-align: left;
    }

    .footer-social-menu {
        justify-content: flex-start;
    }

    .footer-newsletter {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-direction: column;
        gap: var(--gap20px);
    }

    /*agenda*/
    .page-title {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-direction: column;
        gap: var(--gap20px);
        flex-wrap: wrap;
    }

    .main-margin {
        padding-top: calc(var(--gap100px));
    }

    .main-flex {
        display: flex;
        flex-direction: column;
        gap: calc(var(--gap100px) / 2);
    }

    .filter-title {
        gap: 5px;
    }

    /*acolhimento*/
    #agenda-acolhimento {
        margin-top: var(--gap40px);
        row-gap: var(--gap40px);
    }

    #agenda-acolhimento .event-categories {
        justify-content: flex-start;
    }

    #agenda-acolhimento .event {
        padding-top: var(--gap20px);
    }

    .filter-list {
        flex-wrap: wrap;
        justify-content: flex-start;
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .filter-list-container {
        gap: var(--gap10px);
    }


    /*single*/
    .single-hero {
        margin-left: calc(-1 * var(--marginSide));
        width: calc(100% + var(--marginSide) * 2);
        height: calc(var(--vh, 1h)*90);
        ;
    }

    .highlight-event-info {
        bottom: calc(var(--marginSide));
        left: var(--marginSide);
    }


    .single-text {
        padding-top: var(--gap20px);
        margin-top: -40px !important;
    }

    .apoio-container {
        grid-column: 1 / span 6;
    }

    .apoio-logos img {
        width: 40px;
        height: 40px;
    }

    /*bilheteira*/
    .infopage-hero {
        height: calc(var(--vh, 1h)*90);
        ;
    }

    .infopage-text {
        margin-top: -20px !important;
    }

    .infopage-stats {
        width: calc(100% / 1);
        border-top: 1px solid var(--grey);
        border-right: 0;
        padding: var(--gap20px) 0;
    }

    .section-highlight.type-1 .section-text {
        position: relative;
        z-index: 1;
        width: 100%;
        box-sizing: border-box;
        background-color: var(--section-highlight-background);
        border-radius: var(--border-radius);
        margin: calc(var(--marginSide) * 2);
        padding: calc(var(--marginSide));
        display: flex;
        align-items: center;
    }

    .section-highlight.type-1 {
        min-height: auto;
    }

    .section-highlight.type-2 {
        width: calc(100% + var(--marginSide) * 2);
        flex-direction: column;
    }

    .section-highlight.type-2 .section-image {
        width: calc(100% - var(--marginSide) * 2);
        margin: calc(var(--marginSide) * 2) var(--marginSide) var(--marginSide) var(--marginSide);
        display: flex;
    }

    .section-highlight.type-2 .section-text {
        width: calc(100% - var(--marginSide) * 2);
        margin: 0 var(--marginSide) calc(var(--marginSide) * 2) var(--marginSide);
    }

    .section-highlight.type-2 {
        min-height: auto;
    }

    /*homepage*/
    .agenda-header {
        align-items: flex-start;
        gap: var(--gap20px);
        align-content: flex-start;
        flex-direction: column;
    }

    .higlight-hero {
        height: calc(var(--vh, 1h)*90);
        ;
    }

    .highlight-dots {
        right: calc(var(--marginSide));
    }

    .highlight-dots .dot {
        width: 12px;
        height: 12px;
    }


    .highlight-event-info {
        bottom: calc(var(--marginSide) * 1.5);
        left: var(--marginSide);
    }

    .highlight-event-credits {
        bottom: calc(var(--marginSide) / 2);
        left: var(--marginSide);
    }


    .agenda-month-homepage {
        margin-top: -20px !important;
    }

    /*archive*/

    /* Archive: tablet + mobile (full screen, slides up from the bottom) */
    .archive-panel {
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        transform: translateY(100%);
    }

    .archive-panel.is-open {
        transform: translateY(0);
    }

    .archive-panel-inner {
        /* leave room so the Fechar button doesn't cover the list */
        padding-bottom: calc(var(--gap100px) + 40px);
    }

    /* button: bottom center, no rotation */
    .agenda-archive,
    .agenda-archive.is-open {
        top: auto;
        right: auto;
        left: 50%;
        bottom: 20px;
        transform: translateX(-50%);
    }


    .cmplz-cookiebanner .cmplz-buttons {
        gap: var(--gap10px) !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    /*event*/
    .event-details {
        max-width: calc(100% - var(--marginSide));
        row-gap: var(--gap10px) !important;
    }






}

/* Mobile*/
@media (max-width: 640px) {
    :root {
        --marginSide: 25px;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        row-gap: calc(var(--gap20px));
        column-gap: calc(var(--gap20px) / 2);
    }

    .span-m-1 {
        grid-column: span 1;
    }

    .span-m-2 {
        grid-column: span 2;
    }

    .span-m-3 {
        grid-column: span 3;
    }

    .span-m-4 {
        grid-column: span 4;
    }

    .span-m-5 {
        grid-column: span 5;
    }

    .span-m-6 {
        grid-column: span 6;
    }


    /*font*/
    h1 {
        font-size: 35px;
        line-height: 40px;
    }

    h2 {
        font-size: 30px;
        line-height: 35px;
    }

    .h2,
    .h2 p,
    .h2>* {
        font-size: 30px;
        line-height: 35px;
    }

    h3 {
        font-size: 25px;
        line-height: 30px;
    }

    .h3,
    .h3 p,
    .h3>* {
        font-size: 25px;
        line-height: 30px;
    }

    header .menu-item {
        font-size: 25px;
        line-height: 30px;
    }




    p {
        font-size: 16px;
        line-height: 21px;
    }


    .p-big {
        font-size: 20px;
        line-height: 25px;
    }

    .p-small {
        font-size: 14px;
        line-height: 19px;
    }

    .cmplz-message p {
        font-size: 14px !important;
        line-height: 19px !important;
    }

    .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
        font-size: 14px !important;
    }

    /*header*/

    header {
        padding: var(--gap10px) 15px var(--gap10px) var(--gap10px);
        width: calc(100% - (var(--gap10px) + 15px)  - var(--marginSide) * 2);
    }

    .header-desktop {
        display: none;
    }

    .header-mobile {
        display: block;
    }

    /*institutional*/
    .infopage-container-text {
        padding-top: var(--gap20px);
    }

    /*agenda*/
    .filter-searchbar {
        width: calc(100% - var(--gap20px));
        max-width: none;
    }

        .filter-menu {
        /* full screen width, minus the site side margins */
        width: calc(100vw - (var(--marginSide) * 2));
        min-width: 0;
        max-width: none;
        max-height: 50vh;
    }

    .filter-menu li {
        padding: 12px;
        display: flex;
        align-items: center;
    }

    /*single*/

    .single-text {
        padding-top: var(--gap40px);
        margin-top: -40px !important;
    }

    /*bilheteira*/
    .section-highlight.type-1 .section-text {
        position: relative;
        z-index: 1;
        width: 100%;
        box-sizing: border-box;
        background-color: var(--section-highlight-background);
        border-radius: var(--border-radius);
        margin: calc(var(--marginSide) * 2) var(--marginSide);
        padding: calc(var(--marginSide));
        display: flex;
        align-items: center;
    }

    /*menu*/
    .menu-mobile {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: calc(100% - var(--gap40px) * 2);
        padding: var(--gap40px);
        height: calc(var(--vh, 1vh) * 100);
        ;
        height: calc(var(--vh, 1vh) * 100);
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(15px);
        z-index: 10000;
        justify-content: flex-start;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .menu-mobile .primary-menu {
        align-items: flex-start;
    }

    .menu-mobile.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        z-index: 10000;
    }

    .menu-mobile ul {
        flex-direction: column;
        gap: var(--gap20px);
    }

    .menu-mobile-white a {
        color: var(--black);
        text-decoration: none;
    }

    .menu-mobile-white {
        font-size: 30px;
        line-height: 35px;
        font-weight: 600;
    }

    .header-nav {
        display: none;
    }

    .button-header-mobile {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        cursor: pointer;
        z-index: 10002;
    }


}


/*loading da homepage*/
.site-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0s linear 0s;
}

html.bc-loading .site-loader {
    display: flex;
}

html.bc-loading,
html.bc-loading body {
    overflow: hidden;
}

.site-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

/* visita recente: cobre a página mas sem logo, até se perceber que está lento */
html.bc-loading-quiet .site-loader__logo {
    visibility: hidden;
}

/* página carregou depressa: fade curtinho */
.site-loader.is-hidden.is-fast {
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.site-loader__logo {
    width: clamp(50px, 10vw, 60px);
    height: auto;
    animation: site-loader-pulse 1.5s ease-in-out infinite;
}

@keyframes site-loader-pulse {

    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-loader__logo {
        animation: none;
    }
}
/* Mobile: tighter spacing between the agenda filters */
@media (max-width: 640px) {
    .filter-list,
    .filter-list-container {
        gap: 8px;
    }

    .filter-list-container {
        row-gap: 8px;
    }

    .filter-title {
        gap: 8px;           /* space between the label and the arrow */
        padding: 4px 12px;
    }

    .filter-title p.p-small {
        margin: 0;
    }
}
/* Mobile: o header é mais baixo, por isso o estado sobe */
@media (max-width: 640px) {
    .event-state--hero {
        top: calc(var(--gap20px) + 45px + var(--gap20px));
    }
}