/* ==========================================================
   Gallery page - aligned with the homepage system
   Loaded after style.css on the four galeri pages.
   ========================================================== */

:root {
  --hp-navy: #0a1526;
  --hp-accent: #2f86c7;
  --hp-ink: #151a22;
  --hp-muted: #5c6370;
  --hp-line: rgba(10, 21, 38, .14);
  --hp-sand: #f5f0e7;
}

.gallery-page {
  background: #fff;
}

/* Hero: same overlay logic as homepage, shorter */
.gallery-page .site-hero.inner-page {
  height: 72vh;
  min-height: 500px;
}

.gallery-page .site-hero.inner-page.overlay:before {
  background: linear-gradient(180deg, rgba(10, 21, 38, .55) 0%, rgba(10, 21, 38, .3) 50%, rgba(10, 21, 38, .8) 100%);
}

.gallery-page .page-hero-title {
  font-family: var(--font-main);
  font-weight: 600;
  letter-spacing: -.03em;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1;
}

.gallery-page .page-hero-breadcrumbs,
.gallery-page .custom-breadcrumbs {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .72rem;
}

/* Intro and categories */
.gallery-intro {
  padding: 6rem 0 1rem;
}

.gallery-intro-head {
  max-width: 760px;
  margin: 0 auto 4rem;
  text-align: center;
}

.gallery-intro-head span,
.gallery-category-head span {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.gallery-intro-head h2,
.gallery-category-head h2 {
  margin: 1rem 0 0;
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--hp-ink);
}

.gallery-category {
  padding: 5rem 0 1rem;
  border-top: 1px solid var(--hp-line);
  margin-top: 3rem;
}

.gallery-intro .gallery-category:first-child {
  border-top: 0;
  margin-top: 0;
}

.gallery-category-head {
  margin-bottom: 2.5rem;
  text-align: left;
}

/* Cards: 28px radius, no shadow, equal size */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 28px;
  background: var(--hp-sand);
  box-shadow: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 1.4s var(--hp-ease);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

@media (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .gallery-card img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .gallery-page .site-hero.inner-page {
    min-height: 440px;
  }

  .gallery-intro {
    padding-top: 4rem;
  }
}

/* ===== Category tabs ===== */
.gallery-tabs {
  position: sticky;
  top: 72px;
  z-index: 20;
  padding: 1.1rem 0;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hp-line);
}

.gallery-tabs-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}

.gallery-tab {
  padding: .62rem 1.35rem;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hp-ink);
  font-family: var(--font-main);
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}

.gallery-tab:hover {
  border-color: var(--hp-navy);
}

.gallery-tab.is-active {
  background: var(--hp-accent);
  border-color: var(--hp-accent);
  color: #fff;
}

.gallery-category[hidden] {
  display: none;
}

/* ===== Hero, simplified: left aligned, logo removed, readable overlay ===== */
.gallery-page .site-hero.inner-page {
  display: flex;
  align-items: flex-end;
}

.gallery-page .site-hero.inner-page.overlay:before {
  background:
    linear-gradient(90deg, rgba(10, 21, 38, .82) 0%, rgba(10, 21, 38, .35) 55%, rgba(10, 21, 38, .15) 100%),
    linear-gradient(0deg, rgba(10, 21, 38, .55) 0%, rgba(10, 21, 38, 0) 55%);
}

.gallery-page .site-hero .container {
  width: 100%;
  padding-bottom: 6.5rem;
}

.gallery-page .site-hero .row {
  justify-content: flex-start !important;
  margin: 0;
}

.gallery-page .site-hero .text-center {
  text-align: left !important;
}

.gallery-page .page-hero-title {
  margin: .4rem 0 1.1rem;
  color: #fff;
  text-shadow: none;
}

.gallery-page .page-hero-breadcrumbs {
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, .8);
}

.gallery-page .page-hero-breadcrumbs li a,
.gallery-page .page-hero-breadcrumbs li {
  color: rgba(255, 255, 255, .8);
}

.gallery-page .mouse.smoothscroll {
  display: none;
}

.gallery-page .page-hero-logo {
  display: none;
}

.gallery-page .site-hero.inner-page {
  position: relative;
}

.gallery-page .site-hero .container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.gallery-page .site-hero .container {
  height: auto !important;
  top: auto !important;
  min-height: 0 !important;
}

.gallery-page .site-hero .site-hero-inner {
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
}

.gallery-page .site-hero.inner-page {
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}

/* ===== Mobile: tabs become one horizontal scroll row, not a tall sticky block ===== */
@media (max-width: 767.98px) {
  .gallery-tabs {
    position: relative;
    top: auto;
    padding: .75rem 0;
  }

  .gallery-tabs .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .gallery-tabs-list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .2rem;
  }

  .gallery-tabs-list::-webkit-scrollbar {
    display: none;
  }

  .gallery-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .55rem 1.1rem;
    font-size: .82rem;
  }

  .gallery-page .site-hero.inner-page {
    height: 62vh;
    min-height: 420px;
    margin-bottom: 0;
  }

  .gallery-page .site-hero .container {
    padding-bottom: 4.5rem;
  }

  .gallery-intro {
    padding-top: 2rem;
  }
}

