@import "tailwindcss";

/* Nav placeholder reserves 64px to prevent layout shift on partial load */
#nav-placeholder {
  min-height: 64px;
}

@theme {
  /* Colors — '파란디자인' Original Background + Premium Blue Accents */
  --color-navy: #081329;
  --color-navy-light: #0d1e3d;
  --color-cyan: #00c8d9;
  --color-mint: #bae6fd;
  --color-gold: #feb127;
  --color-light: #f7f9f2;
  --color-white: #f7f9f2;
  --color-surface: #f7f9f2;
  --color-surface-alt: #e2e8f0;
  --color-text-dark: #f1f5f9;
  --color-text-light: #0a211f;
  --color-text-muted: #8b9d9b;
  --color-text-muted-light: #64748b;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-light: #cbd5e1;
  --color-accent-bg: #0d2a28;

  /* Fonts — Superside mix */
  --font-display: "Inter Tight", "Pretendard Variable", sans-serif;
  --font-body: "Inter Tight", "Pretendard Variable", sans-serif;
  --font-serif: "Instrument Serif", serif; /* Italic 강조용 */

  /* Easing */
  --ease-premium: cubic-bezier(0.23, 1, 0.32, 1); /* 프리미엄한 부드러운 움직임 */
}

/* Korean typography baseline */
html {
  overflow-y: scroll; /* 스크롤바 항상 표시 → 페이지 이동 시 레이아웃 쏠림 방지 */
  word-break: keep-all;
  line-height: 1.7;
  overflow-wrap: break-word;
  background-color: var(--color-navy);
  color: var(--color-light);
}

/* Scrollbar — 전체 페이지 통일 (8px, 반투명 흰색 thumb) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }

/* Component: Primary CTA Pill button — 전환 최적화 및 프리미엄 스타일 */
.btn-primary {
  background: var(--color-cyan);
  color: var(--color-navy);
  padding: 16px 38px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.15);
  transition: all 0.4s var(--ease-premium);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: #ffffff;
  color: var(--color-navy);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.solutions-card-premium {
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px); /* Reduced from md to be less foggy */
  border: 1px solid rgba(255, 255, 255, 0.12); /* Slightly sharper border */
}

.solutions-card-premium:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08); /* More visible on hover */
  border-color: var(--color-mint);
  box-shadow: 0 20px 40px -15px rgba(0, 243, 255, 0.15);
}

.btn-primary:active {
  filter: brightness(0.95);
}

/* Primary CTA on light background */
.light .btn-primary, .section-light .btn-primary {
  background: var(--color-navy);
  color: var(--color-cyan);
}
.light .btn-primary:hover, .section-light .btn-primary:hover {
  opacity: 0.9;
}

/* Secondary CTA on light background */
.section-light .btn-secondary {
  border-color: rgba(4, 19, 41, 0.2);
  color: #041329;
}
.section-light .btn-secondary:hover {
  background: rgba(4, 19, 41, 0.05);
  border-color: rgba(4, 19, 41, 0.4);
}

/* Secondary CTA Pill button */
.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-light);
  padding: 16px 36px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 16px;
  display: inline-block;
  text-decoration: none;
  transition: background 0.2s var(--ease-default),
              border-color 0.2s var(--ease-default);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Hero portfolio grid cards */
.hero-card {
  position: relative;
  overflow: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-card-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-premium);
  transform-origin: center center;
  z-index: 1;
}

/* Hero card labels removed — cards are image-only */

/* Card component */
.card {
  border-radius: 32px;
  padding: 48px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  transform: translateY(-8px);
}

/* Fixed nav — nav partial(partials/nav.html)에서 직접 관리, style.css 규칙 제거 */

/* Fallback hiding for desktop elements on mobile */
@media (max-width: 1023px) {
  .nav-desktop-only {
    display: none !important;
  }
}

/* Hero mobile marquee rows */
@keyframes hero-marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes hero-marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.hero-marquee-row {
  width: max-content;
}

