/* ==========================================================================
   Factory Page Styles - 4-Column Grid Layout & Image Lightbox Modal
   ========================================================================== */

:root {
  --forest-dark: #0e3d2f;
  --forest-dark-hover: #144e3d;
  --wood: #b78a48;
  --wood-hover: #9d7338;
  --wood-light: #e5cbab;
}

/* ==========================================================================
   Section 1: Hero Banner (Matching Applications & Global Standard)
   ========================================================================== */
.factory-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 136px 0 92px;
  background: linear-gradient(90deg, rgba(8, 21, 16, 0.90) 0%, rgba(8, 21, 16, 0.62) 55%, rgba(8, 21, 16, 0.32) 100%),
              url("../images/about_banner.jpg") center center / cover no-repeat;
  overflow: hidden;
}

.factory-hero__bg-fx {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(183, 138, 72, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.factory-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.factory-hero__content {
  max-width: 640px;
  color: #ffffff;
}

.factory-hero__kicker {
  margin: 0 0 10px;
  color: #e5cbab;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  line-height: 1.4;
}

.factory-hero__title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.factory-hero__subtitle {
  max-width: 580px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(15.5px, 1.35vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.factory-hero__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.factory-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.22s ease;
}

.factory-hero__breadcrumb a:hover {
  color: #e5cbab;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.factory-hero__breadcrumb span:last-child {
  color: #e5cbab;
  font-weight: 700;
}

/* Vertical Architectural Typography */
.factory-hero__vertical-tag {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
  color: rgba(229, 203, 171, 0.8);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  line-height: 1.2;
  user-select: none;
}

.factory-hero__vertical-tag span {
  display: block;
}

/* ==========================================================================
   Section 2: Factory Main Section (4-Column Grid Layout)
   ========================================================================== */
.factory-main-section {
  padding: 72px 0 100px;
  background: #ffffff;
}

/* Factory 4-Column Grid */
.factory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

/* Pure Clean Factory Card with Clickable Cursor */
.factory-card {
  position: static;
  background: #ffffff;
  border: 1px solid #ebe5dc;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.factory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(14, 61, 47, 0.09);
  border-color: rgba(183, 138, 72, 0.5);
}

.factory-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  position: relative;
  background: #f4f1eb;
}

.factory-card__img-wrap img {
  position: static !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none !important;
  opacity: 1 !important;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Zoom Icon Badge on Hover */
.factory-card__zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(14, 61, 47, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5cbab;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  pointer-events: none;
  z-index: 3;
}

.factory-card:hover .factory-card__zoom-hint {
  opacity: 1;
  transform: scale(1);
}

.factory-card:hover .factory-card__img-wrap img {
  transform: scale(1.06);
}

.factory-card__body {
  padding: 16px 18px 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1;
  transition: background-color 0.3s ease;
}

.factory-card:hover .factory-card__body {
  background: #faf8f5;
}

.factory-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a2b23;
  line-height: 1.4;
  letter-spacing: -0.2px;
  transition: color 0.25s ease;
}

.factory-card:hover .factory-card__title {
  color: #b78a48;
}

/* ==========================================================================
   Section 3: Factory Pagination
   ========================================================================== */
.factory-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.factory-pagination .pagination-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e2dbce;
  border-radius: 4px;
  background: #ffffff;
  color: #3b4d44;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.factory-pagination .pagination-btn:hover:not(:disabled) {
  border-color: #b78a48;
  color: #b78a48;
  background: #faf8f5;
  transform: translateY(-2px);
}

.factory-pagination .pagination-btn.is-active {
  background: #0e3d2f;
  border-color: #0e3d2f;
  color: #ffffff;
  pointer-events: none;
}

.factory-pagination .pagination-ellipsis {
  color: #99a8a0;
  font-size: 15px;
  padding: 0 4px;
  user-select: none;
}

/* ==========================================================================
   Section 4: Image Zoom Lightbox Modal & Mask Overlay
   ========================================================================== */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s ease, opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-modal.is-active {
  visibility: visible;
  opacity: 1;
}

/* Backdrop Mask Layer */
.image-lightbox-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 16, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}

/* Lightbox Content Container */
.image-lightbox-modal__container {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-modal.is-active .image-lightbox-modal__container {
  transform: scale(1);
}

/* Close Button */
.image-lightbox-modal__close {
  position: absolute;
  top: -48px;
  right: -8px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  z-index: 10;
}

.image-lightbox-modal__close:hover {
  background: #b78a48;
  border-color: #b78a48;
  color: #ffffff;
  transform: rotate(90deg) scale(1.08);
}

/* Image Frame */
.image-lightbox-modal__img-wrap {
  position: relative;
  max-width: 88vw;
  max-height: 75vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-modal__img {
  max-width: 88vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: opacity 0.25s ease;
}

/* Navigation Arrows */
.image-lightbox-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(14, 61, 47, 0.82);
  border: 1px solid rgba(229, 203, 171, 0.35);
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 5;
}

.image-lightbox-modal__nav--prev {
  left: -70px;
}

.image-lightbox-modal__nav--next {
  right: -70px;
}

.image-lightbox-modal__nav:hover {
  background: #b78a48;
  border-color: #b78a48;
  color: #ffffff;
  transform: translateY(-50%) scale(1.12);
}

/* Caption and Counter Bar */
.image-lightbox-modal__caption-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(14, 61, 47, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  gap: 16px;
}

.image-lightbox-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.image-lightbox-modal__counter {
  font-size: 13px;
  font-weight: 700;
  color: #e5cbab;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .factory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 991px) {
  .factory-hero {
    min-height: 420px;
    padding: 120px 0 70px;
  }

  .factory-hero__vertical-tag {
    display: none;
  }

  .factory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .image-lightbox-modal__nav--prev {
    left: 12px;
  }

  .image-lightbox-modal__nav--next {
    right: 12px;
  }

  .image-lightbox-modal__close {
    top: -44px;
    right: 0;
  }
}

@media (max-width: 576px) {
  .factory-main-section {
    padding: 48px 0 70px;
  }

  .factory-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .factory-card__title {
    font-size: 15px;
  }

  .image-lightbox-modal {
    padding: 12px;
  }

  .image-lightbox-modal__img-wrap {
    max-width: 96vw;
    max-height: 65vh;
  }

  .image-lightbox-modal__img {
    max-width: 96vw;
    max-height: 65vh;
  }

  .image-lightbox-modal__nav {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

  .image-lightbox-modal__nav--prev {
    left: 6px;
  }

  .image-lightbox-modal__nav--next {
    right: 6px;
  }

  .image-lightbox-modal__caption-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
