/* ═══════════════════════════════════════════════════════════
   CATEGORY PAGE CSS — CINEMATIC ACCORDION (NO CARDS)
═══════════════════════════════════════════════════════════ */

:root {
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.12);
  --red-border: rgba(220, 38, 38, 0.28);
  --bg: #080808;
  --surface: #141414;
  --border: #1e1e1e;
  --border2: #262626;
  --text: #e8e8e8;
  --muted: #6b6b6b;
  --muted2: #4a4a4a;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-page {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.cat-page.open {
  transform: translateX(0);
}

/* Nav */
.cat-nav {
  position: sticky;
  top: 0;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.cat-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.25s ease;
}
.cat-back-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}
.cat-back-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.25s ease;
}
.cat-back-btn:hover svg {
  transform: translateX(-3px);
}

/* Hero */
.cat-hero {
  padding: 70px 60px 50px;
  position: relative;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(
    ellipse at top left,
    rgba(220, 38, 38, 0.06) 0%,
    transparent 55%
  );
  overflow: hidden;
}

.cat-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}
.cat-breadcrumb span:last-child {
  color: var(--red);
  font-weight: 600;
}

.cat-icon-big {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.cat-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -2.5px;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1;
}

.cat-subtitle {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.cat-stats {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.cat-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 28px;
}
.cat-stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}
.cat-stat-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
}
.cat-stat-label {
  font-size: 11px;
  color: var(--muted);
}

/* ═══════════════════════════════════
   PROJECTS SECTION — hide old header
═══════════════════════════════════ */
.cat-projects-section {
  padding: 0;
}
.cat-projects-header {
  display: none;
}
#cat-projects-grid {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   CINEMA WRAP — split layout
═══════════════════════════════════════════════════════════ */
.cinema-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  position: relative;
}

/* ── LEFT: Accordion ── */
.accordion-side {
  padding: 60px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.accordion-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.accordion-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red);
}

/* Accordion item */
.acc-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.acc-item:first-of-type {
  border-top: 1px solid var(--border);
}

.acc-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease-out);
}
.acc-item.active::before {
  transform: scaleY(1);
}

/* Header */
.acc-header {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  padding: 22px 0 22px 16px;
  gap: 16px;
  user-select: none;
}

.acc-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted2);
  letter-spacing: 1px;
  transition: color 0.3s;
}
.acc-item.active .acc-num,
.acc-item:hover .acc-num {
  color: var(--red);
}

.acc-title-wrap {
  overflow: hidden;
}

.acc-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 700;
  color: #888;
  letter-spacing: -0.3px;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  line-height: 1.2;
}
.acc-item:hover .acc-title {
  color: #ddd;
  transform: translateX(4px);
}
.acc-item.active .acc-title {
  color: #fff;
  transform: translateX(6px);
}

.acc-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}
.acc-item.active .acc-tag,
.acc-item:hover .acc-tag {
  opacity: 1;
}

.acc-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.35s var(--ease-spring);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.acc-item.active .acc-icon {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: rotate(45deg);
}
.acc-item:hover:not(.active) .acc-icon {
  border-color: var(--red);
  color: var(--red);
}

/* Body */
.acc-body {
  height: 0;
  overflow: hidden;
}

.acc-body-inner {
  padding: 0 16px 24px 68px;
}

.acc-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 420px;
}

.acc-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.acc-tech {
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 11.5px;
  color: #666;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.acc-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  transition: gap 0.3s ease;
}
.acc-cta:hover {
  gap: 16px;
}

.acc-cta-arrow {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s var(--ease-spring);
}
.acc-cta:hover .acc-cta-arrow {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: rotate(-45deg);
}

/* ── RIGHT: Cinema ── */
.cinema-side {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: hidden;
  background: #050505;
}

.cinema-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(220, 38, 38, 0.08),
    transparent 60%
  );
  z-index: 1;
  pointer-events: none;
}

.cinema-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
}
.cinema-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) saturate(0.7);
  transform: scale(1.06);
}
.cinema-img.active {
  opacity: 1;
  z-index: 2;
}