/* Content width: same container rhythm as the homepage, with side gutters on phones */
.gallery-category,
.gallery-intro-head {
  width: min(1180px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.gallery-intro-head {
  width: min(760px, calc(100% - 2.5rem));
}

.gallery-page .site-hero.inner-page {
  overflow: hidden;
}

.gallery-page .site-hero.inner-page.overlay:before {
  inset: 0;
}

/* Category bar sits directly under the hero (no gap), categories start below it */
.gallery-intro {
  padding-top: 0 !important;
}

.gallery-tabs {
  margin-top: 0;
}

.gallery-intro .container:not(.gallery-tabs .container) {
  padding-top: 3.5rem;
}

/* Hero text centred again */
.gallery-page .site-hero .row {
  justify-content: center !important;
}

.gallery-page .site-hero .text-center {
  text-align: center !important;
}

.gallery-page .page-hero-breadcrumbs {
  justify-content: center;
}

/* Lightbox must sit above the site header (z-index 99999) */
.fancybox-container,
.fancybox__container {
  z-index: 100001 !important;
}

/* Gallery hover: soft navy veil with a plus badge, instead of zoom */
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 21, 38, .42);
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

.gallery-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: #fff
    linear-gradient(var(--hp-navy), var(--hp-navy)) center / 20px 2px no-repeat,
    linear-gradient(var(--hp-navy), var(--hp-navy)) center / 2px 20px no-repeat;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .45s ease, transform .45s var(--hp-ease);
  pointer-events: none;
}

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

.gallery-card:hover::before {
  transform: scale(1);
}

.gallery-card:hover img {
  transform: none;
}

/* Category bar: sticks flush under the scrolled header, fully opaque */
.gallery-tabs {
  top: 84px;
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (max-width: 767.98px) {
  .gallery-tabs {
    position: relative;
    top: auto;
  }
}

/* When the header is hidden, the category bar moves up with it */
body.header-hidden .gallery-tabs {
  top: 0;
}

/* Smaller category bar */
.gallery-tabs {
  padding: .6rem 0;
  transition: top .4s cubic-bezier(.2, .7, .2, 1);
}

.gallery-tabs-list {
  gap: .45rem;
}

.gallery-tab {
  padding: .42rem 1rem;
  font-size: .78rem;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

@media (max-width: 767.98px) {
  .gallery-tab {
    padding: .42rem .9rem;
    font-size: .76rem;
  }
}

/* No divider lines above category titles */
.gallery-category,
.gallery-intro .gallery-category:first-child {
  border-top: 0 !important;
}

/* Remove the large gaps above category titles (only one category is visible at a time) */
.gallery-category {
  margin-top: 0 !important;
  padding-top: 3rem !important;
  padding-bottom: 1rem !important;
}

.gallery-intro .gallery-category:first-child {
  padding-top: 2.5rem !important;
}

/* Move category content up, closer to the tabs */
.gallery-category {
  padding-top: .5rem !important;
}

.gallery-intro .gallery-category:first-child {
  padding-top: 1rem !important;
}

/* Every category starts at the same height, Genel included */
.gallery-intro .container:not(.gallery-tabs .container) {
  padding-top: 1rem !important;
}

.gallery-intro .gallery-category:first-child {
  padding-top: .5rem !important;
}

/* ===== Hero: same treatment as the rooms page ===== */
.gallery-page .site-hero.inner-page.overlay:before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  background:
    linear-gradient(180deg,
      rgba(10, 21, 38, .6) 0%,
      rgba(10, 21, 38, .12) 30%,
      rgba(10, 21, 38, .18) 55%,
      rgba(10, 21, 38, .85) 100%);
}

.gallery-page .page-hero-title {
  font-size: clamp(4rem, 8vw, 7rem);
  letter-spacing: -.045em;
  line-height: 1;
}

@media (min-width: 768px) {
  .gallery-page .site-hero.inner-page {
    height: 72vh;
    /* !important: the parallax script writes an inline background-position */
    background-position: center 60% !important;
  }
}

@media (max-width: 767.98px) {
  .gallery-page .site-hero.inner-page {
    height: 64vh !important;
    height: 64svh !important;
    min-height: 440px;
    background-position: 45% 60% !important;
  }

  .gallery-page .site-hero .container {
    padding-bottom: 3.25rem;
  }

  .gallery-page .page-hero-title {
    margin-bottom: .75rem;
    font-size: 3.7rem;
    letter-spacing: -.04em;
  }

  .gallery-page .page-hero-breadcrumbs {
    font-size: .68rem;
    letter-spacing: .2em;
  }
}
