/* =========================================
   1. MASAÜSTÜ (DESKTOP) DÜZENİ
   ========================================= */

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #ffffff, #f3f7ef);
  border-radius: 18px;
  padding: 1.2rem 1.2rem 1rem;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 18px 30px rgba(0,0,0,0.18);
  height: calc(100vh - 110px);
  position: sticky;
  top: 90px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.sidebar-title {
  font-size: 1.05rem;
  margin-bottom: .8rem;
  color: var(--green-main);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-menu {
  list-style: none;
}

/* Üst kategori butonları */
.sidebar-main {
  width: 100%;
  text-align: left;
  background: rgba(245, 250, 240, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.03);
  padding: .45rem .8rem;
  margin-top: .35rem;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.18s ease;
}

.sidebar-main:hover {
  background: #e7f1dd;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* Kategori ok işareti */
.sidebar-main::after {
  content: "▾";
  font-size: .75rem;
  color: var(--text-muted);
  transition: transform 0.18s ease;
}

.sidebar-main-open::after {
  transform: rotate(180deg);
}

/* Alt menü linkleri */
.sidebar-sub {
  display: none;
  padding-left: .75rem;
  margin: .35rem 0 .6rem;
  border-left: 2px solid rgba(127,162,107,0.25);
}

.sidebar-sub li a {
  display: block;
  padding: .22rem 0;
  font-size: .86rem;
  color: var(--text-muted);
  position: relative;
}

.sidebar-sub li a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(127,162,107,0.7);
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
}

.sidebar-sub li a:hover {
  color: var(--green-main);
}

.sidebar-sub-open {
  display: block !important;
}

/* =========================================
   2. MOBİL (RESPONSIVE) DÜZEN - AKORDİYON YAPISI
   ========================================= */

@media (max-width: 900px) {
  .sidebar {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: static !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  }

  /* Mobilde Başlığı Buton Haline Getir */
  .sidebar-title {
    cursor: pointer;
    background: #fdfdfd;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 0;
    border: 1px solid var(--border-soft);
  }

  /* Mobilde Yanına İkon Ekle */
  .sidebar-title::after {
    content: "Menüyü Aç ☰";
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green-main);
    background: #eef3ea;
    padding: 4px 10px;
    border-radius: 6px;
  }

  /* Başlık aktifken ikon değişsin */
  .sidebar.active .sidebar-title::after {
    content: "Kapat ✖";
  }

  /* Menü listesini mobilde varsayılan olarak sakla */
  .sidebar-menu {
    display: none;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 10px;
  }

  /* JS ile sidebar'a 'active' sınıfı gelince menüyü göster */
  .sidebar.active .sidebar-menu {
    display: block;
  }
}