:root {
  /* Paleta Oficial Aerbras (extraída de aerbras.org.br) */
  --aerbras-green: #82ad34;
  --aerbras-green-dark: #6d932a;
  --aerbras-green-tint: rgba(130, 173, 52, 0.12);
  --aerbras-emerald: #23a455;
  --aerbras-charcoal: #333333;
  --aerbras-deep-dark: #191919;
  --aerbras-slate: #54595f;
  --aerbras-muted: #7a7a7a;
  --aerbras-light-gray: #e7e7e7;

  --font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --heading-font-family: 'Cormorant', Georgia, serif;
  --display-sans: 'Montserrat', sans-serif;

  --bg-color: #ffffff;
  --text-color: var(--aerbras-charcoal);
  --gallery-pad-x: 48px;
  --gallery-gap: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  background-color: var(--bg-color);
  color: var(--text-color);
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* =========================================================
   1. HERO / CAPA 100VH COM LOGOTIPO E PALETA AERBRAS
   ========================================================= */
.cover {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  background-color: var(--aerbras-deep-dark);
  color: #ffffff;
  padding: 64px 24px 92px;
  border-bottom: 4px solid var(--aerbras-green);
}

.cover__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  user-select: none;
}

.cover__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(25, 25, 25, 0.36) 0%,
    rgba(25, 25, 25, 0.52) 52%,
    rgba(25, 25, 25, 0.88) 100%
  );
}

.cover__hero {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
  text-align: center;
  margin-bottom: 28px;
}

.cover__logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.cover__logo {
  width: clamp(185px, 22vw, 250px);
  height: auto;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.45));
}

.cover__date {
  display: inline-block;
  font-family: var(--display-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  line-height: 1.3;
  color: #ffffff;
  background: rgba(130, 173, 52, 0.22);
  border: 1px solid rgba(130, 173, 52, 0.55);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
}

.cover__header {
  font-family: var(--heading-font-family);
  font-size: clamp(38px, 4.8vw, 54px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  color: #ffffff;
  margin: 0 0 22px;
}

.cover__subheader {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.cover__sep {
  color: var(--aerbras-green);
  font-weight: 700;
}

.cover__site {
  color: var(--aerbras-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.cover__site:hover {
  color: #a4d24f;
}

.cover__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--aerbras-green);
  padding: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.cover__scroll:hover {
  color: #ffffff;
  transform: translateX(-50%) translateY(3px);
}

/* =========================================================
   2. BARRA DE AÇÕES FIXA (STICKY) COM LOGO AERBRAS
   ========================================================= */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #efefef;
}

.toolbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 14px var(--gallery-pad-x);
}

.toolbar__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.toolbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.toolbar__logo {
  height: 48px;
  width: auto;
  display: block;
}

.toolbar__event-pill {
  font-family: var(--display-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--aerbras-green-dark);
  background-color: var(--aerbras-green-tint);
  border: 1px solid rgba(130, 173, 52, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.toolbar__helpers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.select-mode-toggle {
  background: var(--aerbras-green-tint);
  border: 1px solid rgba(130, 173, 52, 0.35);
  border-radius: 5px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--aerbras-charcoal);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.select-mode-toggle:hover {
  background: var(--aerbras-green);
  color: #ffffff;
}

.nav-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 22px;
  margin-left: auto;
}

.nav-buttons__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 4px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--aerbras-charcoal);
  transition: color 0.15s ease;
}

.nav-buttons__button:hover {
  color: var(--aerbras-green);
}

.nav-buttons__button[aria-pressed="true"] {
  color: var(--aerbras-green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background-color: var(--aerbras-green);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.nav__meta {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--aerbras-slate);
  white-space: nowrap;
}

/* Botão principal Aerbras (#82AD34 -> hover #333333, fiel ao aerbras.org.br) */
.button-brand-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 12px 30px;
  background-color: var(--aerbras-green);
  border: 1px solid var(--aerbras-green);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.button-brand-cta:hover,
.button-brand-cta[aria-expanded="true"] {
  background-color: var(--aerbras-charcoal);
  border-color: var(--aerbras-charcoal);
  color: #ffffff;
}

.button-brand-cta[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.chevron-icon {
  transition: transform 0.16s ease;
}

/* =========================================================
   MENU POPOVER NATIVO (Baixar arquivos)
   ========================================================= */
.download-popover {
  margin: 6px 0 0;
  padding: 6px;
  width: 256px;
  background: #ffffff;
  border: 1px solid var(--aerbras-light-gray);
  border-top: 3px solid var(--aerbras-green);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  color: var(--aerbras-charcoal);
}

@supports (position-area: block-end) {
  .download-popover {
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    inset: auto;
  }
}

@supports not (position-area: block-end) {
  .download-popover {
    position: fixed;
    inset: auto;
    margin: 0;
  }
}

@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) {
    display: none;
  }
}

.download-popover:is(:popover-open, .\:popover-open) {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  @supports selector(:popover-open) {
    .download-popover {
      opacity: 0;
      translate: 0 -0.25rem;
      transition: opacity, translate, display, overlay;
      transition-duration: 0.14s;
      transition-behavior: allow-discrete;
    }

    .download-popover:popover-open {
      opacity: 1;
      translate: 0 0;
      transition-duration: 0.1s;
      @starting-style {
        opacity: 0;
        translate: 0 -0.25rem;
      }
    }
  }
}

.download-menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  color: var(--aerbras-charcoal);
  transition: background-color 0.12s ease;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background-color: var(--aerbras-green-tint);
  outline: none;
}

