/* PortalNews Pro: publicidade em carrossel, galeria de eventos e visualizador de fotos */

/* Álbuns em moldura (home, editoria Galeria, "Mais galerias") */
.gallery-row { margin-top: 28px; padding: 30px 0 34px; background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery-row__track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.tiles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.tiles-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.album-tile { display: flex; flex-direction: column; min-width: 0; }
.album-tile__media {
	position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
	border: 5px solid #fff; border-radius: 3px; background: #ddd;
	box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 18px rgba(0,0,0,.10);
	transition: box-shadow .25s ease, transform .25s ease;
}
[data-theme="dark"] .album-tile__media { border-color: #26262c; background: #222; }
.album-tile__media img, .album-tile__media .thumb-fallback { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.album-tile:hover .album-tile__media { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 14px 28px rgba(0,0,0,.16); }
.album-tile:hover .album-tile__media img { transform: scale(1.05); }
.album-tile__date, .album-tile__count {
	position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
	padding: 4px 8px; border-radius: 3px; font-size: 13px; font-weight: 700; line-height: 1.2;
}
.album-tile__date { left: 8px; bottom: 8px; background: #fff; color: #222; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.album-tile__count { right: 8px; top: 8px; background: rgba(0,0,0,.6); color: #fff; }
.album-tile__title {
	margin: 12px 0 8px; font-size: 15px; font-weight: 700; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.album-tile__title a:hover { color: var(--brand); }
.album-tile__cta { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-size: 15px; font-weight: 800; color: var(--ink); }
.album-tile__cta .icon { font-size: 17px; }
.album-tile__cta:hover { color: var(--brand); }
.album-tile__n { font-size: 12px; font-weight: 600; color: var(--muted); }

@media (max-width: 1100px) {
	.tiles-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.gallery-row__track {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%;
		overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: 0 -4px;
		-webkit-overflow-scrolling: touch;
	}
	.gallery-row__track > * { scroll-snap-align: start; }
}
@media (max-width: 680px) {
	.gallery-row__track { grid-auto-columns: 72%; gap: 14px; }
	.tiles-grid, .tiles-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
	.album-tile__title { font-size: 14px; }
	.album-tile__cta { font-size: 14px; }
	.album-tile__n { display: none; }
}

/* Página do álbum */
.album-layout {
	display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px;
	padding-top: 24px; padding-bottom: 48px; align-items: start;
}
.album-layout .album { grid-column: 2; grid-row: 1; min-width: 0; }
.album-layout__side { grid-column: 1; grid-row: 1; }
.album-layout__sticky { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 20px; }
.admin-bar .album-layout__sticky { top: calc(var(--nav-h) + 48px); }
.album-layout__ad {
	padding: 6px; background: var(--page); border: 1px solid var(--line); border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.album-layout__ad .adc__label { display: none; }

.album__head { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px dotted var(--line); }
.album__when { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.album__title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; font-stretch: 85%; line-height: 1.12; margin: 0 0 10px; text-wrap: balance; }
.album__by { margin: 0; font-size: 15px; color: var(--muted); }
.album__by strong { color: var(--brand); font-weight: 600; }

.album__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.album__item {
	position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
	border: 4px solid #fff; border-radius: 2px; background: #ddd; cursor: zoom-in;
	box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0,0,0,.08);
	transition: box-shadow .2s ease, transform .2s ease;
}
[data-theme="dark"] .album__item { border-color: #26262c; }
.album__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.album__item:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 8px 18px rgba(0,0,0,.16); }
.album__item:hover .album__img { transform: scale(1.06); }

.album__bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
	margin-top: 14px; padding-bottom: 14px; border-bottom: 1px dotted var(--line); font-size: 15px; color: var(--muted);
}
.album__pages { display: flex; align-items: center; gap: 12px; }
.album__pager { display: flex; gap: 4px; }
.album__pager .page-numbers { min-width: 36px; height: 36px; padding: 0 10px; font-size: 14px; }

.album__event {
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
	padding: 16px 0; border-bottom: 1px dotted var(--line);
	font-size: clamp(18px, 2vw, 22px); font-weight: 700; color: var(--ink);
}
.album__event span { display: inline-flex; align-items: center; gap: 8px; }
.album__event .icon { color: var(--muted); }
.album__desc { margin-top: 18px; font-size: 17px; }
.album__foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.album__in { margin: 14px 0 0; font-weight: 700; color: var(--ink); }
.album__in a { color: var(--brand); font-weight: 600; margin-left: 6px; }
.album__more { margin-top: 40px; }

@media (max-width: 1100px) {
	.album-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
	.album__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.album-layout { grid-template-columns: minmax(0, 1fr); }
	.album-layout .album, .album-layout__side { grid-column: 1; grid-row: auto; }
	.album-layout__sticky { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 680px) {
	.album__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
	.album__item { border-width: 2px; }
	.album__bar { font-size: 14px; }
}

/* Visualizador em tela cheia */
.lightbox {
	position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
	background: #070709; color: #fff; opacity: 0; transition: opacity .25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-open { overflow: hidden; }
.lightbox__top {
	position: absolute; top: 0; left: 0; right: 0; z-index: 2;
	display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
	background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0));
}
.lightbox__count { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }
.lightbox__actions { display: flex; gap: 6px; }
.lightbox__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 20px;
}
.lightbox__btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.lightbox__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 94vw; }
.lightbox__img {
	max-width: 94vw; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain;
	opacity: 0; transform: scale(.985); transition: opacity .35s ease, transform .35s ease;
	-webkit-user-select: none; user-select: none;
}
.lightbox__img.is-ready { opacity: 1; transform: none; }
.lightbox__cap { min-height: 1.4em; max-width: 760px; text-align: center; font-size: 14px; color: rgba(255,255,255,.75); }
.lightbox__nav {
	position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 24px;
}
.lightbox__nav:hover { background: var(--brand); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--prev .icon { transform: rotate(180deg); }
.lightbox__nav--next { right: 18px; }
.lightbox__spinner {
	position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
	border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%;
	animation: portal-spin .8s linear infinite; opacity: 0; transition: opacity .2s;
}
.lightbox.is-loading .lightbox__spinner { opacity: 1; }
@keyframes portal-spin { to { transform: rotate(360deg); } }
.entry__content .wp-block-gallery img { cursor: zoom-in; }

@media (max-width: 680px) {
	.lightbox__nav { display: none; }
	.lightbox__img { max-width: 100vw; max-height: calc(100vh - 130px); }
}


/* Carrossel de anúncios */
.adc { position: relative; width: 100%; margin: 0 auto; }
.adc__label { display: block; margin-bottom: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.adc__viewport {
	position: relative; overflow: hidden; border-radius: 3px;
	background: var(--soft); aspect-ratio: var(--ratio, auto);
}
.adc__track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.adc__slide { flex: 0 0 100%; min-width: 0; height: 100%; display: block; }
.adc__img { width: 100%; height: 100%; object-fit: contain; margin: 0 auto; }
.adc__nav {
	position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px;
	opacity: 0; transition: opacity .2s;
}
.adc:hover .adc__nav, .adc:focus-within .adc__nav { opacity: 1; }
.adc__nav:hover { background: var(--brand); }
.adc__nav--prev { left: 8px; }
.adc__nav--prev .icon { transform: rotate(180deg); }
.adc__nav--next { right: 8px; }
.adc__dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.adc__dot {
	width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px;
	background: var(--line); transition: width .25s, background .25s;
}
.adc__dot.is-active { width: 22px; background: var(--brand); }
.adc--header .adc__dots { position: absolute; right: 8px; bottom: 6px; margin: 0; }
.adc--header .adc__dot { background: rgba(255, 255, 255, .55); }
.adc--header .adc__dot.is-active { background: #fff; }
.widget--ad .adc__label { display: none; }
@media (hover: none) { .adc__nav { display: none; } }

.ad-slot--center { margin-top: 28px; }
.ad-slot--bottom { margin-bottom: 36px; }

