/* =====================================================
   AT Design Works v1.3.0
===================================================== */

.atd-works-notice {
  max-width: 1120px;
  margin: 40px auto;
  padding: 20px;
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  background: #f7f7f7;
  border-radius: 8px;
}

.atd-sp-only { display: none; }

/* TOP Hero */
.atd-works-hero,
.atd-works-hero-slider {
  position: relative;
  width: 100%;
  color: #fff;
  overflow: hidden;
  background: #111;
}

.atd-works-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.atd-works-hero__overlay,
.atd-works-hero-slider__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .36);
}

.atd-works-hero__inner,
.atd-works-hero-slider__inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}

.atd-works-hero-slider__inner {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.atd-works-hero__label,
.atd-works-hero-slider__label {
  margin: 0 0 16px;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.4;
  letter-spacing: .04em;
}

.atd-works-hero__title,
.atd-works-hero-slider__title {
  margin: 0;
  font-size: clamp(38px, 7vw, 88px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .04em;
}

.atd-works-hero__work,
.atd-works-hero-slider__work {
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .04em;
}

.atd-works-hero__work { margin: 22px 0 0; }

.atd-works-hero__button,
.atd-works-hero-slider__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 46px;
  padding: 0 28px;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .08em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}

.atd-works-hero__button { margin-top: 34px; }

.atd-works-hero__button:hover,
.atd-works-hero__button:focus,
.atd-works-hero-slider__button:hover,
.atd-works-hero-slider__button:focus {
  color: #111;
  background: #fff;
}

.atd-works-hero-slider__slides,
.atd-works-hero-slider__slide {
  position: absolute;
  inset: 0;
}

.atd-works-hero-slider__slides { z-index: 1; }

.atd-works-hero-slider__slide {
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.2s ease, transform 5s ease;
}

.atd-works-hero-slider__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.atd-works-hero-slider__works {
  position: relative;
  min-height: 32px;
  margin-top: 22px;
}

.atd-works-hero-slider__work {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(760px, calc(100vw - 40px));
  margin: 0;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .6s ease, transform .6s ease;
}

.atd-works-hero-slider__work.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.atd-works-hero-slider__buttons {
  position: relative;
  min-width: 180px;
  min-height: 46px;
  margin-top: 34px;
}

.atd-works-hero-slider__button {
  position: absolute;
  left: 50%;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .4s ease, background-color .2s ease, color .2s ease;
}

.atd-works-hero-slider__button.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Grid */
.atd-works-grid-section,
.atd-works-archive {
  width: min(1120px, calc(100% - 40px));
  margin: 80px auto;
}

.atd-works-grid-section__title,
.atd-works-archive__title {
  margin: 0 0 32px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .04em;
  text-align: center;
}

.atd-works-grid {
  display: grid;
  gap: 28px;
}

.atd-works-grid--cols-1 { grid-template-columns: 1fr; }
.atd-works-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.atd-works-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atd-works-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.atd-works-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.atd-works-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.atd-works-card { margin: 0; }

.atd-works-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.atd-works-card__image {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #f3f3f3;
  overflow: hidden;
}

.atd-works-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.atd-works-card__link:hover .atd-works-card__image img,
.atd-works-card__link:focus .atd-works-card__image img {
  transform: scale(1.04);
}

.atd-works-card__body { padding: 16px 0 0; }

.atd-works-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .03em;
}

.atd-works-card__text {
  margin: 8px 0 0;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}

.atd-works-grid-section__more {
  margin-top: 42px;
  text-align: center;
}

.atd-works-more-button,
.atd-works-single-nav__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 46px;
  padding: 0 28px;
  color: #111;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .08em;
  text-decoration: none;
  border: 1px solid #111;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}

.atd-works-more-button:hover,
.atd-works-more-button:focus,
.atd-works-single-nav__back:hover,
.atd-works-single-nav__back:focus {
  color: #fff;
  background: #111;
}

.atd-works-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin: 0 0 36px;
}

.atd-works-filter__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  color: #111;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
}

.atd-works-filter__item:hover,
.atd-works-filter__item:focus,
.atd-works-filter__item.is-active {
  color: #fff;
  border-color: #111;
  background: #111;
}

