.hero {
  position: relative;
  height: 100vh;
  height: 100dvh; /* 동적 뷰포트 높이 지원 (아이폰 튕김 방지) */
  overflow: hidden;
  background: #000;
}

.hero-text {
  position: absolute;
  left: 6vw;
  top: 34%;
  z-index: 5;
}

.hero-text h1 {
  font-size: clamp(42px, 5vw, 80px);
  line-height: 1.1;
  font-weight: 800;
  color: #fff;
}

.hero-text p {
  color: #fff;
}

.floating-gallery {
  position: absolute;
  inset: 0;
  left: 45%;
  pointer-events: none;
}

.card {
  position: absolute;
  width: 450px;
  height: 620px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(255,255,255,0.35);
}

.card1 {
  top: -80px;
  left: 80px;
  transform: rotate(28deg);
}

.card2 {
  top: 120px;
  left: 520px;
  transform: rotate(28deg);
}

.card3 {
  top: 670px;
  left: 120px;
  transform: rotate(28deg);
}

.card4 {
  top: 470px;
  left: -350px;
  transform: rotate(28deg);
}

.slider {
  width: 100%;
  height: 300%;
  animation: slideY 9s infinite;
}

.slider img {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.card1 .slider { animation-delay: 0s; }
.card2 .slider { animation-delay: -2s; }
.card3 .slider { animation-delay: -4s; }
.card4 .slider { animation-delay: -3s; }

@keyframes slideY {
  0%, 28% {
    transform: translateY(0);
  }
  33%, 61% {
    transform: translateY(-520px);
  }
  66%, 94% {
    transform: translateY(-1040px);
  }
  100% {
    transform: translateY(0);
  }
}

/* 포트폴리오 이미지 영역 */
.portfolio-wrap .img {
  height: 320px;
  background-size: cover;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  border-radius: 20px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.3),
    0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  cursor: grab;

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.portfolio-wrap .img:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.4),
    0 40px 100px rgba(0,0,0,0.6);
}

.portfolio-wrap .img:active,
.portfolio-wrap .img.dragging {
  cursor: grabbing;
}

/* 기존 포트폴리오 자동 이동 완전 차단 */
.portfolio-wrap .img {
  animation: none !important;
}



/* 모달 */
.portfolio-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.portfolio-modal.active {
  display: block;
}

.portfolio-modal-box {
  position: relative;
  width: 92%;
  height: 90vh;
  margin: 5vh auto;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.portfolio-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  z-index: 9999;

  width: 60px;
  height: 60px;
  border-radius: 0%;

  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 2px solid #fff;

  font-size: 28px;
  font-weight: 700;
  line-height: 46px;
  text-align: center;

  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-modal-close:hover {
  background: #ff3366;
  border-color: #ff3366;
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(255, 51, 102, 0.7);
}

#portfolioFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 히어로 랩 */
.hero-wrap {
  position: relative !important;
  min-height: 100vh;
  overflow: hidden;
}

.hero-wrap .overlay {
  z-index: 1;
}

.hero-wrap .container {
  position: relative;
  z-index: 2;
}

/* 스크롤 버튼 */
.scroll-down-wrap {
   position: fixed; 
  left: 0;
  right: 0;
  bottom: 130px;
  z-index: 9999;
  text-align: center;
  pointer-events: none;
}

.scroll-down {
  display: inline-block;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border-radius: 30px;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  pointer-events: auto;
  animation: scrollMove 1.5s infinite;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.3);
}

.scroll-arrow {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 6px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(45deg);
}

.scroll-text {
  display: block;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

@keyframes scrollMove {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }

  50% {
    transform: translateY(10px) scale(1.05);
    opacity: 1;
  }
}

html {
  scroll-behavior: smooth;
}

