:root {
  --brand-color: #651e7c;
  --brand-color-dark: #4f1363;
  --page-bg: #f6f4f8;
  --card-radius: 10px;
  --modal-radius: 10px;
  --text-main: #1f1724;
  --text-soft: #6d6573;
  --border-soft: rgba(101, 30, 124, 0.08);
  --shadow-soft: 0 16px 44px rgba(28, 18, 35, 0.08);
  --shadow-hover: 0 20px 56px rgba(28, 18, 35, 0.14);
  --modal-desktop-width: 1500px;
  --modal-desktop-height: 700px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(101, 30, 124, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(101, 30, 124, 0.06), transparent 24%),
    var(--page-bg);
  font-family: Roboto, Arial, Helvetica, sans-serif;
}

img {
  max-width: 100%;
}

.page-shell {
  padding: 64px 0 80px;
}

.section-intro {
  max-width: 880px;
  margin: 0 auto 40px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(101, 30, 124, 0.08);
  color: var(--brand-color);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 14px;
}

.section-desc {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.gallery-card {
  height: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(101, 30, 124, 0.18);
}

.gallery-media {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    #f1edf5;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-media .swiper,
.gallery-media .swiper-wrapper,
.gallery-media .swiper-slide,
.gallery-media .single-image {
  width: 100%;
  height: 100%;
}

.gallery-media .swiper-slide,
.gallery-media .single-image,
.detail-media .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-media img,
.modal-thumbs-swiper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.detail-media {
  flex: 1 1 auto;
  min-height: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 54%),
    #1a1320;
}

.detail-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #120d16;
}

.card-swiper,
.modal-swiper,
.modal-thumbs-swiper {
  width: 100%;
  height: 100%;
}

.swiper-nav {
  width: 38px;
  height: 38px;
  margin-top: 0;
  border-radius: 50%;
  background: rgba(16, 12, 19, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, visibility 0.25s ease;
  transform: translateY(-50%) scale(0.95);
}

.gallery-media:hover .swiper-nav,
.gallery-media:focus-within .swiper-nav,
.detail-media:hover .swiper-nav,
.detail-media:focus-within .swiper-nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.swiper-nav::after {
  font-size: 0.95rem;
  font-weight: 700;
}

.swiper-nav:hover {
  background: rgba(101, 30, 124, 0.92);
}

.gallery-media,
.detail-media,
.card-swiper,
.modal-swiper,
.modal-thumbs-swiper,
.swiper-wrapper,
.swiper-slide,
.swiper-nav,
.modal-thumbs-swiper .swiper-slide,
.gallery-media img,
.detail-media img,
.modal-thumbs-swiper img {
  -webkit-tap-highlight-color: transparent;
}

.gallery-media img,
.detail-media img,
.modal-thumbs-swiper img,
.swiper-nav,
.modal-thumbs-swiper .swiper-slide {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.swiper-nav:focus,
.swiper-nav:active,
.modal-thumbs-swiper .swiper-slide:focus,
.modal-thumbs-swiper .swiper-slide:active {
  outline: none;
  box-shadow: none;
}



.swiper-button-disabled {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.swiper-pagination {
  z-index: 5;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: #fff;
}

.gallery-card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 22px 24px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(101, 30, 124, 0.08);
  color: var(--brand-color);
  font-weight: 600;
}

.card-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 2);
}

.card-action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-color);
  font-weight: 700;
  font-size: 0.95rem;
}

.card-action svg {
  transition: transform 0.3s ease;
}

.gallery-card:hover .card-action svg {
  transform: translateX(4px);
}

.load-more-wrap {
  margin-top: 18px;
}

.btn-brand,
.btn-brand-outline {
  min-width: 180px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-brand {
  border: none;
  background: var(--brand-color);
  color: #fff;
  box-shadow: 0 12px 26px rgba(101, 30, 124, 0.18);
  text-decoration: none;
}

.btn-brand:hover {
  background: var(--brand-color-dark);
  color: #fff;
}

.btn-brand-outline {
  border: 1px solid rgba(101, 30, 124, 0.18);
  background: #fff;
  color: var(--brand-color);
  text-decoration: none;
}

.btn-brand-outline:hover {
  border-color: var(--brand-color);
  background: rgba(101, 30, 124, 0.04);
  color: var(--brand-color);
}

.load-status {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.gallery-modal .modal-dialog {
  width: min(var(--modal-desktop-width), calc(100vw - 48px));
  max-width: min(var(--modal-desktop-width), calc(100vw - 48px));
  margin: 32px auto;
}

.gallery-modal .modal-content {
  border: none;
  background: transparent;
}

.detail-shell {
  background: #fff;
  border-radius: var(--modal-radius);
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(24, 14, 30, 0.22);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(17, 13, 20, 0.7);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.modal-close:hover {
  background: rgba(101, 30, 124, 0.95);
  transform: scale(1.04);
}

.detail-layout {
  display: flex;
  height: min(var(--modal-desktop-height), calc(100vh - 64px));
  max-height: min(var(--modal-desktop-height), calc(100vh - 64px));
}

.detail-media-col {
  width: 50%;
  min-width: 0;
  background: #140f18;
}

.detail-content-col {
  width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.modal-media-shell {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.thumbs-wrap {
  flex: 0 0 auto;
  padding: 12px;
  background: #120d16;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-thumbs-swiper {
  height: 88px;
}

.modal-thumbs-swiper .swiper-slide {
  width: 110px;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  opacity: 0.42;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.modal-thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #fff;
}

.detail-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 42px 34px 34px;
}

.detail-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(101, 30, 124, 0.08);
  color: var(--brand-color);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.detail-title {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  line-height: 1.25;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 22px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f2f7;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.detail-lead {
  margin-bottom: 24px;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-soft);
}

.detail-content {
  font-size: 0.98rem;
  line-height: 1.92;
  color: #312737;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(101, 30, 124, 0.08);
}

.detail-actions .btn {
  min-width: 150px;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(101, 30, 124, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 42px 22px;
  color: var(--text-soft);
}

@media (max-width: 991.98px) {
  .page-shell {
    padding: 48px 0 64px;
  }

  .gallery-modal .modal-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }

  .detail-shell {
    border-radius: 22px;
  }

  .detail-layout {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  .detail-media-col,
  .detail-content-col {
    width: 100%;
  }

  .detail-media {
    aspect-ratio: 4 / 3;
    flex: initial;
  }

  .thumbs-wrap {
    padding: 10px;
  }

  .modal-thumbs-swiper {
    height: 76px;
  }

  .detail-scroll {
    height: auto;
    max-height: none;
    padding: 28px 20px 24px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 575.98px) {
  .section-intro {
    margin-bottom: 30px;
  }

  .gallery-card-body {
    padding: 18px 18px 20px;
  }

  .card-title {
    font-size: 1.08rem;
  }

  .btn-brand,
  .btn-brand-outline {
    min-width: 100%;
  }

  .detail-actions {
    flex-direction: column;
  }
}