/* Hero Category Pills — LAND-01 */
.hero-category-pill {
  transition: all 0.4s var(--ease-premium);
  cursor: pointer;
}
.hero-category-pill:hover {
  background: var(--color-mint);
  color: var(--color-navy);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 20px rgba(186, 230, 253, 0.3);
}

/* Portfolio Flow Cards Interaction — LAND-01 */
.hero-flow-col > div {
  cursor: pointer;
  position: relative;
  z-index: 1;
}
/* REMOVED: .hero-flow-col > div:hover { ... } - Handled by .hero-card inner-zoom/tilt */


/* Hero flowing portfolio columns (JS handles animation for slow-down effect) */
.hero-flow-col {
  will-change: transform;
}

/* Trust bar marquee — LAND-08 */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.trust-bar-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 73s linear infinite; /* 30% slower */
}

.trust-bar-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.trust-bar-logo {
  height: 2.75rem;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.5s ease;
  margin: 0 2.5rem;
  pointer-events: auto;
}

.trust-bar-logo:hover {
  filter: grayscale(0%) opacity(1);
}

/* FAQ accordion animation — LAND-09 */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item[open] .faq-answer {
  max-height: 500px;
}

/* Solutions icon area — blend AI-generated images seamlessly into card */
.solutions-icon-area {
  background: #0a1628;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* ── Process Flip Card ────────────────────────────────────────────────────── */
.process-flip-card {
  perspective: 1200px;
  cursor: pointer;
}

.process-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 120px;
  transition: transform 0.8s var(--ease-premium);
  transform-style: preserve-3d;
}
@media (min-width: 768px) {
  .process-flip-inner {
    min-height: 220px;
  }
}

.process-flip-front,
.process-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
}
@media (min-width: 768px) {
  .process-flip-front,
  .process-flip-back {
    border-radius: 1rem;
    padding: 1.5rem 1rem;
  }
}

.process-flip-front {
  background: linear-gradient(135deg, #e0eaff 0%, #c7d8f5 100%);
  border: 1.5px solid rgba(8, 19, 41, 0.15);
}

.process-flip-back {
  background: linear-gradient(135deg, #081329 0%, #0d3a6a 100%);
  border: 1.5px solid rgba(0, 240, 255, 0.2);
}

/* Flip: Y-axis rotation, same size front & back */
.process-flip-card .process-flip-back {
  transform: rotateY(180deg);
}
.process-flip-card:hover .process-flip-inner,
.process-flip-card.flipped .process-flip-inner {
  transform: rotateY(180deg);
}

/* Process & Services sections — high-contrast text on light bg */
#process h2, #process h4,
#services h2, #services h3 {
  color: var(--color-navy);
}

#process p, #process .text-text-muted-light,
#services p, #services .text-text-muted-light {
  color: #1e293b; /* Darker slate for better readability */
}

/* Explicitly darken prices and differentiator tags */
.service-price, .process-tag {
  color: #040c1d !important; /* Deepest navy */
  font-weight: 800;
}

#process .bg-surface-alt,
#services .bg-surface-alt {
  background: #dce4ed;
}

#process .bg-surface-alt,
#services .bg-surface-alt {
  background: #dce4ed;
}

#process .border-border-light,
#services .border-border-light {
  border-color: #b8c5d3;
}

/* Force override Tailwind text-cyan in light sections */
#process .text-cyan,
#services .text-cyan {
  color: var(--color-navy) !important;
}
#process .bg-cyan\/15,
#services .bg-cyan\/15 {
  background-color: rgba(8, 19, 41, 0.1) !important;
}

/* Custom cursor — Superside-style premium interaction */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-cyan);
  background: transparent;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-premium),
              height 0.35s var(--ease-premium),
              background 0.35s var(--ease-premium),
              opacity 0.3s ease;
  will-change: transform;
}

#custom-cursor.cursor-active {
  width: 80px;
  height: 80px;
  background: rgba(8, 19, 41, 0.7);
  border-color: rgba(8, 19, 41, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#custom-cursor.cursor-hidden {
  opacity: 0;
}

