/* ════════════════════════════════════════════════════════════
   F-House Single Portfolio Detail
   Template: single-portfolio.php
   Tokens chung lấy từ fhouse-header.css đã enqueue trước.
   ════════════════════════════════════════════════════════════ */

.fh-sp { background: #fafafa; color: #2c3338; }

/* ── FULL-BLEED for portfolio templates ──
   PHP filter adds `.fh-fullbleed` body class — strip every Astra wrapper. */
body.fh-fullbleed #content,
body.fh-fullbleed .site-content,
body.fh-fullbleed #content > .ast-container,
body.fh-fullbleed .site-content > .ast-container,
body.fh-fullbleed #primary,
body.fh-fullbleed .ast-article-single,
body.fh-fullbleed .ast-article-inner,
body.fh-fullbleed .entry-content,
body.fh-fullbleed .ast-grid-common-col {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  flex: 1 1 100% !important;
}

body.fh-fullbleed #content > .ast-container {
  display: block !important;
  grid-template-columns: 1fr !important;
}

/* Hide sidebar slot if Astra renders one anyway */
body.fh-fullbleed #secondary,
body.fh-fullbleed .widget-area {
  display: none !important;
}

/* Hide default WP comments / nav etc. that bleed into our template */
body.single-portfolio .post-navigation,
body.single-portfolio .ast-author-details,
body.single-portfolio .ast-comment-formwrap,
body.single-portfolio .comments-area,
body.single-portfolio .ast-pagination,
body.single-portfolio .ast-single-post-meta,
body.single-portfolio .entry-header {
  display: none !important;
}

/* ── HERO ─────────────────────────────────────────────────── */
.fh-sp__hero {
  position: relative;
  min-height: 56vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  color: #fff;
  overflow: hidden;
}
.fh-sp__hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(212, 160, 23, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(15, 52, 96, 0.92) 0%, rgba(26, 26, 46, 0.94) 100%);
}
.fh-sp__hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  width: 100%;
}

.fh-sp__crumbs {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}
.fh-sp__crumbs a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}
.fh-sp__crumbs a:hover { color: #e8c66a; }
.fh-sp__crumb-sep { margin: 0 8px; opacity: 0.5; }

.fh-sp__cat-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4a017, #e8c66a);
  color: #1a1a2e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 24px;
  text-decoration: none;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
  transition: transform 0.2s ease;
}
.fh-sp__cat-badge:hover { transform: translateY(-2px); color: #1a1a2e; }

.fh-sp__title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 22px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.fh-sp__meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.fh-sp__meta-item { letter-spacing: 0.02em; }

/* ── INTRO BLOCK ──────────────────────────────────────────── */
.fh-sp__intro {
  background: #fff;
  padding: 70px 24px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.fh-sp__intro-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  padding: 48px 40px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 52, 96, 0.08);
  border: 1px solid rgba(15, 52, 96, 0.06);
}
.fh-sp__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c8a050;
  border-left: 3px solid #c8a050;
  padding-left: 10px;
  margin-bottom: 14px;
}
.fh-sp__label--center {
  border-left: none;
  padding: 0;
  background: rgba(200, 160, 80, 0.12);
  border-radius: 24px;
  padding: 6px 16px;
  margin-bottom: 12px;
}
.fh-sp__intro-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 18px;
  line-height: 1.3;
}
.fh-sp__intro-desc {
  font-size: 16px;
  line-height: 1.85;
  color: #4a4a5a;
  margin: 0 0 30px;
}
.fh-sp__intro-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.fh-sp__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}
.fh-sp__btn--lg { padding: 15px 30px; font-size: 15px; }
.fh-sp__btn--gold {
  background: linear-gradient(135deg, #d4a017, #e8c66a);
  color: #1a1a2e;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.35);
}
.fh-sp__btn--gold:hover {
  background: linear-gradient(135deg, #b8860b, #d4a017);
  color: #1a1a2e;
  transform: translateY(-2px);
}
.fh-sp__btn--outline {
  background: transparent;
  border-color: rgba(26, 26, 46, 0.2);
  color: #1a1a2e;
}
.fh-sp__btn--outline:hover {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}
.fh-sp__btn--outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.fh-sp__btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* ════════════════════════════════════════════════════════════
   PROJECT SPECS BLOCK
   ════════════════════════════════════════════════════════════ */
.fh-sp__specs {
  background: #fafafa;
  padding: 60px 24px 30px;
}
.fh-sp__specs-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.fh-sp__specs-header {
  text-align: center;
  margin-bottom: 36px;
}
.fh-sp__specs-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  color: #1a1a2e;
  margin: 8px 0 0;
  line-height: 1.3;
}

.fh-sp__specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.fh-sp__spec {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 52, 96, 0.06);
  border-left: 4px solid #c8a050;
  box-shadow: 0 2px 12px rgba(15, 52, 96, 0.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fh-sp__spec:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 52, 96, 0.12);
  border-left-color: #a47a0e;
}
.fh-sp__spec-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.fh-sp__spec-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fh-sp__spec-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a98;
}
.fh-sp__spec-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
  word-break: break-word;
}

/* Hạng mục — full-width list bên dưới grid */
.fh-sp__hangmuc {
  margin-top: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 22px 26px;
  border: 1px solid rgba(15, 52, 96, 0.06);
  border-top: 4px solid #c8a050;
  box-shadow: 0 2px 12px rgba(15, 52, 96, 0.05);
}
.fh-sp__hangmuc .fh-sp__spec-label {
  display: block;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #1a1a2e;
}
.fh-sp__hangmuc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.fh-sp__hangmuc-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: #2c3338;
  line-height: 1.5;
}
.fh-sp__hangmuc-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #a47a0e;
  font-weight: 800;
  font-size: 14px;
}

