/**
 * Paul Presbyterian Church (바울교회) - Shared CSS Stylesheet
 * Production-ready, responsive design system
 * Mobile-first approach with tablet and desktop breakpoints
 */

/* ============================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================ */

:root {
  /* Blues - Logo primary color family (#0057FF, #006AFF, #0080FF) */
  --blue-50: #EBF5FF;
  --blue-100: #CCE5FF;
  --blue-200: #66B2FF;
  --blue-300: #3399FF;
  --blue-400: #0080FF;
  --blue-500: #006AFF;
  --blue-600: #0057FF;
  --blue-700: #004ACC;
  --blue-800: #003399;
  --blue-900: #002266;

  /* Golds - Logo accent color (#FFD600) */
  --gold-100: #FFF8CC;
  --gold-200: #FFF099;
  --gold-300: #FFE866;
  --gold-400: #FFDF33;
  --gold-500: #FFD600;
  --gold-600: #E6BF00;
  --gold-700: #B39400;

  /* Warm Neutrals */
  --warm-50: #FDFBF7;
  --warm-100: #F7F2EA;
  --warm-200: #EDE5D8;
  --warm-300: #DDD2BF;
  --warm-400: #C4B69E;

  /* Background Colors */
  --bg: #FAFBFE;
  --bg-warm: #F7F2EA;
  --bg-white: #FFFFFF;
  --bg-dark: #0A1628;

  /* Text Colors */
  --text: #1a1a2e;
  --text-2: #4a5068;
  --text-3: #7a8098;
  --text-on-dark: #E0E4EC;

  /* Border Colors */
  --border: #E4E8F0;
  --border-warm: #E8E0D4;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 40, 120, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 40, 120, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 40, 120, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 40, 120, 0.12);
  --shadow-gold: 0 4px 16px rgba(255, 214, 0, 0.25);

  /* Border Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Layout */
  --max-w: 1240px;
  --header-h: 68px;
  --btm-nav: 76px;

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-smooth: 0.2s ease-out;
  --transition-slow: 0.6s ease-out;
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  background: none;
  padding: 0;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

/* Google Fonts: Noto Sans KR, Playfair Display, Inter */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
}

p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Typography utility classes */
.text-display {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.text-heading {
  font-size: 1.5rem;
  font-weight: 700;
}

.text-subheading {
  font-size: 1.25rem;
  font-weight: 600;
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
}

.text-small {
  font-size: 0.875rem;
}

.text-tiny {
  font-size: 0.75rem;
}

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

.text-muted {
  color: var(--text-3);
}

.text-bold {
  font-weight: 700;
}

.text-light {
  font-weight: 300;
}

/* ============================================================================
   4. CONTAINER & LAYOUT HELPERS
   ============================================================================ */

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

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 40px;
  }
}

/* Grid helpers */
.grid {
  display: grid;
}

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

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

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

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Flexbox helpers */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* Spacing helpers */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================================
   5. ICONS
   ============================================================================ */

.icon-svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-lg {
  font-size: 28px;
}

.icon-md {
  font-size: 24px;
}

.icon-sm {
  font-size: 18px;
}

.icon-xs {
  font-size: 16px;
}

/* ============================================================================
   6. MOBILE HEADER (< 768px)
   ============================================================================ */

.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.m-header .logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-header .logo-svg {
  width: 30px;
  height: 30px;
}

.m-header .logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: -0.3px;
}

.m-header .header-right {
  display: flex;
  gap: 4px;
}

.m-header .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 16px;
  transition: background var(--transition-smooth);
  cursor: pointer;
}

.m-header .icon-btn:hover {
  background: var(--blue-50);
}

.m-header .icon-btn:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Hide mobile header on desktop */
@media (min-width: 1024px) {
  .m-header {
    display: none;
  }
}

/* ============================================================================
   7. DESKTOP HEADER (>= 1024px)
   ============================================================================ */

.d-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.d-header .logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.d-header .logo-svg {
  width: 36px;
  height: 36px;
}

.d-header .logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: -0.4px;
}

.d-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
  margin-left: 48px;
}

