/*!
 * forum.css - https://kodester.com/
 * Version - 2.6.0
 * Licensed under the MIT license - http://opensource.org/licenses/MIT
 *
 * Copyright (c) 2026 Kasanova
 */

/* ===== FORUM HERO BANNER ===== */
.forum-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  margin-bottom: 40px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://kodester.com/assets/banners/forum.jpg') center/cover no-repeat;
}
.forum-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8,135,85,.85) 0%, rgba(0,0,0,.7) 50%, rgba(59,130,246,.6) 100%);
  z-index: 1;
  pointer-events: none;
}
.forum-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .04;
  pointer-events: none;
  z-index: 2;
}
.forum-hero-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px 18px;
  width: 100%;
  max-width: 480px;
}
.forum-hero-inner h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.3;
}
.forum-hero-inner h1 i {
  margin-right: 6px;
}
.forum-hero-inner p {
  font-size: .74rem;
  color: rgba(255,255,255,.85);
  max-width: 440px;
  margin: 0 auto 10px;
  line-height: 1.5;
}

/* ===== FORUM SEARCH BOX (inside hero) ===== */
.forum-hero-search {
  margin-bottom: 10px;
}
.forum-search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  padding: 0 4px 0 12px;
  height: 32px;
  gap: 6px;
  transition: .25s;
  backdrop-filter: blur(8px);
  max-width: 340px;
  margin: 0 auto;
}
.forum-search-box:focus-within {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.forum-search-box i.bi-search {
  font-size: .76rem;
  color: rgba(255,255,255,.7);
  flex-shrink: 0;
}
.forum-search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: .74rem;
  color: #fff;
  font-family: inherit;
}
.forum-search-box input::placeholder {
  color: rgba(255,255,255,.55);
}
.forum-search-box button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--grn3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: .7rem;
  transition: .2s;
}
.forum-search-box button:hover {
  background: rgba(255,255,255,.9);
  transform: scale(1.05);
}

/* ===== FORUM HERO CTA BUTTONS ===== */
.forum-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.forum-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 16px;
  font-size: .72rem;
  font-weight: 700;
  border-radius: var(--r);
  transition: .2s;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.forum-cta i {
  font-size: .8rem;
}
.forum-cta.primary {
  background: #fff;
  color: var(--grn3);
}
.forum-cta.primary:hover {
  background: rgba(255,255,255,.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.forum-cta.ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.forum-cta.ghost:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-1px);
}

/* ===== FORUM STATS BAR (pointed bottom) ===== */
.forum-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: var(--r2) var(--r2) 0 0;
  padding: 14px 20px;
  margin-bottom: 0;
}
/* pointed bottom effect via pseudo-element */
.forum-stats-bar::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--s2);
}
.forum-stats-bar { position: relative; }
.forum-stats-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  padding-top: 35px;
}
.forum-stats-icon {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 2;
  transition: .2s;
}
.forum-stats-item:hover .forum-stats-icon {
  transform: translateX(-50%) translateY(-3px) scale(1.08);
}
.forum-stats-num {
  font-size: .88rem;
  font-weight: 800;
  color: var(--grn);
  display: block;
  line-height: 1.2;
}
.forum-stats-label {
  font-size: .58rem;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.forum-stats-divider {
  width: 1px;
  height: 36px;
  background: var(--bd);
}

/* ===== FORUM ONLINE USERS BAR ===== */
.forum-online-bar {
  background: var(--s2);
  border-left: 1px solid var(--bd);
  border-right: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  border-radius: 0 0 var(--r2) var(--r2);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.forum-online-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.forum-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grn);
  flex-shrink: 0;
  animation: forumPulse 2s ease-in-out infinite;
}
@keyframes forumPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(8,135,85,.5); }
  50% { box-shadow: 0 0 0 4px rgba(8,135,85,0); }
}
.forum-online-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--tx);
}
.forum-online-count {
  font-size: .68rem;
  font-weight: 600;
  color: var(--grn);
  background: var(--grng);
  padding: 2px 8px;
  border-radius: 10px;
}
.forum-online-avatars {
  display: flex;
  align-items: center;
  gap: 0;
}
.forum-online-user {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: -6px;
  border: 2px solid var(--s2);
  cursor: pointer;
  transition: .2s;
  position: relative;
}
.forum-online-user:first-child {
  margin-left: 0;
}
.forum-online-user:hover {
  transform: translateY(-3px) scale(1.1);
  z-index: 2;
  border-color: var(--grn);
}
.forum-online-user img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.forum-online-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--s3);
  border: 2px solid var(--s2);
  margin-left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .56rem;
  font-weight: 700;
  color: var(--tx2);
  flex-shrink: 0;
}

/* ===== FORUM CATEGORIES GRID ===== */
.forum-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

