/* =====================================================
   GUIDES PAGE - MOBILE RESPONSIVE STYLES
   ===================================================== */

/* ==========================================
   HEADER BUTTONS - Responsive sizing
   ========================================== */

/* Between 1200px and 900px - smaller buttons */
@media (max-width: 1200px) and (min-width: 901px) {
  .guides-header-buttons .btn,
  #guides-main header .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* ==========================================
   SIDEBAR - Hide at 900px, show drawer trigger
   ========================================== */

@media (max-width: 900px) {
  /* FORCE hide the sidebar completely - override style.css drawer behavior */
  .guides-sidebar,
  .sidebar.guides-sidebar,
  .sd-sidebar.guides-sidebar,
  .page-layout .sidebar.guides-sidebar,
  .page-layout aside.guides-sidebar,
  aside.sidebar.guides-sidebar,
  aside.sidebar.sd-sidebar.guides-sidebar,
  .container-xxl .page-layout .sidebar.guides-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    transform: none !important;
    pointer-events: none !important;
  }
  
  /* Override the nav-toggle checked state too */
  #nav-toggle:checked ~ .container-xxl .page-layout .sidebar.guides-sidebar,
  #nav-toggle:checked ~ .page-layout .sidebar.guides-sidebar,
  #nav-toggle:checked ~ * .page-layout .sidebar.guides-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateX(-100%) !important;
    pointer-events: none !important;
  }
  
  /* Full width main content */
  .page-layout:has(.guides-sidebar),
  .page-layout {
    grid-template-columns: 1fr !important;
    display: block !important;
  }
  
  /* Main content styling */
  .page-layout .main,
  .page-layout main,
  #guides-main {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 30px !important;
    padding-right: 16px !important;
  }
  
  /* Smaller header buttons on mobile */
  #guides-main header .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  /* Hide hamburger - we use vertical bar instead */
  .hamburger,
  .hamburger.d-lg-none,
  label.hamburger,
  label[for="nav-toggle"] {
    display: none !important;
  }
  
  /* Hide nav-toggle completely */
  #nav-toggle {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .page-layout .main,
  .page-layout main,
  #guides-main {
    padding-left: 24px !important;
    padding-right: 8px !important;
  }
  
  /* Stack buttons vertically on very small screens */
  #guides-main header .d-flex.gap-2 {
    flex-direction: column;
    align-items: stretch;
  }
  
  #guides-main header .btn {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================
   VERTICAL TRIGGER BAR (Left edge) - Guides
   ========================================== */
.guides-vertical-trigger {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 180px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-left: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  z-index: 1035;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.guides-vertical-trigger:hover {
  width: 36px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.08));
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.guides-vertical-trigger i {
  color: var(--primary);
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.guides-vertical-trigger:hover i {
  transform: translateX(3px);
}

.guides-vertical-trigger.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Show on mobile */
@media (max-width: 900px) {
  .guides-vertical-trigger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 576px) {
  .guides-vertical-trigger {
    height: 140px;
    width: 22px;
  }
  
  .guides-vertical-trigger i {
    font-size: 0.9rem;
  }
}

/* ==========================================
   GUIDES DRAWER (Slides from left)
   ========================================== */
.guides-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1038;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.guides-drawer-overlay.open {
  display: block;
  opacity: 1;
}

.guides-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(135deg, rgba(15, 25, 45, 0.98), rgba(10, 18, 35, 0.98));
  border-right: 1px solid var(--line-soft);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 1039;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  /* Ensure it's initially hidden */
  visibility: hidden;
}

.guides-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

/* Drawer header */
.guides-drawer-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: rgb(12, 20, 38);
  border-bottom: 1px solid var(--line-soft);
  z-index: 10;
}

.guides-drawer-header h3 {
  margin: 0;
  font-family: Orbitron, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guides-drawer-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.guides-drawer-close:hover {
  background: rgba(255, 100, 100, 0.15);
  border-color: #ff6464;
  color: #ff6464;
}

/* Drawer body - menu content */
.guides-drawer-body {
  padding: 20px;
}

.guides-drawer-body .menu-section {
  margin-bottom: 24px;
}

.guides-drawer-body .menu-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.guides-drawer-body .menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guides-drawer-body .menu-list li {
  margin-bottom: 4px;
}

.guides-drawer-body .menu-list a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.guides-drawer-body .menu-list a:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
}

