/* =========================================================
   Premium Gallery Page — تکساز صنعت عزیزی
   Style: Modern, Minimal, Industrial
   Palette: Navy #0b3c5d | Blue #005b96 | Yellow #ffca3a/#f4b400 | White
   ========================================================= */

:root {
  --gl-navy: #0b3c5d;
  --gl-navy-dark: #062437;
  --gl-blue: #005b96;
  --gl-blue-light: #1f7bb8;
  --gl-yellow: #ffca3a;
  --gl-yellow-dark: #f4b400;
  --gl-white: #ffffff;
  --gl-mist: #f0f4f8;
  --gl-slate: #475569;
  --gl-line: rgba(11, 60, 93, 0.1);
}

html,
body {
  scroll-behavior: smooth;
  font-family: "Vazirmatn", sans-serif, "Inter", sans-serif;
}

.gallery-page {
  direction: rtl;
  overflow: hidden;
  background: var(--gl-white);
  font-family: inherit;
}

/* =========================================================
   HERO
   ========================================================= */
.gl-hero {
  position: relative;
  padding: 130px 32px 90px;
  background: linear-gradient(135deg, var(--gl-navy) 0%, var(--gl-blue) 100%);
  overflow: hidden;
  text-align: center;
}

.gl-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    circle at 50% 40%,
    #000 0%,
    transparent 78%
  );
  pointer-events: none;
}

.gl-hero-container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.gl-tag {
  display: inline-block;
  color: var(--gl-yellow);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 8px 22px;
  background: rgba(255, 202, 58, 0.12);
  border: 1px solid rgba(255, 202, 58, 0.45);
  border-radius: 999px;
  margin-bottom: 24px;
}

.gl-hero-container h1 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gl-white);
  margin: 0 0 22px 0;
  line-height: 1.25;
}

.gl-hero-container p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 2;
  max-width: 640px;
  margin: 0 auto;
}

/* =========================================================
   VIDEO PLACEHOLDERS
   ========================================================= */
.gl-video-section {
  padding: 90px 32px 30px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.gl-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.gl-video-card {
  background: var(--gl-white);
  border: 1px solid rgba(11, 60, 93, 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(11, 60, 93, 0.08);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.gl-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(11, 60, 93, 0.12);
}

.gl-video-play {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
  background: #000;
  border-radius: 0;
}

.gl-video-play video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.gl-video-play.is-playing video {
  opacity: 1;
  visibility: visible;
}

.gl-video-thumb {
  position: relative;
  height: 250px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background:
    linear-gradient(135deg, rgba(11, 60, 93, 0.92), rgba(0, 91, 150, 0.75)),
    url("../styles/assets/project1.webp") center/cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.gl-video-thumb.alt {
  background:
    linear-gradient(135deg, rgba(11, 60, 93, 0.88), rgba(32, 123, 184, 0.75)),
    url("../styles/assets/project2.webp") center/cover no-repeat;
}

.gl-video-thumb.dark {
  background:
    linear-gradient(135deg, rgba(6, 36, 55, 0.9), rgba(11, 60, 93, 0.72)),
    url("../styles/assets/project3.webp") center/cover no-repeat;
}

.gl-video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 60, 93, 0.2);
}

.gl-video-play {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: block;
  background: transparent;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
}

.gl-video-trigger {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 82px;
  height: 82px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  color: var(--gl-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.gl-video-trigger:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.gl-video-play.is-playing .gl-video-trigger {
  opacity: 0;
  pointer-events: none;
}

.gl-video-trigger i {
  font-size: 1.5rem;
  color: var(--gl-white);
  margin-right: 4px;
}

.gl-video-info {
  padding: 24px 22px 26px;
  text-align: center;
}

.gl-video-info h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gl-navy);
}

.gl-video-info p {
  margin: 0;
  color: var(--gl-slate);
  font-size: 1rem;
  line-height: 1.8;
}

/* =========================================================
   CATEGORY NAVIGATION
   ========================================================= */
.gl-cat-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 36px 32px;
  background: var(--gl-white);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 8px 30px rgba(11, 60, 93, 0.08);
}

.gl-cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--gl-line);
  border-radius: 999px;
  background: var(--gl-mist);
  color: var(--gl-navy);
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 220ms ease,
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.gl-cat-nav a:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--gl-yellow) 0%, #ff7b00 100%);
  color: var(--gl-navy);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(244, 180, 0, 0.4);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.gl-section {
  padding: 90px 32px;
  background: linear-gradient(160deg, var(--gl-white) 0%, var(--gl-mist) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.gl-section::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 180, 0, 0.1), transparent 65%);
  top: -150px;
  right: -120px;
  pointer-events: none;
}

