/**
 * Study Abroad Bulletin Styles
 * 해외유학 게시판 전용 스타일 - 새 디자인
 */

/* ========================================
   Variables
======================================== */
:root {
  --bd-primary: #b3322b;
  --bd-primary-hover: #912720;
  --bd-text-dark: #121316;
  --bd-text-secondary: #45484f;
  --bd-text-muted: #6b6e76;
  --bd-text-light: #9a9fa8;
  --bd-bg-page: #fafaf8;
  --bd-bg-dark: #121316;
  --bd-bg-fixed: #f6f3ef;
  --bd-bg-thead: #f0efea;
  --bd-border: #d9d9d4;
  --bd-border-light: #eceef3;
  --bd-cat-university: #3b4b75;
  --bd-cat-session: #b3322b;
  --bd-cat-faq: #45484f;
}

/* ========================================
   Base Layout
======================================== */
.bd-wrapper {
  font-family: Pretendard, 'Noto Sans KR', -apple-system, sans-serif;
  color: var(--bd-text-dark);
  background: var(--bd-bg-page);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.bd-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ========================================
   Header - Dark Section
======================================== */
.bd-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bd-bg-dark);
  color: #fff;
  border-top: 1px solid #2a2d33;
}

.bd-header::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -2;
  background-image: var(--hero-photo);
  background-position: center;
  background-size: cover;
  filter: blur(14px);
}

.bd-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.72);
}

.bd-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bd-header__breadcrumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--bd-text-light);
  text-decoration: none;
  transition: color 0.18s ease;
}

.bd-header__breadcrumb:hover {
  color: #fff;
}

.bd-header__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ef9c96;
}

.bd-header__title {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.bd-header__desc {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #c3cbe0;
  max-width: 620px;
}

/* ========================================
   Main Content
======================================== */
.bd-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 112px;
}

/* ========================================
   Tabs Navigation
======================================== */
.bd-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--bd-border);
  overflow-x: auto;
}

.bd-tabs__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--bd-text-muted);
  cursor: pointer;
  transition: color 0.18s ease;
}

.bd-tabs__item:hover {
  color: var(--bd-text-dark);
}

.bd-tabs__item--active {
  font-weight: 700;
  color: var(--bd-text-dark);
  box-shadow: inset 0 -3px 0 var(--bd-primary);
}

.bd-tabs__count {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #8a8d93;
}

.bd-tabs__item--active .bd-tabs__count {
  color: var(--bd-primary);
}

/* ========================================
   Toolbar (Search)
======================================== */
.bd-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 32px 0 20px;
}

.bd-toolbar__count {
  margin: 0;
  font-size: 15px;
  color: var(--bd-text-secondary);
}

.bd-toolbar__count strong {
  color: var(--bd-primary);
}

.bd-search {
  display: flex;
  gap: 0;
  width: 420px;
  max-width: 100%;
}

.bd-search__select {
  border: 1px solid #d1d1cc;
  border-right: 0;
  padding: 0 12px;
  height: 48px;
  font-size: 15px;
  background: #fff;
  color: var(--bd-text-dark);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6e76' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.bd-search__input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d1cc;
  padding: 0 14px;
  height: 48px;
  font-size: 15px;
  background: #fff;
  font-family: inherit;
  outline: none;
}

.bd-search__input:focus {
  border-color: var(--bd-primary);
}

.bd-search__btn {
  width: 52px;
  height: 48px;
  border: 0;
  background: var(--bd-bg-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease;
}

.bd-search__btn:hover {
  background: #2d3038;
}

/* ========================================
   Table (Grid)
======================================== */
.bd-table {
  border-top: 2px solid var(--bd-bg-dark);
}

.bd-table__head {
  display: grid;
  grid-template-columns: 80px 110px minmax(0, 1fr) 120px 80px;
  gap: 16px;
  padding: 16px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bd-text-secondary);
  border-bottom: 1px solid var(--bd-border);
  background: var(--bd-bg-thead);
  text-align: center;
}

.bd-table__head span:nth-child(3) {
  text-align: left;
}

/* Table Row */
.bd-row {
  display: grid;
  grid-template-columns: 80px 110px minmax(0, 1fr) 120px 80px;
  gap: 16px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--bd-border-light);
  color: var(--bd-text-dark);
  text-decoration: none;
  transition: background 0.15s ease;
}

.bd-row:hover {
  background: #f5f5f3;
}

.bd-row:hover .bd-row__title {
  color: var(--bd-primary);
}

/* Fixed/Pinned Row */
.bd-row--fixed {
  background: var(--bd-bg-fixed);
}

.bd-row--fixed:hover {
  background: #f0ebe4;
}

.bd-row__num {
  display: flex;
  justify-content: center;
  font-size: 14px;
  color: var(--bd-text-muted);
}

