/* Base styles are mobile-first, but we adjust visibility for bottom nav */

/* Desktop view (min-width: 768px) */
@media (min-width: 768px) {
  html {
    background: #e8eaf6;
    /* Elegant outer background */
    min-height: 100vh;
  }

  body {
    background: var(--soft-cream);
    border-radius: 30px;
    margin: 20px 20px 20px 100px;
    /* Space for the left sidebar and margins */
    min-height: calc(100vh - 40px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-bottom: 0;
    overflow-x: hidden;
    transition: margin-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  /* Explicit class to push right section (controlled by JS) */
  body.sidebar-expanded {
    margin-left: 280px;
    /* 240px sidebar + 40px gap */
  }

  /* Transform bottom nav into left sidebar */
  .bottom-nav {
    display: flex;
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 70px;
    /* Minimized width */
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: var(--light-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    padding: 20px 0;
    z-index: 1000;
  }

  .bottom-nav:hover {
    width: 240px;
    /* Expanded width */
  }

  .bottom-nav a {
    flex-direction: row;
    width: calc(100% - 20px);
    padding: 12px 0;
    justify-content: flex-start;
    align-items: center;
    border-radius: 10px;
    margin: 5px 10px;
    overflow: hidden;
  }

  .bottom-nav a i {
    min-width: 50px;
    /* Forces icon to center perfectly in the 70px sidebar (70 - 20 margin = 50) */
    margin-bottom: 0 !important;
    text-align: center;
    font-size: 1.3rem;
  }

  .bottom-nav a:hover {
    background: rgba(246, 196, 69, 0.1);
  }

  .bottom-nav a span {
    display: inline-block;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 600;
    font-size: 1rem;
    transform: translateX(-10px);
  }

  .bottom-nav:hover a span {
    opacity: 1;
    transform: translateX(0);
  }

  /* Hide the old top desktop navbar since we have a sidebar now */
  .navbar.desktop-only {
    display: none !important;
  }

  /* Seamless Sections on Desktop */
  section {
    margin: 0 auto !important;
    /* Keep sections centered horizontally */
    max-width: 100% !important;
    /* Force sections to stretch and fit the entire right frame */
    border-radius: 0 !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 60px 40px !important;
  }

  .hero-section {
    border-radius: 30px 30px 0 0 !important;
    margin-bottom: 0 !important;
  }

  .footer-section {
    border-radius: 0 0 30px 30px !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 40px !important;
  }
}

/* Mobile view (max-width: 767px) */
@media (max-width: 767px) {
  body {
    padding-bottom: 20px;
    /* Reduced to fix extra space since footer has margin */
  }

  .bottom-nav {
    bottom: 15px;
    left: 15px;
    width: calc(100% - 30px);
    border-radius: 25px;
    padding: 12px 0;
    /* Reduced padding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .desktop-only {
    display: none !important;
  }

  .nav-links {
    display: none;
    /* Hide desktop nav links */
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  section {
    margin: 10px;
    padding: 30px 15px;
  }
}