/* Granbel Agenda — palette #45444A #3B7A75 #013F3E #BDDBD4 #89AFA7 · font Montserrat */
.gag{
	--gag-band:#89AFA7;
	--gag-dark:#013F3E;
	--gag-green:#3B7A75;
	--gag-text:#45444A;
	--gag-excerpt:#fff;                 /* excerpt colour (white, as in the layout). Use #013F3E for more contrast */
	--gag-container:1340px;             /* calendar + preview width */
	--gag-arrow:56px;                   /* size of the big outside arrows */
	--gag-arrow-gap:32px;               /* free space between an arrow (even its hover circle) and the calendar / preview */
	--gag-gutter:120px;                 /* room kept at each side for the big arrows (arrow + gap + a little air to the window edge) */
	font-family:var(--gb-font,'Montserrat',system-ui,sans-serif);
	color:var(--gag-text);

	/* the green band spans the whole window, whatever the alignment chosen in WordPress.
	   Without JavaScript the centred 100vw trick is used; gag.js then measures the real position. */
	position:relative;left:calc(50% - 50vw);
	width:100vw;max-width:100vw;
	margin:56px 0;padding:104px 0 88px;
	background:var(--gag-band);
}
.gag,.gag *,.gag *::before,.gag *::after{box-sizing:border-box}
html:has(.gag),body:has(.gag){overflow-x:clip}   /* no-JS fallback: 100vw includes the scrollbar */
.gag .gag-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- Label "Agenda" (half over the band, like "Gestores") ---------- */
.gag .gag-pill{
	position:absolute;left:50%;top:0;transform:translate(-50%,-50%);z-index:3;
	display:flex!important;align-items:center;justify-content:center;
	min-width:235px;height:59px;margin:0!important;padding:0 56px!important;
	background:var(--gag-dark);color:#fff!important;border:0!important;border-radius:22px;
	font-family:var(--gb-font,'Montserrat',system-ui,sans-serif)!important;font-size:26px!important;font-weight:700!important;line-height:1!important;letter-spacing:0!important;text-transform:none!important;white-space:nowrap;
}

/* ---------- Layout: calendar | preview, arrows outside ---------- */
.gag .gag-inner{
	position:relative;
	width:min(var(--gag-container),calc(100% - 2 * var(--gag-gutter)));
	margin:0 auto;
	display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:72px;align-items:center;
}

.gag .gag-nav{
	position:absolute;top:50%;transform:translateY(-50%);z-index:2;
	display:flex!important;align-items:center;justify-content:center;
	width:var(--gag-arrow)!important;height:var(--gag-arrow)!important;min-height:0!important;margin:0!important;padding:0!important;
	background:none!important;color:#fff!important;border:0!important;border-radius:50%!important;box-shadow:none!important;
	cursor:pointer;transition:opacity .2s ease,background-color .2s ease;
}
.gag .gag-prev{left:calc(-1 * (var(--gag-arrow) + var(--gag-arrow-gap)))}
.gag .gag-next{right:calc(-1 * (var(--gag-arrow) + var(--gag-arrow-gap)))}
.gag .gag-nav:hover:not([disabled]){background:rgba(1,63,62,.18)!important}
.gag .gag-nav:focus:not(:focus-visible){outline:0!important;box-shadow:none!important}   /* a mouse click leaves no ring/halo next to the calendar */
.gag .gag-nav:focus-visible{outline:3px solid var(--gag-dark)!important;outline-offset:2px}
.gag .gag-nav[disabled]{opacity:.35;cursor:default}
.gag .gag-nav svg{display:block;width:36px;height:36px}

