/*
Theme Name: 태하의 디자인 커리어 연구소
Theme URI: http://sbscheongju-computer.com/
Author: 태하의 디자인 커리어 연구소
Description: 태하의 디자인 커리어 연구소 전용 커스텀 테마
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: taeha-design
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif; background: #f4f5f7; color: #222; }
a { text-decoration: none; color: inherit; }

/* ===== 상단 로고 바 ===== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar .logo { font-size: 20px; font-weight: 800; color: #003087; letter-spacing: -0.5px; }
.top-bar .logo a { color: inherit; }
.top-bar .logo span { color: #0066cc; }
.top-bar nav a { margin-left: 20px; font-size: 14px; color: #444; font-weight: 500; }
.top-bar nav a:hover { color: #0066cc; }
.top-bar .menu { display: flex; list-style: none; }
.top-bar .menu li a { margin-left: 20px; font-size: 14px; color: #444; font-weight: 500; }
.top-bar .menu li a:hover { color: #0066cc; }

/* ===== 히어로 ===== */
.hero { position: relative; width: 100%; height: 420px; overflow: hidden; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; filter: brightness(0.72); }
.hero-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.hero-overlay h1 { font-size: 38px; font-weight: 900; color: #fff; letter-spacing: -1px; text-shadow: 0 2px 12px rgba(0,0,0,.4); line-height: 1.2; }
.hero-overlay h1 span { color: #7ec8ff; }
.hero-overlay p { margin-top: 12px; font-size: 16px; color: rgba(255,255,255,.88); text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.hero-btn { margin-top: 24px; display: inline-block; background: #0066cc; color: #fff; font-size: 15px; font-weight: 700; padding: 12px 32px; border-radius: 30px; box-shadow: 0 4px 18px rgba(0,102,204,.35); transition: background .2s; }
.hero-btn:hover { background: #0052a3; }

/* ===== CTA 바 ===== */
.cta-bar { background: linear-gradient(90deg,#003087 0%,#0066cc 100%); padding: 0 40px; display: flex; align-items: center; justify-content: center; gap: 48px; height: 72px; }
.cta-item { display: flex; align-items: center; gap: 10px; color: #fff; }
.cta-icon { width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.cta-item .cta-label { font-size: 11px; color: rgba(255,255,255,.7); line-height: 1; }
.cta-item .cta-value { font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: .5px; }
.cta-item .cta-value a { color: #fff; }
.cta-item .cta-value a:hover { text-decoration: underline; }
.cta-divider { width: 1px; height: 36px; background: rgba(255,255,255,.25); }

/* ===== 메인 레이아웃 ===== */
.section-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.main-section { background: #f4f5f7; padding: 36px 0 20px; }
.main-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.main-left { min-width: 0; }
.main-right { min-width: 0; }
.section-title { font-size: 16px; font-weight: 800; color: #111; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 3px solid #0066cc; display: inline-block; }

/* ===== 카테고리 그리드 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; }
.cat-card { position: relative; overflow: hidden; cursor: pointer; border-radius: 8px; display: block; line-height: 0; height: 110px; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, filter .25s; }
.cat-card:hover img { transform: scale(1.05); filter: brightness(.75); }
.cat-label { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top,rgba(0,0,0,.72) 0%,rgba(0,0,0,0) 100%); color: #fff; font-size: 13px; font-weight: 800; padding: 22px 8px 8px; line-height: 1.3; pointer-events: none; }
.cat-badge { position: absolute; top: 8px; right: 8px; background: #0066cc; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; pointer-events: none; }

/* ===== 최신글·인기글 ===== */
.content-col { margin-bottom: 20px; }
.content-col:last-child { margin-bottom: 0; }
.content-col-title { font-size: 15px; font-weight: 800; color: #111; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid #0066cc; display: flex; align-items: center; gap: 8px; }
.content-col-title .badge { font-size: 11px; background: #0066cc; color: #fff; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.post-item { display: flex; gap: 10px; background: #fff; border-radius: 8px; padding: 9px 12px; margin-bottom: 7px; box-shadow: 0 1px 5px rgba(0,0,0,.06); border: 1px solid #eee; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.post-item:hover { box-shadow: 0 4px 14px rgba(0,102,204,.12); border-color: #b3d0ff; }
.post-thumb { width: 64px; height: 50px; border-radius: 7px; flex-shrink: 0; background: #e8f0fe; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.post-info { flex: 1; min-width: 0; }
.post-info .post-cat { font-size: 10px; color: #0066cc; font-weight: 700; background: #e8f0fe; display: inline-block; padding: 2px 7px; border-radius: 8px; margin-bottom: 4px; }
.post-info .post-title { font-size: 13px; font-weight: 600; color: #222; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-info .post-meta { font-size: 11px; color: #aaa; margin-top: 4px; }
.post-rank { font-size: 17px; font-weight: 900; color: #d0d8e8; width: 20px; text-align: center; flex-shrink: 0; line-height: 50px; }
.post-rank.top { color: #0066cc; }

/* ===== 전체글 목록 ===== */
.postlist-section { background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; margin-top: 16px; overflow: hidden; }
.postlist-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 2px solid #0066cc; }
.postlist-header .section-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; font-size: 14px; }
.postlist-header .more-btn { font-size: 12px; color: #0066cc; font-weight: 600; }
.postlist-header .more-btn:hover { text-decoration: underline; }
.postlist-table { width: 100%; border-collapse: collapse; }
.postlist-table thead tr { background: #f8f9fb; border-bottom: 1px solid #e5e7eb; }
.postlist-table th { font-size: 11px; font-weight: 700; color: #888; padding: 7px 10px; text-align: left; }
.postlist-table th.center, .postlist-table td.center { text-align: center; }
.postlist-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .1s; cursor: pointer; }
.postlist-table tbody tr:last-child { border-bottom: none; }
.postlist-table tbody tr:hover { background: #f4f8ff; }
.postlist-table td { font-size: 13px; color: #333; padding: 8px 10px; vertical-align: middle; }
.postlist-table td.num { font-size: 12px; color: #bbb; width: 36px; text-align: center; }
.postlist-table td.cat-tag { width: 86px; }
.postlist-table td.thumb { width: 70px; padding: 5px 7px; }
.postlist-thumb { width: 62px; height: 44px; object-fit: cover; border-radius: 5px; display: block; }
.postlist-cat { display: inline-block; font-size: 11px; font-weight: 700; color: #0066cc; background: #e8f0fe; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.postlist-table td.title a { color: #222; font-weight: 500; }
.postlist-table td.title a:hover { color: #0066cc; }
.postlist-table td.date { font-size: 11px; color: #aaa; width: 86px; white-space: nowrap; }
.postlist-table td.views { font-size: 11px; color: #aaa; width: 56px; text-align: center; }
.post-new-badge { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #ff4d4f; padding: 1px 5px; border-radius: 4px; margin-left: 5px; vertical-align: middle; }

/* ===== 광고 ===== */
.ad-section { padding: 20px 0 36px; }
.ad-title { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.ad-banner { background: linear-gradient(135deg,#f0f4ff,#e0eaff); border: 1px dashed #b3c9f0; border-radius: 12px; height: 110px; display: flex; align-items: center; justify-content: center; color: #8fa8d8; font-size: 14px; font-weight: 600; }
.ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.ad-small { background: linear-gradient(135deg,#f8f9ff,#eef3ff); border: 1px dashed #c5d5f0; border-radius: 10px; height: 88px; display: flex; align-items: center; justify-content: center; color: #a0b4d8; font-size: 13px; }

/* ===== 푸터 ===== */
.footer { background: #1a2540; color: rgba(255,255,255,.65); text-align: center; padding: 26px 20px; font-size: 13px; line-height: 2; }
.footer strong { color: #fff; }
.footer a { color: #7eb8ff; }
.footer a:hover { text-decoration: underline; }

/* ===== 햄버거 메뉴 ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #003087;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드롭다운 nav */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
  z-index: 100;
  flex-direction: column;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a,
.mobile-nav .menu li a {
  display: block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}
.mobile-nav a:hover,
.mobile-nav .menu li a:hover { background: #f4f8ff; color: #0066cc; }
.mobile-nav .menu { flex-direction: column; list-style: none; }

/* ===== 일반 페이지 콘텐츠 ===== */
.page-wrap {
  max-width: 860px;
  margin: 48px auto;
  padding: 0 20px 60px;
}
.page-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  padding: 48px 52px;
}
.page-card h1 {
  font-size: 26px;
  font-weight: 900;
  color: #003087;
  margin-bottom: 6px;
}
.page-card .page-date {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 32px;
  display: block;
}
.page-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  margin: 28px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #0066cc;
}
.page-card p {
  font-size: 14px;
  line-height: 1.95;
  color: #444;
  margin-bottom: 10px;
}
.page-card ul, .page-card ol {
  font-size: 14px;
  line-height: 1.95;
  color: #444;
  padding-left: 22px;
  margin-bottom: 10px;
}
.page-card ul li, .page-card ol li { margin-bottom: 4px; }
.page-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}
.page-card table th {
  background: #f0f4ff;
  color: #003087;
  font-weight: 700;
  padding: 9px 12px;
  border: 1px solid #dde5f5;
  text-align: left;
}
.page-card table td {
  padding: 9px 12px;
  border: 1px solid #e9ecef;
  color: #444;
  vertical-align: top;
}
.page-card .highlight-box {
  background: #f0f4ff;
  border-left: 4px solid #0066cc;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 13px;
  color: #333;
  margin: 16px 0;
  line-height: 1.8;
}
/* 문의하기 폼 */
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin: 16px 0 6px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #dde5f5;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  font-family: inherit;
  transition: border-color .2s;
  background: #fafbff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #0066cc;
  background: #fff;
}
.contact-form textarea { height: 140px; resize: vertical; }
.contact-form .submit-btn {
  margin-top: 18px;
  display: inline-block;
  background: #0066cc;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 36px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s;
}
.contact-form .submit-btn:hover { background: #0052a3; }
.contact-info-box {
  background: #f8f9ff;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 2;
  color: #444;
}
.contact-info-box strong { color: #003087; }

/* 문의하기 폼 추가 스타일 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; color: #333; margin-bottom: 6px; }
.required { color: #e53e3e; }
.contact-form .form-row input,
.contact-form .form-row textarea { width: 100%; }
.form-privacy-notice { font-size: 12px; color: #888; margin: 10px 0 18px; line-height: 1.7; }
.form-privacy-notice a { color: #0066cc; text-decoration: underline; }
.contact-submit-btn {
  display: inline-block;
  background: #0066cc;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 36px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s;
}
.contact-submit-btn:hover { background: #0052a3; }
.contact-success {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  color: #2e7d32;
  margin: 20px 0;
}
.contact-error {
  background: #fff3f3;
  border-left: 4px solid #e53e3e;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  color: #c53030;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .page-card { padding: 28px 20px; }
  .page-card h1 { font-size: 22px; }
}

/* ===== 일반 콘텐츠 (단일글·아카이브) ===== */
.site-content { max-width: 1180px; margin: 36px auto; padding: 0 20px; }
.entry-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
.entry-title { font-size: 24px; font-weight: 800; color: #111; }
.entry-meta { font-size: 13px; color: #aaa; margin-top: 8px; }
.entry-content { font-size: 15px; line-height: 1.9; color: #333; background: #fff; padding: 28px; border-radius: 10px; }
.entry-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.archive-list { list-style: none; }
.archive-list li { background: #fff; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid #eee; }
.archive-list li a { font-size: 15px; font-weight: 600; color: #222; }
.archive-list li a:hover { color: #0066cc; }
.archive-list .meta { font-size: 12px; color: #aaa; margin-top: 4px; }

/* ============================================================
   반응형 미디어 쿼리
   ============================================================ */

/* ── 태블릿 가로 (≤ 1024px) ── */
@media (max-width: 1024px) {
  .top-bar { padding: 12px 24px; }
  .main-layout { grid-template-columns: 1fr 1fr; gap: 18px; }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
  .cta-bar { gap: 28px; padding: 0 24px; }
  .cta-item .cta-value { font-size: 17px; }
  .hero { height: 360px; }
  .hero-overlay h1 { font-size: 32px; }
}

/* ── 태블릿 세로 (≤ 768px) ── */
@media (max-width: 768px) {

  /* 헤더 */
  .top-bar {
    padding: 12px 16px;
    position: relative;
  }
  .top-bar .logo { font-size: 17px; }
  .top-bar > nav { display: none; }   /* 데스크톱 nav 숨김 */
  .hamburger { display: flex; }

  /* 히어로 */
  .hero { height: 280px; }
  .hero-overlay h1 { font-size: 26px; letter-spacing: -.5px; }
  .hero-overlay p { font-size: 13px; margin-top: 8px; }
  .hero-btn { font-size: 13px; padding: 10px 22px; margin-top: 16px; }

  /* CTA */
  .cta-bar {
    height: auto;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .cta-item {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }
  .cta-item:last-child { border-bottom: none; }
  .cta-divider { display: none; }
  .cta-item .cta-value { font-size: 17px; }

  /* 메인 레이아웃 → 1열 */
  .main-layout { grid-template-columns: 1fr; gap: 20px; }
  .section-wrap { padding: 0 14px; }
  .main-section { padding: 24px 0 16px; }

  /* 카테고리 → 3열 */
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cat-card { height: 100px; }
  .cat-label { font-size: 12px; }

  /* 전체글 목록 — 번호·날짜 숨김 */
  .postlist-table td.num,
  .postlist-table th:first-child { display: none; }
  .postlist-table td.date,
  .postlist-table th:nth-child(5) { display: none; }
  .postlist-table td { padding: 7px 8px; font-size: 12px; }

  /* 광고 */
  .ad-grid { grid-template-columns: 1fr; }
  .ad-banner { height: 80px; font-size: 13px; }

  /* 푸터 */
  .footer { font-size: 12px; line-height: 1.9; padding: 20px 16px; }
}

/* ── 모바일 (≤ 480px) ── */
@media (max-width: 480px) {

  /* 헤더 */
  .top-bar .logo { font-size: 15px; }

  /* 히어로 */
  .hero { height: 230px; }
  .hero-overlay h1 { font-size: 22px; }
  .hero-overlay p { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-btn { font-size: 12px; padding: 9px 18px; }

  /* 카테고리 → 2열 (5개씩 가로 스크롤 대신 2열 래핑) */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card { height: 90px; }
  .cat-label { font-size: 11px; padding: 16px 6px 6px; }

  /* 전체글 목록 — 썸네일·조회 숨김 */
  .postlist-table td.thumb,
  .postlist-table th:nth-child(3) { display: none; }
  .postlist-table td.views,
  .postlist-table th:last-child { display: none; }
  .postlist-table td.cat-tag { width: 70px; }
  .postlist-cat { font-size: 10px; padding: 2px 5px; }
  .postlist-table td.title a { font-size: 12px; }

  /* 최신글·인기글 */
  .post-thumb { width: 54px; height: 44px; }
  .post-info .post-title { font-size: 12px; }
  .post-rank { font-size: 15px; line-height: 44px; width: 18px; }

  /* 광고 */
  .ad-small { height: 70px; font-size: 12px; }
}