/* Single custom shell */
.atd-works-single-body {
  margin: 0;
  background: #fff;
  color: #111;
}

.atd-site-header {
  position: relative;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.atd-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  min-height: 84px;
  margin: 0 auto;
  gap: 24px;
}

.atd-site-header__logo {
  display: inline-flex;
  align-items: center;
  width: 148px;
  line-height: 1;
}

.atd-site-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.atd-site-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.atd-site-header__nav a {
  color: #111;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  letter-spacing: .02em;
}

.atd-site-footer {
  padding: 34px 20px;
  color: #666;
  font-size: 13px;
  text-align: center;
  border-top: 1px solid #eee;
}

.atd-site-footer p { margin: 0; }

/* Single WORKS */
.atd-works-single {
  margin: 0;
  padding: 0;
}

.atd-works-single-mainvisual {
  width: 100%;
  margin: 0;
  background: #f4f4f4;
}

.atd-works-single-mainvisual img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: cover;
}

.atd-works-single-heading {
  width: min(1120px, calc(100% - 40px));
  margin: 72px auto 0;
}

.atd-works-single-heading__category {
  margin: 0 0 18px;
  color: #777;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.atd-works-single-heading__title {
  width: min(820px, 100%);
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .03em;
}

.atd-works-single-heading__excerpt {
  width: min(760px, 100%);
  margin: 26px 0 0;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 2;
  letter-spacing: .04em;
}

.atd-works-single-content {
  width: min(1120px, calc(100% - 40px));
  margin: 64px auto 0;
  font-size: 16px;
  line-height: 2;
}

.atd-works-single-content > p,
.atd-works-single-content > h2,
.atd-works-single-content > h3,
.atd-works-single-content > h4,
.atd-works-single-content > ul,
.atd-works-single-content > ol {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.atd-works-single-content h2 {
  margin-top: 80px;
  margin-bottom: 24px;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 500;
  line-height: 1.35;
}

.atd-works-single-content h3 {
  margin-top: 56px;
  margin-bottom: 18px;
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.45;
}

.atd-works-single-content .wp-block-image,
.atd-works-single-content .wp-block-gallery {
  max-width: 1120px;
  margin: 38px auto;
}

.atd-works-single-content .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.atd-works-single-content .wp-block-gallery {
  --wp--style--unstable-gallery-gap: 22px;
  gap: 22px !important;
}

.atd-works-single-content .wp-block-gallery.has-nested-images figure.wp-block-image {
  flex-grow: 0;
}

.atd-works-single-content .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image,
.atd-works-single-content .wp-block-gallery.has-nested-images.columns-2 figure.wp-block-image,
.atd-works-single-content .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image {
  width: calc(50% - 11px);
}

.atd-works-single-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
  cursor: zoom-in;
}

.atd-works-single-content .wp-block-gallery.has-nested-images figure.wp-block-image:first-child:nth-last-child(odd) {
  width: 100%;
}

.atd-works-single-content figcaption,
.atd-works-single-content .wp-element-caption,
.atd-works-single-content .blocks-gallery-caption {
  display: none !important;
}

.atd-works-single-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  margin: 90px auto 80px;
  padding-top: 34px;
  border-top: 1px solid #ddd;
}

.atd-works-single-nav a {
  color: #111;
  text-decoration: none;
}

.atd-works-single-nav__item a {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.atd-works-single-nav__item span {
  color: #777;
  font-size: 11px;
  letter-spacing: .12em;
}

.atd-works-single-nav__item--next { text-align: right; }
.atd-works-single-nav__back { min-width: 130px; }

/* Lightbox */
.atd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px;
  background: rgba(0,0,0,.94);
}

.atd-lightbox.is-active {
  display: flex;
}

.atd-lightbox__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1920px, calc(100vw - 112px));
  max-width: 100%;
  height: calc(100vh - 112px);
  margin: 0 auto;
}

