/* =========================
   COMMUNITY THEME (BLUE)
========================= */

.ab-search-bar {
  margin-bottom: 0px;
}

.community {
    min-height: 100vh;
  padding-top: 20px;
  margin-top: 0;
  padding-top: 6px;
  background: linear-gradient(
    to bottom,
    #EAF2FF 0px,
    #F5F9FF 160px,
    #F5F9FF 100%
  );
}

.community-location {
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.community-title {
  margin: 0;
}
/* Wrapper */
.community-wrapper {
  max-width: 900px;
  margin: 5px auto;
  padding: 0 20px;
  overflow: visible !important;
}

/* Title */
.community-title {
  font-size: 20px;
  margin-bottom: 10px;
  color: #2563EB;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-write-header {
   display:block;
  align-items: center;
  position: relative;
  padding:16px 0;
  margin:8px 0 6px 0;
  line-height:1.4;
}

.community-back{
display:block;
font-size:14px;
color:#666;
margin-bottom:12px;
text-decoration:none;
}

.community-back:hover{
color:#000;
}

.community-login-comment{
background:#F3F4F6;
padding:20px;
border-radius:12px;
text-align:center;
color:#666;
}

.community-write-title {
  flex: 1;
  text-align: center;
  margin: 0;
}

/* Tabs */

.community-tab{
  display:inline-block;
  padding:8px 14px;
  border-radius:20px;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

.community-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
   position: relative;
  z-index: 10;
}

#community-list {
  position: relative;
  z-index: 1;
}

.community-author {
   word-break: keep-all;
   min-width: 50px;
  white-space: nowrap;
}

.community-author-link{
  cursor: pointer;
   color:#444;
  text-decoration:none;
}


.community-author-link:hover{
  color:#2563EB;
  text-decoration:underline;
}

.community-tabs a {
    
  margin-top:0px;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;

  color: #2563EB;
  background: #EFF6FF;
  transition: all 0.2s ease;
}

.community-tabs a:hover {
  background: #DBEAFE;
}

.community-tabs a.active {
  background: #2563EB;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Inline Write Button */
.community-write-btn,
.write-btn {
  background: #2563EB;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.community-write-btn:hover,
.write-btn:hover {
  background: #1D4ED8;
}

/* Post Count */
.community-count {
  color: #2563EB;
  margin-left: 6px;
  font-size: 13px;
}

/* Table Layout */
.community-head,
.community-row {
  display: grid;
  grid-template-columns: 50px 4fr 110px 80px;
  padding: 12px 0;
  border-bottom: 1px solid #E5EDFF;
  align-items: center;
}

.community .community-head {
  font-weight: 600;
  background: #F0F5FF;
  border-bottom: 2px solid #D6E4FF;
  color: #2563EB;
}

.community .community-row {
  transition: background 0.15s ease;
}
.community .community-row:hover {
  background: #F8FBFF;
}

/* Floating Write Button */
.fab-write {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;

  background: #2563EB;
  color: #fff;

  border-radius: 50%;
  font-size: 28px;
  font-weight: 600;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  z-index: 9999;
}

.fab-write:hover {
  background: #1D4ED8;
  transform: scale(1.05);
}

.community {
  background: linear-gradient(
    to bottom,
    #EAF2FF 0px,
    #F5F9FF 160px,
    #F5F9FF 100%
  );
}

.community .community-list {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.05);
}

.community-empty {
  text-align: center;
  padding: 80px 0;
  color: #64748B;
}

.community-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.community-empty h3 {
  font-weight: 600;
  margin-bottom: 6px;
}

/* 메세지 링크 */
.community-message-link {
  color: #2563EB;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.community-message-link:hover {
  text-decoration: underline;
}

#communityLightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.9);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

#communityLightbox img{
  max-width:90%;
  max-height:90%;
  border-radius:8px;
}

.community-preview-wrap{
  position:relative;
  display:inline-block;
}

.community-preview-wrap img{
  max-width:100%;
  border-radius:8px;
  cursor:zoom-in;
}

