/* ==========================================================================
   Arquivo Galicia — Editorial Design System
   ========================================================================== */

:root {
  --ag-black: #000000;
  --ag-ink: #111111;
  --ag-ink-muted: #555555;
  --ag-ink-subtle: #777777;
  --ag-white: #ffffff;
  --ag-border: #111111;
  --ag-divider: #dcdcdc;
  --ag-placeholder: #f5f5f5;
  --ag-lightbox-default: #e8f6fc;
  --ag-header-h: 64px;
  --ag-footer-h: 46px;
  --ag-container-wide: 1520px;
  --ag-container-editorial: 1240px;
  --ag-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --ag-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --ag-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ag-white);
  color: var(--ag-ink);
  font-family: var(--ag-font-body);
  line-height: 1.6;
  padding-top: var(--ag-header-h);
}

body.admin-bar {
  min-height: calc(100vh - 32px);
}

body.home {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.home.admin-bar {
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
}

main {
  flex: 1 0 auto;
}

body.ag-no-scroll {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.ag-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ag-header-h);
  background-color: var(--ag-black);
  color: var(--ag-white);
  z-index: 1000;
  display: flex;
  align-items: center;
}

body.admin-bar .ag-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .ag-header {
    top: 46px;
  }

  body.home.admin-bar {
    height: calc(100vh - 46px);
    height: calc(100dvh - 46px);
  }
}

.ag-header__inner {
  width: 100%;
  max-width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ag-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ag-white);
  font-family: var(--ag-font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.ag-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ag-white);
  font-family: var(--ag-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ag-nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.ag-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.ag-nav__list li a {
  display: inline-block;
  font-family: var(--ag-font-display);
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  padding: 5px 12px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-transform: capitalize;
}

.ag-nav__list li a:hover {
  color: var(--ag-white);
}

.ag-nav__list li.current-menu-item > a,
.ag-nav__list li.current_page_item > a {
  color: var(--ag-white);
  border-color: var(--ag-white);
}

.ag-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: opacity 0.2s ease;
}

.ag-social-link:hover {
  opacity: 0.7;
}

.ag-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ag-white);
  padding: 6px;
}

/* ==========================================================================
   Home Hero Slider
   ========================================================================== */

.ag-hero {
  position: relative;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  background-color: var(--ag-black);
  overflow: hidden;
}

.ag-hero__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.ag-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s var(--ag-ease), visibility 0.75s var(--ag-ease);
}

.ag-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.ag-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ag-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.24) 38%,
    rgba(0, 0, 0, 0.04) 70%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
}

.ag-hero__content {
  position: absolute;
  left: 56px;
  bottom: 52px;
  max-width: 720px;
  color: var(--ag-white);
  z-index: 3;
}

.ag-hero__link {
  display: block;
}

.ag-hero__eyebrow {
  display: block;
  font-family: var(--ag-font-display);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 14px;
}

.ag-hero__author {
  margin: 0 0 6px;
  font-family: var(--ag-font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.ag-hero__title {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
}

.ag-hero__credit {
  margin: 14px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

.ag-hero__dots {
  position: absolute;
  right: 56px;
  bottom: 56px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ag-hero__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ag-white);
  background-color: transparent;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.ag-hero__dot.is-active {
  background-color: var(--ag-white);
  transform: scale(1.1);
}

/* ==========================================================================
   Grid Pages (Exposicións & Historias)
   ========================================================================== */

.ag-section {
  max-width: var(--ag-container-wide);
  margin: 0 auto;
  padding: 36px 40px 96px;
}

.ag-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.ag-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ag-border);
  background-color: var(--ag-white);
  transition: transform 0.3s var(--ag-ease);
}

.ag-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.45;
  overflow: hidden;
  background-color: var(--ag-placeholder);
}

.ag-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ag-ease);
}

.ag-card:hover .ag-card__media img {
  transform: scale(1.03);
}

.ag-card__body {
  padding: 16px 18px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--ag-border);
  flex: 1;
}

.ag-card__author {
  margin: 0 0 2px;
  font-family: var(--ag-font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ag-black);
}