.cursor-text {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

#custom-cursor.cursor-active .cursor-text {
  opacity: 1;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  #custom-cursor { display: none; }
  /* Disable translate/shadow hover effects on touch — prevent sticky hover */
  .group:hover { transform: none !important; }
  [class*="hover\\:-translate-y"] { transform: none !important; }
  [class*="hover\\:shadow-xl"] { box-shadow: none !important; }
}

/* GSAP animation — will-change hint only, no opacity changes in CSS.
   GSAP sets opacity:0 via JS; if GSAP fails, content stays visible. */
[data-animate-child] {
  will-change: transform, opacity;
}

/* ── Superside Portfolio Cards (OUR WORK) ─────────────────────────────── */
/* 이미지-텍스트 공백 제거 */
.portfolio-card-highlight { gap: 0 !important; }
.portfolio-card-highlight .overflow-hidden { line-height: 0; font-size: 0; }
.portfolio-card-highlight img { display: block; }

.portfolio-card-highlight:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 209, 255, 0.08);
}
.portfolio-card-highlight:hover img {
  transform: scale(1.05);
}
.portfolio-card-highlight[data-card-index="0"]:hover .portfolio-card-text {
  background: #1a6a80 !important;
  filter: brightness(1.1);
}
.portfolio-card-highlight[data-card-index="1"]:hover .portfolio-card-text {
  background: #357558 !important;
  filter: brightness(1.1);
}
.portfolio-card-highlight[data-card-index="2"]:hover .portfolio-card-text {
  background: #455f88 !important;
  filter: brightness(1.1);
}

/* Mobile: stack + auto height */
@media (max-width: 768px) {
  .portfolio-card-highlight {
    height: auto !important;
  }
  .portfolio-card-highlight > div:first-child {
    height: 280px !important;
  }
}

/* ── Premium Detail Modal ─────────────────────────────────────────────── */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.detail-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 700px;
  max-height: 90vh;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.detail-modal-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 28px 16px;
}

.detail-modal-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-cyan);
  margin-bottom: 8px;
}

.detail-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.detail-modal-image {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
}
.detail-modal-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  cursor: zoom-in;
}

/* Fullscreen zoom overlay */
.detail-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.detail-zoom-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.detail-zoom-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-family: var(--font-display);
  pointer-events: none;
}

.detail-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 28px 24px;
  padding: 10px 0;
  width: calc(100% - 56px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.detail-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.detail-modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 28px 24px;
}
.detail-modal-cta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--color-cyan);
  color: var(--color-navy);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.detail-modal-cta:hover {
  background: #33daff;
  transform: translateY(-1px);
}
.detail-modal-actions .detail-modal-close {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
  padding: 12px 24px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .detail-modal-content {
    max-width: 92vw;
    max-height: 85vh;
  }
  .detail-modal-info {
    padding: 24px 24px 12px;
  }
  .detail-modal-image {
    padding: 0 24px;
  }
  .detail-modal-actions {
    padding: 12px 24px 20px;
  }
}

/* Mobile menu overlay */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: #081329;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#mobile-menu.hidden {
  display: none !important;
}

/* Service dropdown */
.service-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(8, 19, 41, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 8px;
  min-width: 280px;
  border: 1px solid rgba(39, 53, 76, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.2s;
}
.service-dropdown.dropdown-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Blog Filter Tabs ──────────────────────────────────────────────────── */
.blog-filter-tab {
  padding: 8px 20px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-muted-light);
  background: transparent;
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.blog-filter-tab:hover {
  color: var(--color-text-light);
  border-color: var(--color-text-light);
}
.blog-filter-tab.active {
  background: var(--color-navy);
  color: #fff;
  border-color: var(--color-navy);
}

/* ── Blog TOC Sidebar ─────────────────────────────────────────────────── */
.blog-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.blog-toc-link {
  display: block;
  padding: 6px 0 6px 16px;
  font-size: 13px;
  color: var(--color-text-muted-light);
  border-left: 2px solid var(--color-border-light);
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
  line-height: 1.5;
}
.blog-toc-link:hover {
  color: var(--color-text-light);
}
.blog-toc-link.active {
  color: var(--color-cyan);
  border-left-color: var(--color-cyan);
  font-weight: 600;
}

/* Blog reading progress bar */
.blog-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-cyan);
  z-index: 60;
  transition: width 0.1s linear;
}

