/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1340px;
  margin: 0 auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background-color: #000;
}

.hero-logo {
  position: absolute;
  width: 100%;
  height: 19vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 3;
  padding: var(--clamp20) var(--clamp40);
  top: 0;
}

.logo-img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: -webkit-mask-size 1.5s ease-in-out, mask-size 1.5s ease-in-out;
}

.hero-image.active {
  -webkit-mask-size: 120% 100%;
  mask-size: 120% 100%;
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(104deg, rgba(0, 0, 0, 0.64) -1.59%, rgba(0, 0, 0, 0) 81.38%);
  z-index: 2;
}

.hero-content {
  position: relative;
  top: 38%;
  z-index: 3;
  width: 100%;
  height: 100%;
  text-align: left;
  color: white;
  padding: 0 9.375vw;
  gap: var(--clamp40);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-content>h1,
.hero-content>p {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

.hero-content>h1 {}

.hero-content>p {
  animation-delay: 0.2s;
  /* a little after h1 */
}

.btn-browse-products {
  position: absolute;
  bottom: 50px;
  right: 50px;
  z-index: 4;
  background: #c8102e;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  transition: all 0.3s;
}

.btn-browse-products:hover {
  background: #a00d25;
  transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
  opacity: 0.8;
  transition: opacity 0.3s;
}

.scroll-indicator:hover .scroll-arrow {
  opacity: 1;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Services Section */
.services {
  padding: var(--clamp80) var(--clamp30);
  background: white;
}

.services .container {
  display: flex;
  flex-direction: column;
  gap: var(--clamp50);
}

.section-title {
  font-size: 48px;
  color: #ef4135;
  margin-bottom: 60px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: var(--clamp90);
}

.service-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  cursor: pointer;
}



.service-card:hover .btn-go {
  color: var(--color-red);
  border-bottom-color: var(--color-red);
}

.service-card:hover .btn-go .btn-go-icon {
  filter: invert(34%) sepia(98%) saturate(3117%) hue-rotate(345deg) brightness(97%) contrast(91%);
}

.service-card:hover .service-content {
  width: 38%;
}

.service-card:hover .service-image {
  width: 56%;
}

.service-card-reverse {
  flex-direction: row-reverse;
}

.service-image {
  width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  height: 250px;
  border-radius: 8px;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: 24%;
}

.service-image:last-of-type img{
  object-position: 16%;
}

.service-card-reverse .service-image img {
  object-position: 50%;
}

.service-card-reverse:last-of-type .service-image img {
  object-position: 74%;
}

.service-content {
  width: 56%;
  padding: var(--clamp20) var(--clamp35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--clamp50);
  border-left: 1px solid #ccc;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card-reverse .service-content {
  border: none;
  border-right: 1px solid #ccc;
}

.btn-go {
  border: none;
  color: #000000;
  width: fit-content;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 48px;
  border-radius: 0;
  transition: color 0.3s, border-color 0.3s;
  position: relative;
  padding-bottom: 11px;
  border-bottom: 1px solid #000000;
}

.btn-go:hover {
  color: var(--color-red);
  border-bottom-color: var(--color-red);
}

.btn-go-icon {
  width: 24px;
  height: 23px;
  flex-shrink: 0;
  transition: filter 0.3s ease-in-out;
}

.btn-go:hover .btn-go-icon {
  filter: invert(34%) sepia(98%) saturate(3117%) hue-rotate(345deg) brightness(97%) contrast(91%);
}

/* Products Section */
.products {
  padding: var(--clamp80) var(--clamp30) var(--clamp50) var(--clamp30);
  background: #f9f9f9;
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--clamp50);
  margin: 0 auto;
}

.product-card {
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--clamp30);
}

.product-card:hover .product-image {
  border-radius: unset;
}

