/* ===================================
   신진엔지니어링 홈페이지 공통 스타일
   =================================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0B3D91;
  --primary-dark: #062a66;
  --primary-light: #1565C0;
  --accent: #00ACC1;
  --accent-light: #4DD0E1;
  --text: #333333;
  --text-light: #666666;
  --bg: #FFFFFF;
  --bg-light: #F5F7FA;
  --bg-dark: #0a1628;
  --border: #E0E0E0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

ul { list-style: none; }

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

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: var(--transition);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
}

.logo-img {
  height: 68px;
  width: auto;
  object-fit: contain;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(11,61,145,0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  padding-top: 80px;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(10,22,40,0.75) 0%, rgba(11,61,145,0.7) 50%, rgba(21,101,192,0.65) 100%),
              url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0,172,193,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  color: white;
  padding: 60px 0;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Water animation in hero */
.water-pattern {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  opacity: 0.08;
}

.water-pattern svg {
  width: 100%;
  height: 100%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.btn-blue {
  background: var(--primary);
  color: white;
}

.btn-blue:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(11,61,145,0.3);
}

/* ===== Page Header (서브페이지) ===== */
.page-header {
  padding-top: 80px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
  color: white;
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  padding-top: 60px;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.8;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.breadcrumb a:hover {
  opacity: 1;
}

/* ===== Section ===== */
.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title .label {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Service Cards ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(11,61,145,0.08), rgba(0,172,193,0.08));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Stats ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 50px 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-number span {
  font-size: 1.4rem;
  font-weight: 600;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== About Content ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-image {
  border-radius: 16px;
  min-height: 350px;
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  min-height: 350px;
}

.about-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(11,61,145,0.92));
  padding: 32px;
  color: white;
  border-radius: 0 0 16px 16px;
}

.about-image h4 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.about-image p {
  opacity: 0.9;
  line-height: 1.8;
}

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.value-card {
  text-align: center;
  padding: 32px 24px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.value-card .icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
  font-size: 1.4rem;
}

.value-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.value-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== Timeline ===== */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-left: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item .year {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== Service Detail ===== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
  padding: 40px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(11,61,145,0.1), rgba(0,172,193,0.1));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.service-detail h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.service-detail p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.service-detail ul {
  padding-left: 0;
}

.service-detail ul li {
  padding: 6px 0;
  color: var(--text-light);
  position: relative;
  padding-left: 20px;
}

.service-detail ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.service-visual {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  padding: 40px;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.contact-info-card .icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.contact-info-card h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.contact-info-card p {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.contact-form {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,61,145,0.1);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Map placeholder */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 48px;
  background: var(--bg-light);
  min-height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.7;
}

.footer h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-light);
}

.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-contact-item strong {
  min-width: 40px;
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 100px 24px 24px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    min-height: auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid,
  .service-detail {
    grid-template-columns: 1fr;
  }

  .service-detail:nth-child(even) {
    direction: ltr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 60px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 왼쪽에서 슬라이드 */
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 오른쪽에서 슬라이드 */
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 스케일 업 */
.fade-in-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* 딜레이 클래스 (카드 순차 등장) */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* 모션 감소 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-left, .fade-in-right, .fade-in-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