.ag-card__title {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ag-ink);
}

.ag-card__date {
  font-family: var(--ag-font-display);
  font-size: 13px;
  color: var(--ag-ink-muted);
  white-space: nowrap;
  padding-top: 2px;
}

/* ==========================================================================
   Arquivos Grid (Autores — 6 Columns)
   ========================================================================== */

.ag-section:where(:has(.ag-arquivos-grid)) {
  width: 100%;
  max-width: none;
  padding-left: 32px;
  padding-right: 32px;
}

.ag-arquivos-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.ag-autor-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ag-border);
  background-color: var(--ag-white);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: color 0.3s var(--ag-ease), background-color 0.3s var(--ag-ease);
}

.ag-autor-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ag-ease);
}

.ag-autor-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.55s var(--ag-ease);
}

.ag-autor-card__name,
.ag-autor-card__meta {
  position: relative;
  z-index: 1;
  transition: opacity 0.25s var(--ag-ease);
}

@media (hover: hover) and (pointer: fine) {
  .ag-autor-card.has-photo:hover .ag-autor-card__bg {
    opacity: 1;
  }

  .ag-autor-card.has-photo:hover .ag-autor-card__bg img {
    transform: scale(1);
  }

  .ag-autor-card.has-photo:hover .ag-autor-card__name,
  .ag-autor-card.has-photo:hover .ag-autor-card__meta {
    opacity: 0;
  }

  .ag-autor-card:not(.has-photo):hover {
    background-color: var(--ag-placeholder);
  }
}

.ag-autor-card__name {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.ag-autor-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--ag-font-display);
}

.ag-autor-card__place {
  font-size: 14px;
  font-weight: 400;
}

.ag-autor-card__index {
  font-size: 13px;
  font-weight: 700;
}

.ag-autor-placeholder {
  aspect-ratio: 1 / 1;
  background-color: var(--ag-placeholder);
}

/* ==========================================================================
   Single Exposición / Historia — Gallery Strip & First-Fold 100vh
   ========================================================================== */

@media (min-width: 961px) {
  .ag-exposicion-fold {
    --ag-fold-h: calc(100dvh - var(--ag-header-h));
    min-height: var(--ag-fold-h);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: calc(var(--ag-fold-h) * 0.10);
  }

  body.admin-bar .ag-exposicion-fold {
    --ag-fold-h: calc(100dvh - var(--ag-header-h) - 32px);
  }

  .ag-exposicion-fold .ag-strip-wrap {
    height: calc(var(--ag-fold-h) * 0.50);
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
  }

  .ag-exposicion-fold .ag-strip {
    flex: 1 1 0;
    min-height: 0;
  }

  .ag-exposicion-fold .ag-strip__item {
    height: 100%;
  }

  .ag-exposicion-fold .ag-editorial-container {
    min-height: calc(var(--ag-fold-h) * 0.40);
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .ag-exposicion-fold .ag-single-intro {
    flex: 1 1 auto;
    align-items: start;
    padding: 0 0 28px;
  }
}

.ag-strip-wrap {
  position: relative;
  width: 100%;
  padding-top: 16px;
  background-color: var(--ag-white);
}

.ag-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: var(--ag-white);
}

.ag-strip::-webkit-scrollbar {
  display: none;
}

.ag-strip__item {
  flex: 0 0 auto;
  height: clamp(260px, 33vw, 440px);
  padding: 0;
  border: none;
  background: var(--ag-placeholder);
  overflow: hidden;
  position: relative;
}

.ag-strip__item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s var(--ag-ease), opacity 0.25s ease;
}

.ag-strip__item:hover img {
  transform: scale(1.025);
  opacity: 0.94;
}