/* ---------- Calendar ---------- */
.gag .gag-cal{background:#fff;border-radius:24px;padding:32px 36px 26px;min-width:0}
.gag .gag-cal-head{display:flex;align-items:center;gap:14px;margin:0 0 14px}
.gag .gag-month{margin:0!important;padding:0!important;border:0!important;flex:1 1 auto;min-width:0;font-family:inherit!important;font-size:22px!important;font-weight:700!important;line-height:1.2!important;color:var(--gag-text)!important;text-transform:none!important}
.gag .gag-today{
	flex:none;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;
	font:600 12px/1 var(--gb-font,'Montserrat',system-ui,sans-serif)!important;color:var(--gag-green)!important;text-decoration:underline;text-transform:none!important;cursor:pointer;
}
.gag .gag-today[hidden]{display:none!important}
.gag .gag-today:hover{color:var(--gag-dark)!important}
.gag .gag-month-nav{flex:none;display:flex;gap:4px}
.gag .gag-month-nav button{
	display:flex!important;align-items:center;justify-content:center;
	width:30px!important;height:30px!important;min-height:0!important;margin:0!important;padding:0!important;
	background:none!important;color:var(--gag-text)!important;border:0!important;border-radius:50%!important;box-shadow:none!important;cursor:pointer;
	transition:background-color .2s ease,color .2s ease;
}
.gag .gag-month-nav button:hover{background:rgba(137,175,167,.3)!important;color:var(--gag-dark)!important}
.gag .gag-month-nav button:focus-visible{outline:2px solid var(--gag-dark)!important;outline-offset:1px}

.gag .gag-grid{width:100%;margin:0;border-collapse:separate;border-spacing:0 6px;table-layout:fixed;border:0;background:none}
.gag .gag-grid th,.gag .gag-grid td{padding:0;border:0;background:none;text-align:center;vertical-align:middle}
.gag .gag-grid th{padding:8px 0 4px;font-size:12px;font-weight:700;line-height:1;letter-spacing:.02em;color:var(--gag-text)}
.gag .gag-day{
	display:flex!important;align-items:center;justify-content:center;
	width:min(52px,100%);aspect-ratio:1;margin:0 auto!important;padding:0!important;
	background:none;color:var(--gag-text)!important;border:0!important;border-radius:50%!important;box-shadow:none!important;
	font:500 20px/1 var(--gb-font,'Montserrat',system-ui,sans-serif)!important;position:relative;
}
.gag button.gag-day{cursor:pointer;transition:background-color .2s ease}
.gag .gag-day.has-event{background:var(--gag-band)!important}
.gag button.gag-day.has-event:hover{background:#78a199!important}
.gag .gag-day.is-selected{outline:2px solid var(--gag-dark);outline-offset:2px}
.gag .gag-day.is-today{background:var(--gag-dark)!important;color:#fff!important;font-weight:700!important}
.gag .gag-day.is-today.has-event::after{content:"";position:absolute;left:50%;bottom:7px;width:5px;height:5px;margin-left:-2.5px;border-radius:50%;background:var(--gag-band)}
.gag .gag-day:focus-visible{outline:3px solid var(--gag-dark);outline-offset:2px}

/* Period ("de 26 a 30 de outubro"): one continuous rounded band behind the days. Its ends are rounded where the band stops
   (first/last day, and the start/end of each week row). The band is a pseudo-element, so the cells keep their size. */
.gag .gag-grid td.gag-band{position:relative}
.gag .gag-grid td.gag-band::before{content:"";position:absolute;inset:0;z-index:0;background:var(--gag-band);pointer-events:none}
.gag .gag-grid td.gag-band.is-start::before{border-radius:999px 0 0 999px}
.gag .gag-grid td.gag-band.is-end::before{border-radius:0 999px 999px 0}
.gag .gag-grid td.gag-band.is-start.is-end::before{border-radius:999px}
.gag .gag-grid td.gag-band .gag-day{z-index:1}
.gag .gag-grid td.gag-band .gag-day.has-event:not(.is-today){background:transparent!important}   /* the band is the background: no second circle on top of it (avoids a seam) */
.gag .gag-grid td.gag-band button.gag-day.has-event:not(.is-today):hover{background:#78a199!important}
/* the period of the post being previewed gets the same dark outline as a selected day, drawn around the whole band */
.gag .gag-grid td.gag-band.is-selected::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;border:0 solid var(--gag-dark);border-width:2px 0}
.gag .gag-grid td.gag-band.is-selected.sel-start::after{border-left-width:2px;border-radius:999px 0 0 999px}
.gag .gag-grid td.gag-band.is-selected.sel-end::after{border-right-width:2px;border-radius:0 999px 999px 0}
.gag .gag-grid td.gag-band.is-selected.sel-start.sel-end::after{border-radius:999px}

/* ---------- Preview ---------- */
.gag .gag-card{min-width:0}
.gag .gag-card.is-in{animation:gag-in .3s ease}
@keyframes gag-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.gag .gag-card-img{display:block;aspect-ratio:16/10;background:#d9d9d9;overflow:hidden}
.gag .gag-card-img img{display:block;width:100%;height:100%;max-width:none;object-fit:cover}
.gag .gag-card-title{margin:22px 0 14px!important;padding:0!important;border:0!important;font-family:inherit!important;font-size:19px!important;font-weight:700!important;line-height:1.35!important;color:var(--gag-dark)!important;text-transform:none!important}
.gag .gag-card-title a{color:var(--gag-dark)!important;text-decoration:none}
.gag .gag-card-title a:hover,.gag .gag-card-title a:focus-visible{text-decoration:underline}
.gag .gag-card-text{margin:0;padding:0;font-size:15px;font-weight:400;line-height:1.6;color:var(--gag-excerpt)}

.gag .gag-nojs{margin:24px auto 0;text-align:center;font-weight:600;color:var(--gag-dark)}
.gag-note{margin:12px 0 0;padding:10px 14px;border:1px dashed #3B7A75;border-radius:8px;background:#fff;font:500 12.5px/1.5 var(--gb-font,'Montserrat',system-ui,sans-serif);color:#45444A}
.gag-note a{color:#013F3E;font-weight:600}

/* ---------- Smaller screens: arrows go under the content ---------- */
@media (max-width:1100px){
	.gag{--gag-arrow:44px;--gag-arrow-gap:16px;--gag-gutter:76px}
	.gag .gag-inner{gap:40px}
	.gag .gag-nav svg{width:28px;height:28px}
}
@media (max-width:860px){
	.gag{--gag-gutter:20px;padding:92px 0 52px}
	.gag .gag-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px 16px}
	.gag .gag-cal,.gag .gag-card{grid-column:1/-1}
	.gag .gag-cal{padding:22px 16px 18px}
	.gag .gag-month{font-size:19px!important}
	.gag .gag-day{font:500 16px/1 var(--gb-font,'Montserrat',system-ui,sans-serif)!important}
	.gag .gag-nav{position:static;transform:none;grid-row:3}
	.gag .gag-prev{grid-column:1;justify-self:start}
	.gag .gag-next{grid-column:2;justify-self:end}
	.gag .gag-pill{min-width:0;padding:0 36px!important;font-size:20px!important;height:48px}
}
@media (prefers-reduced-motion:reduce){
	.gag .gag-nav,.gag .gag-month-nav button,.gag button.gag-day{transition:none}
	.gag .gag-card.is-in{animation:none}
}