@media (max-width: 980px) {
  .fh-sp__specs-grid     { grid-template-columns: repeat(2, 1fr); }
  .fh-sp__hangmuc-list   { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .fh-sp__specs-grid     { grid-template-columns: 1fr; }
  .fh-sp__specs          { padding: 50px 16px 20px; }
}

/* ── GALLERY ──────────────────────────────────────────────── */
.fh-sp__gallery {
  padding: 70px 24px 80px;
}
.fh-sp__gallery-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.fh-sp__gallery-header {
  text-align: center;
  margin-bottom: 44px;
}
.fh-sp__gallery-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  color: #1a1a2e;
  margin: 8px 0 0;
  line-height: 1.3;
}
.fh-sp__gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── PHOTO ITEM ───────────────────────────────────────────── */
.fh-sp__photo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fh-sp__photo-frame {
  position: relative;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 4px 20px rgba(15, 52, 96, 0.10);
  border: 1px solid rgba(15, 52, 96, 0.06);
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(.2, .8, .2, 1),
              box-shadow 0.32s ease;
}
.fh-sp__photo-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 52, 96, 0.18);
}
.fh-sp__photo-link {
  position: relative;
  display: block;
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #1a1a2e;
}
.fh-sp__photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.32s ease;
}
.fh-sp__photo-frame:hover .fh-sp__photo-link img {
  transform: scale(1.06);
  filter: brightness(0.7);
}

/* Number label (top-left corner) */
.fh-sp__photo-num {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 26, 46, 0.78);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: #e8c66a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  border-radius: 6px;
  z-index: 2;
}

/* Zoom hint (centered, fades in on hover) */
.fh-sp__photo-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 28px;
  background: rgba(212, 160, 23, 0.95);
  color: #1a1a2e;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.32s ease, transform 0.32s ease;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.fh-sp__photo-frame:hover .fh-sp__photo-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Caption (below frame) */
.fh-sp__photo-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  font-size: 12.5px;
  color: #6a6a7a;
}
.fh-sp__photo-cap-label {
  background: #1a1a2e;
  color: #e8c66a;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  flex-shrink: 0;
}
.fh-sp__photo-cap-text {
  font-style: italic;
  opacity: 0.85;
  line-height: 1.4;
}

/* Visual divider every N photos (full row break) */
.fh-sp__divider {
  grid-column: 1 / -1;
  height: 1px;
  background: linear-gradient(90deg,
              transparent 0%,
              rgba(200, 160, 80, 0.45) 30%,
              rgba(164, 122, 14, 0.7) 50%,
              rgba(200, 160, 80, 0.45) 70%,
              transparent 100%);
  margin: 8px 0;
}

/* ── CTA ──────────────────────────────────────────────────── */
.fh-sp__cta {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  padding: 70px 24px 84px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.fh-sp__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d4a017, transparent);
}
.fh-sp__cta-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.fh-sp__cta h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.fh-sp__cta p {
  opacity: 0.84;
  margin: 0 0 28px;
  font-size: 15px;
}
.fh-sp__cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   LIGHTBOX (vanilla, fhouse-lightbox.js)
   ════════════════════════════════════════════════════════════ */
.fhsp-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 12, 24, 0.94);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fhsp-lb.is-open {
  display: flex;
  opacity: 1;
}

.fhsp-lb__stage {
  position: relative;
  max-width: min(94vw, 1400px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.fhsp-lb__img {
  max-width: 100%;
  max-height: 82vh;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #1a1a2e;
  transition: opacity 0.2s ease;
}
.fhsp-lb__img.is-loading { opacity: 0.4; }

.fhsp-lb__caption {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 0 16px;
}
.fhsp-lb__counter {
  background: #d4a017;
  color: #1a1a2e;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
}
.fhsp-lb__title {
  font-style: italic;
  opacity: 0.8;
  font-size: 13px;
  max-width: 600px;
  line-height: 1.5;
}

/* ── Controls ── */
.fhsp-lb__close,
.fhsp-lb__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}
.fhsp-lb__close:hover,
.fhsp-lb__nav:hover {
  background: #d4a017;
  border-color: #d4a017;
  color: #1a1a2e;
  transform: scale(1.06);
}

.fhsp-lb__close {
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.fhsp-lb__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 36px;
  line-height: 1;
  padding-bottom: 6px;
}
.fhsp-lb__nav--prev { left: 24px; }
.fhsp-lb__nav--next { right: 24px; }
.fhsp-lb__nav:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 600px) {
  .fhsp-lb__close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 18px; }
  .fhsp-lb__nav  { width: 44px; height: 44px; font-size: 28px; }
  .fhsp-lb__nav--prev { left: 8px; }
  .fhsp-lb__nav--next { right: 8px; }
  .fhsp-lb__img { max-height: 76vh; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 980px) {
  .fh-sp__gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .fh-sp__hero { min-height: 44vh; padding: 60px 20px; }
  .fh-sp__intro { padding: 50px 20px; }
  .fh-sp__intro-inner { padding: 36px 28px; }
}
@media (max-width: 600px) {
  .fh-sp__gallery-grid { grid-template-columns: 1fr; }
  .fh-sp__meta { gap: 16px; font-size: 12.5px; }
  .fh-sp__intro-inner { padding: 32px 20px; }
  .fh-sp__gallery { padding: 50px 16px 60px; }
}
