/* Works page styling (metallic theme) */
.works-page {
  min-height: 100vh;
  background: #111827;
  color: #ffffff !important;
  position: relative;
}

.works-bg {
  position: fixed;
  inset: 0;
  background: url('/images/indexbg.png') center / cover no-repeat;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  z-index: 0;
}

.works-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 15, 25, 0.48), rgba(10, 15, 25, 0.58));
}

.works-page > :not(.works-bg) {
  position: relative;
  z-index: 1;
}

.works-wrap {
  width: min(90vw, 1040px);
  margin: 0 auto 56px;
  padding-bottom: 44px;
}

.works-intro {
  padding: 128px 16px 28px;
  text-align: center;
}

.works-title {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: 0.4px;
  margin-bottom: 12px;
  color: #ffffff !important;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.55);
}

.works-lead {
  font-size: 15px;
  line-height: 1.65;
  color: #ffffff !important;
  max-width: 900px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.works-cta {
  margin-top: 18px;
}

.works-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(145deg, #b11212, #8e0d0d);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.works-cta-btn:hover {
  background: linear-gradient(145deg, #c23c3c, #991515);
}

.works-cards {
  display: grid;
  gap: 16px;
}

.works-card {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    rgba(238, 238, 238, 0.95),
    rgba(195, 195, 195, 0.94)
  );
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  color: #ffffff !important;
  align-items: stretch;
  backdrop-filter: blur(6px);
}

.works-card-featured {
  grid-template-columns: minmax(260px, 360px) 1fr;
}

.works-image {
  background: linear-gradient(135deg, #111827, #222936);
  border-radius: 8px;
  height: 230px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.works-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111827;
}

.works-gallery {
  display: grid;
  gap: 12px;
}

.works-gallery-controls {
  width: fit-content;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 20px rgba(17, 24, 39, 0.12);
}

.works-gallery-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(145deg, #263244, #111827);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 7px 15px rgba(17, 24, 39, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.works-gallery-btn span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.works-gallery-btn:hover {
  border-color: #ff2c2c;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(145deg, #2c384b, #141d2d);
  transform: translateY(-1px);
  box-shadow:
    0 10px 18px rgba(17, 24, 39, 0.28),
    0 0 0 3px rgba(177, 18, 18, 0.12);
}

.works-gallery-btn:focus-visible,
.works-gallery-dots button:focus-visible {
  outline: 2px solid rgba(177, 18, 18, 0.65);
  outline-offset: 3px;
}

.works-gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 60px;
}

.works-gallery-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.34);
  cursor: pointer;
  transition:
    width 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.works-gallery-dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: #b11212;
  box-shadow: 0 0 0 3px rgba(177, 18, 18, 0.12);
}

.works-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.works-sector {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(177, 18, 18, 0.12);
  color: #8e0d0d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.works-text h2 {
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.1;
  margin-bottom: 8px;
  color: #111827 !important;
}

.works-text p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #1f2937 !important;
  margin-bottom: 8px;
}

.works-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.works-tags span {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .works-card {
    grid-template-columns: 1fr;
  }

  .works-image {
    height: 240px;
  }
}

.works-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.works-modal.is-open {
  display: flex;
}

.works-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.75);
  backdrop-filter: blur(4px);
}

.works-modal-content {
  position: relative;
  width: min(88vw, 980px);
  max-height: 82vh;
  background: linear-gradient(145deg, #f0f0f0, #c6c6c6);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.works-modal-image {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
}

.works-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #b11212, #8e0d0d);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
  .works-page {
    background: #111827;
  }

  .works-bg {
    background-size: cover;
    background-position: center;
  }

  .works-intro {
    padding: 120px 14px 28px;
  }

  .works-card {
    padding: 12px;
    border-radius: 10px;
  }

  .works-image {
    height: 220px;
  }
}