.dropdown-item[aria-disabled="true"] {
  opacity: 0.48;
}

.dropdown-item__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: var(--aerbras-green-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--aerbras-green-dark);
}

.dropdown-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dropdown-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--aerbras-charcoal);
}

.dropdown-item__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--aerbras-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   3. GRADE STORYBOARD JUSTIFICADA (SEM CORTE DE PROPORÇÃO)
   ========================================================= */
.gallery-wrapper {
  padding: 24px var(--gallery-pad-x) 56px;
  min-height: 45vh;
}

.pieces--storyboard {
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
  width: 100%;
}

.storyboard-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--gallery-gap);
  width: 100%;
}

.piece {
  position: relative;
  flex: none;
  background-color: #f2f2f2;
  overflow: hidden;
  border-radius: 0;
  user-select: none;
}

.piece__link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

body.is-select-mode .piece__link {
  cursor: pointer;
}

.piece__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.piece__img.is-loaded {
  opacity: 1;
}

.piece::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(25, 25, 25, 0.24) 0%,
    rgba(25, 25, 25, 0) 28%,
    rgba(25, 25, 25, 0) 64%,
    rgba(25, 25, 25, 0.54) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.piece:hover::after,
.piece:focus-within::after,
.piece.is-selected::after,
body.is-select-mode .piece::after {
  opacity: 1;
}

.piece.is-selected {
  outline: 3px solid var(--aerbras-green);
  outline-offset: -3px;
}

/* Indicador de seleção no canto superior esquerdo */
.piece__check {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.8px solid #ffffff;
  background: rgba(25, 25, 25, 0.35);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.piece:hover .piece__check,
.piece:focus-within .piece__check,
.piece.is-selected .piece__check,
body.is-select-mode .piece__check,
body.has-selection .piece__check {
  opacity: 1;
}

.piece.is-selected .piece__check {
  background: var(--aerbras-green);
  border-color: #ffffff;
}

.piece__check svg {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.piece.is-selected .piece__check svg {
  opacity: 1;
  transform: scale(1);
}

/* Cluster de 3 ícones no canto inferior direito */
.piece__controls {
  position: absolute;
  right: 6px;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.piece:hover .piece__controls,
.piece:focus-within .piece__controls,
.piece.is-selected .piece__controls {
  opacity: 1;
}

@media (hover: none) {
  .piece__controls {
    opacity: 1;
  }
  .piece::after {
    opacity: 0.7;
  }
}

.piece__control {
  width: 38px;
  height: 54px;
  padding: 16px 8px;
  background: transparent;
  border: 0;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, color 0.14s ease;
}

.piece__control:hover {
  transform: scale(1.12);
  color: #b7e263;
}

.piece.is-selected .piece__control--select svg path {
  fill: var(--aerbras-green);
  stroke: var(--aerbras-green);
}

/* =========================================================
   ESTADO VAZIO
   ========================================================= */
.empty-state {
  padding: 28px 0 48px;
}

.empty-state__card {
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 36px;
  border: 1.5px dashed rgba(130, 173, 52, 0.55);
  border-radius: 10px;
  text-align: center;
  background: #fbfdf8;
}

.empty-state__icon {
  color: var(--aerbras-green);
  margin-bottom: 16px;
}

.empty-state__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--aerbras-charcoal);
  margin: 0 0 12px;
}

.empty-state__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--aerbras-slate);
  margin: 0 0 24px;
}

