/* ============================================================
   RION CONSTRUCTION - Main Stylesheet
   Color Palette:
     Primary Blue:    #1a6fd4 / #2563eb
     Dark Charcoal:   #1c2333
     Silver:          #8fa3b8
     White:           #ffffff
     Light BG:        #f5f7fa
   ============================================================ */

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

:root {
  --blue:       #2563eb;
  --blue-dark:  #1a4fbf;
  --blue-light: #3b82f6;
  --charcoal:   #1c2333;
  --charcoal2:  #2d3a4e;
  --silver:     #8fa3b8;
  --white:      #ffffff;
  --bg-light:   #f5f7fa;
  --bg-dark:    #111827;
  --text-main:  #1c2333;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.14);
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-main);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  /* 한국어 단어 단위 줄바꿈 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ---------- Section Base ---------- */
.section { padding: 100px 0; }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-badge {
  display: inline-block;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(37,99,235,0.08);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  /* 터치 최소 영역 */
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn-full { width: 100%; justify-content: center; }

/* ---------- HEADER / NAVBAR ---------- */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
#header.scrolled {
  background: rgba(17,24,39,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(37,99,235,0.4));
}
.logo-text {
  font-family: 'Barlow', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.nav-contact-btn {
  background: var(--blue);
  color: var(--white) !important;
  border-radius: 8px;
  padding: 8px 20px !important;
}
.nav-contact-btn:hover {
  background: var(--blue-dark) !important;
}
/* 현재 섹션 active 표시 */
.nav-link.active {
  color: var(--white) !important;
  background: rgba(255,255,255,0.12);
}
.nav-contact-btn.active {
  background: var(--blue-dark) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 8px 10px;
  /* 터치 최소 영역 44px 보장 */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }

/* ---------- HERO ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0a0f1e;
}

/* Real photo background */
.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('/static/hero-bg.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease;
  will-change: transform;
}
.hero-section:hover .hero-bg-image {
  transform: scale(1.0);
}

/* Ken Burns subtle zoom on load */
@keyframes kenBurns {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1.0); }
}
.hero-bg-image {
  animation: kenBurns 10s ease forwards;
}

/* Dark overlay: darker at bottom for text legibility */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(5,10,25,0.82) 0%, rgba(5,10,25,0.55) 60%, rgba(5,10,25,0.3) 100%),
    linear-gradient(to top, rgba(5,10,25,0.6) 0%, transparent 50%);
}
/* 모바일: 중앙 정렬이므로 전체 균등 어둡게 */
@media (max-width: 768px) {
  .hero-bg-overlay {
    background: rgba(5,10,25,0.62);
  }
}

/* grid line texture on top */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, black, transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  width: 100%;
}

/* Photo credit strip */
.hero-section .hero-photo-credit {
  position: absolute;
  bottom: 60px;
  right: 24px;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-light);
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero-accent {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,0.7);
  margin-bottom: 48px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-number {
  font-family: 'Barlow', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  margin: 0 24px;
}

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

.hero-scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 2;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---------- ABOUT ---------- */
.about-section { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-intro h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 16px;
}
.about-intro p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.8;
}

.company-info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: transform var(--transition);
}
.info-item:hover { transform: translateX(4px); }

.info-icon {
  font-size: 18px;
  color: var(--blue);
  width: 40px;
  height: 40px;
  background: rgba(37,99,235,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.info-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}

/* Vision Card */
.vision-card {
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal2));
  color: var(--white);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}
.vision-icon {
  width: 64px;
  height: 64px;
  background: rgba(37,99,235,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: var(--blue-light);
}
.vision-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.vision-card p { color: rgba(255,255,255,0.75); line-height: 1.8; font-size: 15px; }

/* Org Chart */
.org-chart {
  background: var(--bg-light);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
}
.org-chart h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--charcoal);
}
.org-top, .org-mid, .org-bottom {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}
.org-box {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}
.org-box.ceo  { background: var(--blue); color: var(--white); }
.org-box.cto  { background: var(--charcoal); color: var(--white); }
.org-box.audit { background: var(--charcoal2); color: var(--white); }
.org-box.dept { background: var(--white); color: var(--charcoal); border: 1px solid var(--border); font-size: 12px; }

