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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --dark: #1e293b;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-700);
  line-height: 1.7;
  background: var(--white);
}

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

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

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

/* ===== Header / Nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -1px;
  white-space: pre-line;
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
  max-width: 520px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

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

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

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

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

.section-header .label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
}

/* ===== About ===== */
.about-content {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--gray-500);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

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

.stat-card .label {
  font-size: 0.95rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  padding: 40px 28px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  text-align: center;
}

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

.service-card .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

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

.service-card p {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-section {
  background: var(--gray-100);
}

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

.contact-info {
  padding-top: 16px;
}

.contact-info p {
  font-size: 1.05rem;
  color: var(--gray-500);
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-detail .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-detail .text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 2px;
}

.contact-detail .text span {
  font-size: 1rem;
  color: var(--dark);
  font-weight: 500;
}

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

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

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

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}

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

/* ===== Section Alt (배경색 교차) ===== */
.section-alt {
  background: var(--gray-100);
}

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.team-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.team-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: var(--primary-light);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.team-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ===== Location ===== */
.location-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
  background: var(--gray-200);
}

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

.map-placeholder {
  width: 100%;
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 1.1rem;
  font-weight: 600;
  gap: 8px;
}

.map-placeholder small {
  font-weight: 400;
  font-size: 0.85rem;
}

.transport-address {
  background: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--dark);
  border: 1px solid var(--gray-200);
}

.transport-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.transport-item:last-child {
  border-bottom: none;
}

.transport-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.transport-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.transport-item p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ===== 서브페이지 공통 ===== */
.page-hero {
  padding: 120px 0 48px;
  background: var(--gray-900);
  color: var(--white);
  text-align: center;
}

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

.page-hero p {
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}

.page-content {
  padding: 48px 0 80px;
}

/* ===== Notice List ===== */
.notice-list {
  list-style: none;
}

.notice-item {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
  gap: 16px;
}

.notice-item:hover {
  background: var(--gray-100);
}

.notice-item.pinned {
  background: var(--primary-light);
}

.notice-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  flex-shrink: 0;
}

.notice-badge.badge-안내 {
  background: var(--gray-500);
}

.notice-title {
  flex: 1;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.notice-title .pin-icon {
  color: var(--primary);
  margin-right: 4px;
}

.notice-date {
  font-size: 0.85rem;
  color: var(--gray-500);
  flex-shrink: 0;
}

/* Notice Detail */
.notice-detail {
  max-width: 800px;
  margin: 0 auto;
}

.notice-detail-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.notice-detail-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.notice-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.notice-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-700);
  white-space: pre-wrap;
}

.notice-back {
  margin-top: 40px;
}

/* ===== Gallery ===== */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-thumb {
  width: 100%;
  height: 220px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card-info {
  padding: 16px;
}

.gallery-card-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.gallery-card-info p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 75vh;
  background: var(--gray-200);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 400px;
  min-height: 300px;
  color: var(--gray-500);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* ===== Scroll Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
  }

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

  .hero-content p {
    font-size: 1rem;
  }

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

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

  .contact-wrapper,
  .location-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

/* ===== SNS Links (Footer) ===== */
.footer-sns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
}

.footer-sns a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* ===== Top Button ===== */
.btn-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 900;
}

.btn-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ===== Loading Screen ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
