/* ==================================================
   MOBILE FIRST BASE
   ================================================== */

.cm-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 16px;
}

/* ==================================================
   TOP MENU (MOBILE FIRST)
   ================================================== */

.cm-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.cm-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cm-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cm-tab.active {
  background: linear-gradient(135deg,#d4af37,#c89b3c);
  color: #fff;
  border-color: transparent;
}

.cm-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.cm-download {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 14px;
  background: #c62828;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cm-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(198,40,40,.35);
}

/* ==================================================
   HEADER
   ================================================== */

.cm-header {
  text-align: center;
  margin-bottom: 24px;
}

.cm-header h2 {
  color: #c89b3c;
  font-size: 22px;
  margin-bottom: 6px;
}

.cm-header p {
  font-size: 14px;
  line-height: 1.6;
}

/* ==================================================
   SUBMENU / CATEGORIES
   ================================================== */

.cm-sidebar {
  background: linear-gradient(180deg,#9b2c2c,#c2410c);
  padding: 24px;
  border-radius: 18px;
}

.cm-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background .25s ease, box-shadow .25s ease;
}

.cm-cat:hover {
  background: rgba(255,255,255,.22);
}

.cm-cat.active {
  background: rgba(255,255,255,.9);
  color: #9b2c2c;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

/* ==================================================
   CONTENT
   ================================================== */

.cm-content {
  margin-top: 24px;
}

.cm-title {
  background: #fff7e6;
  color: #c89b3c;
  border: 2px dashed #c89b3c;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 15px;
}

/* ==================================================
   MENU ITEMS (MOBILE)
   ================================================== */

.cm-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.cm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #ddd;
  font-size: 14px;
}

.cm-item .dashicons {
  color: #c89b3c;
  font-size: 16px;
}

/* ==================================================
   EMPTY STATE
   ================================================== */

.cm-empty {
  padding: 24px;
  background: #faf7f0;
  border: 1px dashed #c89b3c;
  text-align: center;
  font-size: 14px;
  color: #555;
}

/* ==================================================
   DESKTOP – SINGLE SOURCE OF TRUTH
   ================================================== */

@media (min-width: 992px) {

  /* MASTER CARD */
  .cm-wrapper {
    background: #fff;
    border-radius: 18px;
    padding: 32px 36px;
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
  }

  /* TOP MENU — ONE GRID (NO OVERLAP) */
  .cm-top {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    padding: 24px 28px;
  }

  .cm-tabs {
    display: contents; /* 🔑 tabs participate in parent grid */
  }

  .cm-tab {
    width: 100%;
    white-space: nowrap;
  }

  .cm-download {
    grid-column: span 2;   /* sits WITH tabs */
    justify-self: start;
    padding: 12px 26px;
  }

  /* HEADER HIGHLIGHT */
  .cm-header {
    background: #fff7e6;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 40px;
  }

  /* BODY */
  .cm-box {
    display: grid;
    grid-template-columns: 280px minmax(0,1fr);
    gap: 40px;
  }

  .cm-sidebar {
    position: sticky;
    top: 120px;
  }

  .cm-content {
    max-width: 820px;
  }

  /* ITEMS GRID */
  .cm-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 28px;
  }
}

/* ==================================================
   GLOBAL LINK CLEANUP
   ================================================== */

.cm-wrapper a {
  text-decoration: none !important;
}

/* ===============================
   REMOVE DOWNLOAD BUTTON (GLOBAL)
   =============================== */

.cm-download {
  display: none !important;
}


.cm-inner-lang {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.cm-inner-lang .cm-lang-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
}

.cm-inner-lang .cm-lang-btn.active {
  color: #8b1e2d;
  font-weight: 600;
}

.cm-inner-lang .cm-lang-btn:not(:last-child)::after {
  content: "|";
  margin-left: 10px;
  margin-right: 10px;
  color: #ccc;
}

.cm-lang-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.cm-lang-label {
  cursor: pointer;
  color: #888;
  transition: all 0.3s ease;
}

.cm-lang-label.active {
  color: #8b1e2d;
  font-weight: 600;
}

.cm-toggle-switch {
  width: 44px;
  height: 22px;
  background: #e5e5e5;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cm-toggle-slider {
  width: 18px;
  height: 18px;
  background: #8b1e2d;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
}

.cm-toggle-switch.active .cm-toggle-slider {
  left: 24px;
}