.d-nav-item {
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.d-nav-item > a {
  display: flex;
  align-items: center;
  color: var(--text-2);
  transition: color var(--transition-fast);
  padding: 8px 0;
  position: relative;
}

.d-nav-item > a::after {
  content: '▾';
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.5;
}

.d-nav-item > a:hover {
  color: var(--blue-600);
}

.d-nav-item > a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue-600);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.d-nav-item:hover > a::before,
.d-nav-item:focus-within > a::before {
  opacity: 1;
}

/* Dropdown Menu */
.d-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 200;
}

.d-nav-item:hover .d-dropdown,
.d-nav-item:focus-within .d-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Hover bridge area (invisible connector between nav and dropdown) */
.d-nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 150;
}

.d-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  transition: all var(--transition-fast);
  white-space: nowrap;
  border-radius: 0;
  background: none;
}

.d-dropdown a:hover {
  background: var(--blue-50);
  color: var(--blue-600);
  padding-left: 24px;
}

.d-dropdown a:first-child {
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.d-dropdown a:last-child {
  border-radius: 0 0 var(--r-md) var(--r-md);
}

/* Dropdown arrow indicator */
.d-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-right: none;
  border-bottom: none;
  transform: translateX(-50%) rotate(45deg);
}

.d-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.d-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: none;
  color: var(--blue-600);
}

.d-search-btn:hover {
  background: var(--blue-100);
}

.d-search-btn:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Hide desktop header on mobile */
@media (max-width: 1023px) {
  .d-header {
    display: none;
  }
}

/* ============================================================================
   8. MOBILE BOTTOM NAVIGATION
   ============================================================================ */

.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--btm-nav);
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition-smooth);
  cursor: pointer;
  flex: 1;
  max-width: 100px;
}

.nav-item:hover {
  color: var(--text-2);
}

.nav-item.active {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 600;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide on desktop */
@media (min-width: 1024px) {
  .m-bottom-nav {
    display: none;
  }
}

/* Add padding to body on mobile to account for bottom nav */
@media (max-width: 1023px) {
  body {
    padding-bottom: var(--btm-nav);
  }
}

/* ============================================================================
   9. MOBILE SIDE MENU (Hamburger)
   ============================================================================ */

.m-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.m-menu-overlay.active {
  display: block;
  opacity: 1;
}

.m-side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 210;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
  padding: 16px 0;
  padding-bottom: var(--btm-nav);
}

.m-side-menu.active {
  transform: translateX(0);
}

.m-menu-group {
  padding: 0;
  margin: 0;
}

.m-menu-group + .m-menu-group {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

.m-menu-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  margin: 8px 0 4px;
}

.m-menu-link {
  display: block;
  padding: 12px 16px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition-fast);
}

.m-menu-link:hover {
  background: var(--blue-50);
  color: var(--blue-600);
  padding-left: 24px;
}

.m-menu-link.active {
  color: var(--blue-600);
  font-weight: 600;
  background: var(--blue-50);
}

/* Hide on desktop */
@media (min-width: 1024px) {
  .m-menu-overlay,
  .m-side-menu {
    display: none;
  }
}

/* ============================================================================
   10. HERO SECTION
   ============================================================================ */

/* Mobile Hero */
.m-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.15) 0%, rgba(10, 22, 40, 0.3) 40%, rgba(0, 57, 160, 0.6) 70%, rgba(0, 40, 120, 0.85) 100%),
    linear-gradient(135deg, #1a3a5c 0%, #0057FF 50%, #003399 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 20px 28px;
  animation: fadeInDown var(--transition-slow);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.m-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500'%3E%3Crect x='185' y='40' width='30' height='300' rx='2' fill='rgba(255,255,255,0.06)'/%3E%3Crect x='130' y='110' width='140' height='26' rx='2' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E") center top/400px no-repeat;
  pointer-events: none;
}

.m-hero-content {
  position: relative;
  z-index: 2;
}

.m-hero .verse-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.m-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--bg-white);
  line-height: 1.3;
  margin-bottom: 8px;
  animation: fadeInUp var(--transition-slow) 0.1s both;
}

.m-hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  animation: fadeInUp var(--transition-slow) 0.2s both;
}

/* Desktop Hero */
.d-hero {
  position: relative;
  height: 85vh;
  min-height: 640px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.15) 0%, rgba(10, 22, 40, 0.3) 40%, rgba(0, 57, 160, 0.6) 70%, rgba(0, 40, 120, 0.85) 100%),
    linear-gradient(135deg, #1a3a5c 0%, #0057FF 50%, #003399 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 80px 40px 120px;
}