/* ===== FORUM CATEGORY CARD ===== */
.forum-cat-card {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  transition: .2s;
  cursor: pointer;
}
.forum-cat-card:hover {
  border-color: var(--bd2);
  background: var(--s3);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* Category Icon */
.forum-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Category Info */
.forum-cat-info {
  min-width: 0;
}
.forum-cat-info h3 {
  font-size: .84rem;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 4px;
  line-height: 1.35;
  transition: .15s;
}
.forum-cat-card:hover .forum-cat-info h3 {
  color: var(--grn);
}
.forum-cat-info p {
  font-size: .72rem;
  color: var(--tx2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.forum-cat-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .62rem;
  color: var(--tx3);
}
.forum-cat-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Category Stats */
.forum-cat-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.forum-cat-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.forum-cat-stat .num {
  font-size: .9rem;
  font-weight: 800;
  color: var(--tx);
}
.forum-cat-stat .label {
  font-size: .52rem;
  color: var(--tx4);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===== FORUM GUIDELINES ===== */
.forum-guidelines {
  margin-top: 24px;
}
.forum-guidelines-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.forum-guide-card {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: var(--r3);
  padding: 20px 16px;
  text-align: center;
  transition: .2s;
}
.forum-guide-card:hover {
  border-color: var(--bd2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.forum-guide-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin: 0 auto 12px;
  flex-shrink: 0;
}
.forum-guide-card h3 {
  font-size: .78rem;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 6px;
  line-height: 1.35;
}
.forum-guide-card p {
  font-size: .68rem;
  color: var(--tx2);
  line-height: 1.6;
  margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .forum-guidelines-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .forum-hero {
    min-height: 140px;
    margin-bottom: 35px;
  }
  .forum-hero-inner {
    padding: 16px 14px;
  }
  .forum-hero-inner h1 {
    font-size: 1rem;
  }
  .forum-hero-inner p {
    font-size: .7rem;
    margin-bottom: 8px;
  }
  .forum-hero-search {
    margin-bottom: 10px;
  }
  .forum-search-box {
    height: 34px;
    padding: 0 5px 0 12px;
    max-width: 100%;
  }
  .forum-search-box input {
    font-size: .74rem;
  }
  .forum-search-box button {
    width: 26px;
    height: 26px;
    font-size: .72rem;
  }
  .forum-search-box i.bi-search {
    font-size: .8rem;
  }
  .forum-hero-actions {
    gap: 6px;
  }
  .forum-cta {
    height: 28px;
    padding: 0 14px;
    font-size: .68rem;
  }
  .forum-cta i {
    font-size: .76rem;
  }
  .forum-stats-bar {
    gap: 16px;
    padding: 12px 16px;
  }
  .forum-stats-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    top: -28px;
  }
  .forum-stats-item {
    padding-top: 28px;
  }
  .forum-stats-num {
    font-size: .82rem;
  }
  .forum-online-bar {
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px;
  }
  .forum-online-avatars {
    flex-wrap: wrap;
    justify-content: center;
  }
  .forum-cat-card {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 12px 12px;
    align-items: center;
  }
  .forum-cat-stats {
    flex-direction: row;
    gap: 10px;
  }
  .forum-cat-stat .num {
    font-size: .78rem;
  }
  .forum-cat-stat .label {
    font-size: .48rem;
  }
  .forum-cat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .forum-cat-info h3 {
    font-size: .8rem;
  }
  .forum-cat-info p {
    font-size: .7rem;
    -webkit-line-clamp: 1;
  }
  .forum-guidelines-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .forum-guide-card {
    padding: 16px 12px;
  }
  .forum-guide-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    margin-bottom: 10px;
  }
  .forum-guide-card h3 {
    font-size: .74rem;
  }
  .forum-guide-card p {
    font-size: .66rem;
  }
}

@media (max-width: 480px) {
  .forum-hero {
    min-height: 130px;
    margin-bottom: 32px;
  }
  .forum-hero-inner {
    padding: 14px 12px;
  }
  .forum-hero-inner h1 {
    font-size: .9rem;
  }
  .forum-hero-inner p {
    font-size: .66rem;
    margin-bottom: 8px;
  }
  .forum-hero-search {
    margin-bottom: 10px;
  }
  .forum-search-box {
    height: 32px;
    padding: 0 4px 0 12px;
    gap: 6px;
    max-width: 100%;
  }
  .forum-search-box input {
    font-size: .72rem;
  }
  .forum-search-box button {
    width: 24px;
    height: 24px;
    font-size: .68rem;
  }
  .forum-search-box i.bi-search {
    font-size: .76rem;
  }
  .forum-hero-actions {
    flex-direction: column;
    gap: 5px;
  }
  .forum-cta {
    width: 100%;
    justify-content: center;
    height: 26px;
    padding: 0 14px;
    font-size: .66rem;
  }
  .forum-cta i {
    font-size: .72rem;
  }
  .forum-stats-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .forum-stats-divider {
    display: none;
  }
  .forum-stats-item {
    flex: 1;
    min-width: 55px;
    padding-top: 22px;
  }
  .forum-stats-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    top: -22px;
  }
  .forum-stats-num {
    font-size: .76rem;
  }
  .forum-online-bar {
    padding: 10px 12px;
  }
  .forum-online-title {
    font-size: .72rem;
  }
  .forum-online-user {
    width: 24px;
    height: 24px;
  }
  .forum-online-more {
    width: 24px;
    height: 24px;
    font-size: .5rem;
  }
  .forum-cat-card {
    gap: 10px;
    padding: 12px 12px;
  }
  .forum-cat-icon {
    width: 36px;
    height: 36px;
    font-size: .9rem;
  }
  .forum-cat-info h3 {
    font-size: .76rem;
  }
  .forum-cat-info p {
    font-size: .66rem;
    margin-bottom: 4px;
  }
  .forum-cat-meta {
    gap: 8px;
  }
  .forum-guidelines-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .forum-guide-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    text-align: left;
    padding: 14px 12px;
  }
  .forum-guide-icon {
    margin: 0;
  }
}
