/* ============================================================
   생명대학교 (BIOLOGY UNIVERSITY) — 라프텔 <원룸조교님> 프로모 사이트
   common.css — 토큰 / 리셋 / GNB / 푸터 / 공통 컴포넌트
   ============================================================ */

/* ---------- Font ---------- */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");
@import url("https://cdn.jsdelivr.net/gh/Joungkyun/font-d2coding/d2coding.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500;700;900&display=swap");

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --brand-navy: #336191;
  --brand-navy-deep: #234772;
  --brand-blue: #5a89c2;
  --brand-sky: #d8e5f2;
  --brand-sky-50: #eaf2fb;

  /* Surface */
  --bg-page: #ffffff;
  --bg-section: #f5f7fa;

  /* Text */
  --text-primary: #1f2937;
  --text-sub: #6b7280;
  --text-muted: #9ca3af;
  --text-on-navy: #ffffff;

  /* Border */
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* Signal */
  --badge-new: #ef4444;
  --link: #2563eb;

  /* Typography */
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --font-mono: "D2Coding", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing & Layout */
  --container-max: 1200px;
  --gnb-h: 72px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadow */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(51, 97, 145, 0.06);
  --shadow-popup: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ---------- Utility ---------- */
.only-mobile {
  display: none;
}
.only-pc {
  display: inline;
}
@media (max-width: 768px) {
  .only-mobile {
    display: inline;
  }
  .only-pc {
    display: none;
  }
}

/* ---------- Fade-in 애니메이션 ---------- */
@keyframes bioFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font-family: inherit;
  cursor: pointer;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
}
.section.tight {
  padding: 56px 0;
}
.section.bg-tint {
  background: var(--bg-section);
}

/* ---------- GNB ---------- */
.gnb {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--gnb-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.gnb-inner {
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.gnb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--brand-navy);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.gnb-logo img.gnb-emblem {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.gnb-logo img.gnb-title {
  width: auto;
  height: 36px;
  object-fit: contain;
  display: block;
}
.gnb-logo img.gnb-full {
  width: auto;
  height: 44px;
  object-fit: contain;
  display: block;
}
.gnb-logo .en {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.12em;
  display: block;
  margin-top: 2px;
}
.gnb-menus {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 1;
  justify-content: center;
}
.gnb-menus a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 8px 0;
  transition: color 0.15s ease;
}
.gnb-menus a:hover {
  color: var(--brand-navy);
}
.gnb-menus a.active {
  color: var(--brand-navy);
}
.gnb-menus a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand-navy);
}
/* Hover underline 슬라이드 (active 메뉴 제외) */
.gnb-menus a:not(.active)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand-navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}
.gnb-menus a:not(.active):hover::after {
  transform: scaleX(1);
}
.gnb-menus a.locked {
  display: none;
}
html.is-logged-in .gnb-menus a.locked {
  display: inline-block;
}
.gnb-login {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-navy);
  padding: 8px 18px;
  border: 1.5px solid var(--brand-navy);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  flex-shrink: 0;
}
.gnb-login:hover {
  background: var(--brand-navy);
  color: #fff;
}

/* ---------- Hamburger (mobile) ---------- */
.gnb-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 0;
}
.gnb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand-navy);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.gnb-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.gnb-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.gnb-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 86%;
  max-width: 340px;
  height: 100vh;
  background: #fff;
  z-index: 110;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.drawer.open {
  transform: translateX(0);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: var(--gnb-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-head .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-head .brand img.em {
  width: 32px;
  height: 32px;
}
.drawer-head .brand img.tt {
  height: 22px;
}
.drawer-head .brand img.full {
  height: 36px;
  width: auto;
}
.drawer-close {
  width: 36px;
  height: 36px;
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--text-sub);
  cursor: pointer;
  line-height: 1;
}
.drawer-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.drawer-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.drawer-menu a:hover {
  background: var(--brand-sky-50);
}
.drawer-menu a.active {
  color: var(--brand-navy);
  background: var(--brand-sky-50);
}
.drawer-menu a.locked {
  display: none;
}
html.is-logged-in .drawer-menu a.locked {
  display: flex;
}
.drawer-menu a::after {
  content: "›";
  color: var(--text-muted);
  font-size: 18px;
}
.drawer-foot {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-login {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--brand-navy);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.06em;
}

/* ---------- Page header (sub pages) ---------- */
.page-header {
  position: relative;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  color: #fff;
  padding: 80px 0 88px;
  min-height: 280px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.page-header > .page-header-inner {
  width: 100%;
}
.page-header-inner::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(calc(-50% + 80px));
  width: 440px;
  height: 440px;
  background: url("../assets/images/biology-univ-logo-white.png") center/contain no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 768px) {
  .page-header {
    padding: 80px 0 24px;
    min-height: 220px;
  }
  .page-header-inner::before {
    width: 300px;
    height: 300px;
    right: -40px;
    transform: translateY(calc(-50% + 30px));
    opacity: 0.12;
  }
}
.page-header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.page-header h1 {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.page-header p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Section heading ---------- */
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 8px;
}
.section-title .accent {
  color: var(--brand-navy);
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-sub);
  text-align: center;
  margin: 0 0 48px;
}