.d-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect x='550' y='80' width='100' height='500' rx='4' fill='rgba(255,255,255,0.04)'/%3E%3Crect x='300' y='280' width='600' height='80' rx='4' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") center/1200px no-repeat;
  pointer-events: none;
}

.d-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

.d-hero-content .verse-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp var(--transition-slow) 0.1s both;
}

.d-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--bg-white);
  line-height: 1.2;
  margin-bottom: 16px;
  animation: fadeInUp var(--transition-slow) 0.2s both;
}

.d-hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 32px;
  animation: fadeInUp var(--transition-slow) 0.3s both;
}

/* Hide desktop hero on mobile */
@media (max-width: 1023px) {
  .d-hero {
    display: none;
  }
}

/* Hide mobile hero on desktop */
@media (min-width: 1024px) {
  .m-hero {
    display: none;
  }
}

/* ============================================================================
   11. SECTION STYLES
   ============================================================================ */

.section {
  padding: 40px 0;
}

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

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

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

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

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

.section-header.text-left {
  text-align: left;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-description {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.section.section-dark .section-label {
  color: var(--gold-500);
}

.section.section-dark .section-title {
  color: var(--text-on-dark);
}

.section.section-dark .section-description {
  color: rgba(224, 228, 236, 0.8);
}

@media (max-width: 767px) {
  .section {
    padding: 32px 0;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-description {
    font-size: 0.95rem;
  }
}

/* ============================================================================
   12. CARD COMPONENT
   ============================================================================ */

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card.card-warm {
  background: var(--bg-warm);
  border-color: var(--border-warm);
}

.card.card-dark {
  background: var(--bg-dark);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

.card.card-dark:hover {
  border-color: var(--blue-500);
}

.card-header {
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.6;
}

.card-dark .card-description {
  color: rgba(224, 228, 236, 0.85);
}

.card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================================
   13. BUTTON STYLES
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
  white-space: nowrap;
  user-select: none;
}

/* Primary button (Blue) */
.btn-primary {
  background: var(--blue-600);
  color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--blue-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: translateY(0);
}

/* Gold button */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--blue-900);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 214, 0, 0.35);
}

.btn-gold:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Outline button */
.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-600);
}

.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-700);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Glass button */
.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  color: var(--bg-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Secondary button */
.btn-secondary {
  background: var(--blue-50);
  color: var(--blue-600);
}

.btn-secondary:hover {
  background: var(--blue-100);
}

/* Small button */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Large button */
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* Block button */
.btn-block {
  width: 100%;
}

/* ============================================================================
   14. BADGE & TAG COMPONENTS
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background: var(--blue-100);
  color: var(--blue-700);
}

.badge-gold {
  background: var(--gold-100);
  color: var(--gold-700);
}

.badge-success {
  background: #D4EDDA;
  color: #155724;
}

.badge-warning {
  background: #FFE5CC;
  color: #B85C00;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--blue-50);
  color: var(--blue-700);
}

.tag.tag-warm {
  background: var(--warm-100);
  color: var(--warm-400);
}

.tag.tag-gold {
  background: var(--gold-100);
  color: var(--gold-700);
}

/* ============================================================================
   15. FORM INPUTS & CONTROLS
   ============================================================================ */

input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='url'],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.5;
  transition: all var(--transition-fast);
  background: var(--bg-white);
  color: var(--text);
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='search']:focus,
input[type='tel']:focus,
input[type='url']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-50);
}

input[type='text']:disabled,
input[type='email']:disabled,
input[type='password']:disabled,
textarea:disabled,
select:disabled {
  background: var(--bg);
  color: var(--text-3);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-label.required::after {
  content: ' *';
  color: #e74c3c;
}

.form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

.form-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 6px;
}

input.form-error,
textarea.form-error {
  border-color: #e74c3c;
}

/* ============================================================================
   16. SEARCH BAR
   ============================================================================ */

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border-radius: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
}

.search-bar input::placeholder {
  color: var(--text-3);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--blue-600);
  background: var(--bg-white);
}

.search-bar .search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.search-bar .search-btn:hover {
  color: var(--blue-600);
}

/* ============================================================================
   17. PHOTO LOGIN WALL
   ============================================================================ */

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

