/* ---------------------------
   BBS TOP AREA (Scoped)
--------------------------- */
.bbs-top {
    position: relative;
    padding: 64px 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.bbs-top-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 뒤로가기 버튼 */
.bbs-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bbs-btn-back:hover {
    background: #eef2f7;
    color: #111827;
}

.bbs-btn-back:focus-visible {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .35);
}

.bbs-btn-back__icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.bbs-btn-back__label {
    font-size: 14px;
    line-height: 1;
}

/* 타이틀 */
.bbs-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 20px;
}

.bbs-title {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.bbs-subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
}

/* 검색창 */
.bbs-container .bbs-search {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.bbs-container .bbs-search__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: currentColor;
    color: #9ca3af;
    /* placeholder 톤과 유사 */
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

.bbs-container .bbs-search__input {
    width: 100%;
    min-width: 0;
    /* height: 44px; */
    /* h-9(≈36px)보다 살짝 여유 */
    padding: 10px 16px 10px 44px;
    /* 좌측 아이콘 여백(pl-12) */
    font-size: 15px;
    /* text-base */
    line-height: 1.4;
    color: #111827;
    /* text-foreground */
    background: #f3f3f5;
    /* bg-input-background */
    border: 1px solid #d1d5db;
    /* border-gray-300 */
    border-radius: 999px;
    /* rounded-full */
    outline: none;
    transition: color .15s, box-shadow .15s, border-color .15s;
}

/* placeholder:text-muted-foreground */
.bbs-container .bbs-search__input::placeholder {
    color: #9ca3af;
}

/* focus-visible:border-ring + ring */
.bbs-container .bbs-search__input:focus {
    border-color: #a1a1a1;
    /* focus:border-blue-500 */
    box-shadow: 0 0 0 3px rgba(207, 207, 207, 0.8);
    /* focus:ring-blue-500/50 */
}

/* disabled:pointer-events-none + opacity */
.bbs-container .bbs-search__input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* aria-invalid 상태(빨간 링) */
.bbs-container .bbs-search__input[aria-invalid="true"] {
    border-color: #ef4444;
    /* red-500 */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .2);
}

