/* =============================================
   CIG Church — Global Bilingual Community
   ============================================= */

:root {
  --navy: #1e3a5f;
  --navy-dark: #132740;
  --navy-light: #2a5082;
  --gold: #c8a45a;
  --gold-light: #dfc080;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --text: #2c2c2c;
  --text-muted: #666666;
  --border: #e0ddd8;
  --nav-h: 80px;
  --transition: 0.3s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.15);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Navigation ─────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img {
  height: 48px;
  width: auto;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-text .name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.nav-logo-text .sub {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.nav-menu {
  display: flex;
  gap: 0;
}
.nav-menu a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--navy); }
.nav-menu a:hover::after,
.nav-menu a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  transition: var(--transition);
  display: block;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ─────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30,58,95,0.72) 0%,
    rgba(19,39,64,0.5) 100%
  );
}
.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  max-width: 780px;
}
.hero-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.9;
  margin-bottom: 36px;
  font-weight: 300;
  letter-spacing: 0.01em;
}
.hero-cta {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); transform: translateY(-2px); }

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.hero-dots button.active { background: var(--gold); transform: scale(1.3); }

/* ── Sections ─────────────────────────────────── */
.section { padding: 88px 24px; }
.section-light { background: var(--off-white); }
.section-navy { background: var(--navy); color: var(--white); }

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

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-navy .section-label { color: var(--gold-light); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.25;
}
.section-navy .section-title { color: var(--white); }

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
}
.section-navy .section-desc { color: rgba(255,255,255,0.75); }

/* ── Divider ─────────────────────────────────── */
.divider {
  width: 48px; height: 3px;
  background: var(--gold);
  margin: 20px 0 32px;
}

/* ── Info Cards (Home Quick Links) ────────────── */
.info-strip {
  background: var(--navy);
  padding: 0;
}
.info-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.info-card {
  padding: 36px 32px;
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: background var(--transition);
}
.info-card:last-child { border-right: none; }
.info-card:hover { background: var(--navy-light); }
.info-card-icon {
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.2rem;
}
.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.info-card p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ── About Preview (Home) ─────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-img {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 4/3;
}
.about-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.about-img::after {
  content: '';
  position: absolute;
  bottom: -16px; right: -16px;
  width: 120px; height: 120px;
  background: var(--gold);
  opacity: 0.15;
  border-radius: 4px;
  z-index: -1;
}
.about-quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding-left: 20px;
  margin: 24px 0;
  line-height: 1.8;
}
.lang-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── Service Times ────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.service-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 32px 28px;
  transition: var(--transition);
}
.service-card:hover {
  background: rgba(255,255,255,0.13);
  border-color: var(--gold);
}
.service-time {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.service-label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* ── Gallery Grid ─────────────────────────────── */
.gallery-grid {
  columns: 3;
  gap: 16px;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  transition: transform 0.4s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,58,95,0.5);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-load-more {
  text-align: center;
  margin-top: 40px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 16px;
  opacity: 0.7;
  transition: opacity var(--transition);
  background: none;
  border: none;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── Map / Location ────────────────────────────── */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.map-embed {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.location-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.location-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.location-item:last-child { border-bottom: none; }
.location-icon {
  width: 40px; height: 40px;
  background: var(--off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.location-text strong {
  display: block;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  margin-bottom: 3px;
}
.location-text span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Community / Contact ──────────────────────── */
.contact-form {
  max-width: 640px;
  margin: 40px auto 0;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--navy);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Page Hero (non-home) ─────────────────────── */
.page-hero {
  height: 280px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
  margin-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.page-hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  color: var(--white);
}
.page-hero-breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}
.page-hero-breadcrumb a { color: rgba(255,255,255,0.55); }
.page-hero-breadcrumb a:hover { color: var(--gold); }
.page-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-hero-title span {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 12px;
  vertical-align: middle;
}

/* ── About Page ──────────────────────────────── */
.about-full {
  max-width: 800px;
  margin: 0 auto;
}
.about-statement {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-radius: 12px;
  padding: 48px;
  color: var(--white);
  text-align: center;
  margin-bottom: 56px;
}
.about-statement .kor {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 28px;
}
.about-statement .divider-center {
  width: 48px; height: 2px;
  background: var(--gold);
  margin: 24px auto;
}
.about-statement .eng {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
}
.value-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.value-card {
  background: var(--off-white);
  border-radius: 8px;
  padding: 28px 24px;
  border-top: 3px solid var(--gold);
}
.value-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.value-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Church Info Page ────────────────────────── */
.church-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.info-block {
  background: var(--off-white);
  border-radius: 10px;
  padding: 36px;
}
.info-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gold);
}
.schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.schedule-row:last-child { border-bottom: none; }
.schedule-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  flex: 1;
}
.schedule-time {
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.note-box {
  background: rgba(200,164,90,0.1);
  border: 1px solid rgba(200,164,90,0.3);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.note-box strong { color: var(--navy); }

/* ── Footer ──────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  padding: 56px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.footer-brand .logo-sub {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.8;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Reveal animation ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Toast / Alert ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-hover);
  transform: translateY(80px);
  opacity: 0;
  transition: var(--transition);
  z-index: 9000;
}
.toast.show { transform: none; opacity: 1; }
.toast.success { border-left: 4px solid #22c55e; }
.toast.error { border-left: 4px solid #ef4444; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a {
    height: auto;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu a::after { display: none; }
  .nav-toggle { display: flex; }

  .about-grid,
  .location-grid,
  .church-info-grid { grid-template-columns: 1fr; gap: 32px; }

  .info-strip-inner { grid-template-columns: 1fr; }
  .info-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .info-card:last-child { border-bottom: none; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .gallery-grid { columns: 2; }

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

  .about-statement { padding: 32px 24px; }
}

@media (max-width: 540px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .gallery-grid { columns: 1; }
  .btn { width: 100%; text-align: center; }
}