@media (min-width: 768px) {
  .photo-wall {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform var(--transition-smooth);
}

.photo-item:hover {
  transform: scale(1.05);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transition: filter var(--transition-smooth);
}

.photo-item:hover img {
  filter: blur(4px);
}

.photo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blue-600);
  transition: all var(--transition-smooth);
  z-index: 2;
}

.photo-item:hover .photo-lock {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ============================================================================
   18. SUPPORT CARD COMPONENT
   ============================================================================ */

/* Mobile Support Card */
.m-support-card {
  margin: 16px 16px 28px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.m-support-card .support-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.m-support-card .support-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.m-support-card .support-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.m-support-card .support-link {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--blue-500);
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.m-support-card .support-link:hover {
  color: var(--blue-700);
}

/* Desktop Support Card */
.d-support-card {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px 40px;
}

.d-support-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  background: var(--bg-white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.d-support-inner .support-content {
  flex: 1;
}

.d-support-inner .support-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.d-support-inner .support-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.d-support-inner .support-link {
  flex-shrink: 0;
  margin-left: 32px;
  padding: 12px 28px;
  background: var(--blue-600);
  color: var(--bg-white);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.d-support-inner .support-link:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

/* Hide desktop support card on mobile */
@media (max-width: 1023px) {
  .d-support-card {
    display: none;
  }
}

/* Hide mobile support card on desktop */
@media (min-width: 1024px) {
  .m-support-card {
    display: none;
  }
}

/* ============================================================================
   19. FOOTER
   ============================================================================ */

/* Mobile Footer */
.m-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 32px 16px;
  font-size: 13px;
  margin-top: auto;
}

.m-footer-section {
  margin-bottom: 20px;
}

.m-footer-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gold-500);
}

.m-footer a {
  color: rgba(224, 228, 236, 0.85);
  transition: color var(--transition-fast);
  display: block;
  margin-bottom: 8px;
}

.m-footer a:hover {
  color: var(--gold-500);
}

.m-footer-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.m-footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(224, 228, 236, 0.6);
  font-size: 12px;
}

/* Desktop Footer */
.d-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 60px 40px 40px;
}

.d-footer-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.d-footer-section {
  display: flex;
  flex-direction: column;
}

.d-footer-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gold-500);
}

.d-footer a {
  color: rgba(224, 228, 236, 0.85);
  font-size: 14px;
  line-height: 2;
  transition: color var(--transition-fast);
}

.d-footer a:hover {
  color: var(--gold-500);
}

.d-footer-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 40px 0;
}

.d-footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(224, 228, 236, 0.6);
}

.d-footer-socials {
  display: flex;
  gap: 12px;
}

.d-footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
  transition: all var(--transition-fast);
  line-height: 1;
}

.d-footer-socials a:hover {
  background: var(--blue-600);
  color: var(--bg-white);
}

/* Hide desktop footer on mobile */
@media (max-width: 1023px) {
  .d-footer {
    display: none;
  }
}

/* Hide mobile footer on desktop */
@media (min-width: 1024px) {
  .m-footer {
    display: none;
  }
}

/* Adjust footer grid on tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .d-footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   20. RESPONSIVE ADJUSTMENTS
   ============================================================================ */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --header-h: 72px;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

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

  .container {
    padding: 0 28px;
  }
}

/* Small devices (max 480px) */
@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .section {
    padding: 24px 0;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .container {
    padding: 0 12px;
  }
}

/* ============================================================================
   21. ACCESSIBILITY & FOCUS STATES
   ============================================================================ */

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --border: #999;
    --text-3: #555;
  }

  .btn {
    border: 2px solid;
    padding: 10px 22px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Keep current light theme as default, but allow CSS variables to be overridden */
}

/* ============================================================================
   22. UTILITY & MISC
   ============================================================================ */

.overflow-hidden {
  overflow: hidden;
}

.pointer-events-none {
  pointer-events: none;
}

.pointer-events-auto {
  pointer-events: auto;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-default {
  cursor: default;
}

.user-select-none {
  user-select: none;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }
}


/* ===== 헤더 회원정보 영역 ===== */
.header-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-right: 10px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-user-name:empty { display: none; }
a.d-search-btn, a.icon-btn { text-decoration: none; }
.d-header-right { display: flex; align-items: center; }
