:root {
  --primary: #002147;
  --bg: #f8f8f8;
  --white: #fff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard', sans-serif;
  background: var(--bg);
  color: #333;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}
.header-inner {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
.logo img {
  width: 20%;
}
.main-nav ul {
  display: flex;
  gap: 20px;
}
.main-nav li {
  list-style: none;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
}
.header-icon {
  font-size: 20px;
  color: var(--primary);
  margin-left: 10px;
}
.hamburger {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero */
.hero {
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: center;
  margin-top: 60px;
}
.hero-content {
  position: relative;
  width: 100%;
  height: 80vh; /* 필요 크기 */
  overflow: hidden;
  text-align: center;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}
.hero-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute; /* 텍스트 뒤로 보내기 */
  z-index: 1; /* 가장 아래 */
}

.hero-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  
  z-index: 2; /* 이미지 위, 텍스트 아래 */
}
/* 텍스트(맨 위) */
.hero-content h1,
.hero-content a {
  position: relative;
  z-index: 3; /* 이미지+딤드 위 */
  color: white;
  line-height: 160%;
}
/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}
.btn.outline {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
}

/* Sections 공통 */
.inner {
  max-width: 1000px;
  margin: auto;
  padding: 60px 20px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 40px;
}
.section-header h2 {
  font-size: 28px;
  color: var(--primary);
}
.section-header .btn {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
}

/* News Slider */
.news-section {
  background: var(--white);
  padding: 60px 0;
}
.news-slider {
  position: relative;
  margin-top: -50px;
}
.news-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}
.news-track::-webkit-scrollbar {
  display: none;
}
.news-card {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  scroll-snap-align: start;
  overflow: hidden;
}
.card-image {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
}
.card-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.news-card:hover .card-overlay {
  opacity: 1;
}
.card-title {
  margin: 16px;
  font-size: 18px;
  color: var(--primary);
}
.card-desc {
  margin: 0 16px 16px;
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}
.card-link {
  display: inline-flex;
  align-items: center;
  margin: 0 16px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.card-link i {
  margin-left: 6px;
  font-size: 12px;
}
.card-link:hover {
  transform: translateX(4px);
}
.news-prev,
.news-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.news-prev { left: -20px; }
.news-next { right: -20px; }
.news-prev i,
.news-next i {
  color: var(--primary);
}

/* Brand List Section */
/* 컨테이너 */
.brand-list-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* 카테고리 */
.brand-categories {
  flex: 0 0 160px;
}
.brand-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.brand-categories li {
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.brand-categories li.active,
.brand-categories li:hover {
  background: var(--primary);
  color: #fff;
}

/* 브랜드 카드 그리드 (모바일 & 태블릿 기본) */
.brand-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.brand-item {
  display: flex;
  flex-direction: column; /* 이미지 위, 텍스트 아래 */
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}
.brand-item:hover {
  transform: translateY(-4px);
}

.brand-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f0f0f0;
}
.brand-item .brand-info {
  padding: 12px;
}
.brand-item h4 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 16px;
}
.brand-item p {
  margin: 0;
  font-size: 14px;
  color: #555;
}

/* Mobile Specific Overrides */
@media (max-width: 768px) {
  .brand-list-container {
    flex-direction: column;
  }
  .brand-categories {
    order: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding-bottom: 4px;
  }
  .brand-categories::-webkit-scrollbar {
    height: 10px;
  }
  .brand-categories::-webkit-scrollbar-track {
    margin-top: 2px;
  }
  .brand-categories ul {
    display: inline-flex;
    gap: 8px;
    white-space: nowrap;
  }
  .brand-categories li {
    flex: 0 0 auto;
  }

  .brand-list {
    order: 2;
    display: block;     /* 모바일은 블록 레이아웃 */
    margin-top: -100px;      /* 기존 -100px 제거 */
  }
  .brand-item {
    display: block ;
    margin-top: 15px;
    
  }
  .brand-item img {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
    flex-direction:column ;
  }
  .brand-item .brand-info {
    padding: 0 12px 20px;
  }
  .brand-info{
    width: 100%;
  }
}

/* Desktop Overrides */
@media (min-width: 769px) {
  .brand-list {
    display: block ;
    height: 600px;
    overflow-y: auto;
    padding-right: 10px;
    gap: 0px;
  }
  .brand-list::-webkit-scrollbar {
    width: 6px;
  }
  .brand-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
  .brand-item {
    flex-direction: row;      /* 이미지 왼쪽, 텍스트 오른쪽 */
    align-items: center;
    gap: 16px;
    margin-top: 20px;
  }
  .brand-item img {
    flex: 0 0 200px;
    height: 140px;
    width: 300px;
    object-fit: cover;
  }
  .brand-item .brand-info {
    flex: 1;
    padding: 16px;
  }
}

/* Contact */
.contact-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.contact-info {
  flex: 1;
  min-width: 280px;
}
.contact-logo {
  width: 120px;
  margin-bottom: 20px;
}
.contact-form {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form select,
.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: #002147;
  color: #fff;
  padding: 40px 20px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}
.footer-col {
  flex: 1;
  min-width: 200px;
}
.footer-col h4 {
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.partners-marquee {
  overflow: hidden;
  background: #fff;
  padding: 40px 0;
}

.marquee-row {
  display: flex;
  width: 200%;           /* 두 개의 .marquee-content 합쳐서 */
}

.marquee-content {
  display: flex;
  gap: 100px;
  flex: none;
  margin: 40px 0;
}

.marquee-content img {
  width: 150px;
  height: 80px;
  object-fit: contain;
}

/* 위줄: 왼쪽으로 */
.marquee-row--left {
  animation: marquee-left 20s linear infinite;
}

/* 아래줄: 오른쪽으로 (속도차 +1s) */
.marquee-row--right {
  margin-top: 24px;
  animation: marquee-right 21s linear infinite;
}

/* 애니메이션 키프레임 */
@keyframes marquee-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* 반응형: 모바일에서는 이미지 크기 줄임 */
@media (max-width: 768px) {
  .marquee-content img {
    width: 160px;
    height: 100px;
  }
}
/* Mobile Header/Nav */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
  }
  .main-nav.active {
    display: flex;
  }
  .hamburger {
    display: block;
  }
  .inner {
    padding: 40px 20px;
  }
  .hero-content h1 {
    font-size: 40px;
  }
}
@media (max-width: 768px) {
  /* 1) 리뷰해 놓은 전체 숨김 셀렉터에서 .news-track 은 빼거나 덮어쓰기 */
  html, body {
    overflow-x: hidden;
  }
  .inner,
  .header-inner,
  .hero,
  /* .news-track,  ← 여긴 제거 */
  .brand-list-container {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* 2) .news-track 만 다시 스크롤 허용 */
  .news-track {
    overflow-x: auto !important;
  }
}
@media (max-width: 768px) {
 .footer-grid{
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
 }
 .footer-grid ul{
  margin:0;
  padding:0;
  justify-content: center;
  align-items: center;
  text-align: center;
 }
 .footer-col a, p {
  color:#b3b3b3;
 }
}