/* =========================================================
   MOBILE STYLES (CLEAN FINAL VERSION)
   Breakpoint: max-width 768px
========================================================= */

@media (max-width: 768px) {

  /* GLOBAL RESET */
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-size: 14px;
  }

  .container,
  main,
  section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
  }

  /* =========================
     HEADER / NAVBAR
  ========================= */
  header.navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #111;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .logo {
    font-size: 16px;
    color: #fff;
    margin-bottom: 6px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  nav a {
    font-size: 12px;
    padding: 5px 6px;
    color: #fff;
    text-decoration: none;
  }

  /* =========================
     DROPDOWN MENU (MOBILE)
  ========================= */
  .nav-dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown-toggle {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: #222;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
  }

  .dropdown-menu {
    display: none;
    width: 100%;
    background: #111;
    padding: 6px 0;
    margin-top: 6px;
    border-radius: 6px;
  }

  .dropdown-menu a {
    display: block;
    padding: 8px;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
  }

  .dropdown-menu.open {
    display: block;
  }

  /* =========================
     HERO SECTION
  ========================= */
  .hero {
    padding: 20px 10px 30px !important;
    min-height: auto !important;
    border-radius: 10px;
    text-align: center;
  }

  .hero-content {
    max-width: 95%;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 22px !important;
    line-height: 1.3 !important;
    margin-bottom: 10px;
  }

  .hero p {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .btn-primary {
    font-size: 14px !important;
    padding: 10px 16px !important;
    border-radius: 8px;
  }

  /* =========================
     PLATFORM CONTENT
  ========================= */
  .platform-intro h2 { font-size: 20px !important; }
  .platform-intro h3 { font-size: 17px !important; }

  .platform-intro p,
  .platform-intro li {
    font-size: 14px !important;
    line-height: 1.6;
  }

  /* =========================
     CARDS
  ========================= */
  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 14px;
  }

  .card h3 { font-size: 16px; }
  .card p { font-size: 13px; }

  /* =========================
     FOOTER
  ========================= */
  footer {
    text-align: center;
    padding: 14px 8px;
    font-size: 12px;
  }

  footer a {
    display: inline-block;
    margin: 4px;
  }
}

/* =========================
   MOBILE SIDEBAR SYSTEM
========================= */

/* Hide sidebar by default on mobile */
@media (max-width: 768px) {
  #sideNav {
    display: none;
  }

  #sideNav.show {
    display: block;
  }

  .sidebar-open-btn {
    display: block;
  }
}

/* Sidebar box */
#sideNav {
  position: fixed;
  top: 220px;  /* adjust as needed */
  right: 10px;
  background: #9400D3; /* medium violet */
  padding: 15px 12px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  z-index: 999;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateX(0);  /* always visible */
  opacity: 1;                /* fully visible */
}

/* When hidden (after clicking X) */
#sideNav:not(.show) {
  transform: translateX(120%);
  opacity: 0;
}


/* Close button (X) 
.sidebar-toggle {
  position: absolute;
  bottom: 10px;   /* ⬅ move to bottom 
  right: 10px;
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

*/

.sidebar-toggle {
  position: sticky;      /* stays visible while scrolling */
  top: 8px;              /* stick to top */
  left: 8px;
  background: #000;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  z-index: 1001;
}



/* Open button */
.sidebar-open-btn {
  position: fixed;
  top: 220px;
  right: 10px;
  z-index: 1000;
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

#sideNav {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateX(120%);
  opacity: 0;
}

#sideNav.show {
  transform: translateX(0);
  opacity: 1;
}

.sidebar-open-btn {
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
