/* =============================
   기본 설정
============================= */
body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #fff;
  color: #222;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* =============================
   헤더 / 로고 / 네비게이션
============================= */
.header {
  background-color: #000;
  color: #fff;
  padding: 20px 0;
}

.logo {
  font-size: 34px;
  margin: 0;
  margin-bottom: 44px;
  text-align: center;
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 80px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 22px;
  transition: all 0.3s ease;
}

.nav a:hover {
  text-decoration: underline;
  color: #00c853;
}

/* =============================
   히어로(첫 랜딩) 영역
============================= */
.hero {
  background: url('images/hero.jpg') no-repeat center center/cover;
  color: #fff;
  text-align: center;
  padding: 80px 20px 20px;
  position: relative;
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* 버튼 */
.btn {
  background-color: #00c853;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: #009624;
}

.btn-secondary {
  background-color: #555;
  color: #fff;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background-color: #333;
}

/* =============================
   일반 섹션
============================= */
.section {
  padding: 60px 20px; /* 기본 간격 */
}

#about {
  padding-top: 40px; /* ✅ 회사소개는 위쪽 간격 줄이기 */
  margin-top: 0;
}

.bg-light {
  background-color: #f9f9f9;
  padding: 80px 20px; /* 여백 넉넉히 */
}

h3 {
  font-size: 32px;
  margin-bottom: 20px;
}

/* =============================
   카드 / 그리드
============================= */
.grid {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.card {
  flex: 1;
  background: #fff;
  padding: 20px;
  border: 1px solid #ddd;
}

/* =============================
   뉴스 리스트
============================= */
.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  margin-bottom: 10px;
}

/* =============================
   폼
============================= */
form input,
form textarea {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  font-size: 16px;
}

form button {
  background-color: #00c853;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background-color: #009624;
}

/* =============================
   푸터
============================= */
.footer {
  background-color: #222;
  color: #aaa;
  text-align: center;
  padding: 20px;
}

/* =============================
   두 줄 자동 스크롤 제품 슬라이더
============================= */
.product-slider {
  background: #fff;
  padding: 40px 0 0;
  margin-top: 0;
}

.slider-row {
  overflow: hidden;
  white-space: nowrap;
}

.slider-track {
  display: inline-flex;
}

.product-card {
  flex: 0 0 auto;
  margin: 0 15px;
}

/* 윗줄 */
.row-top {
  margin-bottom: 30px;
}

/* 아랫줄 */
.row-bottom {
  margin-top: 0;
}

.product-card img {
  width: 225px;
  height: 225px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.product-card img:hover {
  transform: scale(1.1);
}

/* 애니메이션 */
.row-top .slider-track {
  animation: scroll-left 100s ease-in-out infinite;
}

@keyframes scroll-left {
  0%, 3%   { transform: translateX(0); }        /* 시작 잠깐 멈춤 */
  45%      { transform: translateX(-25%); }     /* 이동 */
  48%      { transform: translateX(-25%); }     /* 짧게 멈춤 */
  90%      { transform: translateX(-50%); }     /* 이동 */
  93%      { transform: translateX(-50%); }     /* 짧게 멈춤 */
  100%     { transform: translateX(-50%); }     /* 대기 */
}

.row-bottom .slider-track {
  animation: scroll-right 105s ease-in-out infinite;
}

@keyframes scroll-right {
  0%, 3%   { transform: translateX(-50%); }     /* 시작 잠깐 멈춤 */
  45%      { transform: translateX(-25%); }     /* 이동 */
  48%      { transform: translateX(-25%); }     /* 짧게 멈춤 */
  90%      { transform: translateX(0); }        /* 이동 */
  93%      { transform: translateX(0); }        /* 짧게 멈춤 */
  100%     { transform: translateX(0); }        /* 대기 */
}

/* hover 시 애니메이션 일시정지 */
.slider-row:hover .slider-track {
  animation-play-state: paused;
}

/* =============================
   인트로 배너
============================= */
.intro-banner {
  background: #f9f9f9;
  padding: 60px 20px;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* 텍스트 */
.intro-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
}

.intro-title {
  white-space: nowrap;      /* 공백으로는 줄바꿈 X, <br>는 유효 */
  overflow-wrap: normal;    /* anywhere 무효화 */
  word-break: normal;       /* keep-all/anywhere 영향 제거 */
  font-size: 36px;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
  line-height: 0.9; 
}

.intro-subtitle {
  font-size: 22px;
  font-weight: 600;
  color: #00c853;
  margin-bottom: 20px;
}

.intro-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

/* PC 화면 */
@media (min-width: 992px) {
  .intro-content {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: left;
  }

  .intro-text {
    justify-content: center;
    align-items: flex-start;
    max-width: 500px;
    margin-left: 40px;

    position: relative;
    top: -15px;
  }

  .intro-title {
    font-size: 54px;
    line-height: 1.05; 
  }
  .intro-subtitle {
    font-size: 33px;
  }
  .intro-description {
    font-size: 24px;
  }
}

/* =============================
   인트로 영상
============================= */
.intro-video {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  object-fit: cover;
}

/* =============================
   회사 소개
============================= */
.about-content {
  display: flex;
  flex-direction: column; /* 모바일 기본: 세로 */
  align-items: center;
  gap: 20px;
  text-align: left; /* 문구 왼쪽 정렬 */
}

.about-text {
  max-width: 500px; /* ✅ 본문이 너무 퍼지지 않게 폭 제한 */
  text-align: left; /* 왼쪽 정렬 */
  line-height: 1.8;
}

.about-text h3 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #222;
}

