/* ═══════════════════════════════════════════════
   SangSang Culture — 반응형 스타일
   Breakpoints: ≤1024px (tablet+mobile), ≤768px (mobile)
═══════════════════════════════════════════════ */

/* ── Hamburger Button (데스크탑에서는 숨김) ── */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  padding: 4px; flex-shrink: 0;
}
.navbar__hamburger span {
  display: block; width: 24px; height: 2px;
  background: #343434; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 모바일 메뉴 오버레이 ── */
.mobile-nav-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-overlay.open {
  display: block;
  opacity: 1;
}

/* ── 모바일 슬라이드 메뉴 ── */
.mobile-nav {
  position: fixed; top: 0; right: -320px; z-index: 201;
  width: 300px; height: 100%;
  background: #fff;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open { right: 0; }

.mobile-nav__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}

.mobile-nav__logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.mobile-nav__logo-img { width: 50px; height: 36px; object-fit: contain; }
.mobile-nav__logo-text {
  font-family: 'Y_Spotlight', 'Noto Serif KR', Georgia, serif;
  font-size: 17px; color: #95B658; line-height: 1.3;
}

.mobile-nav__close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: #9fa0a0; line-height: 1;
  padding: 4px; transition: color 0.2s;
}
.mobile-nav__close:hover { color: #343434; }

.mobile-nav__menu {
  list-style: none; padding: 16px 0; flex: 1;
}
.mobile-nav__menu li a {
  display: block; padding: 15px 28px;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 600; font-size: 17px; color: #343434;
  text-decoration: none; transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}
.mobile-nav__menu li a:hover { color: #95B658; background: #f8fdf0; border-left-color: #95B658; }
.mobile-nav__menu li a.active { color: #95B658; border-left-color: #95B658; }

.mobile-nav__auth {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid #eee;
}
.mobile-nav__auth span {
  width: 100%;
  text-align: center;
  padding: 14px 0 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
}
.mobile-nav__auth a {
  flex: 1; text-align: center; padding: 18px 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 600; font-size: 15px; color: #9fa0a0;
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
.mobile-nav__auth a:hover { color: #95B658; background: #f8fdf0; }
.mobile-nav__auth .auth-divider {
  width: 1px; background: #eee; flex: 0; align-self: stretch; margin: 12px 0;
}


/* ══════════════════════════════════════════════
   TABLET + MOBILE: ≤ 1024px
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* ── Navbar ── */
  .navbar { height: 80px !important; padding: 0 24px !important; position: relative !important; }
  .navbar__logo-img { width: 64px !important; height: 46px !important; }
  .navbar__logo-text { font-size: 17px !important; }
  .navbar__menu { display: none !important; }
  .navbar__auth { display: none !important; }
  .navbar__hamburger {
    display: flex !important;
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* ── Footer ── */
  .footer { height: auto !important; padding: 40px 24px 32px !important; }
  .footer__links { gap: 32px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
  .footer__links a { font-size: 16px; }
  .footer__info { font-size: 11px; line-height: 2; }
  .footer__copy { font-size: 13px; }

  /* ── index.html: Brand Grid (태블릿: 2열 유지, 패딩/로고 재정의) ── */
  .brand-grid { grid-template-rows: 280px 280px !important; }
  .brand-tile--1, .brand-tile--2,
  .brand-tile--3, .brand-tile--4 {
    padding: 24px 20px !important;
    gap: 16px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .brand-tile__label { font-size: 40px !important; white-space: nowrap !important; }
  .brand-tile--1 .brand-tile__logo,
  .brand-tile--2 .brand-tile__logo,
  .brand-tile--3 .brand-tile__logo,
  .brand-tile--4 .brand-tile__logo {
    width: auto !important;
    height: auto !important;
    max-height: 120px !important;
    max-width: 80% !important;
  }

  /* ── about.html ── */
  .hero { height: 380px; }
  .hero__title { font-size: 52px !important; }
  .hero__subtitle { font-size: 20px !important; }
  .about-section { padding: 60px 40px !important; }
  .about-section__body { font-size: 17px !important; }
  .photo-strip { height: 260px; }
  .contents-section { padding: 60px 40px !important; }
  .content-card { height: 120px !important; padding: 0 36px !important; justify-content: center !important; align-items: flex-start !important; flex-direction: column !important; gap: 6px !important; }
  .content-card__name { font-size: 28px !important; line-height: 1.3 !important; }
  .content-card__name-en { font-size: 20px !important; }
  .content-card__arrow { display: none !important; }

  /* ── sangsang-madang.html ── */
  /* 광고 배너: 이미지 비율 유지, 높이만 모바일에 맞게 */
  .ad-banner__img { height: 220px !important; }
  /* 콘서트 목록 배너: 원래 가로 비율 유지 */
  .page-banner { height: auto !important; min-height: 260px; }
  .page-banner__left { padding: 36px 24px 36px 40px !important; }
  .page-banner__headline { font-size: 22px !important; line-height: 1.5 !important; }
  .page-banner__sub { font-size: 16px !important; }
  .page-banner__tag { font-size: 17px !important; height: 36px !important; }
  .section-head { padding: 0 32px !important; }
  .poster-row { padding: 0 32px !important; }
  .list-section { padding: 40px 40px 60px !important; }
  .poster-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 20px 16px !important; }

  /* ── sangsang-zine.html: 50/50 split → stacked ── */
  .split-wrapper {
    height: auto !important;
    overflow: visible !important;
    flex-direction: column !important;
  }
  .split-left {
    width: 100% !important;
    overflow: visible !important;
    padding: 40px 40px !important;
    border-right: none !important;
    border-bottom: 1px solid #eee;
  }
  .split-right {
    width: 100% !important;
    overflow: visible !important;
    padding: 40px 40px !important;
  }
  .hero__zine-text { font-size: 40px !important; }
  .hero__logo { width: 200px !important; }
  .cover-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
  .cover-card:nth-child(even) { margin-top: 0 !important; }
  .mag-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 20px 16px !important; }

  /* ── zine-newsletter.html ── */
  .dark-section { flex-direction: column !important; min-height: auto !important; }
  .dark-section__content {
    margin-left: 0 !important;
    padding: 60px 40px !important;
    width: 100% !important;
  }
  .dark-section__bg { opacity: 0.3 !important; }
  .dark-section__title { font-size: 36px !important; }
  .dark-section__body { font-size: 18px !important; line-height: 28px !important; max-width: 100% !important; }
  .newsletter-section { padding: 60px 40px !important; }
  .newsletter-input { width: 100% !important; max-width: 420px !important; }

  /* ── zine-magazine.html ── */
  .article { padding: 40px 40px 60px !important; }
  .article__title { font-size: 26px !important; }
  .article__body { font-size: 16px !important; line-height: 26px !important; }
  .img-pair { grid-template-columns: 1fr !important; }

  /* ── sangsang-books.html ── */
  /* 신간 소식 배너: 원래 가로 비율 유지 */
  .news-banner { min-height: 320px; }
  .news-banner__text { padding: 40px 0 40px 40px !important; }
  .news-banner__headline { font-size: 22px !important; line-height: 1.5 !important; }
  .news-banner__sub { font-size: 18px !important; }
  .news-banner__card { width: 300px !important; padding: 32px 32px !important; }
  .news-banner__cta-title { font-size: 18px !important; }
  .news-banner__btn { font-size: 17px !important; height: 50px !important; }
  .recent-books { padding: 50px 40px 40px !important; }
  .all-books { padding: 0 40px 60px !important; }
  .books-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 24px 16px !important; }
  .hero__books-text { font-size: 40px !important; }

  /* ── login / signup ── */
  .page-main { padding: 48px 32px 60px !important; }
  .form-box { width: 100% !important; max-width: 420px !important; }
}


/* ══════════════════════════════════════════════
   MOBILE ONLY: ≤ 768px
══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Navbar */
  .navbar { height: 64px !important; padding: 0 16px !important; }
  .navbar__logo-text { display: none; }
  .navbar__hamburger { right: 16px !important; }

  /* index: brand grid → 1열 (세로 스택, 로고+라벨 column 유지) */
  .brand-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 200px) !important;
  }
  .brand-tile--1, .brand-tile--2,
  .brand-tile--3, .brand-tile--4 {
    padding: 16px 20px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .brand-tile__label { font-size: 28px !important; white-space: nowrap !important; }
  .brand-tile--1 .brand-tile__logo,
  .brand-tile--2 .brand-tile__logo,
  .brand-tile--3 .brand-tile__logo,
  .brand-tile--4 .brand-tile__logo {
    width: auto !important;
    height: auto !important;
    max-height: 100px !important;
    max-width: 75% !important;
  }

  /* about */
  .hero { height: 260px; }
  .hero__title { font-size: 32px !important; }
  .hero__subtitle { font-size: 15px !important; }
  .about-section { padding: 48px 20px !important; }
  .about-section__body { font-size: 15px !important; }
  .photo-strip { height: 180px; }
  .photo-strip__img:not(:first-child) { display: none; }
  .photo-strip { grid-template-columns: 1fr !important; }
  .contents-section { padding: 48px 20px !important; }
  .content-card {
    flex-direction: column !important;
    height: 100px !important;
    padding: 0 24px !important;
    gap: 6px !important;
    border-radius: 18px !important;
    justify-content: center !important;
    align-items: flex-start !important;
  }
  .content-card__text { text-align: left !important; }
  .content-card__name { font-size: 24px !important; line-height: 1.3 !important; }
  .content-card__name-en { font-size: 15px !important; }
  .content-card__arrow { display: none !important; }
  .contents-list { gap: 12px; }

  /* madang poster grid */
  .poster-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px 12px !important; }
  .replay-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px 12px !important; }
  /* 광고 배너 모바일 */
  .ad-banner__img { height: 160px !important; }
  /* 콘서트 목록 배너 */
  .page-banner { min-height: 220px; }
  .page-banner__left { padding: 28px 16px 28px 24px !important; }
  .page-banner__headline { font-size: 18px !important; }
  .page-banner__tag { font-size: 15px !important; height: 32px !important; width: auto !important; padding: 0 12px !important; }
  .list-section { padding: 32px 20px 48px !important; }

  /* zine */
  .split-left { padding: 32px 20px !important; }
  .split-right { padding: 32px 20px !important; }
  .hero__zine-text { font-size: 28px !important; }
  .hero__logo { width: 140px !important; }
  .cover-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .mag-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px 12px !important; }
  .mag-card__issue { font-size: 14px !important; }
  .mag-card__date { font-size: 13px !important; }
  .issue-list { gap: 12px; }

  /* newsletter */
  .dark-section__content { padding: 48px 20px !important; }
  .dark-section__title { font-size: 28px !important; }
  .dark-section__body { font-size: 16px !important; }
  .newsletter-section { padding: 48px 20px !important; }
  .newsletter-input { font-size: 16px !important; }
  .newsletter-submit { width: 160px !important; height: 54px !important; font-size: 18px !important; }

  /* magazine article */
  .article { padding: 32px 20px 48px !important; }
  .article__title { font-size: 22px !important; }
  .img-pair { gap: 12px; }

  /* books */
  .books-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px 12px !important; }
  .recent-books { padding: 40px 20px 32px !important; }
  .all-books { padding: 0 20px 48px !important; }
  .news-banner { min-height: 260px; }
  .news-banner__text { padding: 28px 0 28px 20px !important; }
  .news-banner__headline { font-size: 17px !important; }
  .news-banner__card { width: 220px !important; padding: 24px 20px !important; gap: 20px !important; }
  .news-banner__cta-title { font-size: 15px !important; }
  .news-banner__btn { font-size: 14px !important; height: 42px !important; padding: 0 16px !important; }

  /* footer */
  .footer { padding: 36px 20px 28px !important; }
  .footer__links { gap: 20px; }
  .footer__info { font-size: 10px; }

  /* login/signup */
  .page-main { padding: 40px 20px 48px !important; }

  /* 모달 */
  .modal { width: calc(100vw - 32px) !important; max-width: 400px !important; }
  .modal__email { font-size: 18px !important; word-break: break-all; }
  .modal__desc { font-size: 16px !important; }
  .modal__body { padding: 36px 24px 32px !important; }
}