.atd-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.atd-lightbox__close,
.atd-lightbox__prev,
.atd-lightbox__next {
  position: absolute;
  z-index: 2;
  padding: 0;
  color: #fff;
  font-family: inherit;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.atd-lightbox__close {
  top: 22px;
  right: 28px;
  font-size: 42px;
}

.atd-lightbox__prev,
.atd-lightbox__next {
  top: 50%;
  font-size: 76px;
  transform: translateY(-50%);
}

.atd-lightbox__prev { left: 28px; }
.atd-lightbox__next { right: 28px; }

/* Responsive */
@media (max-width: 960px) {
  .atd-works-grid--cols-4,
  .atd-works-grid--cols-5,
  .atd-works-grid--cols-6,
  .atd-works-grid--cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atd-works-single-content .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image,
  .atd-works-single-content .wp-block-gallery.has-nested-images.columns-2 figure.wp-block-image,
  .atd-works-single-content .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image {
    width: 100%;
  }

  .atd-works-single-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .atd-sp-only { display: block; }

  .atd-works-hero__inner,
  .atd-works-hero-slider__inner,
  .atd-works-grid-section,
  .atd-works-archive,
  .atd-site-header__inner,
  .atd-works-single-heading,
  .atd-works-single-content,
  .atd-works-single-nav {
    width: min(100% - 28px, 560px);
  }

  .atd-works-grid,
  .atd-works-grid--cols-2,
  .atd-works-grid--cols-3,
  .atd-works-grid--cols-4,
  .atd-works-grid--cols-5,
  .atd-works-grid--cols-6 {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .atd-site-header__inner {
    min-height: 72px;
  }

  .atd-site-header__logo { width: 130px; }
  .atd-site-header__nav { gap: 14px; }
  .atd-site-header__nav a { font-size: 13px; }

  .atd-works-single-heading {
    margin-top: 48px;
  }

  .atd-works-single-content {
    margin-top: 44px;
  }

  .atd-works-single-content .wp-block-image,
  .atd-works-single-content .wp-block-gallery {
    margin-top: 28px;
    margin-bottom: 28px;
  }

  .atd-works-single-nav {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 64px auto 56px;
  }

  .atd-works-single-nav__item--next {
    text-align: left;
  }

  .atd-works-single-nav__back {
    width: fit-content;
  }

  .atd-lightbox {
    padding: 44px 14px;
  }

  .atd-lightbox__figure {
    width: calc(100vw - 28px);
    height: calc(100vh - 88px);
  }

  .atd-lightbox__close {
    top: 12px;
    right: 16px;
    font-size: 36px;
  }

  .atd-lightbox__prev,
  .atd-lightbox__next {
    font-size: 54px;
  }

  .atd-lightbox__prev { left: 12px; }
  .atd-lightbox__next { right: 12px; }
}


/* ------------------------------
   v1.4.0 TOP Hero: title + button only
------------------------------ */

.atd-works-hero__button,
.atd-works-hero-slider__buttons {
  margin-top: 36px;
}

.atd-works-hero-slider__buttons {
  min-height: 46px;
}

@media (max-width: 640px) {
  .atd-works-hero__button,
  .atd-works-hero-slider__buttons {
    margin-top: 28px;
  }
}


/* ------------------------------
   v1.4.1 TOP Hero: large WORKS title + button only
------------------------------ */

.atd-works-hero-slider__titles {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  min-height: clamp(92px, 15vw, 190px);
  margin: 0 auto;
}

.atd-works-hero-slider__titles .atd-works-hero-slider__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;
}

.atd-works-hero-slider__titles .atd-works-hero-slider__title.is-active {
  opacity: 1;
  transform: translateY(0);
}

.atd-works-hero__title,
.atd-works-hero-slider__title {
  text-transform: none;
}

.atd-works-hero__button,
.atd-works-hero-slider__buttons {
  margin-top: 34px;
}

@media (max-width: 640px) {
  .atd-works-hero-slider__titles {
    width: min(100% - 28px, 560px);
    min-height: clamp(84px, 24vw, 142px);
  }

  .atd-works-hero__button,
  .atd-works-hero-slider__buttons {
    margin-top: 26px;
  }
}


/* ------------------------------
   v1.4.2 Common header tuning + hero button only
------------------------------ */

/* TOP hero: show only the button on image */
.atd-works-hero__button--only {
  margin-top: 0;
}

.atd-works-hero-slider__buttons--only {
  margin-top: 0;
}

/* Single WORKS header: match Twenty Twenty-Five common header */
.atd-site-header {
  border-bottom: 0;
}

.atd-site-header__inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 92px;
}

