/* ============================================================
   Musang.us.com — Main Stylesheet
   Author: musang.us.com
   Theme: Hijau & Coklat
   ============================================================ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --green-dark:  #2d5a27;
  --green-mid:   #4a7c3f;
  --green-light: #7ab648;
  --brown-dark:  #5c3a1e;
  --brown-mid:   #8b5e3c;
  --brown-light: #c49a6c;
  --cream:       #fdf6ec;
  --white:       #ffffff;
  --text-dark:   #2c1a0e;
  --text-mid:    #5a4030;
  --border:      #d4b896;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 6px 20px rgba(0,0,0,.12);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   14px;
  --radius-full: 30px;
}

/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
nav {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.nav-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cream);
  letter-spacing: .5px;
}

.logo span {
  color: var(--brown-light);
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-links a {
  color: #cde8b5;
  font-size: .95rem;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-join {
  background: var(--brown-mid);
  color: var(--white) !important;
  padding: .35rem .9rem;
  border-radius: 20px;
}

.nav-join:hover {
  background: var(--brown-dark) !important;
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .7rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.btn-primary {
  background: var(--green-light);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--brown-light);
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(135deg, rgba(45,90,39,.75) 0%, rgba(92,58,30,.80) 100%),
    url('og-image.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  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='0.04'%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");
  pointer-events: none;
}

.hero-emoji {
  font-size: 5rem;
  display: block;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: .6rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.hero h1 span {
  color: var(--brown-light);
}

.hero p {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  opacity: .9;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── STATS BAR ──────────────────────────────────────────────── */
.stats-bar {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 1.2rem 1.5rem;
}

.stats-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}

.stat strong {
  font-size: 1.8rem;
  color: var(--brown-light);
  display: block;
}

.stat span {
  font-size: .85rem;
  opacity: .8;
}

/* ── SECTIONS SHARED ────────────────────────────────────────── */
section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: .4rem;
}

.section-subtitle {
  color: var(--text-mid);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.divider {
  width: 50px;
  height: 4px;
  background: var(--green-light);
  border-radius: 2px;
  margin: .5rem 0 2rem;
}

/* ── ABOUT ──────────────────────────────────────────────────── */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: box-shadow .2s;
}

.about-card:hover {
  box-shadow: var(--shadow-md);
}

.about-card .icon {
  font-size: 2.5rem;
  margin-bottom: .8rem;
  display: block;
}

.about-card h3 {
  color: var(--green-dark);
  margin-bottom: .4rem;
}

.about-card p {
  font-size: .9rem;
  color: var(--text-mid);
}

/* ── TIPS ───────────────────────────────────────────────────── */
.tips {
  background: var(--cream);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.tip-card {
  background: var(--white);
  border-left: 5px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}

.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tip-tag {
  display: inline-block;
  background: var(--green-dark);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 12px;
  margin-bottom: .6rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tip-card h3 {
  font-size: 1.05rem;
  color: var(--brown-dark);
  margin-bottom: .5rem;
}

.tip-card p {
  font-size: .88rem;
  color: var(--text-mid);
}

.tip-card .read-more {
  display: inline-block;
  margin-top: .8rem;
  font-size: .85rem;
  color: var(--green-mid);
  font-weight: 600;
  cursor: pointer;
  transition: color .15s;
}

.tip-card .read-more:hover {
  color: var(--green-dark);
}

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 2rem;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-mid);
  transition: color .15s;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal h2 {
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.modal p,
.modal li {
  color: var(--text-mid);
  font-size: .93rem;
  line-height: 1.7;
}

.modal ul {
  padding-left: 1.2rem;
  margin-top: .5rem;
}

/* ── FORUM ──────────────────────────────────────────────────── */
.forum {
  background: var(--white);
}

.forum-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }
}

/* Post Form */
.post-form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.post-form h3 {
  color: var(--green-dark);
  margin-bottom: .8rem;
  font-size: 1rem;
}

.post-form input,
.post-form textarea,
.post-form select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .7rem;
  font-family: inherit;
  font-size: .9rem;
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color .2s;
}

.post-form input:focus,
.post-form textarea:focus,
.post-form select:focus {
  border-color: var(--green-mid);
}

.post-form textarea {
  height: 80px;
  resize: vertical;
}

.post-form .btn-post {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  padding: .55rem 1.4rem;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s;
}

.post-form .btn-post:hover {
  background: var(--green-mid);
}

/* Post List */
#post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  background: var(--cream);
  transition: box-shadow .2s;
}