/* ---------- BUSINESS ---------- */
.business-section { background: var(--bg-dark); }
.business-section .section-badge { color: #60a5fa; background: rgba(59,130,246,0.15); }
.business-section .section-title { color: var(--white); }
.business-section .section-subtitle { color: rgba(255,255,255,0.6); }

.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.business-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.business-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transform: scaleX(0);
  transition: transform var(--transition);
}
.business-card:hover::before { transform: scaleX(1); }
.business-card:hover {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.business-card-accent {
  background: rgba(37,99,235,0.1);
  border-color: rgba(37,99,235,0.3);
}
.business-card-accent::before { transform: scaleX(1); }

.business-icon {
  width: 60px;
  height: 60px;
  background: rgba(37,99,235,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--blue-light);
  margin-bottom: 12px;
}
.business-number {
  font-family: 'Barlow', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: rgba(255,255,255,0.05);
  line-height: 1;
  margin-bottom: 8px;
}
.business-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.4;
}
.business-card p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.business-list { display: flex; flex-direction: column; gap: 8px; }
.business-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.business-list li i { color: var(--blue-light); font-size: 12px; }

/* License Section */
.license-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}
.license-section h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 28px;
}
.license-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.license-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.25);
  padding: 12px 24px;
  border-radius: 100px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.license-item:hover {
  background: rgba(37,99,235,0.2);
  border-color: var(--blue);
}
.license-item i { color: var(--blue-light); }

