/* ===========================================
   전남광주상사 사회적협동조합 - 메인 스타일시트
   =========================================== */

/* CSS 변수 - CI 컬러 기반 */
:root {
  --brand-blue: #1E6FB8;
  --brand-blue-dark: #185FA5;
  --brand-blue-light: #E6F1FB;
  --brand-green: #5BB94A;
  --brand-green-dark: #3B6D11;
  --brand-orange: #F39C12;
  --brand-red: #E84B3C;
  --brand-red-dark: #A32D2D;

  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-tertiary: #888;
  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fa;
  --bg-tertiary: #ecf0f3;
  --border: #e5e7eb;
  --border-light: #f0f1f3;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);

  --container-w: 1200px;
}

/* 리셋 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard',
               'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 컨테이너 */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ======================
   상단 유틸 바
   ====================== */
.utility-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.utility-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.utility-bar a {
  color: var(--text-secondary);
  transition: color 0.15s;
}
.utility-bar a:hover { color: var(--brand-blue); }
.utility-bar .donate-link {
  color: var(--brand-red);
  font-weight: 500;
}

/* ======================
   메인 헤더
   ====================== */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 44px; width: auto; }
.brand-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.gnb {
  display: flex;
  gap: 26px;
  align-items: center;
}
.gnb > li { position: relative; list-style: none; }
.gnb > li > a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.15s;
  white-space: nowrap;
}
.gnb > li > a:hover,
.gnb > li.active > a { color: var(--brand-blue); }
.gnb .submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 0;
  min-width: 160px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  list-style: none;
}
.gnb > li:hover .submenu { opacity: 1; visibility: visible; }
.gnb .submenu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.gnb .submenu a:hover {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-primary);
}

/* ======================
   히어로 (메인 비주얼)
   ====================== */