.guides-drawer-body .menu-list a.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================
   CONTENT IMPROVEMENTS FOR MOBILE
   ========================================== */

@media (max-width: 900px) {
  /* Step cards - stack on mobile */
  .steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .step-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  
  .step-num {
    flex-shrink: 0;
  }
  
  /* Stats grid - 2 columns on mobile */
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .stat {
    text-align: center;
    padding: 12px;
  }
  
  .stat .big {
    font-size: 1.2rem;
  }
  
  /* Delivery grid - single column */
  .grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Cards padding reduction */
  #guides-main .card {
    padding: 16px;
  }
  
  /* Title sizing */
  #guides-main .title {
    font-size: 1.4rem;
  }
  
  #guides-main h2 {
    font-size: 1.2rem;
  }
  
  /* Accordion improvements */
  .accordion-button {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* ==========================================
   SMALL MOBILE (≤576px) - Reduced text sizes
   ========================================== */
@media (max-width: 576px) {
  .stats {
    grid-template-columns: 1fr;
  }
  
  /* Page title */
  #guides-main .title {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  #guides-main .subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* Section headings */
  #guides-main h2,
  #guides-main .card h2 {
    font-size: 1.05rem;
  }
  
  #guides-main h3 {
    font-size: 0.95rem;
  }
  
  #guides-main h4 {
    font-size: 0.9rem;
  }
  
  /* Body text */
  #guides-main p,
  #guides-main li,
  #guides-main .card {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  /* Cards */
  #guides-main .card {
    padding: 14px;
    border-radius: 10px;
  }
  
  /* Feature boxes / info cards */
  #guides-main .card .card,
  #guides-main .info-box,
  #guides-main .feature-card {
    padding: 12px;
  }
  
  /* Icons in headers */
  #guides-main h2 i,
  #guides-main h3 i {
    font-size: 1rem;
  }
  
  /* Buttons */
  #guides-main .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  /* CTA box */
  .cta-final .cta-box {
    padding: 16px;
    text-align: center;
  }
  
  .cta-final h3 {
    font-size: 1rem;
  }
  
  .cta-final .d-flex {
    flex-direction: column;
    gap: 8px;
  }
  
  .cta-final .btn {
    width: 100%;
  }
  
  /* Accordion */
  .accordion-button {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .accordion-body {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
}

/* ==========================================
   EXTRA SMALL MOBILE (≤400px) - Galaxy S8 etc
   ========================================== */
@media (max-width: 400px) {
  /* Even smaller content padding */
  .page-layout .main,
  .page-layout main,
  #guides-main {
    padding-left: 20px !important;
    padding-right: 6px !important;
  }
  
  /* Page title */
  #guides-main .title {
    font-size: 1rem;
  }
  
  #guides-main .subtitle {
    font-size: 0.8rem;
  }
  
  /* Section headings */
  #guides-main h2,
  #guides-main .card h2 {
    font-size: 0.95rem;
  }
  
  #guides-main h3 {
    font-size: 0.875rem;
  }
  
  /* Body text */
  #guides-main p,
  #guides-main li {
    font-size: 0.825rem;
  }
  
  /* Cards - tighter */
  #guides-main .card {
    padding: 12px;
    border-radius: 8px;
  }
  
  /* Inner cards */
  #guides-main .card .card {
    padding: 10px;
  }
  
  /* Stats */
  .stat .big {
    font-size: 1rem;
  }
  
  .stat {
    padding: 10px;
    font-size: 0.8rem;
  }
  
  /* Buttons */
  #guides-main .btn {
    padding: 7px 12px;
    font-size: 0.75rem;
  }
  
  /* Vertical trigger - smaller */
  .guides-vertical-trigger {
    width: 18px;
    height: 120px;
  }
  
  .guides-vertical-trigger i {
    font-size: 0.8rem;
  }
}