.atd-site-header__logo {
  width: 168px;
}

.atd-site-header__nav {
  gap: 24px;
}

.atd-site-header__nav a {
  color: #555;
  font-size: 16px;
  letter-spacing: .01em;
}

.atd-site-header__nav a:hover,
.atd-site-header__nav a:focus {
  color: #111;
}

/* Twenty Twenty-Five common header logo HTML helper */
.atd-header-logo {
  display: inline-flex;
  align-items: center;
  width: 168px;
  line-height: 1;
}

.atd-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .atd-site-header__inner {
    min-height: 78px;
  }

  .atd-site-header__logo,
  .atd-header-logo {
    width: 136px;
  }

  .atd-site-header__nav {
    gap: 14px;
  }

  .atd-site-header__nav a {
    font-size: 13px;
  }
}


/* ------------------------------
   v1.4.4: theme common header/footer + button-only hero
------------------------------ */

/* TOP hero: VIEW WORKS only, exact center */
.atd-works-hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.atd-works-hero__inner,
.atd-works-hero-slider__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.atd-works-hero__button--only {
  margin: 0;
}

.atd-works-hero-slider__buttons--only {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 46px;
  margin: 0;
}

.atd-works-hero-slider__buttons--only .atd-works-hero-slider__button {
  top: 0;
}

/* Old custom WORKS header/footer classes are no longer used. */
.atd-site-header,
.atd-site-footer {
  display: none;
}

/* Helper for the Twenty Twenty-Five common header custom HTML logo */
.atd-header-logo {
  display: inline-flex;
  align-items: center;
  width: 168px;
  line-height: 1;
}

.atd-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .atd-header-logo {
    width: 136px;
  }

  .atd-works-hero-slider__buttons--only {
    min-height: 42px;
  }
}


/* ------------------------------
   v1.4.5: use Twenty Twenty-Five block template parts
------------------------------ */

/* Remove default theme spacing around plugin-rendered WORKS pages */
body.atd-works-single-body {
  margin: 0;
}

body.atd-works-single-body .atd-works-single {
  margin-block-start: 0;
}

/* TOP hero: VIEW WORKS button exact center */
.atd-works-hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.atd-works-hero__inner,
.atd-works-hero-slider__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.atd-works-hero__button--only,
.atd-works-hero-slider__buttons--only {
  margin: 0;
}

.atd-works-hero-slider__buttons--only {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 46px;
}

/* Helper for the Twenty Twenty-Five common header custom HTML logo */
.atd-header-logo {
  display: inline-flex;
  align-items: center;
  width: 168px;
  line-height: 1;
}

.atd-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .atd-header-logo {
    width: 136px;
  }
}


/* ------------------------------
   v1.4.6: restore block-theme layout context on WORKS single
------------------------------ */

body.atd-works-single-body .atd-works-site-blocks {
  min-height: 100vh;
}

/* Reduce unexpected block gap before the WORKS main visual */
body.atd-works-single-body .atd-works-single {
  margin-block-start: 0;
}

body.atd-works-single-body .atd-works-site-blocks > * + .atd-works-single {
  margin-block-start: 0;
}

/* Keep the WORKS main visual directly under the shared header */
body.atd-works-single-body .atd-works-single-mainvisual {
  margin-top: 0;
}

/* If the shared header uses the helper logo class, keep it consistent */
.atd-header-logo {
  display: inline-flex;
  align-items: center;
  width: 168px;
  line-height: 1;
}

.atd-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}


/* ------------------------------
   v1.4.7: force shared header layout on WORKS single
   - logo left
   - navigation right
   - max width about 1200px
------------------------------ */

body.atd-works-single-body header.wp-block-template-part {
  width: 100%;
  background: #fff;
}