.ag-strip-controls {
  width: 100%;
  max-width: var(--ag-container-editorial);
  margin: 0 auto;
  padding: 12px 40px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.ag-strip-btn {
  background: none;
  border: none;
  color: var(--ag-ink-muted);
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.ag-strip-btn:hover {
  color: var(--ag-black);
}

/* ==========================================================================
   Single Exposición / Historia — Editorial Content
   ========================================================================== */

.ag-editorial-container {
  max-width: var(--ag-container-editorial);
  margin: 0 auto;
  padding: 0 40px;
}

.ag-single-intro {
  display: grid;
  grid-template-columns: minmax(220px, 28%) minmax(320px, 48%) minmax(140px, 1fr);
  gap: 48px;
  padding: 28px 0 48px;
  border-bottom: 1px solid var(--ag-divider);
}

.ag-single-intro__author {
  margin: 0 0 4px;
  font-family: var(--ag-font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ag-single-intro__title {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ag-ink);
}

.ag-single-intro__date {
  margin: 28px 0 6px;
  font-size: 13.5px;
  color: var(--ag-ink-subtle);
}

.ag-single-intro__byline {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ag-ink);
}

.ag-single-intro__quote {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ag-ink);
}

.ag-single-credits {
  justify-self: end;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ag-ink-muted);
}

.ag-single-credits__group {
  margin-bottom: 12px;
}

.ag-single-credits__label {
  display: block;
  font-weight: 700;
  color: var(--ag-ink);
}

.ag-single-essay {
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  gap: 48px;
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--ag-divider);
}

.ag-single-essay__aside {
  position: sticky;
  top: calc(var(--ag-header-h) + 32px);
  align-self: start;
}

.ag-single-essay__heading {
  margin: 0 0 18px;
  font-family: var(--ag-font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.ag-single-essay__author {
  margin: 0;
  font-size: 14.5px;
  color: var(--ag-ink-muted);
}

.ag-prose {
  max-width: 66ch;
  font-size: 15.5px;
  line-height: 1.74;
  color: #222222;
}

.ag-prose p {
  margin: 0 0 1.35em;
}

.ag-prose p:last-child {
  margin-bottom: 0;
}

.ag-prose figure,
.ag-prose .wp-caption {
  margin: 28px 0;
  max-width: 100% !important;
}

.ag-prose figcaption,
.ag-prose .wp-caption-text {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ag-ink-subtle);
}

/* Author Bio Block */
.ag-author-bio {
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr minmax(200px, 250px);
  gap: 48px;
  padding: 56px 0 96px;
  align-items: start;
}

.ag-author-bio__name {
  margin: 0 0 6px;
  font-family: var(--ag-font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.ag-author-bio__name a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ag-author-bio__meta {
  margin: 0;
  font-size: 15px;
  color: var(--ag-ink-muted);
}

.ag-author-bio__text {
  font-size: 14.5px;
  line-height: 1.68;
  color: #222222;
}

.ag-author-bio__text p {
  margin: 0 0 1.15em;
}

.ag-author-bio__text p:last-child {
  margin-bottom: 0;
}

.ag-author-bio__portrait {
  margin: 0;
}

.ag-author-bio__portrait img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.ag-author-bio__caption {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ag-ink-subtle);
  text-align: right;
}

/* ==========================================================================
   Single Historia — Full-Width Hero & Gallery Grid
   ========================================================================== */

.ag-historia-hero {
  width: 100%;
  height: clamp(260px, 42vw, 440px);
  background-color: var(--ag-placeholder);
  overflow: hidden;
}

@media (min-width: 961px) {
  .ag-historia-hero {
    height: calc((100dvh - var(--ag-header-h)) * 0.50);
  }

  body.admin-bar .ag-historia-hero {
    height: calc((100dvh - var(--ag-header-h) - 32px) * 0.50);
  }
}

.ag-historia-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ag-historia-gallery-section {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--ag-divider);
}

.ag-historia-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ag-historia-gallery__item {
  padding: 0;
  border: none;
  background-color: var(--ag-placeholder);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  width: 100%;
}

.ag-historia-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ag-ease), opacity 0.25s ease;
}

.ag-historia-gallery__item:hover img {
  transform: scale(1.03);
  opacity: 0.94;
}