/* ---------- PROJECTS ---------- */
.projects-section { background: var(--bg-light); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  border: 1px solid var(--border);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-ongoing {
  border-color: rgba(37,99,235,0.2);
  background: linear-gradient(135deg, #fff 0%, rgba(37,99,235,0.02) 100%);
}

.project-status {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}
.project-status.done    { background: #e8f5e9; color: #2e7d32; }
.project-status.ongoing { background: rgba(37,99,235,0.1); color: var(--blue); }

.project-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--blue);
  margin-bottom: 20px;
}
.project-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 16px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.project-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-client, .project-type {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-client i, .project-type i { color: var(--blue); font-size: 11px; }
.project-location, .project-year {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-location i, .project-year i { color: var(--blue); font-size: 11px; }
.project-desc {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---------- SAFETY ---------- */
.safety-section { background: var(--white); }

.safety-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 0;
}
.safety-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  background: var(--bg-light);
}
.safety-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow);
  transform: translateY(-4px);
}
.safety-icon {
  width: 64px;
  height: 64px;
  background: rgba(37,99,235,0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: var(--blue);
  transition: all var(--transition);
}
.safety-card:hover .safety-icon {
  background: var(--blue);
  color: var(--white);
}
.safety-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.safety-card p { font-size: 14px; color: var(--text-muted); line-height: 1.8; }

/* Tech Team - removed */

/* ---------- CONTACT ---------- */
.contact-section { background: var(--charcoal); }
.contact-section .section-badge { color: #60a5fa; background: rgba(59,130,246,0.15); }
.contact-section .section-title { color: var(--white); }
.contact-section .section-subtitle { color: rgba(255,255,255,0.6); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 32px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 46px;
  height: 46px;
  background: rgba(37,99,235,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--blue-light);
  flex-shrink: 0;
}
.contact-detail { display: flex; flex-direction: column; }
.contact-label { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 500; margin-bottom: 4px; }
.contact-value { font-size: 16px; color: var(--white); font-weight: 500; line-height: 1.6; }
.contact-value[href] { transition: color var(--transition); }
.contact-value[href]:hover { color: var(--blue-light); }

.contact-cta { margin-top: 32px; }

.contact-map iframe {
  width: 100%;
  height: 420px;
  border: none;
  border-radius: 16px;
  display: block;
}
.map-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.map-address {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-address i { color: var(--blue-light); }
.map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.map-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.map-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.kakao-btn {
  background: #FEE500;
  color: #3C1E1E;
}
.google-btn {
  background: #4285F4;
  color: #fff;
}

/* ---------- FOOTER ---------- */
#footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 32px;
}
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 16px;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}
.footer-links h4, .footer-contact h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-contact p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  line-height: 1.6;
}
.footer-contact i { color: var(--blue-light); flex-shrink: 0; margin-top: 3px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ---------- SCROLL TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 46px; height: 46px;
  background: var(--blue);
  color: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 900;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover { background: var(--blue-dark); transform: translateY(-2px); }

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — 태블릿 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-visual { order: -1; }

  /* Business */
  .business-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Safety */
  .safety-grid { grid-template-columns: repeat(2, 1fr); }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-map iframe { height: 360px; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* ============================================================
   RESPONSIVE — 모바일 768px
   ============================================================ */
@media (max-width: 768px) {
  /* Base */
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }
  .section-subtitle { font-size: 15px; }

  /* ---- NAVBAR ---- */
  .navbar { padding: 14px 16px; }
  .logo-text { font-size: 19px; }
  .logo-img { width: 38px; height: 38px; }

  .nav-toggle { display: flex; align-items: center; justify-content: center; padding: 6px 10px; }

  .nav-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,15,30,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 999;
    padding: 80px 24px 40px;
  }
  .nav-menu.open { display: flex; }
  .nav-link {
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-radius: 12px;
  }
  .nav-contact-btn {
    margin-top: 8px;
    padding: 16px 24px !important;
    font-size: 18px;
  }
  /* 메뉴 열릴 때 X 버튼 */
  .nav-toggle.open i::before { content: "\f00d"; }

  /* ---- HERO ---- */
  .hero-content {
    padding: 100px 16px 70px;
    text-align: center;
  }
  .hero-badge { font-size: 11px; padding: 6px 16px; margin-bottom: 20px; }
  .hero-title {
    font-size: clamp(32px, 9vw, 52px);
    margin-bottom: 18px;
  }
  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 32px;
    color: rgba(255,255,255,0.75);
  }

  .hero-stats {
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: nowrap;
  }
  .stat-divider { width: 1px; height: 32px; margin: 0; display: block; }
  .stat-number { font-size: 26px; }
  .stat-label { font-size: 11px; }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-cta .btn { width: 100%; max-width: 320px; justify-content: center; }

  .hero-scroll-indicator { display: none; }

  /* ---- ABOUT ---- */
  .about-grid { gap: 28px; }
  .about-intro h3 { font-size: 22px; }
  .about-intro p { font-size: 15px; }
  .company-info-grid { gap: 12px; }
  .info-item { padding: 14px; gap: 12px; }
  .info-value { font-size: 13px; }

  .vision-card { padding: 28px 20px; }
  .org-chart { padding: 24px 16px; }
  .org-box { padding: 8px 10px; font-size: 12px; }
  .org-box.dept { font-size: 11px; }
  .org-bottom { gap: 6px; flex-wrap: wrap; }

  /* ---- BUSINESS ---- */
  .business-grid { grid-template-columns: 1fr; gap: 16px; }
  .business-card { padding: 28px 24px; }
  .license-section { padding: 28px 20px; }
  .license-grid { gap: 10px; }
  .license-item { padding: 10px 18px; font-size: 13px; }

  /* ---- PROJECTS ---- */
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-card { padding: 24px 20px; }
  .project-card h3 { font-size: 16px; padding-right: 60px; }

  /* ---- SAFETY ---- */
  .safety-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .safety-card { padding: 28px 16px; }
  .safety-icon { width: 52px; height: 52px; font-size: 22px; }
  .safety-card h3 { font-size: 16px; }
  .safety-card p { font-size: 13px; }

  /* ---- CONTACT ---- */
  .contact-grid { gap: 28px; }
  .contact-info h3 { font-size: 19px; margin-bottom: 24px; }
  .contact-item { gap: 12px; margin-bottom: 18px; }
  .contact-icon { width: 40px; height: 40px; font-size: 16px; }
  .contact-value { font-size: 15px; }
  .contact-map iframe { height: 300px; border-radius: 12px; }
  .map-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .map-actions { width: 100%; }
  .map-btn { flex: 1; justify-content: center; }

  /* ---- FOOTER ---- */
  .footer-inner { padding: 48px 16px 28px; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  /* ---- SCROLL TOP ---- */
  .scroll-top { bottom: 20px; right: 16px; width: 42px; height: 42px; font-size: 14px; }
}

/* ============================================================
   RESPONSIVE — 소형 모바일 480px
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section { padding: 56px 0; }

  /* Hero */
  .hero-content { padding: 90px 14px 60px; }
  .hero-stats { gap: 14px; }
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .stat-divider { height: 28px; }

  /* About org chart - 작은 화면에서 단순화 */
  .org-bottom { grid-template-columns: repeat(2,1fr); display: grid; }

  /* Safety */
  .safety-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .safety-card { padding: 22px 12px; }
  .safety-icon { width: 44px; height: 44px; font-size: 18px; margin-bottom: 14px; }
  .safety-card h3 { font-size: 14px; margin-bottom: 8px; }
  .safety-card p { font-size: 12px; line-height: 1.6; }

  /* License */
  .license-grid { flex-direction: column; align-items: stretch; }
  .license-item { justify-content: center; }

  /* Contact map */
  .contact-map iframe { height: 260px; }
  .map-actions { flex-direction: column; }
  .map-btn { width: 100%; justify-content: center; }

  /* Project card */
  .project-card { padding: 20px 16px; }

  /* Business card */
  .business-card { padding: 24px 18px; }
  .business-number { font-size: 36px; }

  /* Footer */
  .footer-logo { width: 44px; height: 44px; }
}

