/* BASIC css start */
/* ═══════════════════════════════════════════════════════════════════
   THELAB CHEMICAL — Mobile Main Page CSS
   main.mobile.css
   ═══════════════════════════════════════════════════════════════════ */

/* ── 공통 ── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  background: #f7f8fc;
  margin: 0; padding: 0;
}

.sec_inner { padding: 0 16px; }


/* ══════════════════════════════════════
   1. Hero
══════════════════════════════════════ */
#hero { overflow: hidden; }

.hero-bg {
  background: linear-gradient(170deg, #0C025B 0%, #0a1040 65%, #0d1a5a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-molecules { position: absolute; inset: 0; pointer-events: none; }
.mol {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: rgba(160,140,255,0.08);
  animation: mol-float linear infinite;
  white-space: nowrap;
}
@keyframes mol-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* 내부 컨텐츠 */
.hero-inner {
  position: relative; z-index: 1;
  text-align: center; color: #fff;
  padding: 36px 20px 20px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
  margin: 0 0 14px;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 10px;
  letter-spacing: -0.025em;
}
.hero-title em { font-style: normal; color: #7eb8ff; }

.hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
}

/* 검색창 */
.hero-search {
  display: flex;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
  transition: border-color .2s;
}
.hero-search:focus-within { border-color: rgba(126,184,255,0.6); }

.hero-search input {
  flex: 1;
  padding: 13px 14px;
  background: none; border: none; outline: none;
  color: #fff; font-size: 14px;
  font-family: inherit;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.35); }

.hero-search button {
  padding: 13px 18px;
  background: #3b82f6; color: #fff;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
}
.hero-search button:active { background: #2563eb; }

/* ── 모바일 전용 태그 영역 ── */
.hero-ft-mobile {
  position: relative; z-index: 1;
  width: 100%;
  padding: 14px 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-ft-mobile::-webkit-scrollbar { display: none; }

.mft-row {
  display: flex;
  align-items: center;  /* flex-start → center 로 되돌리기 */
  padding: 0 16px;
  gap: 0;
}

.mft-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: right;
  padding-right: 12px;
  word-break: keep-all;
  line-height: 1.3;
  align-self: center;  /* 추가 */
}

.mft-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;  /* 추가 */
}
.mft-tags::-webkit-scrollbar { display: none; }

.ft-tag {
  display: inline-block;
  padding: 2px 10px 2px 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(210,225,255,0.85);
  text-decoration: none;
  background: none; border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.ft-tag:active { color: #fff; }
.ft-tag--hot { color: rgba(255,190,155,0.95); font-weight: 700; }

/* ── 통계 바 ── */
.hero-stats {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 8px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hst-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 0 4px;
}
.hst-item:last-child { border-right: none; }

.hst-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.hst-unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-left: 1px;
}
.hst-label {
  display: block;
  font-size: 0.56rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}


/* ══════════════════════════════════════
   2. THELABCOMM
══════════════════════════════════════ */
#sec-comm {
  padding: 24px 0 20px;
  background: #fff;
}

.comm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
}
.comm-title { font-size: 15px; font-weight: 700; color: #111; }
.comm-more  { font-size: 12px; color: #999; text-decoration: none; }

.comm-list { list-style: none; margin: 0 0 12px; padding: 0; }

.comm-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  min-height: 44px;
}
.comm-list-item:last-child { border-bottom: none; }
.comm-list-item:active .comm-list-subject { color: #2b7fff; }

.comm-list-subject {
  flex: 1;
  font-size: 13.5px;
  color: #333;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comm-list-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  color: #bbb;
}
.comm-list-nick { color: #999; font-weight: 500; }

.comm-list-skel {
  height: 52px;
  border-bottom: 1px solid #f2f2f2;
  background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.comm-cta {
  display: block;
  padding: 12px 16px;
  background: #f7f8fc;
  border: 1px dashed #d0d0d0;
  border-radius: 10px;
  font-size: 13px; color: #888;
  text-decoration: none;
  text-align: center;
}
.comm-cta:active { border-color: #2b7fff; color: #2b7fff; background: #f0f6ff; }

.comm-empty { padding: 20px 0; text-align: center; color: #bbb; font-size: 13px; }


/* ══════════════════════════════════════
   3. Science News
══════════════════════════════════════ */
#sec-mid {
  padding: 24px 0 20px;
  background: #fff;
  border-top: 8px solid #f7f8fc;
}

.info-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
}
.info-col-title { font-size: 15px; font-weight: 700; color: #111; }
.info-col-more  { font-size: 12px; color: #999; text-decoration: none; }

/* 히어로 카드 — 가로 스크롤 슬라이더 */
.sci-news-hero {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -16px 20px;
  padding: 4px 16px 8px;
}
.sci-news-hero::-webkit-scrollbar { display: none; }

.sci-news-hero-skel {
  flex-shrink: 0;
  width: 260px;
  height: 220px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.sci-hero-card {
  flex-shrink: 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-decoration: none;
  color: inherit;
}
.sci-hero-card:active { opacity: 0.85; transform: scale(0.98); }

.sci-hero-thumb {
  width: 100%;
  height: 150px;
  overflow: hidden;
  flex-shrink: 0;
}
.sci-hero-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.sci-hero-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sci-hero-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sci-hero-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #bbb;
  flex-wrap: wrap;
}
.sci-news-src { font-weight: 600; color: #999; }

/* 뉴스 리스트 */
.sci-news-list { display: flex; flex-direction: column; }

.sci-news-skel {
  height: 56px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.sci-news-item {
  display: flex;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid #f2f2f2;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.sci-news-item:last-child { border-bottom: none; }
.sci-news-item:active { background: #fafafa; }

.sci-news-body { flex: 1; min-width: 0; }

.sci-news-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sci-news-item:active .sci-news-title { color: #2b7fff; }

.sci-news-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  color: #bbb;
  flex-wrap: wrap;
}

/* 언어/카테고리 배지 */
.sci-news-lang {
  font-size: 9px; padding: 1px 5px;
  border-radius: 3px; font-weight: 700;
}
.sci-news-lang.ko { background: #dbeafe; color: #1d4ed8; }
.sci-news-lang.en { background: #f3f4f6; color: #9ca3af; }

.sci-news-cat {
  font-size: 9px; padding: 1px 6px;
  border-radius: 3px; font-weight: 700;
  text-transform: uppercase;
}
.sci-news-cat-life    { background: #ede9fe; color: #5b21b6; }
.sci-news-cat-matter  { background: #ecfdf5; color: #065f46; }
.sci-news-cat-energy  { background: #fff7ed; color: #9a3412; }
.sci-news-cat-tech    { background: #dbeafe; color: #1e40af; }
.sci-news-cat-science { background: #f0fdf4; color: #166534; }

.sci-news-empty { padding: 24px 0; text-align: center; color: #bbb; font-size: 13px; }

.sci-news-more-wrap { margin-top: 16px; }
.sci-news-more-btn {
  display: block;
  padding: 13px 16px;
  background: #f7f8fc;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
  color: #666; text-decoration: none;
  text-align: center;
}
.sci-news-more-btn:active { border-color: #2b7fff; color: #2b7fff; }


/* ══════════════════════════════════════
   4. 게시판 — 탭
══════════════════════════════════════ */
#sec-info {
  padding: 24px 0 80px; /* 하단 네비 여백 */
  background: #f7f8fc;
  border-top: 8px solid #f7f8fc;
}

/* 탭 버튼 */
.board-tabs {
  display: flex;
  border-bottom: 2px solid #e5e5e5;
  margin-bottom: 0;
  background: #fff;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.board-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color .15s;
  font-family: inherit;
}
.board-tab.active {
  color: #0C025B;
}
.board-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: #0C025B;
  border-radius: 2px 2px 0 0;
}

/* 탭 패널 */
.board-panel {
  display: none;
  background: #fff;
  border-radius: 0 0 10px 10px;
  padding: 0 16px 8px;
}
.board-panel.active { display: block; }

.board-panel-head {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0 4px;
}

/* 리스트 공통 */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-item { border-bottom: 1px solid #f2f2f2; }
.info-item:last-child { border-bottom: none; }

.info-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.info-link:active .info-subject { color: #2b7fff; }

.info-subject {
  flex: 1;
  font-size: 13px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.info-meta {
  flex-shrink: 0;
  font-size: 11px;
  color: #bbb;
  white-space: nowrap;
}

/* 교체 */
/* MakeShop font 태그 무력화 */
.info-list font,
.info-item font,
.info-link font,
.info-subject font {
  font-size: 13px !important;
  color: inherit !important;
  display: contents;
}
/* BASIC css end */

