/* ==================================================
   PROJECT PAGE
================================================== */

.navbar{
  background: rgba(3, 27, 84, 0.82);
}

.project-page {
  padding-top: 120px;
  background:
    radial-gradient(circle at top left, rgba(7, 67, 211, 0.06), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 38%, #f7f9fc 100%);
}

/* ==================================================
   HERO
================================================== */

.project-hero {
  padding: 32px 0 20px;
}

.project-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.project-breadcrumbs a {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.project-breadcrumbs a:hover {
  color: var(--red-500);
}

.project-hero-copy {
  max-width: 860px;
}

.project-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--blue-900);
  text-transform: uppercase;
}

.project-hero-copy p:not(.section-tag) {
  margin: 18px 0 0;
  max-width: 780px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ==================================================
   MAIN LAYOUT
================================================== */

.project-content {
  padding: 10px 0 70px;
}

.project-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.project-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 120px;
}

.project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(7, 67, 211, 0.12);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.project-card h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--blue-900);
}

.project-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.project-work-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.project-work-list li {
  color: var(--blue-900);
  line-height: 1.7;
}

.project-card-cta {
  background:
    linear-gradient(180deg, rgba(7, 67, 211, 0.04), rgba(204, 21, 22, 0.04)),
    #ffffff;
}

.project-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-project-primary,
.btn-project-secondary,
.btn-back-projects {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn-project-primary {
  background: linear-gradient(135deg, var(--red-500), #ef4444);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(204, 21, 22, 0.22);
}

.btn-project-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(204, 21, 22, 0.28);
}

.btn-project-secondary,
.btn-back-projects {
  background: #ffffff;
  color: var(--blue-900);
  border: 1px solid rgba(7, 67, 211, 0.14);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.btn-project-secondary:hover,
.btn-back-projects:hover {
  transform: translateY(-2px);
  border-color: rgba(204, 21, 22, 0.28);
  color: var(--red-500);
}

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

.project-gallery-section {
  min-width: 0;
}

.project-gallery-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.project-gallery-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  color: var(--blue-900);
}

.project-gallery-text {
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 185px;
  gap: 18px;
  align-items: stretch;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 620px;
  min-height: 620px;
  max-height: 620px;
  border: 1px solid rgba(7, 67, 211, 0.12);
  border-radius: 30px;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  isolation: isolate;
}

.gallery-main::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

.gallery-main::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    rgba(3, 27, 84, 0) 0%,
    rgba(3, 27, 84, 0.12) 100%
  );
  pointer-events: none;
  z-index: 1;
}

#mainGalleryMedia {
  width: 100%;
  height: 100%;
}

#mainGalleryMedia img,
#mainGalleryMedia video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 14px;
  height: 620px;
}

.gallery-thumb {
  position: relative;
  border: 2px solid transparent;
  border-radius: 22px;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  transform: translateY(-2px);
  border-color: var(--red-500);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-thumb-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 27, 84, 0.12),
    rgba(3, 27, 84, 0.22)
  );
  pointer-events: none;
}

.gallery-thumb-video::before {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-900);
  font-size: 1.2rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.gallery-thumb-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(3, 27, 84, 0.56);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(2px);
}

/* ==================================================
   BOTTOM BAR
================================================== */

.project-bottom-bar {
  padding: 0 0 80px;
}

.project-bottom-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(7, 67, 211, 0.04), rgba(204, 21, 22, 0.04)),
    #ffffff;
  border: 1px solid rgba(7, 67, 211, 0.12);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.project-bottom-label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-500);
  font-weight: 800;
}

.project-bottom-shell h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.05;
}

/* ==================================================
   VIEWER
================================================== */

.gallery-viewer {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gallery-viewer.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-viewer-content {
  width: min(96vw, 1240px);
  height: min(88vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-viewer-content img,
.gallery-viewer-content video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
}

.gallery-viewer-close,
.gallery-viewer-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 1.7rem;
}

.gallery-viewer-close:hover,
.gallery-viewer-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.04);
}

.gallery-viewer-close {
  top: 22px;
  right: 22px;
}

.gallery-viewer-prev {
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-viewer-next {
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-viewer-prev:hover,
.gallery-viewer-next:hover {
  transform: translateY(-50%) scale(1.04);
}

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

@media (max-width: 1200px) {
  .project-shell {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
  }

  .gallery-layout {
    grid-template-columns: minmax(0, 1fr) 165px;
  }
}

@media (max-width: 1024px) {
  .project-page {
    padding-top: 110px;
  }

  .project-shell {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    position: static;
    order: 2;
  }

  .project-gallery-section {
    order: 1;
  }

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

  .gallery-main {
    height: 500px;
    min-height: 500px;
    max-height: 500px;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: none;
    height: auto;
  }

  .gallery-thumb {
    min-height: 120px;
  }

  .project-bottom-shell {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .project-hero {
    padding: 20px 0 10px;
  }

  .project-hero-copy h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .project-card {
    border-radius: 22px;
    padding: 20px;
  }

  .gallery-main {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
    border-radius: 22px;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-thumb {
    min-height: 96px;
    border-radius: 16px;
  }

  .gallery-thumb-video::before {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .project-bottom-shell {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .gallery-viewer {
    padding: 12px;
  }

  .gallery-viewer-content {
    width: 100%;
    height: min(82vh, 560px);
  }

  .gallery-viewer-close,
  .gallery-viewer-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .gallery-viewer-prev {
    left: 10px;
  }

  .gallery-viewer-next {
    right: 10px;
  }

  .gallery-viewer-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .project-page {
    padding-top: 98px;
  }

  .project-breadcrumbs {
    gap: 7px;
    font-size: 0.85rem;
  }

  .project-hero-copy p:not(.section-tag) {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .project-card {
    padding: 18px;
    border-radius: 18px;
  }

  .gallery-main {
    height: 270px;
    min-height: 270px;
    max-height: 270px;
    border-radius: 18px;
  }

  .gallery-thumb {
    min-height: 84px;
    border-radius: 14px;
  }

  .btn-project-primary,
  .btn-project-secondary,
  .btn-back-projects {
    width: 100%;
  }

  .project-cta-group {
    flex-direction: column;
  }
}