.empty-state__desc code {
  background: var(--aerbras-green-tint);
  color: var(--aerbras-charcoal);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.empty-state__upload-label {
  display: inline-flex;
  cursor: pointer;
}

/* =========================================================
   BARRA FLUTUANTE DE SELEÇÃO (base da tela)
   ========================================================= */
.selection-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px 12px 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid var(--aerbras-light-gray);
  border-left: 4px solid var(--aerbras-green);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  max-width: calc(100vw - 32px);
}

.selection-bar__info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.selection-bar__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--aerbras-green);
}

.selection-bar__count {
  font-size: 14px;
  font-weight: 700;
  color: var(--aerbras-charcoal);
  white-space: nowrap;
}

.selection-bar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selection-bar__link {
  background: transparent;
  border: 0;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--aerbras-slate);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.selection-bar__link:hover {
  color: var(--aerbras-green-dark);
}

.selection-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--aerbras-green);
  color: #ffffff;
  border: 0;
  border-radius: 5px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}

.selection-bar__cta:hover {
  background: var(--aerbras-charcoal);
}

/* =========================================================
   MODAIS NATIVOS (<dialog>) + SCROLL CONTAINMENT
   ========================================================= */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.wfolio-dialog {
  border: 0;
  border-top: 4px solid var(--aerbras-green);
  padding: 0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--aerbras-charcoal);
  max-width: 568px;
  width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.wfolio-dialog::backdrop {
  background-color: rgba(25, 25, 25, 0.62);
}

.modal__window {
  position: relative;
  padding: 46px 48px 44px;
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background-color: #dcdcdc;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.modal__close:hover {
  background-color: var(--aerbras-charcoal);
}

.modal__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--aerbras-charcoal);
  margin: 0 0 8px;
}

.modal__title--secondary {
  margin: 28px 0 18px;
}

.modal__subtitle {
  font-size: 13px;
  color: var(--aerbras-muted);
  text-align: center;
  margin: 0 0 24px;
  word-break: break-all;
}

.radio-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.radio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 15px;
}

.radio-row__left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.radio-row input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.6px solid #cccccc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.radio-dot::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--aerbras-green);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.radio-row input[type="radio"]:checked + .radio-dot {
  border-color: var(--aerbras-green);
}

.radio-row input[type="radio"]:checked + .radio-dot::after {
  transform: scale(1);
}

.radio-row input[type="radio"]:focus-visible + .radio-dot {
  outline: 2px solid var(--aerbras-green);
  outline-offset: 2px;
}

.radio-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--aerbras-slate);
  text-align: right;
}

.single-download-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 15px 32px;
  border-radius: 5px;
  border: 1px solid var(--aerbras-green);
  background-color: var(--aerbras-green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.button-primary:hover:not(:disabled) {
  background-color: var(--aerbras-charcoal);
  border-color: var(--aerbras-charcoal);
}

.button-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-transparent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 15px 32px;
  border-radius: 5px;
  border: 1px solid var(--aerbras-charcoal);
  background-color: transparent;
  color: var(--aerbras-charcoal);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.button-transparent:hover:not(:disabled) {
  background-color: var(--aerbras-charcoal);
  color: #ffffff;
}

.button-full {
  width: 100%;
}

/* Barra de progresso do ZIP */
.progress-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--aerbras-green-tint);
}

.progress-box__header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--aerbras-charcoal);
  margin-bottom: 8px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #dce8c5;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--aerbras-green);
  transition: width 0.15s ease;
}