.product-image {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-content {
  height: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  gap: var(--clamp20);
}

.product-content-inner {
  border-top: 1px solid #ccc;
  padding-top: var(--clamp25);
  display: flex;
  flex-direction: column;
  gap: var(--clamp35);
}

.product-title {
  margin-bottom: 0;
}

.product-description {
  margin-bottom: 0;
  line-height: 1.6;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: var(--clamp25);
  justify-content: flex-end;
}

/* Contact Section */
.contact {
  padding: var(--clamp50) var(--clamp30);
  background: #f9f9f9;
}

.contact-info {
  display: flex;
  justify-content: center;

  gap: var(--clamp80);
}

.contact-item {
  display: flex;
  padding: var(--clamp35) 0;
  gap: var(--clamp40);
  text-align: left;
  flex: 1;
}

.contact-item img {
  align-self: flex-start;
}

.contact-item-inner {
  display: flex;
  flex-direction: column;
  gap: var(--clamp40);
}

.contact-item-info {
  display: flex;
  flex-direction: column;
  gap: var(--clamp10);
}

/* Footer */
.footer {
  background: #000000;
  color: white;
  padding: var(--clamp80) var(--clamp100) var(--clamp120);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 25%;
  width: 12%;
  height: 100%;
  background-color: #ef4135;
  transform: skewX(25deg);
  z-index: 1;
}

.footer::after {
  content: "";
  position: absolute;
  top: 0;
  right: calc(25% + -7px);
  width: 15%;
  height: 100%;
  border-right: 2px solid white;
  transform: skewX(25deg);
  z-index: 2;
}

.footer-container {
  max-width: unset;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}

.footer-top-nav {
  align-self: flex-end;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
}

.footer-top-nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.footer-main-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: var(--clamp120);
}

.footer-browse {
  display: flex;
  align-items: center;
  gap: var(--clamp10)
}

.footer-links-section {
  flex-shrink: 0;
}

.footer-links-section h3 {
  margin-bottom: var(--clamp20);
}

.footer-term-section {
  display: flex;
  gap: var(--clamp20);
  align-items: center;
}

.footer-term-section a {
  padding: var(--clamp10) var(--clamp15);
  border-bottom: 1px solid #777;
  transition: color 0.3s;
}

.footer-term-section a:hover {
  color: var(--color-orange);
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--clamp20);
}

.footer-nav-links li {
  display: flex;
  align-items: center;
  gap: var(--clamp20);
}

.footer-nav-links a {
  display: flex;
  align-items: center;
  padding-bottom: var(--clamp10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.30);
  gap: var(--clamp20);
  text-decoration: none;
  background: linear-gradient(to left, white 50%, var(--color-orange) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.4s ease-out;
}

.footer-nav-links a:hover {
  background-position: 0 0;
}



.footer-nav-links span {
  margin-right: 10px;
}

.footer-info-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-self: flex-end;
  gap: var(--clamp15);
}

.footer-company-english {
  margin-bottom: var(--clamp25);
}

.footer-logo-img {
  width: 150px;
}

.footer-details p {
  color: rgba(255, 255, 255, 0.70);
  margin: 0;
  line-height: 200%;
}

p.footer-copyright {
  color: #999;
  margin-top: var(--clamp10);
}

/* Scroll-triggered Animations */

/* 1. 애니메이션을 위한 초기 상태 설정 */

/* 카드 자체는 애니메이션 트리거 역할만 하도록 투명하게 만듭니다. */
.service-card,
.product-card,
.contact-item {
  opacity: 0;
  transition: opacity 0.1s;
}

.service-card.visible,
.product-card.visible,
.contact-item.visible {
  opacity: 1;
}