.post-item:hover {
  box-shadow: var(--shadow-sm);
}

.post-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .5rem;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}

.post-meta strong {
  font-size: .95rem;
  color: var(--brown-dark);
}

.post-meta span {
  font-size: .78rem;
  color: var(--text-mid);
  display: block;
}

.post-cat {
  margin-left: auto;
  background: var(--brown-light);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.post-body {
  font-size: .9rem;
  color: var(--text-mid);
  margin-bottom: .7rem;
}

.post-actions {
  display: flex;
  gap: 1rem;
}

.post-like-btn,
.reply-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: .25rem .8rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text-mid);
  transition: all .2s;
}

.post-like-btn:hover,
.reply-toggle-btn:hover {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.post-like-btn.liked {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

/* Replies */
.replies-section {
  display: none;
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--border);
}

.replies-section.open {
  display: block;
}

.reply-item {
  display: flex;
  gap: .6rem;
  margin-bottom: .6rem;
  align-items: flex-start;
}

.reply-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brown-mid);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.reply-bubble {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem .9rem;
  flex: 1;
}

.reply-bubble strong {
  font-size: .82rem;
  color: var(--brown-dark);
}

.reply-bubble p {
  font-size: .85rem;
  color: var(--text-mid);
  margin-top: .1rem;
}

.reply-form {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
}

.reply-form input {
  flex: 1;
  padding: .45rem .8rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}

.reply-form input:focus {
  border-color: var(--green-mid);
}

.reply-form button {
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: .45rem 1rem;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.reply-form button:hover {
  background: var(--green-dark);
}

/* ── FORUM SIDEBAR ──────────────────────────────────────────── */
.forum-sidebar {
  position: sticky;
  top: 75px;
}

.sidebar-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.sidebar-card h4 {
  color: var(--green-dark);
  margin-bottom: .8rem;
  font-size: .95rem;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-mid);
  cursor: pointer;
  transition: color .15s;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list li:hover {
  color: var(--green-dark);
}

.cat-count {
  background: var(--green-dark);
  color: var(--white);
  font-size: .7rem;
  padding: .1rem .5rem;
  border-radius: 10px;
}

.online-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.online-badge {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .78rem;
  padding: .2rem .6rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #4caf50;
  border-radius: 50%;
  flex-shrink: 0;
}

.popular-list li {
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .87rem;
  color: var(--text-mid);
  cursor: pointer;
  transition: color .15s;
}

.popular-list li:last-child {
  border-bottom: none;
}

.popular-list li:hover {
  color: var(--green-dark);
}

/* ── BY STATE ───────────────────────────────────────────────── */
.states {
  background: var(--green-dark);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.states h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .3rem;
}

.states p {
  opacity: .8;
  margin-bottom: 1.8rem;
}

.states-grid {
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
}

.state-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  padding: .4rem 1.1rem;
  border-radius: 20px;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}

.state-pill:hover,
.state-pill.active {
  background: var(--brown-mid);
  border-color: var(--brown-mid);
}

/* ── JOIN BANNER ────────────────────────────────────────────── */
.join-banner {
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-mid));
  color: var(--white);
  text-align: center;
  padding: 4rem 1.5rem;
}

.join-banner h2 {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: .6rem;
}

.join-banner p {
  opacity: .9;
  margin-bottom: 1.8rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.join-form {
  display: flex;
  gap: .7rem;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.join-form input {
  flex: 1;
  min-width: 200px;
  padding: .7rem 1.1rem;
  border-radius: 25px;
  border: none;
  font-size: .95rem;
  outline: none;
  font-family: inherit;
  color: var(--text-dark);
}

.join-form button {
  background: var(--green-light);
  color: var(--white);
  border: none;
  padding: .7rem 1.6rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s;
}

.join-form button:hover {
  background: var(--green-dark);
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.6);
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--brown-light);
  margin-bottom: .8rem;
  font-size: .95rem;
}

.footer-col ul li {
  margin-bottom: .4rem;
}

.footer-col ul a {
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  transition: color .2s;
}

.footer-col ul a:hover {
  color: var(--cream);
}

.footer-col p {
  font-size: .88rem;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.2rem;
  text-align: center;
  font-size: .82rem;
}

.footer-flag {
  font-size: 1.2rem;
}

/* ── TOAST NOTIFICATION ─────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--green-dark);
  color: var(--white);
  padding: .7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: .9rem;
  z-index: 300;
  transition: transform .35s ease;
  pointer-events: none;
  white-space: nowrap;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
}
