/* =========================
   COMPONENTS
========================= */

/* =========================
   Header Logo (Image + Title Split) - override safe
========================= */

/* 로고 영역은 버튼/로고가 겹치지 않게 고정 */
.header .logo-area{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

/* logo-link 클래스를 div에 쓰는 구조라면: div.logo-link.logo-img */
.header .logo-link.logo-img{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

/* 로고 이미지 링크 */
.header .logo-img-link{
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

/* 로고 이미지 */
.header .logo-image{
  height:32px;
  width:auto;
  display:block;
}

/* 타이틀 링크(현재 홈) */
.header a.logo-title{
  display:block;
  font-size:16px;          /* header.css 기본 톤과 맞춤 */
  font-weight:800;
  color:#0f172a;
  text-decoration:none;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* hover는 데스크탑에서만 */
@media (hover: hover){
  .header a.logo-title:hover{
    text-decoration:underline;
  }
}

@media (max-width:768px){
  .header .logo-image{ height:26px; }
  .header a.logo-title{ font-size:15px; }
}



/* nav 링크 */
.nav a { color: #e5e7eb; opacity: 0.8; }
.nav a:hover { opacity: 1; }
.nav a.active { color: #f97316; font-weight: 600; }

/* 검색/버튼 */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.search-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.9);
}

.search-input {
  width: 160px;
  border: 0;
  outline: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 12px;
}
.search-input::placeholder { color: #6b7280; }

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.92;
}

.admin-btn:hover {
  opacity: 1;
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  transition: 0.12s ease;
}

/* =========================
   MAIN SLIDE
========================= */
.main_slide { margin-bottom: 18px; }

.mainSlide {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mainSlide .swiper-slide {
  min-height: 260px;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* 배너 BG */
.banner-bg {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.banner-overlay { display: block; }

.banner-inner {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding: 20px 22px;
  gap: 18px;
  align-items: center;
}

.banner-text { flex: 1 1 260px; min-width: 0; }
.banner-heading { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.banner-sub { font-size: 13px; color: #cbd5f5; margin-bottom: 8px; }
.banner-desc {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  white-space: pre-line;
}

.banner-pill-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.banner-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.banner-thumb {
  flex: 0 0 220px;
  max-width: 240px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.banner-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
  background: repeating-linear-gradient(
    45deg,
    rgba(31, 41, 55, 0.9),
    rgba(31, 41, 55, 0.9) 6px,
    rgba(17, 24, 39, 0.9) 6px,
    rgba(17, 24, 39, 0.9) 12px
  );
}

/* main swiper buttons */
.mainSlide .swiper-button-prev,
.mainSlide .swiper-button-next {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.mainSlide .swiper-button-prev::after,
.mainSlide .swiper-button-next::after {
  font-size: 14px;
  color: #e5e7eb;
}

.mainSlide .swiper-pagination-bullet {
  background: rgba(148, 163, 184, 0.6);
  opacity: 1;
}

.mainSlide .swiper-pagination-bullet-active {
  background: linear-gradient(135deg, #6366f1, #22c55e);
}

/* =========================
   GRID / CARD
========================= */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.manga-item {
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.2), rgba(15, 23, 42, 0.95));
  border-radius: 14px;
  padding: 6px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  display: flex;
  flex-direction: column;
  height: 230px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.manga-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  border-color: rgba(129, 140, 248, 0.9);
}

.manga-thumb-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  background: #020617;
}

.manga-thumb-placeholder {
  width: 100%;
  height: 140px;
  background: repeating-linear-gradient(135deg, #111827, #111827 6px, #020617 6px, #020617 12px);
}

.manga-thumb-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.badge-today,
.badge-gray {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: 999px;
  font-size: 11px;
}

.badge-today {
  background: rgba(34, 197, 94, 0.98);
  color: #022c22;
  font-weight: 600;
}

.badge-gray {
  background: rgba(31, 41, 55, 0.96);
  border: 1px solid rgba(75, 85, 99, 0.9);
  color: #e5e7eb;
}

.manga-info { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }

.manga-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
}

.manga-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}

/* =========================
   CARD META (2 LINE FIX)
   1) 회사/지역 : 한 줄
   2) 작성일   : 항상 아래 줄
========================= */

.manga-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-top:6px;
}

.manga-meta .meta-line{
  display:flex;
  gap:6px;
  white-space:nowrap;
  overflow:hidden;
}

.manga-meta .meta-name,
.manga-meta .meta-region{
  font-size:13px;          /* 🔽 기존보다 살짝 작게 */
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
}

.manga-meta .meta-name::after{
  content:" · ";
  opacity:.6;
}

.manga-meta .meta-date{
  font-size:12px;
  line-height:1.2;
  color:#64748b;
  white-space:nowrap;
}


/* 공지 배지 */
.badge-notice {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: #facc15;
  color: #020617;
  border: 1px solid #eab308;
  pointer-events: none;
  user-select: none;
}

/* 구인/구직 타입 */
.badge-type {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
  user-select: none;
}

.badge-hire { background: #2563eb; color: #fff; border: 1px solid #1d4ed8; }
.badge-seek { background: #f97316; color: #fff; border: 1px solid #ea580c; }

/* CTA */
.admin-btn.cta{
  border: 1px solid transparent !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(2,6,23,0.12) !important;
}
.admin-btn.cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2,6,23,0.16) !important;
  opacity: 1;
}
.admin-btn.cta-contact{ background: linear-gradient(135deg, #f97316, #ea580c) !important; }
.admin-btn.cta-hire{ background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; }
.admin-btn.cta-seek{ background: linear-gradient(135deg, #16a34a, #15803d) !important; }

/* 더보기 버튼 */
.layout-more {
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.28);
  background: rgba(255,255,255,0.92);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.12s ease;
}
.layout-more:hover {
  color:#ea580c;
  border-color: rgba(234,88,12,0.45);
  transform: translateY(-1px);
}

/* =========================
   MID BANNER (상단 슬라이드)
========================= */
.mid-banner { margin: 18px 0; }

.mid-banner-inner {
  border-radius: 16px;
  overflow: hidden;
  border: 1px dashed rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at left, #1f2937, #020617);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mid-banner-text { font-size: 13px; color: #cbd5f5; padding: 18px; text-align: center; }

.midSlide {
  height: 120px;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  min-height: 0;
}

.midSlide .swiper-slide {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mid-banner-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mid-banner-click { cursor: pointer; display: block; width: 100%; }

/* mid swiper buttons */
.midSlide .swiper-button-prev,
.midSlide .swiper-button-next{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}
.midSlide .swiper-button-prev::after,
.midSlide .swiper-button-next::after{
  font-size: 13px;
  color: #e5e7eb;
}

.midSlide .swiper-pagination-bullet{
  background: rgba(148, 163, 184, 0.6);
  opacity: 1;
}
.midSlide .swiper-pagination-bullet-active{
  background: linear-gradient(135deg, #6366f1, #22c55e);
}

/* =========================
   Language buttons
========================= */
.lang-buttons{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-btn{
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.22);
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  font-weight: 800;
  font-size: 12px;
}

.lang-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(234,88,12,0.28);
  box-shadow: 0 10px 22px rgba(2,6,23,0.08);
}

.lang-btn[aria-pressed="true"]{
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
}

.lang-flag{ width: 18px; height: 18px; display: block; }
.lang-label{ font-size: 12px; font-weight: 900; letter-spacing: -0.2px; }

/* =========================
   Grid inline mid banners (삽입형)
========================= */
.grid-inline-mid{
  grid-column: 1 / -1;
  margin: 0;
}

.grid-inline-banner{
  height: 120px;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.grid-inline-banner.placeholder{
  color: #475569;
  font-size: 13px;
  padding: 18px;
  text-align: center;
}

/* =========================
   RESPONSIVE (컴포넌트 크기)
========================= */
@media (max-width: 1024px) {
  .manga-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .manga-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner-inner { flex-direction: column; }

  .mainSlide .swiper-slide { min-height: 120px; height: auto; }
  .banner-bg {
    width: 100%;
    height: auto;
    min-height: 120px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .midSlide { height: 70px; min-height: 0 !important; }
  .midSlide .swiper-slide { height: 70px; }
  .midSlide .swiper-wrapper { height: 70px !important; }

  .mid-banner-img {
    height: 70px !important;
    width: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
  }

  .grid-inline-banner{ height: 70px; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .grid-inline-banner.placeholder{ border: 1px dashed rgba(15,23,42,0.18) !important; background: rgba(255,255,255,0.92) !important; }
  .mainSlide{ border: 0 !important; background: transparent !important; box-shadow: none !important; }

  .lang-buttons{ gap: 6px; }
  .lang-btn{ height: 30px; }
}

@media (max-width: 480px) {
  .manga-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================
   Mobile bottom region bar (LIGHT)
   ========================= */
.m-catbar { display: none; }

@media (max-width: 768px){
  .m-catbar{
    display:flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 56px;
    padding: 8px 10px;
    gap: 8px;
    align-items: center;

    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(15, 23, 42, 0.10);

    z-index: 9999;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .m-catbar *{
    pointer-events: auto;    /* 🔥 추가 */
  }
}

  .wrap { padding-bottom: 74px; }

  .m-cat{
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;

    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255,255,255,.92);
    color: rgba(15, 23, 42, 0.86);

    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
  }

  .m-cat.active{
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.18);
    color: rgba(15, 23, 42, 0.95);
  }
}

/* ✅ 모바일: 상단 메뉴(nav) 열리면 "검색만" 보이게 (지역 링크 숨김) */
@media (max-width: 768px){
  /* nav 안의 지역 링크들 숨김 */
  .nav a[data-filter] { display: none !important; }

  /* nav 안의 모바일 검색은 보이게 */
  .nav .mobile-search { display: block !important; }
}

/* ✅ 모바일에서 로고 이미지 숨기기 (텍스트 로고는 유지) */
@media (max-width: 768px){
  .logo-img-link,
  .logo-image {
    display: none !important;
  }
}

/* ✅ 모바일에서는 푸터 숨기기 (하단바가 푸터 역할) */
@media (max-width: 768px){
  .footer{
    display: none !important;
  }
}

.view-count{
  font-size:11px;
  color:#64748b;
  line-height:1;
}

/* 제목 줄 중앙 정렬 */
.manga-title-row{
  display:flex;
  align-items:center;
  justify-content:center;   /* ✅ 중앙 정렬 */
  gap:8px;
}

/* 제목은 최대 2줄까지 표시 (중앙 정렬 유지) */
.manga-title-row .manga-title{
  white-space:normal;          /* 줄바꿈 허용 */
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;

  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;        /* ← 2줄 제한 */
}

.manga-meta .meta-views{
  margin-left:20px;      /* ✅ 작성일과 '두 칸' 정도 띄움 */

  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
  color: #475569;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 눈 이모티콘 */
.manga-meta .meta-views .eye{
  font-size: 12px;        /* 🔼 11px → 12px */
  line-height: 1;
}

/* 하단바 버튼 색상만 변경 */
.m-catbar .m-cat.active{
  background: #2563eb;   /* 파란색 */
  color: #ffffff;
  border-color: #2563eb;
}

@media (max-width: 768px){
  .header-right{
    display:flex;
    align-items:center;
    gap:8px;

    overflow-x:auto;          /* ✅ 가로 스크롤 허용 */
    overflow-y:hidden;
    white-space:nowrap;       /* ✅ 줄바꿈 방지 */

    -webkit-overflow-scrolling: touch;
  }

  .header-right::-webkit-scrollbar{
    display:none;             /* ✅ 스크롤바 숨김 (모바일) */
  }

  .header-right .admin-btn{
    flex:0 0 auto;            /* ✅ 버튼 폭 줄어들지 않게 */
    white-space:nowrap;       /* ✅ 글자 세로 깨짐 방지 */
    word-break:keep-all;
  }
}