/* =============================================
   올티칭 캠퍼스 — 모바일 전용 오버라이드
   PC (769px+) 에는 전혀 영향 없음
   적용: @media (max-width: 768px) 전체 감싸기
   ============================================= */

@media (max-width: 768px) {

  /* ── 0. 공통 기본 ──────────────────────────── */
  body {
    overflow-x: hidden;
    padding-bottom: 65px; /* 하단 바 높이만큼 여백 */
  }

  /* ── 1. 네비게이션 바 ────────────────────────── */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .navbar-container {
    height: 56px;
    padding: 0 16px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  /* PC 전용 요소 숨김 */
  .category-btn,
  .navbar-links,
  .btn-login,
  .btn-signup,
  .mypage-dropdown-wrapper,
  .sidebar.mypage {
    display: none !important;
  }

  /* 검색창 축소 */
  .search-container {
    flex: 1;
    min-width: 40%;
    max-width: 100%;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-around;
  }

  .search-input {
    font-size: 13px;
    padding: 7px 40px 7px 14px;
  }

  /* 마이페이지 버튼 간소화 */
  .mypage-btn span:last-child {
    display: none; /* "마이페이지" 텍스트 숨김 */
  }

  .mypage-btn {
    padding: 6px 10px;
    gap: 0;
  }

  /* 드롭다운 위치 모바일용 */
  .mypage-dropdown {
    right: 0;
    width: 290px;
    max-height: 70vh;
  }

  /* 햄버거 버튼 — 모바일에서만 표시 */
  .m-ham-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: max-content;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    color: #0d1b3e;
  }

  /* ── 2. 모바일 드로어 ────────────────────────── */
  .m-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 299;
    backdrop-filter: blur(2px);
  }

  .m-drawer-overlay.open { display: block; }

  .m-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100dvh;
    background: #fff;
    z-index: 300;
    transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 32px;
  }

  .m-drawer.open { left: 0; }

  .m-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
  }

  .m-drawer-logo {
    height: 28px;
    object-fit: contain;
    width: auto;
  }

  .m-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    font-size: 18px;
  }

  .m-drawer-menu {
    padding: 12px 0;
    flex: 1;
  }

  .m-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #18233d;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
  }

  .m-drawer-item:hover {
    background: #fff5ee;
    color: #ff6900;
  }

  .m-drawer-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6a7282;
  }

  .m-drawer-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 20px;
  }

  .m-drawer-auth {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .m-drawer-auth .dropdown-user-info {
    padding: 0;
  }

  .m-drawer-btn-login {
    display: block;
    padding: 12px;
    text-align: center;
    border: 2px solid #0d1b3e;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #0d1b3e;
    text-decoration: none;
    cursor: pointer;
  }

  .m-drawer-btn-signup {
    display: block;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, #ff6900, #f54900);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: none;
  }

  .m-drawer-btn-signout {
    display: block;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, #ff6900, #f54900);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: none;
  }

  /* ── 3. 알림 패널 ────────────────────────────── */
  .m-notif-panel {
    position: fixed;
    top: 56px;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: calc(100dvh - 56px - 72px);
    background: #fff;
    z-index: 250;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  }

  .m-notif-panel.open {
    transform: translateX(0);
    display: flex;
    flex-direction: column;
  }

  .m-notif-head {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .m-notif-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: #18233d;
  }

  .m-notif-read-all {
    font-size: 12px;
    color: #ff6900;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .m-notif-list {
    flex: 1;
    overflow-y: auto;
  }

  .m-notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    transition: background 0.15s;
  }

  .m-notif-item:hover { background: #fff8f3; }

  .m-notif-item.unread {
    background: #fff5ee;
  }

  .m-notif-item.unread::before {
    /* 읽지 않음 표시 점 */
    content: "";
    display: none; /* 아이콘으로 대체 */
  }

  .m-notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff1e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .m-notif-icon svg {
    width: 20px;
    height: 20px;
    color: #ff6900;
  }

  .m-notif-body {
    flex: 1;
  }

  .m-notif-title {
    font-size: 14px;
    font-weight: 600;
    color: #18233d;
    line-height: 1.4;
  }

  .m-notif-desc {
    font-size: 12px;
    color: #6a7282;
    margin-top: 2px;
    line-height: 1.5;
  }

  .m-notif-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
  }

  .m-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #f54900;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
  }

  .m-notif-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
    gap: 12px;
  }

  .m-notif-empty svg {
    width: 48px;
    height: 48px;
    color: #ddd;
  }

  .notification-link {
    color: #ff6b35;
  }

  /* ── 4. Hero 슬라이더 ───────────────────────── */
  .page-shell section.hero {
    padding: 20px 0 40px;
    width: 100%;
  }

  .hero-track {
    gap: 12px;
    padding: 0 16px;
  }

  .hero-card {
    flex: 0 0 82vw;
    min-height: 360px;
    border-radius: 20px;
  }

  .hero-card-content h3 {
    font-size: 18px;
  }

  .hero-price {
    font-size: 26px;
  }

  .hero-arrow {
    display: none; /* 모바일은 스와이프로 대체 */
  }

  .hero-dots {
    margin-top: 14px;
  }

  /* ── 5. CTA 스트립 ──────────────────────────── */
  .page-shell section.cta-strip {
    border-radius: 0;
    padding: 24px 0;
  }

  .cta-strip-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 0 20px;
  }

  .cta-strip-inner h2 {
    font-size: 20px !important;
  }

  .cta-strip-inner p {
    font-size: 13px;
  }

  .cta-strip-inner .btn-cta {
    width: 100%;
    max-width: 320px;
  }

  /* ── 6. 수익 계산기 ─────────────────────────── */
  .page-shell section {
    width: 100%;
    padding: 24px 16px 64px;
  }

  .section-heading h2 {
    font-size: 24px !important;
  }

  .calc-option-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .calc-option {
    padding: 14px 10px;
  }

  .field-grid {
    flex-direction: column;
    gap: 12px;
  }

  .field input,
  .field select {
    height: 48px;
    font-size: 15px;
  }

  .calc-channel-btn {
    font-size: 13px;
    padding: 8px 14px;
  }

  /* ── 7. 혜택 카드 ───────────────────────────── */
  .benefit-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .benefit-card {
    padding: 20px 16px;
  }

  .referral-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
  }

  /* ── 8. QnA 섹션 ────────────────────────────── */
  .qna-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .qna-board {
    overflow: hidden;
  }

  .qna-board-head {
    font-size: 14px;
  }

  /* ── 9. 하단 고정 바 ────────────────────────── */
  .m-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .m-bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 8px 0 6px;
    color: #9aa0ac;
    transition: color 0.15s;
    position: relative;
    text-decoration: none;
  }

  .m-bn-item.active {
    color: #ff6900;
  }

  .m-bn-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }

  .m-bn-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  .m-bn-notif-wrap {
    position: relative;
    height: 22px;
  }

  .m-bn-badge {
    position: absolute;
    top: -3px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    background: #f54900;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
  }

  /* ── 10. 스크롤 검색 오버레이 ────────────────── */
  .m-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 400;
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
  }

  .m-search-overlay.open {
    display: flex;
  }

  .m-search-top {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .m-search-field {
    flex: 1;
    height: 48px;
    border: 2px solid #ff6900;
    border-radius: 24px;
    padding: 0 48px 0 20px;
    font-size: 15px;
    outline: none;
    font-family: "Noto Sans KR", sans-serif;
  }

  .m-search-cancel {
    font-size: 15px;
    font-weight: 700;
    color: #6a7282;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
  }

  .m-search-recent h4 {
    font-size: 13px;
    font-weight: 700;
    color: #6a7282;
    margin-bottom: 10px;
  }

  .m-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .m-search-tag {
    padding: 6px 14px;
    background: #f5f7fb;
    border-radius: 999px;
    font-size: 13px;
    color: #18233d;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    font-family: "Noto Sans KR", sans-serif;
  }

  .m-search-tag:hover {
    background: #fff1e8;
    border-color: #ff6900;
    color: #ff6900;
  }

  .fixed-cta-bar {
    bottom: 63px;
  }

  /* ── 11. PC 전용 요소 숨김 ────────────────────── */
  .m-ham-btn { display: flex !important; }
  .m-bottom-nav { display: flex !important; }
  .m-drawer { display: flex !important; }

} /* end @media (max-width: 768px) */

/* PC에서 모바일 전용 요소 숨김 — 미디어쿼리 밖 */
.m-ham-btn,
.m-bottom-nav,
.m-drawer,
.m-drawer-overlay,
.m-notif-panel,
.m-search-overlay {
  display: none;
}