/* The main header wrapper */
body.atd-works-single-body header.wp-block-template-part > .wp-block-group,
body.atd-works-single-body header.wp-block-template-part .wp-block-group:has(.atd-header-logo) {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* The row that contains logo + navigation */
body.atd-works-single-body header.wp-block-template-part .wp-block-group:has(.atd-header-logo) > .wp-block-group,
body.atd-works-single-body header.wp-block-template-part .wp-block-group:has(.atd-header-logo).is-layout-flex,
body.atd-works-single-body header.wp-block-template-part .wp-block-group:has(.atd-header-logo) .wp-block-group-is-layout-flex {
  width: 100% !important;
  max-width: 1200px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Logo */
body.atd-works-single-body header.wp-block-template-part .atd-header-logo {
  flex: 0 0 auto !important;
  margin-right: 24px !important;
}

/* Navigation */
body.atd-works-single-body header.wp-block-template-part .wp-block-navigation {
  margin-left: auto !important;
}

body.atd-works-single-body header.wp-block-template-part .wp-block-navigation__container {
  gap: 24px !important;
}

/* Fallback for browsers without :has support */
body.atd-works-single-body header.wp-block-template-part .wp-block-navigation {
  justify-content: flex-end !important;
}

/* Keep the first visual directly under header */
body.atd-works-single-body .atd-works-single {
  margin-top: 0 !important;
}

body.atd-works-single-body .atd-works-single-mainvisual {
  margin-top: 0 !important;
}

/* VIEW WORKS button exact center on TOP hero */
.atd-works-hero-slider__inner,
.atd-works-hero__inner {
  min-height: inherit;
}

.atd-works-hero-slider__buttons--only {
  inset: auto !important;
  transform: none !important;
}

@media (max-width: 640px) {
  body.atd-works-single-body header.wp-block-template-part > .wp-block-group,
  body.atd-works-single-body header.wp-block-template-part .wp-block-group:has(.atd-header-logo) {
    max-width: calc(100% - 28px) !important;
  }

  body.atd-works-single-body header.wp-block-template-part .wp-block-navigation__container {
    gap: 14px !important;
  }
}


/* ------------------------------
   v1.4.8: fixed shared header row by editor class
   Required editor class:
   atd-header-row
------------------------------ */

/* Header row shared by TOP / BLOG / WORKS single */
.atd-header-row {
  width: min(1200px, calc(100% - 40px)) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

/* Logo side */
.atd-header-row .atd-header-logo {
  flex: 0 0 auto !important;
  width: 168px !important;
  margin: 0 !important;
}

.atd-header-row .atd-header-logo img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

/* Navigation side */
.atd-header-row .wp-block-navigation {
  margin-left: auto !important;
  flex: 0 0 auto !important;
}

.atd-header-row .wp-block-navigation__container {
  gap: 24px !important;
}

/* Cancel previous over-specific WORKS single header corrections */
body.atd-works-single-body header.wp-block-template-part .wp-block-navigation {
  margin-left: auto !important;
}

body.atd-works-single-body header.wp-block-template-part .atd-header-row {
  width: min(1200px, calc(100% - 40px)) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: space-between !important;
}

/* TOP hero button only, centered */
.atd-works-hero,
.atd-works-hero-slider {
  position: relative;
}

.atd-works-hero__inner,
.atd-works-hero-slider__inner {
  min-height: inherit !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.atd-works-hero__button--only,
.atd-works-hero-slider__buttons--only {
  margin: 0 !important;
}

@media (max-width: 640px) {
  .atd-header-row {
    width: min(100% - 28px, 560px) !important;
    gap: 14px !important;
  }

  .atd-header-row .atd-header-logo {
    width: 136px !important;
  }

  .atd-header-row .wp-block-navigation__container {
    gap: 14px !important;
  }
}


/* ------------------------------
   v1.4.9: make TOP hero height deterministic
------------------------------ */

/* TOP hero height is controlled by shortcode height="".
   The PHP now outputs both height and min-height.
   These rules make child layers fill the parent reliably. */
.atd-works-hero,
.atd-works-hero-slider {
  height: auto;
  overflow: hidden;
}

.atd-works-hero-slider__slides,
.atd-works-hero-slider__slide,
.atd-works-hero-slider__overlay {
  height: 100%;
}

.atd-works-hero__inner,
.atd-works-hero-slider__inner {
  height: 100%;
}

/* WORKS single main image reference height */
body.atd-works-single-body .atd-works-single-mainvisual img {
  display: block;
  width: 100%;
  height: 82vh;
  max-height: 82vh;
  object-fit: cover;
}

/* If you want TOP to match WORKS single, use:
   [at_works_hero_slider interval="5000" count="6" height="82vh"]
*/