.hero {
  background: linear-gradient(135deg, #F0F7FF 0%, #E8F5E9 100%);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  background-image: url('../images/logo_symbol.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: white;
  border: 1px solid #B5D4F4;
  color: var(--brand-blue);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 18px;
}
.hero-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
  color: #042C53;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero-subtitle {
  font-size: 17px;
  color: var(--brand-blue-dark);
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ======================
   버튼
   ====================== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand-blue);
  color: white;
}
.btn-primary:hover { background: var(--brand-blue-dark); }
.btn-outline {
  background: white;
  color: var(--brand-blue);
  border-color: #B5D4F4;
}
.btn-outline:hover { background: var(--brand-blue-light); }
.btn-donate {
  background: var(--brand-red);
  color: white;
}
.btn-donate:hover { background: var(--brand-red-dark); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ======================
   섹션 공통
   ====================== */
.section { padding: 70px 0; }
.section-sm { padding: 50px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
}
.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.section-subtitle {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 6px;
}
.section-more {
  color: var(--brand-blue);
  font-size: 14px;
  font-weight: 500;
}

/* ======================
   퀵 메뉴 (3분할 카드)
   ====================== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
}
.quick-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
}
.quick-card .icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.quick-card .icon.green { color: var(--brand-green); }
.quick-card .icon.blue  { color: var(--brand-blue); }
.quick-card .icon.orange{ color: var(--brand-orange); }
.quick-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.quick-card p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ======================
   상품 그리드
   ====================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-image {
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image .placeholder { font-size: 48px; color: var(--text-tertiary); }
.product-body { padding: 14px 16px; }
.product-company {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 13px;
  color: var(--brand-blue);
  font-weight: 500;
}

/* ======================
   소식 리스트
   ====================== */
.news-list { list-style: none; }
.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.news-item:last-child { border-bottom: none; }
.news-cat {
  display: inline-block;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 12px;
}
.news-title {
  font-size: 15px;
  color: var(--text-primary);
  flex: 1;
}
.news-date {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ======================
   후원 배너 (메인 강조 영역)
   ====================== */
.donate-banner {
  background: linear-gradient(135deg, #FCEBEB 0%, #FAEEDA 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.donate-banner .icon-wrap {
  width: 72px;
  height: 72px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 36px;
  color: var(--brand-red);
}
.donate-banner .content { flex: 1; }
.donate-banner .label {
  font-size: 13px;
  color: var(--brand-red-dark);
  font-weight: 500;
  margin-bottom: 4px;
}
.donate-banner h3 {
  font-size: 22px;
  color: #501313;
  margin-bottom: 6px;
  font-weight: 700;
}
.donate-banner p {
  font-size: 14px;
  color: var(--brand-red-dark);
}

/* ======================
   푸터
   ====================== */
.site-footer {
  background: #2C2C2A;
  color: #B4B2A9;
  padding: 50px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.footer-symbol {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  object-fit: contain;
  flex-shrink: 0;
}
.footer-brand-text { line-height: 1.3; }
.footer-brand-name {
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.footer-brand-sub {
  color: #888780;
  font-size: 11px;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.footer-info {
  font-size: 13px;
  line-height: 1.8;
}
.footer-info strong { color: white; font-size: 14px; }
.footer-links h4 {
  color: white;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  font-size: 13px;
  color: #B4B2A9;
  transition: color 0.15s;
}
.footer-links a:hover { color: white; }

.footer-donate {
  background: rgba(232, 75, 60, 0.12);
  border: 1px solid rgba(232, 75, 60, 0.3);
  border-radius: var(--radius-md);
  padding: 18px;
}
.footer-donate h4 {
  color: #F09595;
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 600;
}
.footer-donate .account {
  color: #F7C1C1;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.footer-donate .account strong { color: white; }
.footer-donate a {
  color: white;
  font-size: 12px;
  text-decoration: underline;
}

/* 하단 정보 */
.footer-bottom {
  border-top: 1px solid #444441;
  padding-top: 22px;
  margin-top: 30px;
  font-size: 12px;
  color: #aaa9a3;
  text-align: center;
  line-height: 1.7;
}
.footer-bottom-info {
  margin-bottom: 10px;
  word-break: keep-all;
}
.footer-bottom-links {
  margin: 12px 0 10px;
}
.footer-bottom-links a {
  color: #ccc;
  font-size: 13px;
  padding: 0 6px;
}
.footer-bottom-links a:hover {
  color: white;
  text-decoration: underline;
}
.footer-bottom-copyright {
  margin-top: 8px;
  color: #888780;
  font-size: 11px;
}

/* ======================
   페이지 내부 공통
   ====================== */
.page-head {
  background: var(--bg-secondary);
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 8px;
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--brand-blue); }

.content-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

/* 게시판 테이블 */
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.board-table th,
.board-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.board-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 2px solid var(--text-primary);
  font-size: 13px;
}
.board-table td.text-left,
.board-table th.text-left { text-align: left; }
.board-table tr:hover td { background: var(--bg-secondary); }

/* 폼 */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(30, 111, 184, 0.1);
}
textarea.form-control { resize: vertical; min-height: 140px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-success { background: #EAF3DE; color: #3B6D11; border: 1px solid #C0DD97; }
.alert-error   { background: #FCEBEB; color: #A32D2D; border: 1px solid #F7C1C1; }
.alert-info    { background: #E6F1FB; color: #0C447C; border: 1px solid #B5D4F4; }

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 30px;
  list-style: none;
}
.pagination a, .pagination span {
  display: inline-block;
  min-width: 36px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.pagination .active { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }

/* ======================
   반응형 - 태블릿 & 모바일
   ====================== */
@media (max-width: 1024px) {
  .mobile-toggle { display: block; }
  .gnb {
    position: fixed;
    top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 70px 24px 24px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s;
    align-items: stretch;
    z-index: 100;
  }
  .gnb.open { right: 0; }
  .gnb > li { width: 100%; border-bottom: 1px solid var(--border-light); }
  .gnb > li > a { padding: 14px 0; }
  .gnb .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0 0 8px 12px;
    min-width: 0;
  }
}

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

  .hero { padding: 50px 0 60px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }

  .quick-grid {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 22px; }

  .donate-banner {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-head { padding: 40px 0; }
  .page-head h1 { font-size: 24px; }
  .content-box { padding: 22px 18px; }

  .board-table th:nth-child(1),
  .board-table td:nth-child(1) { display: none; }
}

/* 모바일 메뉴 오버레이 */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.menu-overlay.show { display: block; }