.community-zoom-icon{
  position:absolute;
  right:8px;
  bottom:8px;
  background:rgba(0,0,0,0.6);
  color:#fff;
  font-size:14px;
  padding:4px 6px;
  border-radius:4px;
  opacity:0;
  transition:opacity .2s;
}

.community-preview-wrap:hover .community-zoom-icon{
  opacity:1;
}
/* =========================
   COMMUNITY SINGLE
========================= */

.anabada-community-single {
  background: #F5F9FF;
  min-height: 100vh;
  padding: 60px 20px;
}

.community-single-card {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.07);
  display:block;
}

.community-single-title {
  font-size: 28px;
  margin-bottom: 12px;
  color: #2563EB;
}

.community-single-meta {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 16px;
}

.community-single-image {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 18px;
}

.community-single-image img {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 24px;
}

.community-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.single-community .post-thumbnail img,
.single-community img.wp-post-image {
  width: 100%;
  max-width: 400px;   /* ← 여기 숫자 줄이면 작아짐 */
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 18px;
}

.view-count {
  font-size: 13px;
  color: #6b7280;
  margin-left: 8px;
}

.comment-count {
  font-size: 13px;
  color: #2563EB;
  margin-left: 6px;
}

.meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.meta-inline span {
  margin-left: 6px;
}

.view-count {
  opacity: 0.7; /* 덜 중요 */
}

.comment-count {
  color: #ff7a00; /* 강조 */
  font-weight: 500;
}



/** 수정  ****/

.col-title{
  display:flex;
  align-items:center;
  gap:8px;
}

.col-actions{
  position:relative;
  display: inline-flex;
  align-items: center;
  margin-left:6px;
}

.community-menu-btn{
  background: transparent;
  border:none;
  font-size:16px;
  cursor:pointer;
  color: #999;
  padding: 4px 8px;
  line-height: 1;
}

.community-menu-btn:hover {
  color: #333;
}

/* dropdown */
.community-menu {
  position: absolute;
  top: 20px;
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 6px 0;
  display: none;
  min-width: 100px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 100;
}


.col-actions.open .community-menu{
  display:block;
}

.community-menu a{
  display:block;
  padding:6px 14px;
  font-size:13px;
  color:#333;
  text-decoration:none;
}

.community-menu a:hover{
  background:#f5f5f5;
}

.community-actions.open .community-menu{
  display:block;
}

/* ✅ 기본: 모바일에선 보이게 */
.ab-hero {
  display: block;
}


.community-pagination {
  display: flex;
  flex-wrap: wrap;   /* 🔥 핵심 */
  gap: 10px;
  justify-content: center;
  overflow: visible; /* 🔥 중요 */
}

.page-link {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #E5EDFF;
   color: #6B7280;
  cursor: pointer;
  text-decoration: none;
}

.page-link.active {
  background: #2563EB;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.page-link.active {
  pointer-events: none;
}

.page-link:last-child {
  font-weight: 600;
}


/* ✅ 데스크탑/태블릿(769px 이상)에서는 hero 숨김 */
@media (min-width: 769px) {
  .ab-hero {
    display: none !important;
  }
}
/* Responsive */
@media (max-width: 768px) {
    
   .community-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .community-location {
    margin-top: 6px;
  }
  
  .community-tab{
      min-height:36px;
      display:flex;
      align-items:center;
    }
   .community-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 8px;
  }

  .community-tabs::-webkit-scrollbar {
    display: none;
  }

  .community-tabs a {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .community-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 6px;
  }

  .col-title {
    grid-column: 2;
  }
  
   .community-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:4px;
  }
  
  .col-author,
  .col-date{
    display:inline-block;
    font-size:13px;
  }
   /* author 뒤로 */
    .col-author{
    display:block;
    margin-left:35px;   /* 번호 + 제목 위치 맞추기 */
    text-align:right;
    margin-top:4px;
    font-size:12px;
    color:#666;
    pointer-events: auto;
    position: relative;
    z-index: 5;
      /* 추가 */
  word-break: keep-all;
  white-space: nowrap;
  }

  .col-date{
    order:3;
    margin-left:auto;
    color:#888;
  }

}