:root {
  --primary-color: #0A2647;
  /* Deep Blue - 신뢰감 */
  --secondary-color: #144272;
  /* Lighter Blue */
  --accent-color: #FF8C00;
  /* Dark Orange - 활기 */
  --text-color: #333333;
  --bg-color: #FFFFFF;
  --light-bg: #F5F7FA;
  --footer-bg: #1A1A1A;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 80px;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
}

nav ul {
  display: flex;
  gap: 40px;
}

nav ul li a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
  padding: 10px 0;
  transition: var(--transition);
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--accent-color);
}

nav ul li a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 10px 24px;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 38, 71, 0.3);
}

/* Hero Section */
.hero {
  height: 80vh;
  min-height: 600px;
  background: linear-gradient(rgba(15, 30, 50, 0.85), rgba(15, 30, 50, 0.85)), url('/factory-intro.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center horizontally */
  color: white;
  margin-top: 80px;
  text-align: center;
  /* Center text */
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 25px;
  word-break: keep-all;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
  word-break: keep-all;
}

/* Sections */
section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-title p {
  color: #666;
  font-size: 1.1rem;
}

/* Catalog Preview Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 250px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.product-info .price {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 40px;
}

footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}

footer h4 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

footer ul li {
  margin-bottom: 12px;
}

footer ul li a:hover {
  color: white;
}

.copyright {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 60px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Carousel */
.carousel-button:hover {
  background: rgba(0, 0, 0, 0.8) !important;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Mobile Navigation & Responsive Styles */

/* Base Logic for Desktop/Mobile */
.mobile-menu-btn {
  display: none;
  /* Hidden on desktop */
}

.mobile-nav {
  display: none;
  /* Hidden by default */
}

/* Tablet & Mobile Styles (Max-width: 768px) */
@media (max-width: 768px) {

  /* Header Adjustments */
  header {
    height: 60px;
  }

  header .container {
    justify-content: space-between;
    padding: 0 15px;
  }

  .logo img {
    height: 30px !important;
  }

  /* Hide Desktop Elements */
  .desktop-nav,
  .desktop-only {
    display: none !important;
  }

  /* Hamburger Button */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    /* Above overlay */
  }

  .mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
  }

  /* Hamburger Animation when Active */
  .mobile-menu-btn.active span:first-child {
    transform: rotate(45deg);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg);
  }

  /* Mobile Nav Overlay */
  .mobile-nav {
    display: none;
    /* Hidden until toggled */
    position: fixed;
    top: 60px;
    /* Below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: white;
    padding: 40px 20px;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    z-index: 1050;
    overflow-y: auto;
  }

  .mobile-nav.active {
    display: flex;
  }

  .mobile-nav ul {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .mobile-nav ul li a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    padding: 10px;
  }

  /* Phase 2: Hero Section Mobile */
  .hero {
    margin-top: 60px;
    height: auto;
    min-height: 500px;
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* Phase 2: Footer Mobile */
  footer .container {
    grid-template-columns: 1fr;
    /* Stack vertically */
    text-align: center;
    gap: 40px;
  }

  .copyright {
    padding-top: 30px;
    margin-top: 30px;
  }

  /* Phase 3: Horizontal Scroll for Grids */
  .product-grid,
  #portfolio .container>div:nth-child(2) {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 20px;
    /* Space for scrollbar */
    -webkit-overflow-scrolling: touch;
  }

  .product-card,
  #portfolio .container>div:nth-child(2)>div {
    min-width: 280px;
    /* Card width */
    scroll-snap-align: center;
    /* Center snap */
    margin-bottom: 0;
    /* Override default */
  }

  /* Ensure images in grid fill the card */
  .product-card img,
  #portfolio .container>div:nth-child(2)>div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Hide scrollbar for cleaner look (optional) */
  .product-grid::-webkit-scrollbar,
  #portfolio .container>div:nth-child(2)::-webkit-scrollbar {
    display: none;
  }
}