.about-text p {
  font-size: 18px;
  line-height: 1.8;
  color: #444;
}

.about-image img {
  max-width: 500px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* PC 화면에서 가로 배치 */
@media (min-width: 992px) {
  .about-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .about-text {
    flex: 1;
  }

  .about-image {
    flex: 1;
    text-align: right; /* 이미지 오른쪽 배치 */
  }
}

/* =============================
   서비스
============================= */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.service-card {
  flex: 1 1 calc(33.333% - 30px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.service-card h4 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #222;
}

.service-card p {
  font-size: 16px;
  color: #555;
}

/* ✅ 회사소개 풀 배경 */
.about-section.bg-image {
  position: relative;
  background: url('images/company-bg.jpg') no-repeat center center/cover;
  padding: 70px 200px;
  display: flex;
  justify-content: center;   /* 중앙 배치 */
  align-items: center;       /* 세로 중앙 */
  min-height: 70vh;
}

.about-text-box h3,
.about-text-box p {
  margin-top: 5px; /* 조금씩 줄여서 글씨만 위로 */
}

.about-text-box strong {
  color: #00c853;  /* ✅ 인트로 배너와 같은 초록색 */
  font-weight: bold;
}

.about-text-box {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 세로 중앙 */
  align-items: flex-start;   /* 왼쪽 정렬 */
  transform: translateY(10px); /* ✅ 원하는 만큼 위로 */
  
  max-width: 600px;
  height: 50%;              /* 부모 높이에 맞추기 */
  margin: 0 auto;
  margin-left: 150px;        /* 오른쪽 이동 */
  background: #fff;
  padding: 60px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.about-text-box p {
  font-size: 16px;   /* 본문 글씨 크기 */
  line-height: 1.8;  /* 줄 간격 */
}

.about-text {
  max-width: 600px;
  font-size: 18px;
  line-height: 1.8;
  color: #444;
  text-align: left;
  margin-bottom: 30px;
}

/* 줄바꿈 방지 */
.nowrap {
  white-space: nowrap;
}

/* 오른쪽 카드 2x2 */
.about-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card-item {
  width: 200px;   /* 가로 크기 */
  height: 220px;  /* 세로 크기 */
  background: #fff;
  padding: 20px;  /* 내부 여백 */
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.card-item img {
  width: 70px;
  height: 70px;
  margin-top: 20px;   /* ✅ 아이콘을 아래로 내림 */
  margin-bottom: -10px; /* ✅ 텍스트와의 간격도 유지 */
}

.card-item h4 {
  font-size: 22px;
  margin-bottom: 8px;
  color: #222;
}

.card-item p {
  font-size: 16px;
  color: #555;
  line-height: 1.5;
}

.card-item:nth-child(1) {
  margin-top: 25px; /* 아래로 내리기 */
  margin-left: 80px; /* 오른쪽으로 이동 */
}

.card-item:nth-child(2) {
  margin-top: 25px; /* 아래로 내리기 */
  margin-left: -10px; /* 오른쪽으로 이동 */
}

.card-item:nth-child(3) {
  margin-top: 45px; /* 아래로 내리기 */
  margin-left: 80px; /* 오른쪽으로 이동 */
}

.card-item:nth-child(4) {
  margin-top: 45px; /* 아래로 내리기 */
  margin-left: -10px; /* 오른쪽으로 이동 */
}

.card-item:hover h4 {
  color: #00c853; /* 녹색으로 강조 */
}

/* ✅ 제품 및 서비스 풀 배경 */
/* 2x2 그리드 */
.services-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* =============================
   제품 및 서비스 - 개별 제목 스타일
============================= */
.service-card-content h4.megaracer-title {
  text-indent: -12px;       /* 첫 줄만 살짝 당김 (보정용) */
  padding-left: 12px;      /* 전체 들여쓰기 */
  line-height: 1.3;        /* 줄간격 약간 조정 */
}

/* ✅ 카드 전체 hover 시 소제목 색상 변경 */
.service-card-2x2:hover .service-card-content h4,
.service-card:hover h4 {
  color: #00c853 !important;
}

/* 카드 공통 스타일 */
.service-card {
  display: flex;                /* 가로 배치 */
  align-items: flex-start;       /* 위쪽 맞춤 */
  gap: 20px;                     /* 이미지와 텍스트 사이 간격 */
  text-align: left;              /* 텍스트 왼쪽 정렬 */
  padding: 20px 30px;            /* ✅ 좌우 여백 줄이기 */
  min-height: 280px;             /* ✅ 카드 높이 조금 키움 */
  justify-content: flex-start;   /* 전체를 왼쪽 정렬 */
}

.service-card img {
  width: 282px;                  /* ✅ 적당한 크기 (320 → 280) */
  height: 383px;
  margin-top: 14px;          /* 이미지 조금 아래로 */
  margin-left: 0;                /* 왼쪽 여백 제거 */
  object-fit: contain;             /* ✅ 꽉 차게 보여주기 */
  flex-shrink: 0;                /* 이미지 크기 고정 */
  border-radius: 12px;            /* ✅ 이미지 모서리 살짝 라운드 */
}

.service-card-content {
  flex: 1;                            /* ✅ 텍스트 영역이 남은 공간 차지 */
  text-align: left;
  margin: 0;                     /* 불필요한 여백 제거 */
  display: flex;
  flex-direction: column;
  margin-top: 20px;             /* 텍스트 조금 위로 */
  justify-content: center;       /* ✅ 텍스트를 카드 세로 중앙 배치 */
}

.service-card-content h4 {
  font-size: 24px;   /* 제목 크기 */
  font-weight: 700;
  margin: 0 0 12px;
  color: #222;
  transition: color 0.3s ease; /* ✅ 부드러운 색상 전환 */
}

.service-card-content ul {
  list-style: none;   /* ✅ 기본 불릿 제거 */
  padding-left: 0;    /* 기본 여백 제거 */
  margin: 0;
}

.service-card-content li {
  margin-bottom: 16px;   /* 항목 간격 */
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  position: relative;
  padding-left: 1em;     /* 기호와 본문 간격 */
}

.service-card-content li::before {
  content: "ㆍ";          /* ✅ 목록 기호 */
  position: absolute;
  left: 0;               /* 소제목과 같은 라인 */
  font-weight: bold;
}

#services.section {
  padding-top: 20px;   /* 기존보다 줄임 (예: 60px → 20px) */
}

/* 포트폴리오 섹션 */
.portfolio-banner {
  background: #fff;
  padding: 15px 20px;
}

.portfolio-banner .container {
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-banner h3 {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  text-align: left;   /* ✅ 왼쪽 정렬 */
}

.portfolio-video {
  display: flex;
  justify-content: center; /* ✅ 영상은 가운데 유지 */
}

.portfolio-video iframe {
  width: 100%;
  max-width: 1000px;
  height: 480px;
  border: none;
  border-radius: 12px;
}

/* 문의하기 레이아웃 */
.contact-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-form, .contact-info {
  flex: 1;
  min-width: 300px;
}

/* 폼 스타일 */
.contact-form form input,
.contact-form form textarea {
  width: 95%;
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.contact-form form button {
  background: #00c853;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form form button:hover {
  background: #009624;
}

/* 연락처 정보 */
.contact-info h4 {
  margin-bottom: 15px;
  font-size: 32px;
  color: #222;
}

.contact-info p {
  margin: 8px 0;
  font-size: 18px;
  color: #555;
}

.contact-logo {
  margin-top: 30px;       /* 주소와 로고 사이 간격 */
  text-align: left;       /* 왼쪽 정렬 (필요시 center로 변경) */
}

.contact-logo img {
  max-width: 180px;       /* 로고 크기 제한 */
  height: auto;
}

/* style.css 맨 위나 맨 아래 */
html {
  scroll-behavior: smooth;
}

.lang-switch {
  position: absolute;
  top: 20px;
  right: 20px;   /* ✅ 항상 오른쪽 상단 */
  font-size: 14px;
}

.lang-switch a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
  font-weight: bold;
}

.lang-switch a:hover {
  text-decoration: underline;
  color: #00c853;
}

/* =============================
   About (EN) — match KR sizing/position
   html lang="en" 에만 적용
============================= */
html[lang="en"] .about-section.bg-image {
  /* 한글과 유사한 여백 */
  padding: 70px 200px;
}

html[lang="en"] .about-text-box {
  max-width: 640px;          /* 600 → 640: 문단 줄바꿈 패턴이 KR과 비슷해짐 */
  padding: 56px 60px;        /* 박스 내부 여백을 KR처럼 넉넉하게 */
  margin-left: 150px;        /* 위치를 KR 박스와 일치 */
  transform: translateY(10px);
}

html[lang="en"] .about-text-box h3 {
  font-size: 44px;           /* KR의 제목 크기와 유사 */
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 26px;
  line-height: 1.25;
}

html[lang="en"] .about-text-box p {
  font-size: 18px;           /* 본문 크기 동일화 */
  line-height: 1.85;         /* 문장 간격 KR 느낌으로 */
  margin: 22px 0;
}

/* =============================
   About > 2x2 카드 (영문 전용)
   html[lang="en"]에만 적용되므로 한글엔 영향 X
============================= */
html[lang="en"] .about-cards .card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;   /* 아이콘을 위쪽 기준으로 */
  text-align: center;
  height: 220px;                 /* KR과 동일한 높이 유지 */
  padding: 20px;
}

html[lang="en"] .services-grid-2x2 .service-card img {
  object-fit: cover;   /* contain → cover */
}

html[lang="en"] .about-cards .card-item img {
  width: 70px;
  height: 70px;
  margin: 20px 0 6px;            /* 아이콘 위치를 KR과 유사하게 */
  display: block;
}

html[lang="en"] .about-cards .card-item h4 {
  font-size: 20px;               /* EN 제목 살짝 축소 → 줄수 안정화 */
  line-height: 1.25;
  margin: 8px 0 6px;
  min-height: 48px;              /* 1~2줄 모두 같은 높이로 정렬 */
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.2px;
}

html[lang="en"] .about-cards .card-item p {
  font-size: 15px;               /* 본문도 살짝 축소 */
  line-height: 1.5;
  margin: 0;
  padding: 0 6px;
  min-height: 54px;              /* 문단 길이 차이가 있어도 카드 하단 정렬 유지 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* EN 전용: 카드 그리드를 왼쪽으로 이동 */
html[lang="en"] .about-cards {
  gap: 20px 58px;         /* = row-gap 20px, column-gap 48px */
  margin-left: -20px;          /* 필요에 따라 -20 ~ -80px 정도로 조절 */
  /* 또는 transform 사용 */
  /* transform: translateX(-40px); */
}

html[lang="en"] .about-cards { row-gap: 1px; }

/* (선택) 긴 단어 줄바꿈 안정화 */
html[lang="en"] .about-cards .card-item h4,
html[lang="en"] .about-cards .card-item p {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 제품·서비스 카드 이미지 – EN 전용 라운드 */
html[lang="en"] .service-card img {
  border-radius: 12px;           /* 한국어와 동일 값 */
  display: block;
  clip-path: inset(0 round 12px); /* 브라우저별 확실한 클리핑(선택) */
}

/* =============================
   Contact Section (영문 전용)
============================= */
html[lang="en"] .contact-container {
  display: flex;
  align-items: flex-start;   /* ✅ 좌우 그룹을 위쪽 기준으로 정렬 */
  gap: 40px;
  flex-wrap: wrap;
}

/* 필요시 오른쪽만 살짝 더 올리고 싶을 때 (선택) */
html[lang="en"] .contact-info {
  margin-top: -10px;  /* 값은 -5~-15px 정도로 조절 */
}