.bd-row__badge {
  background: var(--bd-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.bd-row__cat {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.bd-row__cat--university { color: var(--bd-cat-university); }
.bd-row__cat--session { color: var(--bd-cat-session); }
.bd-row__cat--faq { color: var(--bd-cat-faq); }

.bd-row--fixed .bd-row__cat {
  font-weight: 700;
}

.bd-row__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bd-row__title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-row--fixed .bd-row__title {
  font-weight: 700;
}

.bd-row__new {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bd-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.bd-row__file {
  flex-shrink: 0;
  color: var(--bd-text-muted);
}

.bd-row__date,
.bd-row__views {
  text-align: center;
  font-size: 14px;
  color: var(--bd-text-muted);
}

/* ========================================
   Pagination
======================================== */
.bd-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.bd-pagination__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--bd-border);
  background: #fff;
  color: var(--bd-text-secondary);
  font-size: 15px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.bd-pagination__btn:hover {
  border-color: var(--bd-text-dark);
}

.bd-pagination__btn--active {
  border-color: var(--bd-text-dark);
  background: var(--bd-text-dark);
  color: #fff;
  font-weight: 700;
}

.bd-pagination__btn--disabled {
  color: var(--bd-text-muted);
  cursor: default;
}

.bd-pagination__btn--disabled:hover {
  border-color: var(--bd-border);
}

/* ========================================
   Empty State
======================================== */
.bd-empty {
  padding: 80px 20px;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--bd-border-light);
}

.bd-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.bd-empty__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bd-text-dark);
  margin: 0 0 8px;
}

.bd-empty__desc {
  font-size: 15px;
  color: var(--bd-text-muted);
  margin: 0;
}

/* ========================================
   Detail Page
======================================== */
.bd-detail {
  max-width: 1024px;
  margin: 0 auto;
  padding: 64px 32px 112px;
}

/* Back Link */
.bd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--bd-text-secondary);
  text-decoration: none;
}

.bd-back:hover {
  color: var(--bd-primary);
}

/* Article Header */
.bd-article__header {
  border-top: 2px solid var(--bd-text-dark);
  border-bottom: 1px solid var(--bd-border);
  padding: 36px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bd-article__meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bd-article__badge {
  background: var(--bd-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.bd-article__cat {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bd-primary);
}

.bd-article__title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.bd-article__info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--bd-text-muted);
}

.bd-article__info strong {
  color: var(--bd-text-secondary);
  font-weight: 600;
}

.bd-article__info-divider {
  color: var(--bd-border);
}

/* Content */
.bd-content {
  padding: 48px 0;
  font-size: 17px;
  line-height: 1.8;
  color: var(--bd-text-secondary);
}

.bd-content p {
  margin: 0 0 24px;
}

.bd-content p:last-child {
  margin-bottom: 0;
}

.bd-content img {
  max-width: 100%;
  height: auto;
}

/* Attachments */
.bd-files {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 0;
  border-top: 1px solid var(--bd-border);
}

.bd-files__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--bd-text-dark);
}

.bd-files__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--bd-border);
  font-size: 15px;
  color: var(--bd-text-secondary);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.bd-files__item:hover {
  border-color: var(--bd-text-dark);
}

.bd-files__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-files__download {
  font-size: 13px;
  color: var(--bd-text-muted);
}

/* Adjacent (Prev/Next) */
.bd-adjacent {
  border-top: 2px solid var(--bd-text-dark);
  border-bottom: 1px solid var(--bd-border);
}

.bd-adjacent__item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--bd-border-light);
  color: var(--bd-text-dark);
  text-decoration: none;
  transition: background 0.15s ease;
}

.bd-adjacent__item:last-child {
  border-bottom: 0;
}

.bd-adjacent__item:hover {
  background: #f5f5f3;
}

.bd-adjacent__item:hover .bd-adjacent__title {
  color: var(--bd-primary);
}

.bd-adjacent__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bd-text-muted);
}

.bd-adjacent__title {
  font-size: 16px;
  transition: color 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-adjacent__date {
  font-size: 14px;
  color: var(--bd-text-muted);
  text-align: right;
}

/* Actions */
.bd-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
}

.bd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.bd-btn--outline {
  border: 1.5px solid var(--bd-text-dark);
  background: transparent;
  color: var(--bd-text-dark);
}

.bd-btn--outline:hover {
  background: var(--bd-text-dark);
  color: #fff;
}

.bd-btn--primary {
  border: 0;
  background: var(--bd-primary);
  color: #fff;
  padding: 0 36px;
}

.bd-btn--primary:hover {
  background: var(--bd-primary-hover);
}

/* ========================================
   Responsive - Mobile
======================================== */
@media (max-width: 760px) {
  .bd-header__inner {
    padding: 48px 20px 56px;
  }

  .bd-header__title {
    font-size: 32px;
  }

  .bd-header__desc {
    font-size: 15px;
  }

  .bd-main {
    padding: 0 20px 80px;
  }

  .bd-tabs {
    gap: 20px;
  }

  .bd-tabs__item {
    font-size: 15px;
    height: 56px;
  }

  .bd-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 0 16px;
  }

  .bd-search {
    width: 100%;
  }

  /* Table - Mobile */
  .bd-table__head {
    display: none;
  }

  .bd-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 18px 4px;
  }

  .bd-row__num,
  .bd-row__views {
    display: none;
  }

  .bd-row__cat {
    text-align: left;
    font-size: 12px;
  }

  .bd-row__title {
    font-size: 15px;
    white-space: normal;
    overflow: visible;
  }

  .bd-row__date {
    font-size: 13px;
    text-align: left;
  }

  /* Detail - Mobile */
  .bd-detail {
    padding: 32px 20px 80px;
  }

  .bd-article__title {
    font-size: 24px;
  }

  .bd-article__info {
    flex-direction: column;
    gap: 4px;
  }

  .bd-article__info-divider {
    display: none;
  }

  .bd-content {
    padding: 32px 0;
    font-size: 15px;
  }

  .bd-adjacent__item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .bd-adjacent__date {
    display: none;
  }

  .bd-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .bd-btn {
    min-height: 48px;
    font-size: 15px;
  }
}