/* 모바일 */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
	height: 100dvh;
  }

  .hero-text {
    left: 6vw;
    top: 28%;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .floating-gallery {
    left: 35%;
    opacity: 0.6;
  }

  .card {
    width: 220px;
    height: 320px;
  }

  .slider img {
    height: 320px;
  }

  @keyframes slideY {
    0%, 28% {
      transform: translateY(0);
    }

    33%, 61% {
      transform: translateY(-320px);
    }

    66%, 94% {
      transform: translateY(-640px);
    }

    100% {
      transform: translateY(0);
    }
  }

  .card1 {
    top: -60px;
    left: -160px;
  }

  .card2 {
    top: 80px;
    left: 60px;
  }

  .card3 {
    top: 460px;
    left: 20px;
  }

  .card4 {
    top: 360px;
    left: -230px;
  }

  .portfolio-wrap {
    width: 100%;
  }

  .portfolio-wrap .img {
    height: 220px !important;
    min-height: 0 !important;
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    transform: none !important;
  }

  .portfolio-wrap .img:hover {
    transform: none !important;
  }

  .portfolio-wrap .text {
    padding: 0 5px;
  }

  .portfolio-wrap h2 {
    font-size: 18px;
  }

  .portfolio-wrap p,
  .portfolio-wrap .subheading {
    font-size: 13px;
  }

  .portfolio-modal-box {
    width: 96%;
    height: 92vh;
    margin: 4vh auto;
    border-radius: 10px;
  }

  .scroll-down-wrap {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .scroll-down {
    padding: 10px 14px;
    font-size: 13px;
  }

  .scroll-arrow {
    width: 26px;
    height: 26px;
  }

  .scroll-text {
    font-size: 12px;
  }

  .services {
    border: 1px solid #ddd;
    padding: 5px;
    margin: 3px;
    border-radius: 0;
  }
}

/* 스크롤 영역 */
.portfolio-wrap .img {
  overflow-y: auto;
}

/* 전체 스크롤 바 */
.portfolio-wrap .img::-webkit-scrollbar {
  width: 6px;
}

/* 배경 */
.portfolio-wrap .img::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}

/* 실제 움직이는 바 */
.portfolio-wrap .img::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c249ca, #ff3366);
  border-radius: 10px;
}

/* 호버 시 강조 */
.portfolio-wrap .img::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff3366, #c249ca);
}

.portfolio-wrap .img {
  scrollbar-width: thin;
  scrollbar-color: #c249ca rgba(0,0,0,0.05);
}
.portfolio-img-wrap {
  position: relative;
  display: block;
}

.portfolio-fake-scrollbar {
  position: absolute;
  top: 18px;
  right: 12px;
  width: 5px;
  height: calc(100% - 36px);
  border-radius: 20px;
  background: rgba(255,255,255,0.25);
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.portfolio-fake-scrollbar span {
  display: block;
  width: 100%;
  height: 28%;
  border-radius: 20px;
  background: linear-gradient(180deg, #c249ca, #ff3366);
  box-shadow: 0 0 10px rgba(255,51,102,0.6);
  transform: translateY(0%);
}

.portfolio-fake-scrollbar {
  z-index: 2; /* 기존 10 → 낮춤 */
}



.portfolio-modal::after {
  display: none !important;
  content: none !important;
}

#portfolioFrame {
  opacity: 1 !important;
  display: block !important;
  width: 100%;
  height: 100%;
  border: 0;
}

#portfolioLoading {
  display: none;
}

#portfolioLoading .loading-spinner {
  display: none;
}

#ftco-loader,
.ftco-loader,
.loader,
.loading,
.loading-spinner {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.portfolio-img-wrap,
.portfolio-manual-img {
  touch-action: pan-y;
}


.portfolio-img-wrap,
.portfolio-manual-img {
  touch-action: none;
}

#portfolioMoreGuide {
  text-align: center;
  padding: 60px 0 100px;
  font-size: 15px;
  color: #777;
}


.portfolio-wrap .img {
  /* 기존 속성 유지... */
  overflow-y: auto;
  
  /* 추가할 속성 */
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  overscroll-behavior-y: none; /* 아이폰 고무줄 바운스 효과 차단 */
}

.portfolio-wrap .img,
.portfolio-img-wrap {
  scroll-behavior: auto !important; 
}


/*중앙 광고형 컨텐츠*/
/* ===== 헤드 ===== */
.neoline-head {
  background: #3d1313;
  padding: 120px 20px 60px;
  text-align: center;
  border-bottom: 1px solid #222;
}

.neoline-head .sub {
  color: #fff;
  font-weight: 300;
  letter-spacing: 1px;
  font-size: 12px;
  margin-bottom: 25px;
  opacity: 0.8;
}