@media (max-width: 960px) {
  .ag-historia-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .ag-historia-gallery {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Single Autor Page
   ========================================================================== */

.ag-autor-hero {
  padding: 56px 0 56px;
  border-bottom: 1px solid var(--ag-divider);
}

.ag-autor-works {
  padding: 48px 0 84px;
}

.ag-autor-works__title {
  margin: 0 0 28px;
  font-family: var(--ag-font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Standard Page (Aviso legal, Privacidade, Cookies, etc.)
   ========================================================================== */

.ag-simple-page {
  width: 100%;
  padding: 56px 40px 88px 40px;
}

.ag-simple-page__content {
  width: 45%;
  max-width: none;
}

.ag-simple-page__content h2,
.ag-simple-page__content h3 {
  font-family: var(--ag-font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ag-black);
  margin: 1.6em 0 0.6em;
}

.ag-simple-page__content h2:first-child,
.ag-simple-page__content h3:first-child {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .ag-simple-page__content {
    width: 75%;
  }
}

@media (max-width: 768px) {
  .ag-simple-page {
    padding: 36px 20px 64px 20px;
  }

  .ag-simple-page__content {
    width: 100%;
  }
}

.ag-page-layout {
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  gap: 48px;
  padding: 56px 0 96px;
}

.ag-page-layout__title {
  margin: 0;
  font-family: var(--ag-font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: capitalize;
}

/* ==========================================================================
   Fluent Forms — Editorial Overrides
   ========================================================================== */

.frm-fluent-form {
  --fluentform-primary: #000000;
  max-width: 560px;
}

.frm-fluent-form .ff-el-group {
  margin-bottom: 24px;
}

.frm-fluent-form .ff-el-input--label {
  margin-bottom: 8px;
}

.frm-fluent-form .ff-el-input--label label {
  font-family: var(--ag-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-ink);
  letter-spacing: 0.01em;
}

.frm-fluent-form .ff-el-form-control {
  width: 100%;
  background-color: var(--ag-white);
  color: var(--ag-ink);
  border: 1px solid #b5b5b5;
  border-radius: 0;
  padding: 12px 14px;
  font-family: var(--ag-font-body);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.frm-fluent-form .ff-el-form-control::placeholder {
  color: #999999;
}

.frm-fluent-form .ff-el-form-control:focus {
  outline: none;
  border-color: var(--ag-black);
  box-shadow: none;
}

.frm-fluent-form textarea.ff-el-form-control {
  min-height: 140px;
  resize: vertical;
}

.frm-fluent-form input[type='checkbox'],
.frm-fluent-form input[type='radio'] {
  accent-color: var(--ag-black);
}

.frm-fluent-form .ff-el-form-check-label {
  font-size: 13.5px;
  color: var(--ag-ink-muted);
}

.frm-fluent-form .ff-el-form-check-label a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ag-ink);
}

.frm-fluent-form .ff-btn-submit,
.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style) {
  background-color: var(--ag-black) !important;
  color: var(--ag-white) !important;
  border: 1px solid var(--ag-black) !important;
  border-radius: 0 !important;
  padding: 13px 28px !important;
  font-family: var(--ag-font-display) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  box-shadow: none !important;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}

.frm-fluent-form .ff-btn-submit:hover,
.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):hover {
  background-color: var(--ag-white) !important;
  color: var(--ag-black) !important;
  opacity: 1 !important;
}

.frm-fluent-form .ff-el-is-error .ff-el-form-control {
  border-color: #b91c1c !important;
}

.frm-fluent-form .error.text-danger {
  color: #b91c1c;
  font-size: 12.5px;
  margin-top: 6px;
}

.ff-message-success {
  border: 1px solid var(--ag-border);
  background-color: #fafafa;
  color: var(--ag-ink);
  border-radius: 0;
  padding: 14px 18px;
  font-size: 14px;
  margin-top: 20px;
}

/* ==========================================================================
   Full-Screen Gallery Lightbox
   ========================================================================== */

.ag-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: var(--ag-lightbox-default);
  color: var(--ag-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ag-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.ag-lightbox.is-dark-bg {
  color: var(--ag-white);
}

.ag-lightbox__close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 10;
  background: none;
  border: none;
  color: inherit;
  padding: 8px;
  opacity: 0.78;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ag-lightbox__close:hover {
  opacity: 1;
  transform: scale(1.08);
}

.ag-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  color: inherit;
  padding: 16px;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.ag-lightbox__nav:hover {
  opacity: 1;
}

.ag-lightbox__nav--prev {
  left: 16px;
}

.ag-lightbox__nav--next {
  right: 16px;
}

.ag-lightbox__stage {
  width: 100%;
  height: 100%;
  padding: 48px 88px;
  display: grid;
  grid-template-columns: minmax(190px, 250px) 1fr;
  align-items: center;
  gap: 48px;
}

.ag-lightbox__info {
  align-self: center;
}

.ag-lightbox__author {
  margin: 0 0 4px;
  font-family: var(--ag-font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.ag-lightbox__meta {
  margin: 0 0 24px;
  font-size: 14px;
  opacity: 0.8;
}

.ag-lightbox__caption {
  margin: 0 0 6px;
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
}

.ag-lightbox__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  opacity: 0.85;
}

.ag-lightbox__counter {
  margin-top: 24px;
  font-size: 12px;
  opacity: 0.55;
  font-family: var(--ag-font-display);
}

.ag-lightbox__figure {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ag-lightbox__img {
  max-height: calc(100vh - 104px);
  max-width: 100%;
  width: auto;
  height: auto;
  border: 12px solid var(--ag-white);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
  object-fit: contain;
  background-color: var(--ag-white);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ag-footer {
  flex-shrink: 0;
  background-color: var(--ag-white);
  border-top: 1px solid #d4d4d4;
  padding: 13px 32px;
  min-height: var(--ag-footer-h);
  display: flex;
  align-items: center;
  font-family: var(--ag-font-display);
  font-size: 12px;
  color: var(--ag-ink);
}

.ag-footer__inner {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.ag-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ag-footer__links li {
  display: inline-flex;
  align-items: center;
}

.ag-footer__links li:not(:last-child)::after {
  content: '|';
  margin: 0 12px;
  color: #666666;
  font-weight: 400;
}

.ag-footer__links a {
  font-weight: 700;
  color: var(--ag-ink);
  transition: opacity 0.2s ease;
}

.ag-footer__links a:hover {
  opacity: 0.65;
}

.ag-footer__credit {
  margin: 0;
  font-weight: 400;
  color: var(--ag-ink-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .ag-arquivos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ag-single-intro {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .ag-single-credits {
    justify-self: start;
    grid-column: 1 / -1;
    display: flex;
    gap: 32px;
  }
}

@media (max-width: 960px) {
  .ag-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .ag-single-essay,
  .ag-author-bio,
  .ag-page-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ag-single-essay__aside {
    position: static;
  }

  .ag-author-bio__portrait {
    max-width: 280px;
  }

  .ag-lightbox__stage {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 64px 56px 28px;
    gap: 20px;
  }

  .ag-lightbox__info {
    order: 2;
    text-align: center;
  }

  .ag-lightbox__meta {
    margin-bottom: 10px;
  }

  .ag-lightbox__img {
    max-height: calc(100vh - 220px);
    border-width: 8px;
  }
}

@media (max-width: 768px) {
  .ag-header__inner {
    padding: 0 20px;
  }

  .ag-menu-toggle {
    display: inline-flex;
  }

  .ag-nav-wrap {
    position: fixed;
    top: var(--ag-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ag-black);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .ag-nav-wrap.is-open {
    opacity: 1;
    visibility: visible;
  }

  .ag-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ag-nav__list li a {
    font-size: 20px;
    padding: 6px 14px;
  }

  .ag-section,
  .ag-editorial-container,
  .ag-strip-controls {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ag-cards-grid {
    grid-template-columns: 1fr;
  }

  .ag-arquivos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .ag-single-intro {
    grid-template-columns: 1fr;
  }

  .ag-hero__content {
    left: 24px;
    right: 24px;
    bottom: 64px;
  }

  .ag-hero__dots {
    right: 24px;
    bottom: 24px;
  }

  .ag-lightbox__stage {
    padding: 56px 20px 24px;
  }

  .ag-lightbox__nav--prev {
    left: 4px;
  }

  .ag-lightbox__nav--next {
    right: 4px;
  }
}
