/* ===============================
   AKopiCafe Gallery Page
   File: gallery.css
   Professional + mobile ready
================================ */

/* ===============================
   PAGE BASE
================================ */

body.internal-page.gallery-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(181, 139, 96, 0.12), transparent 30%),
    radial-gradient(circle at 86% 80%, rgba(90, 56, 37, 0.08), transparent 34%),
    linear-gradient(180deg, #fffaf4 0%, #fffdf9 48%, #f8efe6 100%);
  color: var(--dark, #2d1c13);
}

.gallery-page-main {
  width: 100%;
  overflow: hidden;
}

/* ===============================
   GALLERY HEADER
================================ */

body.gallery-page .gallery-header {
  position: relative;
  overflow: hidden;

  margin: 0;
  padding: 154px 24px 86px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  background:
    radial-gradient(circle at 14% 16%, rgba(181, 139, 96, 0.10), transparent 30%),
    radial-gradient(circle at 86% 78%, rgba(90, 56, 37, 0.07), transparent 34%),
    linear-gradient(180deg, #fffaf4 0%, #f7ecdf 100%);

  border-bottom: 1px solid rgba(181, 139, 96, 0.12);
  box-sizing: border-box;
}

body.gallery-page .gallery-header::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 50%;

  width: min(780px, 92%);
  height: 300px;

  transform: translateX(-50%);

  background: radial-gradient(circle, rgba(217, 174, 124, 0.16), transparent 68%);
  pointer-events: none;
}

body.gallery-page .gallery-header::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);

  background-size: 34px 34px;
  pointer-events: none;
  opacity: 0.5;
}