/* ---------- News / Notice list ---------- */
.news-list {
  display: flex;
  flex-direction: column;
}
.news-item {
  display: grid;
  grid-template-columns: 100px 60px 50px 1fr 20px;
  align-items: center;
  gap: 16px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.news-item:hover {
  background: var(--brand-sky-50);
}
.news-item:hover .news-title {
  color: var(--brand-navy);
}
.news-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.news-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-navy);
  background: var(--brand-sky-50);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.news-badge {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--badge-new);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  text-align: center;
}
.news-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.15s;
}
.news-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Two column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Button / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand-navy);
  background: transparent;
  color: var(--brand-navy);
  transition: all 0.15s;
  cursor: pointer;
}
.btn:hover {
  background: var(--brand-navy);
  color: #fff;
}
.btn-primary {
  background: var(--brand-navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-navy-deep);
}
.btn-arrow::after {
  content: "→";
}

/* ---------- Signature curve graphic ---------- */
.brand-curve {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

/* ---------- Notice card (홈/대학생활 공통) ---------- */
.notice-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px 16px;
}
.notice-card .heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.notice-card .heading h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 4px 0 0;
  letter-spacing: -0.02em;
}
.notice-card .tabs {
  display: flex;
  gap: 2px;
  flex: 1;
}
.notice-card .tab {
  background: none;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.notice-card .tab:hover {
  color: var(--brand-navy);
}
.notice-card .tab.active {
  background: var(--brand-blue);
  color: #fff;
}
.notice-card .view-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.notice-card .view-more:hover {
  color: var(--brand-navy-deep);
}

.news-v2 .item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.news-v2 .item:last-child {
  border-bottom: 0;
}
.news-v2 .item:hover .item-title {
  color: var(--brand-navy);
}
.news-v2 .item.hidden {
  display: none;
}
.news-v2 .item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.news-v2 .item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.news-v2 .item-meta .sep {
  color: var(--border-strong);
}
.news-v2 .item-meta .cat {
  color: var(--text-sub);
  font-weight: 600;
}
.news-v2 .item-meta .new,
.news-v2 .item-meta .best {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-blue);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.news-v2 .item-meta .new::after,
.news-v2 .item-meta .best::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--brand-blue);
  border-radius: 50%;
}
@media (max-width: 768px) {
  .notice-card {
    padding: 20px 18px 18px;
  }
  .notice-card .heading {
    flex-wrap: nowrap;
    row-gap: 6px;
  }
  .notice-card .heading h3 {
    font-size: 18px;
    flex-shrink: 0;
  }
  .notice-card .tabs {
    flex: none;
    flex-wrap: nowrap;
    margin-left: auto;
  }
  .notice-card .tab {
    white-space: nowrap;
    font-size: 12px;
    padding: 5px 12px;
  }
  /* View More 모바일: 헤더에서 분리 → 카드 하단으로 절대배치 */
  .notice-card {
    position: relative;
  }
  .notice-card .view-more {
    position: absolute;
    bottom: 16px;
    right: 18px;
    margin: 0;
  }
  .news-v2 {
    padding-bottom: 28px;
  }
  .news-v2 .item-title {
    font-size: 14px;
  }
}

/* ---------- Attachments (모달 / 아코디언 공용) ---------- */
.attachments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.attachments h4 {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: 0.16em;
  margin: 0 0 12px;
}
.attach-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
}
.attach-item:hover {
  border-color: var(--brand-navy);
  background: var(--brand-sky-50);
}
.attach-item .icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--brand-sky-50);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.attach-item .name {
  flex: 1;
}
.attach-item .size {
  font-size: 11px;
  color: var(--text-muted);
}
.attach-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border: 1px solid var(--border);
  display: block;
}
.attach-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-popup);
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close {
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--brand-navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 56px 0 36px;
  font-size: 13px;
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 24px;
}
.footer-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #fff;
  color: var(--brand-navy-deep);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.share-btn:hover {
  background: rgba(255, 255, 255, 0.88);
}
.share-btn .x-mark {
  font-size: 14px;
}
.footer-disclaimer {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}
.footer-copyright {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-logo-img {
    height: 36px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
  .gnb-inner {
    padding: 0 24px;
  }
  .page-header-inner {
    padding: 0 24px;
  }
  .footer-inner {
    padding: 0 24px;
  }
  .section {
    padding: 48px 0;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .four-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .gnb-menus {
    display: none;
  }
  .gnb-login {
    display: none;
  }
  .gnb-hamburger {
    display: flex;
  }
  .gnb-logo img.gnb-emblem {
    width: 36px;
    height: 36px;
  }
  .gnb-logo img.gnb-title {
    height: 28px;
  }
  .gnb-logo img.gnb-full {
    height: 36px;
  }
  .section-title {
    font-size: 24px;
  }
  .page-header h1 {
    font-size: 28px;
  }
  .news-item {
    grid-template-columns: 80px 1fr 16px;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    padding: 14px 4px;
  }
  .news-item .news-cat,
  .news-item .news-badge {
    display: none;
  }
  .news-arrow {
    grid-column: 3;
    grid-row: 1 / -1;
  }
  .news-title {
    grid-column: 1 / 3;
    font-size: 14px;
  }
}