/* ============================================================
   RESPONSIVE — 최소 모바일 375px (아이폰 SE 등)
   ============================================================ */
@media (max-width: 375px) {
  .hero-title { font-size: 28px; }
  .hero-stats { gap: 10px; }
  .stat-number { font-size: 20px; }
  .stat-divider { height: 24px; margin: 0 2px; }

  .section-title { font-size: 24px; }
  .safety-grid { grid-template-columns: 1fr; }
  .safety-card { padding: 24px 20px; }

  .navbar { padding: 12px 14px; }
  .logo-text { font-size: 17px; }
  .logo-img { width: 34px; height: 34px; }
}

/* ============================================================
   접근성 — 모션 줄이기 설정
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg-image { animation: none; }
}

/* ============================================================
   NEW PROJECT CARD — 이미지 카드 디자인 (pc-* 클래스)
   ============================================================ */

/* 기존 project-card override: 이미지 카드는 padding 제거 */
.project-card:has(.pc-thumb) {
  padding: 0;
  overflow: hidden;
}

/* 상태 배지 */
.pc-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  pointer-events: none;
}
.pc-badge.done    { background: #e8f5e9; color: #2e7d32; }
.pc-badge.ongoing { background: rgba(37,99,235,0.12); color: var(--blue); }

/* 썸네일 이미지 영역 */
.pc-thumb {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #e8edf5;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 0;
}

/* 호버 시 오버레이 */
.pc-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 70, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.pc-thumb-overlay i { font-size: 18px; }
.project-card:hover .pc-thumb-overlay { opacity: 1; }

/* 이미지 없는 경우 placeholder */
.pc-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2fb 0%, #dce6f7 100%);
  height: 160px;
}
.pc-no-img i {
  font-size: 42px;
  color: rgba(37,99,235,0.25);
}

/* 카드 바디 */
.pc-body {
  padding: 20px 22px 22px;
}

/* 제목 */
.pc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 10px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
  /* 2줄 말줄임 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 메타 정보 (발주처, 공사유형, 연도) */
.pc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 0;
}
.pc-meta span {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.pc-meta i { color: var(--blue); font-size: 10px; }

/* 설명 텍스트 */
.pc-desc {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 이미지 없는 카드는 기존 스타일 유지 */
.project-card:not(:has(.pc-thumb)) {
  padding: 32px;
}

/* ============================================================
   이미지 팝업 오버레이
   ============================================================ */
#imgPopup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 12, 30, 0.88);
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: popupFadeIn 0.2s ease;
}
#imgPopup.open { display: flex; }

@keyframes popupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.img-popup-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55);
  animation: popupSlideUp 0.22s ease;
}
@keyframes popupSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.img-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.img-popup-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.4;
  word-break: keep-all;
  flex: 1;
  margin-right: 12px;
}
.img-popup-close {
  width: 36px; height: 36px;
  border: none;
  background: var(--bg-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.img-popup-close:hover {
  background: #fee2e2;
  color: #dc2626;
}
.img-popup-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  background: #f0f4fb;
}

/* ============================================================
   어드민 이미지 업로드 UI
   ============================================================ */
.img-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-top: 4px;
}
.img-upload-area:hover { border-color: var(--blue); }
.img-upload-area.has-img { border-style: solid; border-color: var(--blue-light); background: #eff6ff; }

.img-preview-wrap {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}
.img-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.img-preview-delete {
  position: absolute;
  top: -8px; right: -8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.img-upload-placeholder i { font-size: 30px; color: #94a3b8; margin-bottom: 8px; }
.img-upload-placeholder p { font-size: 13px; color: #64748b; margin: 0 0 4px; }
.img-upload-placeholder span { font-size: 11px; color: #94a3b8; }

.img-action-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

/* ============================================================
   반응형: pc-* 카드 모바일
   ============================================================ */
@media (max-width: 640px) {
  .pc-thumb { height: 170px; }
  .pc-no-img { height: 130px; }
  .pc-body { padding: 16px 16px 18px; }
  .pc-title { font-size: 15px; }
  .img-popup-img { max-height: 60vh; }
  .img-popup-header { padding: 12px 14px; }
  .img-popup-title { font-size: 14px; }
}
