/* ==========================================================================
   Single Project Page Styles (Dự án thực tế)
   Scope: Exclusively applied to post_type = 'du-an' (.single-project-wrapper)
   ========================================================================== */

.project-section {
  padding: 30px 0px;
}

.single-project-wrapper {
  min-height: 100vh;
  padding: 30px 0 80px;
  color: #1e293b;
  font-family: inherit;
}

.single-project-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Topbar & Breadcrumb
   -------------------------------------------------------------------------- */
.project-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: #64748b;
}

.project-bc-root,
.project-bc-cat {
  color: #64748b;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.project-bc-root:hover,
.project-bc-cat:hover {
  color: #0e5f8a;
}

.project-bc-sep {
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   2. Project Header
   -------------------------------------------------------------------------- */
.project-header {
  margin-bottom: 24px;
}

.project-category-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 14px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  border-left: 3px solid #0284c7;
}

.project-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  color: #0a2239;
  margin: 0;
  letter-spacing: -0.3px;
}

/* --------------------------------------------------------------------------
   3. Hero Featured Banner
   -------------------------------------------------------------------------- */
.project-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 580px;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(10, 34, 57, 0.1);
  margin-bottom: 40px;
  background: #0a2239;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   Common Section Styles
   -------------------------------------------------------------------------- */
.project-section-heading {
  margin-bottom: 26px;
}

.project-heading-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #0e5f8a;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.project-section-title {
  margin-bottom: 15px !important;
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 6px;
  line-height: 1.3;
  position: relative;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   4. Editorial Grid (2-Column Narrative & Sticky Specs)
   -------------------------------------------------------------------------- */
.project-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 32px;
  align-items: start;
}

.project-editorial-grid.no-sidebar {
  grid-template-columns: 1fr;
}

/* Left Column */
.project-main-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

/* .project-story-card,
.project-highlights-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 20px rgba(10, 34, 57, 0.04);
  padding: 32px 34px;
} */

.project-block-header {
  margin-bottom: 20px;
}

.project-block-title {
  font-size: 22px;
  font-weight: 800;
  color: #0a2239;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* 5. Content Overview (the_content) */
.project-entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.project-entry-content p:first-of-type {
  font-size: 16.5px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.75;
}

.project-entry-content p {
  margin-bottom: 16px;
  color: inherit;
}

.project-entry-content p:last-child {
  margin-bottom: 0;
}

.project-entry-content img {
  border-radius: 8px;
  margin: 16px 0;
  max-width: 100%;
  height: auto;
}

/* 6. Architectural Highlights Flow (Điểm nhấn nổi bật) */
.project-highlights-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-highlight-item {
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.24s ease;
  position: relative;
}

.hl-badge-wrap {
  flex-shrink: 0;
}

.hl-badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.hl-text-wrap {
  flex: 1;
  min-width: 0;
}

.hl-item-title {
  font-size: 18px;
  font-weight: 600;
  color: #0a2239;
  margin: 0 0 3px;
  line-height: 1.35;
}

.hl-item-desc {
  font-size: 14.5px;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* When only description exists (no title) - make statement bold & elegant */
.project-highlight-item.has-no-title .hl-item-desc {
  font-size: 18px;
  font-weight: 600;
  color: #0f2744;
  line-height: 1.55;
}

/* Right Column: Specs Sidebar (Sticky Card) */
.project-sidebar-col {
  min-width: 0;
}

.project-specs-card {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
}

.specs-card-header {
  padding-bottom: 15px;
}

.specs-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #0e5f8a;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.specs-header-badge svg {
  color: #0e5f8a;
}

.specs-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #0a2239;
  margin: 0;
  line-height: 1.25;
}

.specs-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.specs-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #edf2f7;
  transition: all 0.2s ease;
}

.specs-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.specs-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.specs-item-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.specs-item-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.specs-item-value {
  font-size: 17.5px;
  font-weight: 800;
  color: #0a2239;
  line-height: 1.25;
}

.specs-cta-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #0a2239;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.22s ease;
  box-sizing: border-box;
}

.specs-cta-action:hover {
  background: #0e5f8a;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(14, 95, 138, 0.28);
  transform: translateY(-2px);
}