/* 다크 톤이 필요하면 선택적으로 */
@media (prefers-color-scheme: dark) {
    .bbs-container .bbs-search__input {
        background: rgba(17, 24, 39, .2);
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .bbs-container .bbs-search__icon {
        color: #9ca3af;
    }
}

/* 작은 화면 대응 */
@media (max-width: 640px) {
    .bbs-container .bbs-search__input {
        height: 42px;
    }
}

/* 필터 버튼 그룹 */
.bbs-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.bbs-filter__btn {
    padding: 8px 24px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bbs-filter__btn:hover {
    background: #f9fafb;
}

.bbs-filter__btn.is-active {
    background: #2563eb;
    border-color: transparent;
    color: #fff;
}

.bbs-filter__btn.is-active:hover {
    background: #1d4ed8;
}

/* 반응형 */
@media (max-width: 640px) {
    .bbs-top {
        padding: 48px 0;
    }

    .bbs-title {
        font-size: 26px;
    }

    .bbs-search__input {
        height: 42px;
    }
}



/* =========================
   bbs-list : 카드/페이지네이션
   ========================= */
.bbs-list {
    padding: 100px 0 50px;
}

@media screen and (max-width:768px) {
    .bbs-list {
        padding: 50px 0 30px;
    }
}

/* =========================
   bbs-list : 컨트롤(셀렉트)
   ========================= */
.bbs-container .bbs-list .bbs-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    align-items: stretch;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .bbs-container .bbs-list .bbs-controls {
        flex-direction: row;
        align-items: center;
    }

    .bbs-container .bbs-list .bbs-select[data-field="category"] {
        width: 200px;
    }

    .bbs-container .bbs-list .bbs-select[data-field="sort"] {
        width: 180px;
    }
}

.bbs-container .bbs-list .bbs-select {
    position: relative;
}

.bbs-container .bbs-list .bbs-select__input {
    appearance: none;
    width: 100%;
    max-width: 240px;
    min-height: 36px;
    padding: 8px 36px 8px 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239ca3af' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    outline: none;
}

.bbs-container .bbs-list .bbs-select__input:hover {
    background-color: #f9fafb;
}

.bbs-container .bbs-list .bbs-select__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 내용 텍스트 */
.bbs-container .bbs-list .bbs-select__value {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 아이콘들 */
.bbs-container .bbs-list .bbs-select__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #6b7280;
}

.bbs-container .bbs-list .bbs-select__chev {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #9ca3af;
}

/* 열림 상태(필요 시 버튼에 .is-open 추가) */
.bbs-container .bbs-list .bbs-select__trigger.is-open {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

/* 드롭다운 목록(필요하면 사용) */
.bbs-container .bbs-list .bbs-select__list {
    position: absolute;
    inset: auto 0 0 0;
    transform: translateY(calc(100% + 6px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    padding: 6px;
    margin: 0;
    list-style: none;
    z-index: 20;
    max-height: 280px;
    overflow: auto;
}

.bbs-container .bbs-list .bbs-select__option {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

.bbs-container .bbs-list .bbs-select__option:hover {
    background: #f3f4f6;
}

.bbs-container .bbs-list .bbs-select__option[aria-selected="true"] {
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
}


.bbs-container .bbs-list__grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
    max-width: 1120px;
    margin: 0 auto 28px;
}

@media(min-width:640px) {
    .bbs-container .bbs-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(min-width:1024px) {
    .bbs-container .bbs-list__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.bbs-container .bbs-card {
    border: 1px solid var(--bbs-border, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.bbs-container .bbs-card:hover {
    transform: translateY(-2px);
    border-color: #d1d5db;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.bbs-container .bbs-card__media {
    aspect-ratio: 16/10;
    background: #f9fafb;
    display: block;
    overflow: hidden;
}

.bbs-container .bbs-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bbs-container .bbs-card__body {
    padding: 14px 14px 16px;
}

.bbs-container .bbs-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.bbs-container .bbs-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #9ca3af;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex: 0 0 auto;
}

.bbs-container .bbs-author {
    flex: 1 1 auto;
    min-width: 0;
}

.bbs-container .bbs-author__name {
    margin: 0;
    font-weight: 600;
    color: #111827;
    font-size: 15px;
    line-height: 1.2;
}

.bbs-container .bbs-author__role {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.bbs-container .bbs-rating {
    color: #f59e0b;
    /* 노랑 별 */
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}

.bbs-container .bbs-card__desc {
    margin: 10px 0 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.2;
}

.bbs-container .bbs-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    color: #6b7280;
    font-size: 13px;
}

.bbs-container .bbs-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 12px;
}


/* =========================
   Portfolio Grid (scoped)
   ========================= */
.bbs-container .bbs-list .port-grid {
  --port-gap: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--port-gap);
}

@media (min-width: 768px) {
  .bbs-container .bbs-list .port-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .bbs-container .bbs-list .port-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 카드 */
.bbs-container .bbs-list .port-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  overflow: hidden;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.bbs-container .bbs-list .port-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
  transform: translateY(-2px);
}

/* 링크 래퍼(전체 클릭 영역) */
.bbs-container .bbs-list .port-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* 미디어: 4:3 비율 유지 */
.bbs-container .bbs-list .port-media {
  position: relative;
  background: #e5e7eb;
  overflow: hidden;
  /* aspect-ratio 폴백: padding-top 방식 */
}
.bbs-container .bbs-list .port-media::before {
  content: "";
  display: block;
  padding-top: 75%; /* 4:3 */
}
.bbs-container .bbs-list .port-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform .5s ease;
}
.bbs-container .bbs-list .port-card:hover .port-media > img {
  transform: scale(1.08);
}

/* 기본 본문 */
.bbs-container .bbs-list .port-body {
  padding: 20px;
  transition: opacity .25s ease;
}
.bbs-container .bbs-list .port-name {
  margin: 8px 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.bbs-container .bbs-list .port-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

/* 배지 */
.bbs-container .bbs-list .port-badge {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .9);
  color: #fff;
  backdrop-filter: saturate(120%) blur(2px);
}
.bbs-container .bbs-list .port-badge--soft {
  background: #dbeafe;
  color: #1d4ed8;
}

/* 오버레이 */
.bbs-container .bbs-list .port-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.2), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none; /* 기본 비활성 */
}
.bbs-container .bbs-list .port-card:hover .port-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* 오버레이 내용 */
.bbs-container .bbs-list .port-overlay__inner {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  color: #fff;
  transform: translateY(8px);
  transition: transform .25s ease;
}
.bbs-container .bbs-list .port-card:hover .port-overlay__inner {
  transform: translateY(0);
}

.bbs-container .bbs-list .port-title {
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.bbs-container .bbs-list .port-desc {
  font-size: 14px;
  color: #e5e7eb;
  margin-bottom: 10px;
}

.bbs-container .bbs-list .port-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #f3f4f6;
}
.bbs-container .bbs-list .port-meta b {
  color: #93c5fd; /* 파란 톤 강조 */
  font-weight: 700;
  margin-right: 6px;
}

/* 호버 시 본문 페이드아웃 */
.bbs-container .bbs-list .port-card:hover .port-body {
  opacity: 0;
}


/* 페이지네이션 */
.bbs-container .bbs-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px auto 20px;
}

.bbs-container .bbs-page {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    text-align: center;
    align-content: center;
}

.bbs-container .bbs-page:hover {
    background: #f3f4f6;
}

.bbs-container .bbs-page.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.bbs-container .bbs-page[disabled],
.bbs-container .bbs-page[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}