.gl-section-alt {
  background: linear-gradient(
    165deg,
    var(--gl-navy-dark) 0%,
    var(--gl-navy) 60%,
    var(--gl-blue) 100%
  );
}

.gl-section-alt::before {
  background: radial-gradient(
    circle,
    rgba(255, 202, 58, 0.12),
    transparent 65%
  );
}

.gl-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.gl-header {
  max-width: 680px;
  margin: 0 auto 52px;
}

.gl-eyebrow {
  display: inline-block;
  color: var(--gl-yellow-dark);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 14px 0;
  padding: 7px 18px;
  background: rgba(244, 180, 0, 0.12);
  border: 1px solid rgba(244, 180, 0, 0.35);
  border-radius: 999px;
}

.gl-eyebrow-light {
  color: var(--gl-yellow);
  background: rgba(255, 202, 58, 0.12);
  border-color: rgba(255, 202, 58, 0.4);
}

.gl-header h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gl-navy);
  margin: 0 0 18px 0;
  line-height: 1.4;
}

.gl-section-alt .gl-header h2 {
  color: var(--gl-white);
}

.gl-header p {
  font-size: 1.05rem;
  color: var(--gl-slate);
  line-height: 1.9;
  margin: 0;
}

.gl-section-alt .gl-header p {
  color: rgba(255, 255, 255, 0.8);
}

/* =========================================================
   GALLERY GRID
   ========================================================= */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 980px) {
  .gl-video-grid {
    grid-template-columns: 1fr;
  }
}

.gl-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gl-white);
  box-shadow: 0 14px 32px rgba(11, 60, 93, 0.1);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition:
    transform 300ms ease,
    box-shadow 300ms ease;
}

.gl-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.gl-item::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--gl-white);
  background: linear-gradient(
    160deg,
    rgba(11, 60, 93, 0.5),
    rgba(0, 91, 150, 0.45)
  );
  opacity: 0;
  transition: opacity 300ms ease;
}

.gl-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 50px rgba(11, 60, 93, 0.18);
}

.gl-item:hover img {
  transform: scale(1.12);
}

.gl-item:hover::after {
  opacity: 1;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.gl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 36, 55, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 280ms ease,
    visibility 280ms ease;
}

.gl-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.gl-lightbox-img {
  max-width: 88vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.gl-lightbox.open .gl-lightbox-img {
  transform: scale(1);
}

.gl-lightbox-close,
.gl-lightbox-prev,
.gl-lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--gl-white);
  cursor: pointer;
  transition:
    background 220ms ease,
    transform 220ms ease,
    color 220ms ease;
}

.gl-lightbox-close {
  top: 24px;
  left: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.gl-lightbox-prev,
.gl-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.gl-lightbox-prev {
  right: 24px;
}

.gl-lightbox-next {
  left: 24px;
}

.gl-lightbox-close:hover,
.gl-lightbox-prev:hover,
.gl-lightbox-next:hover {
  background: linear-gradient(135deg, var(--gl-yellow) 0%, #ff7b00 100%);
  color: var(--gl-navy);
  border-color: transparent;
}

.gl-lightbox-prev:hover {
  transform: translateY(-50%) scale(1.06);
}

.gl-lightbox-next:hover {
  transform: translateY(-50%) scale(1.06);
}

.gl-lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 992px) {
  .gl-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .gl-hero {
    padding: 110px 20px 60px;
  }

  .gl-hero-container h1 {
    font-size: 2.2rem;
  }

  .gl-section {
    padding: 60px 20px;
  }

  .gl-cat-nav {
    padding: 24px 16px;
    gap: 10px;
  }

  .gl-cat-nav a {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .gl-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .gl-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .gl-hero-container h1 {
    font-size: 1.8rem;
  }

  .gl-hero-container p {
    font-size: 1rem;
  }

  .gl-section {
    padding: 48px 14px;
  }

  .gl-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gl-item {
    aspect-ratio: 16 / 10;
  }

  .gl-header {
    margin-bottom: 36px;
  }

  .gl-header h2 {
    font-size: 1.6rem;
  }

  .gl-lightbox-prev,
  .gl-lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .gl-lightbox-prev {
    right: 12px;
  }

  .gl-lightbox-next {
    left: 12px;
  }

  .gl-lightbox-close {
    top: 14px;
    left: 14px;
    width: 44px;
    height: 44px;
  }

  .gl-lightbox-caption {
    bottom: 20px;
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

@media (max-width: 400px) {
  .gl-hero {
    padding: 90px 14px 48px;
  }

  .gl-hero-container h1 {
    font-size: 1.6rem;
  }

  .gl-cat-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .gl-cat-nav a {
    justify-content: center;
  }

  .gl-section {
    padding: 40px 12px;
  }

  .gl-header h2 {
    font-size: 1.4rem;
  }
}