/* ── Related Posts Cards ──────────────────────────────────────────────── */
.related-post-card {
  display: block;
  border-radius: 16px;
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  text-decoration: none;
}
.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.related-post-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* ── Portfolio Filter Tabs ─────────────────────────────────────────────── */
.filter-tab {
  padding: 10px 24px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}
.filter-tab.active {
  background: var(--color-cyan);
  color: var(--color-navy);
  border-color: var(--color-cyan);
}

/* ── Portfolio Card ────────────────────────────────────────────────────── */
.portfolio-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-card:hover {
  transform: translateY(-6px);
}

/* ── Estimate Item Cards ───────────────────────────────────────────────── */
.estimate-item {
  display: block;
  cursor: pointer;
}
.estimate-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.estimate-item .peer:checked ~ .estimate-item-card {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.12);
}
.estimate-check {
  visibility: hidden;
  flex-shrink: 0;
}
.estimate-item .peer:checked ~ .estimate-item-card .estimate-check {
  visibility: visible;
}

/* ── Estimate Option Cards ─────────────────────────────────────────────── */
.estimate-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border-light);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
label:has(.peer:checked) .estimate-option-card {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.12);
}

/* ── Project Modal (Premium Glassmorphism) ────────────────────────────────── */
#project-modal {
  position: fixed;
  inset: 0;
  z-index: 99999; /* Above custom cursor? Or below? Let's say above standard nav. */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease-premium), visibility 0.5s;
}

#project-modal.modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 19, 41, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-wrapper {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  z-index: 10;
}

.modal-container {
  width: 100%;
  height: 100%;
  background: #f7f9f2;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  display: flex;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
}

.modal-close-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(8, 19, 41, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s var(--ease-premium);
  border: none;
}

.modal-close-btn:hover {
  background: var(--color-navy);
  color: #fff;
  transform: rotate(90deg) scale(1.1);
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 450px;
  width: 100%;
  height: 100%;
}

.modal-image-area {
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.modal-image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-premium);
}

.modal-text-area {
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--color-navy);
}

.modal-category {
  font-size: 18px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-description {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
  color: #475569;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
}

.meta-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.meta-value {
  font-weight: 600;
  color: var(--color-navy);
}

@media (max-width: 1024px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
  }
  .modal-wrapper {
    height: 90vh;
  }
  .modal-container {
    flex-direction: column;
    overflow-y: auto;
  }
  .modal-text-area {
    padding: 40px 32px;
  }
  .modal-title {
    font-size: 32px;
  }
}

/* ── Carousel Arrow Buttons ──────────────────────────────────────────── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #081329;
  transition: all 0.2s;
  padding: 0;
}
.carousel-arrow:active {
  transform: translateY(-50%) scale(0.92);
}
.carousel-arrow-left { left: 2px; }
.carousel-arrow-right { right: 2px; }
.carousel-arrow:disabled {
  opacity: 0.25;
  pointer-events: none;
}
.carousel-arrow-dark {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.carousel-arrow-dark:active {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Mobile Horizontal Scroll Carousel ───────────────────────────────── */
.mobile-scroll-cards {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 calc(50% - 35vw);
}
.mobile-scroll-cards::-webkit-scrollbar {
  display: none;
}

/* Portfolio dynamic grid: mobile horizontal scroll */
@media (max-width: 767px) {
  #portfolio-dynamic-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-left: -1.5rem;
    padding-left: 1.5rem;
    margin-right: -1.5rem;
    padding-right: 1.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 1.5rem;
  }
  #portfolio-dynamic-grid::-webkit-scrollbar {
    display: none;
  }
  #portfolio-dynamic-grid > * {
    flex-shrink: 0;
    width: 80vw;
    scroll-snap-align: center;
  }
}