/* 서비스 카드 내부 요소 */
.service-card .service-image {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card-reverse .service-image {
  transform: translateX(50px);
}

.service-card .service-content>* {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 프로덕트 카드 내부 요소 */
.product-card .product-image {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card .product-content-inner>* {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card .product-actions a {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* 연락처 아이템 내부 요소 */
.contact-item>img {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-item .contact-item-inner>* {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* 2. .visible 클래스가 추가되었을 때 애니메이션 실행 */

/* 서비스 카드 */
.service-card.visible .service-image,
.service-card.visible .service-content>*,
.service-card-reverse.visible .service-image {
  opacity: 1;
  transform: none;
}

/* 프로덕트 카드 */
.product-card.visible .product-image,
.product-card.visible .product-content-inner>*,
.product-card.visible .product-actions a {
  opacity: 1;
  transform: none;
}

/* 연락처 아이템 */
.contact-item.visible>img,
.contact-item.visible .contact-item-inner>* {
  opacity: 1;
  transform: none;
}


/* 3. 내부 요소별 애니메이션 지연 시간 설정 */
.service-card.visible .service-content-inner {
  transition-delay: 0.2s;
}

.product-card.visible .product-content-inner {
  transition-delay: 0.2s;
}

.contact-item.visible .contact-item-inner {
  transition-delay: 0.2s;
}

.contact-item.visible .contact-item-inner .contact-note {
  transition-delay: 0.3s;
}


/* Product Page General Styles */
.product-header {
  position:fixed;
  width: 100%; 
  background-color: white;
  padding: 20px var(--clamp30);
  border-bottom: 1px solid #eee;
  z-index: 999;
}

.product-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-nav a {
  text-decoration: none;
  color: #333;
  margin-left: 30px;
  font-weight: 500;
}

.product-nav a.active {
  color: var(--color-red);
}

.product-main {
  padding: var(--clamp60) var(--clamp30);
}

.direct .product-main {
  margin-top: 99px;
}

.product-title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--clamp70);
}

.product-title-section img {
  margin-top: 10px;
}

/* Filters */
.product-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--clamp50);
}

.product-filter-main {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.main-tabs {
  display: flex;
  gap: 1px;
}

.main-tabs .tab-btn:first-of-type {
  border-top-left-radius: 10px;
}

.main-tabs .tab-btn:last-of-type {
  border-top-right-radius: 10px;
}

.tab-btn {
  padding: var(--clamp15) var(--clamp35);
  background-color: #E9E9E9;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 13vw;
  min-width: 140px;
}

.tab-btn.active {
  background-color: var(--color-red);
  color: white;
  justify-content: space-between;
}

.sub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--clamp35);
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid #eee;
  width: 100%;
  justify-content: center;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-item input[type="checkbox"] {
  display: none;
}

.filter-item label {
  cursor: pointer;
  position: relative;
  padding-left: 25px;
}

.filter-item label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url('../images/ic_checkbox.svg') no-repeat center center;
  background-size: contain;
}

.filter-item input[type="checkbox"]:checked+label::before {
  background-image: url('../images/ic_checkbox_checked.svg');
}

/* Product List */
.product-list {
  display: flex;
  flex-direction: column;
}

.product-category {
  display: flex;
  padding-bottom: var(--clamp30);
  margin-bottom: var(--clamp50);
  gap: var(--clamp30);
}

.product-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.category-title {
  padding-top: var(--clamp35);
  position: relative;
  border-top: 3px solid var(--color-red);
  min-width: 10.4vw;
}

.category-products {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--clamp35) var(--clamp35) 0;
  border-top: 1px solid #CCC;
}

.product-row {
  display: flex;
  gap: var(--clamp30);

}


.product-name {
  width: 20%;
  margin: var(--clamp20);
  font-weight: 500;
  border-right: 1px solid #CCC;
}

.product-items {
  width: 80%;
  display: flex;
  flex-direction: column;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--clamp20);
  border-bottom: 0.5px dashed #CCC;
}

.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-title {
  font-weight: 500;
}

.item-desc {
  color: var(--color-gray);
  padding-left: 2em;
  position: relative;
}

.item-desc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 15px;
  background-image: url('../images/ic_product_desc.svg');
  background-size: contain;
  background-repeat: repeat-x;
}

.btn-pdf {
  text-decoration: none;
  color: #555;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;

}

.btn-pdf::after {
  content: "|";
  padding-left: 10px;
  padding-right: 20px;
}

.btn-detail {
  text-decoration: none;
  color: #555;
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Side Arrow */
/* Product Page Container */
#product-page-container {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 2000;
  transition: right 0.5s ease-in-out;
  overflow: hidden;
  /* Hide main scrollbar */
}

#product-page-container.active {
  right: 0;
}

#product-page-container.direct {
  position: initial;
  right: 0;
  overflow: unset;
}

.product-page-scroller {
  height: 100%;
  overflow-y: auto;

  /* For Webkit browsers */
  &::-webkit-scrollbar {
    display: none;
  }

  /* For IE, Edge and Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.side-arrow {
  position: absolute;
  /* Changed to absolute */
  width: 100px;
  height: 100px;
  left: -11px;
  top: 50%;
  /* Position relative to parent */
  transform: translateY(-50%) rotate(180deg);
  /* Center vertically */
  background: url('../images/ic_side_arrow.svg') no-repeat center;
  z-index: 2001;
  cursor: pointer;
}

.side-arrow.rotate {
  left:initial;
  right:-11px;
  transform: translateY(-50%);
  transition: right 0.5s ease-in-out;
}

.product-page-is-active .side-arrow.rotate  {
  right: calc(100% - 11px);
}