/* 문현제일교회 디자인 시스템 — 시안 A (모던 클래식 · 고신 블루) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --color-primary: #005BAC;
  --color-primary-dark: #004282;
  --color-primary-soft: #EBF4FC;
  --color-navy: #13294B;
  --color-bg: #FFFFFF;
  --color-surface: #F5F7FA;
  --color-text: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-danger: #DC2626;
  --color-success: #16A34A;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 2px;
  position: relative;
  transition: color 0.15s ease;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 2px;
}

.nav-cta {
  background: var(--color-primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.nav-cta:hover {
  background: var(--color-primary-dark);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  background: #fff;
  padding: 16px 20px 24px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--color-surface);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 490px;
  display: flex;
  align-items: center;
  background-color: var(--color-navy);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(19, 41, 75, 0.88) 0%, rgba(0, 91, 172, 0.68) 52%, rgba(19, 41, 75, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 780px;
  padding: 72px 0;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: pre-line;
  word-break: keep-all;
}

.hero-sub {
  margin: 0 0 30px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

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

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

.btn-outline-white:hover {
  background: #fff;
  color: var(--color-navy);
}

.btn-outline {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-soft);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: #E5E7EB;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
}

/* Quick Menu Bar */
.quick-bar {
  margin-top: -36px;
  position: relative;
  z-index: 10;
}

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

.quick-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.quick-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 2px;
}

.quick-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

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

.section-surface {
  background: var(--color-surface);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-kicker {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

.section-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

.more-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-primary);
}

.more-link:hover {
  text-decoration: underline;
}

/* Page Sub-Header */
.page-banner {
  background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 48px 0;
}

.page-banner h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
}

.page-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.sub-tabs {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.sub-tabs-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
}

.sub-tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.sub-tab:hover {
  background: var(--color-surface);
  color: var(--color-navy);
}

.sub-tab.active {
  background: var(--color-primary);
  color: #fff;
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

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

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 20px;
}

/* Sermon Video Cards */
.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0F172A;
  overflow: hidden;
}

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

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.25);
}

.play-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 91, 172, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge-pin {
  background: #FEF3C7;
  color: #B45309;
}

.badge-success {
  background: #DCFCE7;
  color: #15803D;
}

/* Notice List */
.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-title {
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-title:hover {
  color: var(--color-primary);
}

.notice-date {
  font-size: 13.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-surface);
  font-weight: 700;
  color: var(--color-navy);
}

tr:last-child td {
  border-bottom: 0;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.14);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 14.5px;
}

.alert-success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}

.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.82);
  padding: 48px 0 36px;
  margin-top: 48px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Admin Layout */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--color-navy);
  color: #fff;
  padding: 24px 16px;
}

.admin-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.admin-main {
  background: var(--color-surface);
  padding: 32px;
}

.prose {
  white-space: pre-line;
  line-height: 1.85;
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .quick-grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: 400px; }
  .hero-content { padding: 48px 0; }
  .section { padding: 44px 0; }
}