@media (max-width: 991px) {
  .project-editorial-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .project-specs-card {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   7. Before / After Comparison Slider
   -------------------------------------------------------------------------- */
.project-ba-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-ba-area-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.ba-area-title {
  font-size: 22px;
  font-weight: 600;
  color: #0a2239;
  margin: 0;
}

/* Split Slider Container */
.project-ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  min-height: 230px;
  overflow: hidden;
  border-radius: 10px;
  user-select: none;
  cursor: ew-resize;
  background: #0f172a;
}

.ba-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ba-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-layer-before {
  width: 50%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #ffffff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.ba-layer-before img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Tags on Image */
.ba-tag {
  position: absolute;
  bottom: 16px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(10, 34, 57, 0.85);
  backdrop-filter: blur(6px);
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.2px;
}

.ba-tag-before {
  left: 16px;
}

.ba-tag-after {
  right: 16px;
}

/* Handle Slider Button */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  margin-left: -22px;
  z-index: 4;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
}

.ba-handle-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #ffffff;
  color: #0e5f8a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 2;
}

.project-ba-slider:hover .ba-handle-btn {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   8. Photo Gallery (Bộ ảnh công trình)
   -------------------------------------------------------------------------- */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project-gallery-item {
  display: block;
  text-decoration: none !important;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0f172a;
}

.project-gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 34, 57, 0.75) 0%, transparent 60%);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.28s ease;
}

.gallery-zoom-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0e5f8a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: scale(0.8);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(10, 34, 57, 0.12);
}

.project-gallery-item:hover .project-gallery-img-wrap img {
  transform: scale(1.06);
}

.project-gallery-item:hover .project-gallery-overlay {
  opacity: 1;
}

.project-gallery-item:hover .gallery-zoom-badge {
  transform: scale(1);
}

/* --------------------------------------------------------------------------
   10. Related Projects Slider (Dự án cùng chuyên mục)
   -------------------------------------------------------------------------- */
.project-related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.project-related-header .project-section-heading {
  margin-bottom: 0;
}

.project-slider-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-slider-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0a2239;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 0;
}

.project-slider-btn:hover:not(:disabled) {
  background: #0e5f8a;
  color: #ffffff;
  border-color: #0e5f8a;
  box-shadow: 0 4px 12px rgba(14, 95, 138, 0.25);
  transform: translateY(-1px);
}

.project-slider-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.project-related-slider-wrap {
  position: relative;
  width: 100%;
}

.project-related-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  /* Ẩn hoàn toàn thanh cuộn trên mọi trình duyệt */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE, Edge */
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
}

.project-related-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.project-related-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Card Sizing - Compact, balanced proportions */
.project-related-card {
  flex: 0 0 320px;
  width: 320px;
  max-width: 320px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(10, 34, 57, 0.04);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.26s ease;
  display: flex;
  flex-direction: column;
  -webkit-user-drag: none;
  user-select: none;
}

.project-related-card *,
.project-related-card img {
  -webkit-user-drag: none;
  user-select: none;
}

.project-related-card:hover {
  border-color: #cbd5e1;
}

.project-related-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}

.project-related-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a2239;
}

.project-related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-related-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a2239 0%, #13628e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.project-related-card:hover .project-related-media img {
  transform: scale(1.06);
}

.project-related-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(10, 34, 57, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.project-related-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-related-area {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #0e5f8a;
  margin-bottom: 6px;
}

.project-related-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: #0a2239;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.project-related-card:hover .project-related-title {
  color: #0e5f8a;
}

.project-related-btn {
  font-size: 13px;
  font-weight: 700;
  color: #0e5f8a;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

@media (max-width: 640px) {
  .project-related-card {
    flex: 0 0 280px;
    width: 280px;
  }
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .single-project-wrapper {
    padding: 30px 0 30px;
  }

  .single-project-container {
    padding: 0 16px;
  }

  .project-title {
    font-size: 26px;
  }

  .project-section {
    padding: 20px 0px;
  }

  .project-section-title {
    font-size: 24px;
  }

  .project-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .project-spec-card {
    padding: 14px 14px;
    gap: 12px;
  }

  .project-spec-value {
    font-size: 16px;
  }

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

  .project-cta-title {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .project-specs-grid {
    grid-template-columns: 1fr;
  }

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

  .ba-tag {
    font-size: 11px;
    padding: 4px 10px;
  }
}