@import url(common.css);

body{
  width: 1200px;  
  margin: 0 auto;
}

.top-bar {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bochi-pink);
  padding: 10px 20px;
  border-radius: 6px;
  margin-top: 30px;
}

.top-bar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
}

.top-bar span {
  color: white;
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;
}

.leftbox{
  width: 30%;
  justify-content: space-around;
  display: flex;
}

/* ==============================
   모바일 전용 스타일
   ============================== */
@media (max-width: 480px) {
  .top-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 10px;
  }

  .logbox {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 5px 0;
  }

  .logbox a {
    margin: 0;
    padding: 4px 8px;
    font-size: 0.9em;
    white-space: nowrap;
    border-radius: 4px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.15);
  }

  #login, #newsign, .auth-btn {
    flex: 1 1 45%;
    margin: 5px 2.5%;
    box-sizing: border-box;
  }
}

@media (max-width: 580px) {
  body {
    margin: 0 auto;
  }

  .header-banner,
  .top-bar,
  .board-list,
  .post-item {
    max-width: 1200px;
    margin: 0 auto;
  }

  /* 배너 세로 구조 */
  .header-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .banner-left {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .banner-right {
    width: 100%;
    justify-content: flex-start;
    margin-top: 5px;
  }

  /* 검색창 & 버튼 모바일 최적화 */
  .banner-search {
    width: 100%;   /* 꽉 차게 */
    max-width: 100%;
  }

  .search-btn {
    width: 100%;
  }

  .banner-text h2 {
    font-size: 1em;
  }

  .banner-text p {
    font-size: 0.75em;
  }
}


.logbox a{
  margin: 10px;
}

.auth-btn {
  background-color: #e84118;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 0 12px;
}

.btn-ao {
  background-color: #479da0;
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.auth-btn:hover {
  background-color: #c23616;
}

.top-right-auth {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 0.8rem; /* 작은 텍스트 */
  z-index: 1000; /* 배너 위에 올라오도록 */
}

.top-right-auth a {
  text-decoration: none;
  color: #2f3640;
  margin-left: 5px;
}

.top-right-auth a:hover {
  color: #40739e;
}

#visited-boards-container{
  width: 70%;
  height: 30px;
  background-color: #d2d2d2;
  color: black;
}
#visited-boards-container a{
  margin: 5px;
  color: rgb(62, 62, 62);
}

.header-banner {
  display: flex;
  align-items: center;
  justify-content: space-around; /* 좌우 배치 */
  background-color: #f0f8ff;
  padding: 15px 30px;
  border-bottom: 2px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* 왼쪽 로고 + 텍스트 */
.banner-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.banner-logo {
  height: 75px;
  width: 75px;
  align-items: center;
}

.banner-text h2 {
  margin: 0;
  font-size: 1.5em;
  color: #333;
}

.banner-text p {
  margin: 2px 0 0 0;
  font-size: 0.9em;
  color: #666;
}

/* 오른쪽 검색창 */
.banner-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.banner-search {
  padding: 6px 10px;
  font-size: 0.95em;
  border: 1px solid #aaa;
  border-radius: 4px;
}

.search-btn {
  padding: 6px 12px;
  font-size: 0.95em;
  border: none;
  border-radius: 4px;
  background-color: var(--bochi-pink);
  color: white;
  cursor: pointer;
}

.search-btn:hover {
  background-color: var(--bochi-pink-deep);
}

@media (max-width: 580px) {
  body {
    margin: 0 auto;      /* 가운데 정렬 */
  }

  .header-banner,
  .top-bar,
  .board-list,
  .post-item {
    max-width: 1200px;   /* 내용 영역도 동일하게 고정 */
    margin: 0 auto;
  }
  /* 배너를 세로 구조로 */
  .header-banner {
    flex-direction: column;
    align-items: flex-start; /* 왼쪽 정렬 유지 */
    gap: 10px;
  }

  .banner-left {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .banner-right {
    width: 100%;
    justify-content: flex-start; /* 왼쪽 정렬 */
    margin-top: 5px; /* 로고 아래 간격 */
  }

  .banner-search {
    width: 50%;
    max-width: 50%;
  }

  .search-btn {
    width: 50%;
  }

  .banner-text h2 {
    font-size: 1em;
  }

  .banner-text p {
    font-size: 0.75em;
  }
}