.neoline-head h2 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(20px, 5vw, 46px);
  line-height: 1.5;
}

.neoline-head h2 span {
  background: linear-gradient(to right, #c249ca, #ff3366);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== 섹션 ===== */
.neoline-split-section {
  scroll-snap-type: y mandatory;
}

/* 큰 섹션 */
.split-item {
  position: relative; /* 추가 */
  width: 100%;
  border-bottom: 1px solid #222;
  overflow: hidden;
}

/* 배경색 */
.split-item:nth-child(1) { background: #111; }
.split-item:nth-child(2) { background: #250047; }
.split-item:nth-child(3) { background: #0f3164; }
.split-item:nth-child(4) { background: #0d2f00; }

/* 종이 질감 */
.split-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background-image:
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");

  opacity: 0.12;
  mix-blend-mode: screen;

  pointer-events: none;
}
/* 실제 콘텐츠는 질감 위로 */
.split-inner {
  position: relative;
  z-index: 1;

  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 0 20px;
}

/* 큰 섹션 */
.split-item.large {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 0;
  scroll-snap-align: start;
}

/* 내부 */
.split-inner {
  max-width: 1200px;
  width: 100%;            /* 🔥 추가 */
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 0 20px;
}

/* ===== 영상 ===== */
.split-video {
  flex: 1;
  height: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  position: relative;
  min-width: 0;
  background: transparent;
}

.split-video video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;        /* contain → cover */
  background: transparent;
}

/* ===== 텍스트 ===== */
.split-text {
  flex: 0.8;
  color: #fff;
  min-width: 0;           /* 🔥 추가 */
}

.split-text h3 {
  color: #fff !important;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800;
  margin-bottom: 25px;
  line-height: 1.4;
}

.split-text h3 span {
  margin-right: 10px;
}

/* 색상 포인트 */
.split-item:nth-child(1) h3 span { color: #c249ca; }
.split-item:nth-child(2) h3 span { color: #ff3366; }
.split-item:nth-child(3) h3 span { color: #6585ff; }
.split-item:nth-child(4) h3 span { color: #00ffcc; }

.split-text p {
  font-size: 18px;
  color: #aaa;
  line-height: 1.8;
  margin-bottom: 18px;
}

.split-text .highlight {
  color: #00ffcc;
  font-weight: 700;
  font-size: 20px;
}

/* 좌우 반전 */
.split-item.reverse .split-inner {
  flex-direction: row-reverse;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {

  .neoline-split-section {
    scroll-snap-type: none; /* 🔥 추가 (iOS 깨짐 핵심) */
  }

  .split-inner {
    display: block;         /* 🔥 flex 제거 */
  }

  .split-item.large {
    min-height: auto;
    padding: 80px 0;
  }

  .split-video {
    width: 100%;
    height: auto;           /* 🔥 변경 */
    aspect-ratio: 16 / 9;   /* 🔥 추가 (영상 안정화) */
  }

  .split-text {
    width: 100%;
    margin-top: 20px;       /* 🔥 추가 */
  }

  .split-text h3 {
    font-size: 24px;
  }

  .split-text p {
    font-size: 16px;
  }

  .split-item.reverse .split-inner {
    display: block !important;
  }
}
@media (max-width: 768px) {

  /* 🔥 전체 섹션 여백 축소 */
  .split-item.large {
    padding: 40px 0 !important;   /* 기존 80px → 절반 */
  }

  /* 🔥 내부 좌우 여백 줄이기 */
  .split-inner {
    padding: 0 14px !important;   /* 20px → 14px */
    gap: 20px !important;         /* 80px → 20px */
  }

  /* 🔥 영상 크기 키우기 */
  .split-video {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  /* 🔥 텍스트 위 간격 줄이기 */
  .split-text {
    margin-top: 10px;  /* 기존 20px → 줄임 */
  }

  /* 🔥 제목 아래 여백 줄이기 */
  .split-text h3 {
    margin-bottom: 15px;
  }

  /* 🔥 문단 간격 줄이기 */
  .split-text p {
    margin-bottom: 12px;
    line-height: 1.6;
  }

  /* 🔥 헤드 영역 여백 줄이기 */
  .neoline-head {
    padding: 70px 16px 30px !important;
  }