.cinema-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(8, 8, 8, 0.65) 0%, transparent 45%),
    linear-gradient(to top, rgba(8, 8, 8, 0.6) 0%, transparent 40%);
  z-index: 3;
  pointer-events: none;
}

.cinema-watermark {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 4;
  font-family: var(--font-display);
  font-size: 110px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.035);
  letter-spacing: -4px;
  line-height: 1;
  pointer-events: none;
}

.cinema-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 5;
  background: var(--border);
  overflow: hidden;
}
.cinema-strip-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

.cinema-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 36px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cinema-info-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(220, 38, 38, 0.85);
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.cinema-info-counter {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 1px;
}

.cinema-nav {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cinema-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.45);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.cinema-nav-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Empty */
.cat-empty {
  padding: 80px 60px;
  text-align: center;
}
.cat-empty-icon {
  font-size: 52px;
  margin-bottom: 18px;
}
.cat-empty h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: #fff;
  margin-bottom: 10px;
}
.cat-empty p {
  color: var(--muted);
  font-size: 15px;
}

/* CTA Banner */
.cat-cta-banner {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.1),
    rgba(220, 38, 38, 0.04)
  );
  border-top: 1px solid rgba(220, 38, 38, 0.15);
  padding: 64px 28px;
  text-align: center;
}
.cat-cta-content h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 10px;
}
.cat-cta-content p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 28px;
}

/* Modal */
.proj-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.proj-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.proj-modal {
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}
.proj-modal-overlay.open .proj-modal {
  transform: scale(1) translateY(0);
}

.proj-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
  border-radius: 50%;
  color: #aaa;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  font-family: var(--font-body);
}
.proj-modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.proj-modal-img-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #000;
}
.proj-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proj-modal-img-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.proj-modal-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 13px;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(220, 38, 38, 0.45);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ff7070;
}

.proj-modal-body {
  padding: 28px 32px 32px;
}
.proj-modal-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 12px;
}
.proj-modal-body p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.proj-modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.proj-modal-tech-tag {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 12px;
  color: #888;
  font-weight: 500;
}
.proj-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.proj-live-btn {
  text-decoration: none;
}
.proj-close-btn {
  padding: 12px 24px;
  font-size: 14px;
}

/* Service cards */
.service-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.service-card:hover .service-card-cta {
  color: var(--red);
}
.service-card-arrow {
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 18px;
  color: var(--muted2);
  transition: all 0.3s var(--ease-spring);
  opacity: 0;
}
.service-card:hover .service-card-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--red);
}

/* Responsive */
@media (max-width: 1024px) {
  .cinema-wrap {
    grid-template-columns: 1fr;
  }
  .cinema-side {
    position: relative;
    top: 0;
    height: 50vw;
    min-height: 280px;
    max-height: 420px;
  }
  .accordion-side {
    padding: 40px 28px;
    border-right: none;
    border-top: 1px solid var(--border);
  }
  .cat-hero {
    padding: 50px 28px 40px;
  }
}

@media (max-width: 768px) {
  .cat-hero {
    padding: 40px 20px 32px;
  }
  .cat-title {
    font-size: clamp(28px, 8vw, 42px);
    letter-spacing: -1px;
  }
  .cinema-side {
    height: 56vw;
    min-height: 220px;
  }
  .accordion-side {
    padding: 32px 20px;
  }
  .acc-header {
    grid-template-columns: 40px 1fr 28px;
    padding: 18px 0 18px 12px;
  }
  .acc-title {
    font-size: 15px;
  }
  .acc-body-inner {
    padding: 0 12px 20px 52px;
  }
  .cat-cta-banner {
    padding: 48px 20px;
  }
  .cat-cta-content h2 {
    font-size: 26px;
  }
  .proj-modal {
    border-radius: 16px;
    max-height: 95vh;
  }
  .proj-modal-img-wrap {
    height: 220px;
  }
  .proj-modal-body {
    padding: 20px 20px 24px;
  }
  .proj-modal-actions {
    flex-direction: column;
  }
}
