/* ============================================
   MEUBLES CIANO — Our Projects Page Styles
   ============================================ */

/* ============================================
   HERO
   ============================================ */
.projects-hero {
  position: relative;
  padding: 0;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: none;
}

.projects-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.projects-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.projects-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14, 12, 10, 0.45) 0%, rgba(14, 12, 10, 0.0) 18%),
    linear-gradient(to top, rgba(14, 12, 10, 0.95) 0%, rgba(14, 12, 10, 0.40) 55%, rgba(14, 12, 10, 0.10) 100%);
}

.projects-hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 120px;
}

.projects-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e8c98a;
  margin-bottom: 20px;
}

.projects-hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: #e8c98a;
  opacity: 0.7;
}

.projects-hero-content h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  color: #f5f0e8;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.projects-hero-content h1 em {
  font-style: italic;
  color: #e8c98a;
}

/* ============================================
   HERO SCROLL HINT
   ============================================ */
@keyframes scrollHintPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
  white-space: nowrap;
  animation: scrollHintPulse 2.4s ease-in-out infinite;
}

.hero-scroll-hint:hover {
  color: rgba(245, 240, 232, 0.85);
  animation: none;
  opacity: 1;
}

/* ============================================
   PROJECTS BODY
   ============================================ */
.projects-body {
  background: var(--color-bg);
  padding-top: 100px;
  padding-bottom: 80px;
}

/* ============================================
   CARD GRID
   ============================================ */
.projects-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ============================================
   PROJECT CARD
   ============================================ */
.pcard {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.pcard:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
  transform: translateY(-4px);
}

/* ---- Cover image ---- */
.pcard-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0ece6;
}

.pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.45s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}

.pcard-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 7;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pcard-progress-bar.is-visible {
  opacity: 1;
}

.pcard-progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(201, 169, 110, 0.8);
}

.pcard-img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e2d8;
}

/* ---- Hover slideshow overlay image ---- */
.pcard-img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.pcard-img-hover.visible {
  opacity: 1;
}

/* ---- Image count badge ---- */
.pcard-count-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(245, 240, 232, 0.9);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 20px;
  z-index: 4;
  pointer-events: none;
}

/* ---- Hover overlay with view button ---- */
.pcard-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 12, 10, 0.70) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 6;
}

.pcard:hover .pcard-hover-overlay {
  opacity: 1;
}

.pcard-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f5f0e8;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pcard-view-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---- Card body ---- */
.pcard-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pcard-viewport-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(107, 78, 42, 0.08);
  background: rgba(107, 78, 42, 0.02);
  flex-shrink: 0;
}

.pcard-vp-camera {
  font-family: var(--font-sans);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  opacity: 0.55;
}

.pcard-vp-sep {
  font-size: 0.5rem;
  color: var(--color-text-muted);
  opacity: 0.3;
}

.pcard-vp-layer {
  font-family: var(--font-sans);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.pcard-content {
  padding: 28px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pcard-content .section-label {
  margin-bottom: 0;
}

.pcard-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 200;
  color: var(--color-white);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.pcard-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.pcard-specs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(107, 78, 42, 0.08);
  margin-top: 4px;
}

.pcard-spec {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pcard-spec-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.pcard-spec-value {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---- Card footer button ---- */
.pcard-footer {
  padding: 0 28px 24px;
  flex-shrink: 0;
}

.pcard-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pcard-footer-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================
   PROJECT MODAL
   ============================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-modal.is-open {
  pointer-events: all;
  opacity: 1;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-modal-inner {
  position: relative;
  z-index: 1;
  width: 92vw;
  max-width: 1060px;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-modal.is-open .project-modal-inner {
  transform: translateY(0) scale(1);
}

/* ---- Close button ---- */
.project-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(245, 240, 232, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-modal-close:hover {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

/* ---- Main slideshow area ---- */
.project-modal-slideshow {
  position: relative;
  flex: 1 1 0;
  min-height: 200px;
  overflow: hidden;
  background: #0a0806;
}

.modal-slideshow-track {
  position: absolute;
  inset: 0;
}

.modal-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease;
}

.modal-slide.active {
  opacity: 1;
}

.modal-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Prev / Next buttons ---- */
.modal-slideshow-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  z-index: 4;
  border: none;
  background: none;
  color: rgba(245, 240, 232, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-slideshow-btn:hover {
  color: #fff;
}

.modal-slideshow-btn--prev { left: 0; }
.modal-slideshow-btn--next { right: 0; }

.project-modal-slideshow::before,
.project-modal-slideshow::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-modal-slideshow::before {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25), transparent);
}

.project-modal-slideshow::after {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.25), transparent);
}

.project-modal-slideshow:has(.modal-slideshow-btn--prev:hover)::before,
.project-modal-slideshow:has(.modal-slideshow-btn--next:hover)::after {
  opacity: 1;
}

/* ---- Slide counter ---- */
.modal-slide-counter {
  position: absolute;
  bottom: 14px;
  right: 18px;
  z-index: 5;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.65);
  pointer-events: none;
}

.modal-counter-sep {
  opacity: 0.5;
}

/* ---- Progress bar ---- */
@keyframes modalProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

.modal-progress-bar {
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: transparent;
  z-index: 6;
  pointer-events: none;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
  mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: #c9a96e;
  border-radius: 2px;
}

.modal-progress-fill.animating {
  animation: modalProgress 3s linear forwards;
}

/* ---- Thumbnail strip ---- */
.modal-thumbnails-wrap {
  background: #0d0b09;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  flex-shrink: 0;
}

.modal-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-thumbnails::-webkit-scrollbar {
  display: none;
}

.modal-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.55;
}

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

.modal-thumb:hover {
  opacity: 0.85;
}

.modal-thumb.active {
  border-color: var(--color-accent, #c9a96e);
  opacity: 1;
}

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.cta-band-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.cta-band-text {
  flex: 1;
  min-width: 0;
}

.cta-band-text .section-label {
  margin-bottom: 20px;
  display: block;
}

.cta-band-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--color-white);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.cta-band-title em {
  font-style: italic;
  color: var(--color-accent);
}

.cta-band-divider {
  width: 56px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
  opacity: 0.5;
  margin: 28px auto;
}

.cta-band-sub {
  font-size: 0.975rem;
  color: var(--color-text);
  line-height: 1.9;
  max-width: 520px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}

.cta-band-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  min-width: 240px;
}

.cta-band-contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  opacity: 0.7;
  margin-bottom: 4px;
}

.cta-band-contact-item {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.cta-band-contact-item:hover {
  color: var(--color-accent);
}

.cta-band-sep {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: 8px 0;
}

.cta-band-actions .btn-primary {
  background: #c9a96e;
  color: #2c2318;
}

.cta-band-actions .btn-primary:hover {
  background: #b8956a;
  color: #2c2318;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .projects-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .modal-thumb {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 640px) {
  .projects-hero { min-height: 55vh; }

  .projects-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pcard-content { padding: 20px 20px 14px; }
  .pcard-footer { padding: 0 20px 18px; }

  .project-modal-inner {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-thumb {
    width: 52px;
    height: 40px;
  }

  .cta-band-inner { flex-direction: column; align-items: flex-start; gap: 36px; }
  .cta-band-actions { flex-direction: row; flex-wrap: wrap; }
}