.gallery-header-content {
  position: relative;
  z-index: 2;

  width: min(1120px, 100%);
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-kicker {
  width: fit-content;
  margin: 0 auto 18px;
  padding: 7px 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(181, 139, 96, 0.26);

  background: rgba(255, 255, 255, 0.62);
  color: var(--coffee, #5a3825);

  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;

  box-shadow: 0 10px 24px rgba(45, 26, 17, 0.05);
}

body.gallery-page .gallery-header h1 {
  width: 100%;
  max-width: 1120px;

  margin: 0 0 18px;
  padding: 0;
  border: 0;

  color: var(--coffee, #5a3825);

  font-family: var(--heading-font, 'Playfair Display', serif);
  font-size: clamp(44px, 5vw, 74px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-align: center;
}

body.gallery-page .gallery-header h1::after {
  content: "";
  display: block;

  width: 92px;
  height: 4px;

  margin: 20px auto 0;

  border-radius: 999px;
  background: linear-gradient(90deg, var(--coffee, #5a3825), var(--accent, #b58b60));
}

body.gallery-page .gallery-header p {
  width: min(760px, 100%);
  margin: 0 auto;

  color: #6d5a4f;

  font-family: var(--body-font, 'Lora', serif);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.7;
  text-align: center;
}

/* ===============================
   SEARCH + FILTER
================================ */

.gallery-filter-section {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 24px;
}

.gallery-controls {
  width: 100%;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;

  padding: 22px;

  border-radius: 24px;
  border: 1px solid rgba(181, 139, 96, 0.18);

  background:
    radial-gradient(circle at top right, rgba(181, 139, 96, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 246, 0.96));

  box-shadow: 0 18px 45px rgba(45, 26, 17, 0.10);

  box-sizing: border-box;
}

.gallery-controls input,
.gallery-controls select {
  width: 100%;
  height: 52px;

  margin: 0;
  padding: 0 16px;

  border: 1px solid rgba(90, 56, 37, 0.14);
  border-radius: 14px;
  outline: none;

  background: rgba(255, 255, 255, 0.92);
  color: var(--dark, #2d1c13);

  font-family: var(--body-font, 'Lora', serif);
  font-size: 15.5px;
  line-height: 1.4;

  box-shadow: 0 6px 16px rgba(45, 26, 17, 0.035);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;

  box-sizing: border-box;
}

.gallery-controls select {
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  padding-right: 44px;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent, #b58b60) 50%),
    linear-gradient(135deg, var(--accent, #b58b60) 50%, transparent 50%);

  background-position:
    calc(100% - 21px) 50%,
    calc(100% - 15px) 50%;

  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.gallery-controls input::placeholder {
  color: rgba(111, 90, 75, 0.55);
}

.gallery-controls input:hover,
.gallery-controls select:hover {
  border-color: rgba(181, 139, 96, 0.42);
  background: #fff;
}

.gallery-controls input:focus,
.gallery-controls select:focus {
  border-color: var(--accent, #b58b60);
  background: #fff;

  box-shadow:
    0 0 0 4px rgba(181, 139, 96, 0.15),
    0 10px 24px rgba(45, 26, 17, 0.07);
}

/* ===============================
   GALLERY SECTION
================================ */

.gallery-section {
  position: relative;
  overflow: hidden;

  padding: 54px 20px 84px;

  text-align: center;

  background:
    radial-gradient(circle at 12% 18%, rgba(181, 139, 96, 0.10), transparent 28%),
    radial-gradient(circle at 88% 84%, rgba(90, 56, 37, 0.07), transparent 32%),
    linear-gradient(180deg, #fffaf4 0%, #f8efe6 100%);

  border-top: 1px solid rgba(181, 139, 96, 0.12);
}

.gallery-section::before {
  content: "";
  position: absolute;
  inset: 24px;

  border: 1px solid rgba(181, 139, 96, 0.13);
  border-radius: 32px;

  pointer-events: none;
}

.gallery-section-heading {
  position: relative;
  z-index: 2;

  width: min(760px, 100%);
  margin: 0 auto 46px;

  text-align: center;
}

.gallery-section-heading h2 {
  margin: 0;

  color: var(--coffee, #5a3825);

  font-family: var(--heading-font, 'Playfair Display', serif);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.gallery-section-heading h2::after {
  content: "";
  display: block;

  width: 92px;
  height: 4px;

  margin: 18px auto 0;

  border-radius: 999px;
  background: linear-gradient(90deg, var(--coffee, #5a3825), var(--accent, #b58b60));
}

.gallery-section-heading p {
  width: min(620px, 100%);
  margin: 22px auto 0;

  color: #6d5a4f;

  font-size: 16.5px;
  line-height: 1.75;
}

/* ===============================
   GALLERY GRID
================================ */

.gallery-grid {
  position: relative;
  z-index: 2;

  width: min(1320px, 100%);
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* ===============================
   GALLERY CARD
================================ */

.gallery-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  min-height: 100%;

  display: flex;
  flex-direction: column;

  border-radius: 26px;
  border: 1px solid rgba(181, 139, 96, 0.22);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 249, 242, 0.96));

  box-shadow:
    0 18px 44px rgba(45, 26, 17, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);

  text-align: center;

  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;

  background:
    linear-gradient(135deg, rgba(90, 56, 37, 0.98), rgba(181, 139, 96, 0.94));

  opacity: 0;

  transition: opacity 0.28s ease;
}

.gallery-card::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -72px;
  z-index: -1;

  width: 158px;
  height: 158px;

  border-radius: 50%;
  background: rgba(181, 139, 96, 0.12);

  transition:
    transform 0.28s ease,
    background 0.28s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  border-color: rgba(181, 139, 96, 0.42);

  box-shadow:
    0 26px 64px rgba(45, 26, 17, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.gallery-card:hover::before {
  opacity: 1;
}

.gallery-card:hover::after {
  transform: scale(1.14);
  background: rgba(255, 255, 255, 0.10);
}

.gallery-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-card img {
  position: relative;
  z-index: 2;

  width: 100%;
  height: 260px;

  display: block;

  object-fit: contain;
  object-position: center;

  padding: 16px;

  border-bottom: 1px solid rgba(181, 139, 96, 0.16);

  background:
    radial-gradient(circle at 50% 35%, #ffffff 0%, #fff7ef 58%, #efe0d1 100%);

  cursor: pointer;

  transition:
    transform 0.35s ease,
    filter 0.35s ease;

  box-sizing: border-box;
}

.gallery-card:hover img {
  transform: scale(1.035);
  filter: brightness(1.04) contrast(1.02);
}

/* ===============================
   CARD CAPTION
================================ */

.gallery-caption {
  position: relative;
  z-index: 2;

  padding: 24px 22px 26px;

  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.gallery-caption h3 {
  margin: 0 0 12px;

  color: var(--coffee, #5a3825);

  font-family: var(--heading-font, 'Playfair Display', serif);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;

  transition: color 0.28s ease;
}

.gallery-caption h3::after {
  content: "";
  display: block;

  width: 58px;
  height: 3px;

  margin: 12px auto 0;

  border-radius: 999px;
  background: linear-gradient(90deg, var(--coffee, #5a3825), var(--accent, #b58b60));

  transition: background 0.28s ease;
}

.gallery-caption p {
  margin: 0 0 16px;

  color: #6d5a4f;

  font-size: 15px;
  line-height: 1.65;

  transition: color 0.28s ease;
}

.gallery-caption .location {
  margin-top: auto;
  padding: 8px 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(181, 139, 96, 0.22);

  background: rgba(255, 255, 255, 0.66);
  color: var(--coffee, #5a3825);

  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  transition:
    color 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease;
}

.gallery-card:hover .gallery-caption h3,
.gallery-card:hover .gallery-caption p,
.gallery-card:hover .gallery-caption .location {
  color: #fff8ef;
}

.gallery-card:hover .gallery-caption h3::after {
  background: rgba(255, 248, 239, 0.75);
}

.gallery-card:hover .gallery-caption .location {
  border-color: rgba(255, 248, 239, 0.25);
  background: rgba(255, 248, 239, 0.10);
}

/* ===============================
   EMPTY MESSAGE
================================ */

.gallery-empty-message {
  position: relative;
  z-index: 2;

  width: min(520px, 100%);
  margin: 36px auto 0;
  padding: 18px 20px;

  border-radius: 18px;
  border: 1px dashed rgba(181, 139, 96, 0.30);

  background: rgba(255, 250, 244, 0.78);
  color: #6d5a4f;

  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 800;
}

/* ===============================
   CONSENT NOTICE
================================ */

.gallery-consent {
  padding: 34px 20px;

  text-align: center;

  background: #fffaf4;
  border-top: 1px solid rgba(181, 139, 96, 0.12);
}

.gallery-consent p {
  margin: 0;

  color: #6d5a4f;

  font-size: 15px;
  line-height: 1.6;
}

/* ===============================
   LIGHTBOX
================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 28px;

  background: rgba(31, 18, 12, 0.72);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  animation: galleryFadeIn 0.24s ease both;
  box-sizing: border-box;
}

.lightbox-overlay img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;

  object-fit: contain;

  border-radius: 22px;
  border: 1px solid rgba(181, 139, 96, 0.30);

  background: #fffaf4;

  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.34),
    0 0 0 8px rgba(255, 248, 239, 0.08);

  animation: galleryImagePop 0.24s ease both;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 10001;

  width: 46px;
  height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 248, 239, 0.22);
  border-radius: 50%;

  background: rgba(255, 248, 239, 0.10);
  color: #fff8ef;

  font-size: 32px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.05);
  background: rgba(255, 248, 239, 0.18);
  border-color: rgba(255, 248, 239, 0.36);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 10001;

  width: 52px;
  height: 52px;

  transform: translateY(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 248, 239, 0.22);
  border-radius: 50%;

  background: rgba(255, 248, 239, 0.10);
  color: #fff8ef;

  font-size: 34px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 248, 239, 0.18);
  border-color: rgba(255, 248, 239, 0.36);
}

.lightbox-nav.prev {
  left: 28px;
}

.lightbox-nav.next {
  right: 28px;
}

/* ===============================
   ANIMATIONS
================================ */

@keyframes galleryFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes galleryImagePop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===============================
   RESPONSIVE
================================ */

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

@media (max-width: 900px) {
  .gallery-grid {
    width: min(680px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.gallery-page .gallery-header {
    padding: 130px 20px 72px;
  }

  body.gallery-page .gallery-header h1 {
    font-size: clamp(38px, 10vw, 54px);
  }

  body.gallery-page .gallery-header p {
    font-size: 15.5px;
  }

  .gallery-filter-section {
    width: min(100% - 24px, 980px);
    padding: 40px 0 22px;
  }

  .gallery-controls {
    padding: 18px;
    border-radius: 20px;
  }

  .gallery-section {
    padding: 48px 16px 72px;
  }

  .gallery-section::before {
    inset: 18px 14px;
    border-radius: 26px;
  }

  .gallery-section-heading {
    margin-bottom: 38px;
  }

  .gallery-grid {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .gallery-card {
    border-radius: 22px;
  }

  .gallery-card img {
    height: 300px;
  }

  .gallery-caption {
    padding: 22px 20px 24px;
  }

  .lightbox-overlay {
    padding: 18px;
  }

  .lightbox-overlay img {
    max-width: 92vw;
    max-height: 76vh;
    border-radius: 18px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .lightbox-nav.prev {
    left: 14px;
  }

  .lightbox-nav.next {
    right: 14px;
  }
}

@media (max-width: 480px) {
  body.gallery-page .gallery-header {
    padding: 118px 16px 64px;
  }

  .gallery-kicker {
    font-size: 10px;
    padding: 7px 13px;
  }

  .gallery-filter-section {
    width: min(100% - 18px, 980px);
    padding: 32px 0 18px;
  }

  .gallery-controls input,
  .gallery-controls select {
    height: 48px;
    font-size: 15px;
  }

  .gallery-section {
    padding: 42px 12px 64px;
  }

  .gallery-section-heading h2 {
    font-size: 32px;
  }

  .gallery-section-heading p {
    font-size: 15px;
  }

  .gallery-card {
    border-radius: 18px;
  }

  .gallery-card img {
    height: 235px;
    padding: 12px;
  }

  .gallery-caption {
    padding: 20px 18px 22px;
  }

  .gallery-caption h3 {
    font-size: 22px;
  }

  .gallery-caption p {
    font-size: 14.5px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lightbox-nav.prev {
    left: calc(50% - 56px);
  }

  .lightbox-nav.next {
    right: calc(50% - 56px);
  }
}