/*
Theme Name: 잇콘출판사
Theme URI: https://itconbooks.co.kr
Author: 주식회사 아이티씨온
Description: 잇콘출판사 공식 홈페이지 테마
Version: 1.0
*/

/* ===== RESET & VARIABLES ===== */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --primary: #f97316;
  --primary-dark: #ea6c00;
  --line: #e5e5ea;
  --radius: 12px;
}

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

body {
  font-family: 'SUIT', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

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

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

.container {
  width: min(1100px, 94%);
  margin: 0 auto;
}

/* ===== TOP NOTICE BAR ===== */
.topnoti {
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 10px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.logo-text em {
  color: var(--primary);
  font-style: normal;
}

.gnb {
  display: flex;
  gap: 0.2rem;
  flex: 1;
}

.gnb a {
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  color: var(--muted);
}

.gnb a:hover {
  background: #f0f0f5;
  color: var(--text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-join {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  transition: background 0.15s;
}

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

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
}

/* ===== HERO SLIDER ===== */
.hero { position: relative; }

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
  position: relative;
}

.slide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.5rem 0;
}

.slide-text { color: #fff; flex: 1; }

.slide-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.slide-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  color: #fff;
}

.slide-desc {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 1.6rem;
  line-height: 1.7;
}

.btn-slide {
  display: inline-block;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}

.btn-slide:hover { opacity: 0.85; }

.slide-books { flex-shrink: 0; }

.slide-book-img {
  height: 260px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  object-fit: cover;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* ===== SECTIONS ===== */
.section { padding: 3rem 0; }

.section.alt {
  background: #eeeeef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.sec-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.view-all {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.view-all:hover { text-decoration: underline; }

/* ===== TWO COLUMN LAYOUT ===== */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

/* ===== BOOK GRID ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.book-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow 0.2s, transform 0.2s;
}

.book-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.book-thumb {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0f0f0;
}

.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.book-card:hover .book-thumb img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 1;
  letter-spacing: 0.03em;
}

.badge.best { background: #ff6b35; color: #fff; }
.badge.new  { background: #10b981; color: #fff; }

.book-info { padding: 0.85rem; }

.book-info h3 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.book-info h3 a:hover { color: var(--primary); }

.book-author {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.book-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===== SIDEBAR ===== */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.side-banner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.side-banner-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.side-banner-img {
  width: 100%;
  max-width: 140px;
  margin: 0 auto 0.9rem;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  aspect-ratio: 3/4;
  object-fit: cover;
}

.side-banner-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.side-banner-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.subscribe-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.subscribe-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.subscribe-sub {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subscribe-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  background: var(--bg);
}

.subscribe-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.subscribe-form button:hover { background: var(--primary-dark); }

/* ===== YT EMBED ===== */
.yt-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.yt-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ===== EVENT GRID ===== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.event-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow 0.2s, transform 0.2s;
}

.event-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.event-thumb {
  position: relative;
  padding: 2rem 1.2rem 1.5rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.event-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.event-badge.new  { background: #10b981; color: #fff; }
.event-badge.best { background: #ff6b35; color: #fff; }

.event-dday {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0,0,0,0.3);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}

.event-card-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.35;
}

.event-desc {
  padding: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== NOTICE LIST ===== */
.notice-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: #f8f8fa; }

.notice-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
}

.notice-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.notice-tag.event  { background: #eff6ff; color: var(--primary); }
.notice-tag.notice { background: #f0fdf4; color: #16a34a; }

.notice-date {
  font-size: 0.83rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ===== ABOUT ===== */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.about-text h2 { margin-bottom: 1rem; }

.about-text p {
  color: var(--muted);
  margin-bottom: 1.4rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
}

.stat { text-align: center; }

.stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.stat span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info p {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.footer-copyright {
  font-weight: 600;
  color: var(--text) !important;
  margin-bottom: 0.6rem !important;
}

.footer-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.83rem;
  color: var(--primary);
  font-weight: 600;
}

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

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
  flex-shrink: 0;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.footer-nav a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .two-col-layout { grid-template-columns: 1fr; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .about-wrap { grid-template-columns: 1fr; }
  .about-stats { justify-content: center; }
}

@media (max-width: 720px) {
  .menu-btn { display: block; }

  .gnb {
    display: none;
    position: absolute;
    top: 65px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 0.5rem 1rem;
    z-index: 100;
    gap: 0;
  }

  .gnb.open { display: flex; }

  .gnb a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .gnb a:last-child { border-bottom: none; }

  .slide-book-img { height: 160px; }
  .slide-inner { padding: 2rem 0; }

  .event-grid { grid-template-columns: 1fr; }
  .side-col { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .notice-date { display: none; }
}