.progress-cancel-btn {
  margin-top: 10px;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--aerbras-slate);
  text-decoration: underline;
}

/* =========================================================
   5. LIGHTBOX EM TELA CHEIA
   ========================================================= */
.lightbox-dialog {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  background: #ffffff;
  color: var(--aerbras-charcoal);
}

.lightbox-dialog::backdrop {
  background: #ffffff;
}

.pswp-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #ffffff;
  user-select: none;
}

.pswp-topbar {
  position: relative;
  flex: none;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #f2f2f2;
  z-index: 10;
}

.pswp-counter {
  font-size: 13px;
  font-weight: 600;
  line-height: 48px;
  padding: 0 10px;
  color: var(--aerbras-charcoal);
  opacity: 0.8;
}

.pswp-download-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  background: var(--aerbras-green);
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  transition: background-color 0.15s ease;
}

.pswp-download-btn:hover {
  background: var(--aerbras-charcoal);
}

.pswp-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pswp-icon-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  color: var(--aerbras-charcoal);
  opacity: 0.78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.pswp-icon-btn:hover {
  opacity: 1;
  color: var(--aerbras-green);
}

.pswp-icon-btn.is-active {
  opacity: 1;
  color: var(--aerbras-green);
}

.pswp-icon-btn.is-active #lb-heart-path {
  fill: var(--aerbras-green);
  stroke: var(--aerbras-green);
}

.pswp-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px 68px;
}

.pswp-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.pswp-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.22, 1);
}

.pswp-img.is-zoomed {
  transform: scale(1.85);
  cursor: zoom-out;
}

.pswp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 96px;
  background: transparent;
  border: 0;
  color: var(--aerbras-charcoal);
  opacity: 0.72;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.pswp-arrow:hover {
  opacity: 1;
  color: var(--aerbras-green);
}

.pswp-arrow--prev {
  left: 4px;
}

.pswp-arrow--next {
  right: 4px;
}

.pswp-caption {
  flex: none;
  min-height: 38px;
  padding: 8px 16px 12px;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: var(--aerbras-slate);
}

/* =========================================================
   RODAPÉ INSTITUCIONAL AERBRAS (#333333 + barra verde #82AD34)
   ========================================================= */
.branding {
  background-color: var(--aerbras-charcoal);
  border-top: 4px solid var(--aerbras-green);
  color: #ffffff;
  padding: 44px 24px 40px;
  text-align: center;
}

.branding__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.branding__logo {
  height: 62px;
  width: auto;
  display: block;
}

.branding__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.branding__site {
  font-size: 13px;
  font-weight: 700;
  color: var(--aerbras-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.branding__site:hover {
  color: #a5d350;
}

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--aerbras-green);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.scroll-top-btn:hover {
  background: var(--aerbras-charcoal);
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: var(--aerbras-charcoal);
  border-left: 4px solid var(--aerbras-green);
  color: #ffffff;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* =========================================================
   RESPONSIVO (TABLET E MOBILE)
   ========================================================= */
@media (max-width: 960px) {
  :root {
    --gallery-pad-x: 20px;
    --gallery-gap: 12px;
  }

  .toolbar__inner {
    min-height: 72px;
    padding: 12px var(--gallery-pad-x);
  }

  .toolbar__logo {
    height: 38px;
  }

  .nav-buttons {
    gap: 14px;
  }

  .nav__meta {
    display: none;
  }

  .button-brand-cta {
    padding: 10px 18px;
  }

  .modal__window {
    padding: 36px 24px 28px;
  }

  .pswp-stage {
    padding: 4px 12px;
  }

  .pswp-arrow {
    width: 44px;
    height: 64px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 8px;
  }
}

@media (max-width: 640px) {
  :root {
    --gallery-pad-x: 12px;
    --gallery-gap: 8px;
  }

  .toolbar__event-pill {
    display: none;
  }

  .nav-buttons__button span:not(.nav-badge) {
    display: none;
  }

  .selection-bar {
    bottom: 14px;
    gap: 12px;
    padding: 10px 12px;
    width: calc(100vw - 24px);
  }

  .selection-bar__link {
    font-size: 12px;
  }

  .pswp-download-btn span {
    display: none;
  }
}
