@charset "utf-8";

/* ══ KISA 2026 Card News Board Skin ══ */

.kisa-cardnews-wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem 1.5rem;
  box-sizing: border-box;
}

/* Category Filter Tabs */
.kisa-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.kisa-cat-tab {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(28,20,16,0.6);
  background-color: var(--secondary, #f8f6f2);
  border: 1px solid var(--border, #e7e0d6);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.kisa-cat-tab:hover {
  color: var(--primary, #8b1d27);
  border-color: rgba(139,29,39,0.3);
  text-decoration: none;
}
.kisa-cat-tab.active {
  color: #fff;
  background-color: var(--primary, #8b1d27);
  border-color: var(--primary, #8b1d27);
  font-weight: 600;
}

/* Top Toolbar */
.kisa-board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border, #e7e0d6);
}
.kisa-board-total {
  font-size: 0.875rem;
  color: rgba(28,20,16,0.6);
  margin: 0;
}
.kisa-board-total strong {
  color: var(--primary, #8b1d27);
  font-weight: 700;
}
.kisa-board-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Search Form */
.kisa-search-form {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.kisa-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.kisa-search-input {
  height: 38px;
  padding: 0 2rem 0 0.875rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border, #e7e0d6);
  background-color: #fff;
  color: var(--foreground, #1c1410);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  width: 180px;
}
.kisa-search-input:focus {
  border-color: var(--primary, #8b1d27);
}
.kisa-search-icon-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: rgba(28,20,16,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.kisa-search-submit-btn {
  height: 38px;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  background-color: var(--primary, #8b1d27);
  border: 1px solid var(--primary, #8b1d27);
  cursor: pointer;
  transition: opacity 0.2s;
}
.kisa-search-submit-btn:hover {
  opacity: 0.9;
}
.kisa-write-btn {
  height: 38px;
  padding: 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--primary, #8b1d27);
  border: 1px solid var(--primary, #8b1d27);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.kisa-write-btn:hover {
  opacity: 0.9;
  text-decoration: none;
  color: #fff;
}

/* Card News Grid */
.kisa-cardnews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3.5rem;
  list-style: none;
  padding: 0;
}
@media (max-width: 1024px) {
  .kisa-cardnews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
@media (max-width: 768px) {
  .kisa-cardnews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}
@media (max-width: 480px) {
  .kisa-cardnews-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
  }
}

/* Card Item */
.kisa-cardnews-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #e7e0d6);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: left;
}
.kisa-cardnews-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,29,39,0.3);
  box-shadow: 0 12px 24px -10px rgba(139,29,39,0.12);
}

.kisa-cardnews-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background-color: rgba(28,20,16,0.03);
}
.kisa-cardnews-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.kisa-cardnews-card:hover .kisa-cardnews-thumb {
  transform: scale(1.06);
}

/* Slide Count Badge & New Badge */
.kisa-slide-count-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(15,10,8,0.75);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.kisa-new-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary, #8b1d27);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* Card Information */
.kisa-cardnews-info {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.kisa-cardnews-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent, #927e62);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.kisa-cardnews-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground, #1c1410);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-serif, 'Playfair Display', serif);
  transition: color 0.2s;
}
.kisa-cardnews-card:hover .kisa-cardnews-title {
  color: var(--primary, #8b1d27);
}
.kisa-cardnews-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(28,20,16,0.4);
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(28,20,16,0.08);
}

/* Admin Edit Row */
.kisa-cardnews-admin-actions {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.25rem;
  z-index: 3;
}
.kisa-cardnews-admin-btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  background: rgba(255,255,255,0.9);
  color: #333;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-decoration: none;
}
.kisa-cardnews-admin-btn:hover {
  background: #fff;
  color: #000;
}

/* Empty State */
.kisa-cardnews-empty {
  text-align: center;
  padding: 5rem 1rem;
  color: rgba(28,20,16,0.4);
  font-size: 0.9375rem;
  grid-column: 1 / -1;
  background: #faf8f5;
  border: 1px dashed var(--border, #e7e0d6);
}

/* ══ Card News Fullscreen / Modal Swiper Popup ══ */
.bpop_layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.bpop_layer .bgshadow {
  position: fixed;
  inset: 0;
  background: rgba(12, 8, 6, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100000;
}
.bpop_wrap {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  z-index: 100001;
  display: flex;
  flex-direction: column;
}
.bpop_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(28, 20, 16, 0.95);
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}
.bpop_header_title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}
.bpop_header_close {
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.bpop_header_close:hover {
  color: #fff;
}

#popView {
  width: 100%;
  background: #000;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  position: relative;
}
#popSlider {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.cardnews-slide-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.cardnews-slide-inner img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

/* Swiper navigation buttons */
.bpop_wrap .swiper-button-prev,
.bpop_wrap .swiper-button-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(139, 29, 39, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.bpop_wrap .swiper-button-prev:hover,
.bpop_wrap .swiper-button-next:hover {
  background: var(--primary, #8b1d27);
  transform: scale(1.1);
}
.bpop_wrap .swiper-button-prev:after,
.bpop_wrap .swiper-button-next:after {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}
.bpop_wrap .swiper-button-prev {
  left: -22px;
}
.bpop_wrap .swiper-button-next {
  right: -22px;
}
@media (max-width: 768px) {
  .bpop_wrap .swiper-button-prev { left: 8px; }
  .bpop_wrap .swiper-button-next { right: 8px; }
}

/* Swiper pagination bullets */
.bpop_wrap .swiper-pagination-bullet {
  background: rgba(255,255,255,0.4);
  opacity: 1;
}
.bpop_wrap .swiper-pagination-bullet-active {
  background: var(--primary, #8b1d27);
  width: 16px;
  border-radius: 4px;
}

/* ══ Write Form Styles ══ */
.kisa-write-box {
  background: #fff;
  border: 1px solid var(--border, #e7e0d6);
  padding: 2.5rem;
  box-sizing: border-box;
}
.kisa-write-row {
  margin-bottom: 1.5rem;
}
.kisa-write-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground, #1c1410);
  margin-bottom: 0.5rem;
}
.kisa-write-label strong {
  color: var(--primary, #8b1d27);
}
.kisa-write-input, .kisa-write-select {
  width: 100%;
  height: 42px;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--border, #e7e0d6);
  outline: none;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s;
}
.kisa-write-input:focus, .kisa-write-select:focus {
  border-color: var(--primary, #8b1d27);
}

.kisa-file-row {
  background: #faf8f5;
  border: 1px solid var(--border, #e7e0d6);
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.kisa-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.kisa-file-prev-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid #ccc;
}
