/* =====================
   HERO SLIDER
===================== */
.hero-section {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--color-primary-dark);
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* 히어로1·2: 데스크톱에서 배경이 과하게 크게 보이지 않도록 축소 (모바일 히어로1 규칙은 하단 미디어쿼리 참고) */
@media (min-width: 769px) {
  .hero-slide.hero-slide--mobile-contain {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: var(--color-primary-dark);
  }

  .hero-slide.hero-slide--desktop-contain {
    background-size: contain;
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: var(--color-primary-dark);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 50, 0.78) 0%, rgba(10, 20, 50, 0.35) 55%, rgba(10, 20, 50, 0.55) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.hero-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: rgba(90, 158, 47, 0.85);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.hero-content h1 span {
  color: #7dc8ff;
}

.hero-desc {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 480px;
}

.hero-btn {
  font-size: var(--font-size-base);
}

/* Navigation */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: var(--space-6);
}

.hero-next {
  right: var(--space-6);
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.hero-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* =====================
   CATEGORY SECTION
===================== */
.category-section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-4px);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: rgba(26, 58, 107, 0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.category-icon svg {
  width: 26px;
  height: 26px;
}

.category-card h2 {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.category-card p {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
  flex: 1;
}

.category-arrow {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition);
}

.category-card:hover .category-arrow {
  transform: translateX(4px);
}

/* =====================
   PRODUCTS HIGHLIGHT
===================== */
.products-highlight .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.products-highlight .section-title {
  margin-bottom: 0;
}

.products-highlight .section-title::after {
  margin-top: var(--space-2);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* ── 홈 제품 카드 (products.css 없이도 동작) ── */
.products-highlight .product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.products-highlight .product-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-4px);
}

.products-highlight .product-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-bg);
  overflow: hidden;
}

.products-highlight .product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.products-highlight .product-card-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-highlight .product-card-body {
  padding: var(--space-3) var(--space-4);
}

.products-highlight .product-card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.products-highlight .product-card-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  white-space: pre-line;
}

/* =====================
   ABOUT STRIP
===================== */
.about-strip {
  background: var(--color-primary);
  padding: var(--space-16) 0;
}

.about-strip-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-12);
  align-items: center;
}

.about-strip-text h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  line-height: 1.3;
}

.about-strip-text p {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-bottom: var(--space-6);
  max-width: 560px;
}

.about-strip .btn-outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.about-strip .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-white);
}

.about-strip-badges {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.cert-large-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
}

/* =====================
   NOTICES SECTION
===================== */
.notices-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.notices-section .section-title {
  margin-bottom: 0;
}

.notices-section .section-title::after {
  margin-top: var(--space-2);
}

.notices-list {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--color-primary);
}

.notice-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
  cursor: pointer;
}

.notice-item:hover .notice-title {
  color: var(--color-primary);
}

.notice-title {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.notice-placeholder {
  padding: var(--space-10) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1024px) {
  .category-section {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {

  /* absolute 슬라이드 자식 때문에 부모 높이는 반드시 지정 */
  .hero-section {
    height: min(72vh, 560px);
    min-height: 400px;
    max-height: 640px;
  }

  .hero-slide {
    background-position: center center;
  }

  /* 히어로1: 모바일에서 cover 크롭 완화 — 전체 이미지가 보이도록 */
  .hero-slide.hero-slide--mobile-contain {
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--color-primary-dark);
    background-position: center center;
  }

  /* 모바일: 이미지 위 텍스트 대비 강화 */
  .hero-overlay {
    background: linear-gradient(180deg,
        rgba(10, 20, 50, 0.45) 0%,
        rgba(10, 20, 50, 0.72) 45%,
        rgba(10, 20, 50, 0.88) 100%);
  }

  .hero-content {
    padding-top: var(--space-10);
    padding-bottom: calc(var(--space-10) + env(safe-area-inset-bottom, 0));
  }

  .hero-content h1 {
    font-size: 1.75rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  }

  .hero-desc {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  }

  .hero-nav {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-strip-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-strip-badges {
    justify-content: center;
  }

  /* 카테고리 바로가기: 세로 공간 축소 */
  .category-section {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }

  .category-grid {
    gap: var(--space-2);
  }

  .category-card {
    padding: var(--space-4) var(--space-3);
  }

  .category-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-2);
  }

  .category-icon svg {
    width: 22px;
    height: 22px;
  }

  .category-card h2 {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .category-card p {
    font-size: 11px;
    line-height: 1.35;
  }

  .category-arrow {
    margin-top: var(--space-1);
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .category-section {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .category-card {
    padding: var(--space-3) var(--space-2);
    border-radius: var(--radius-md);
  }

  .category-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-1);
  }

  .category-icon svg {
    width: 20px;
    height: 20px;
  }

  .category-arrow {
    display: none;
  }

  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
}