/*
 * ===========================================
 * Media Queries for Bluish Academy
 * ===========================================
 *
 * Breakpoints:
 * 1. Laptops / Small Desktops (<= 1200px)
 * 2. Tablets (<= 992px)
 * 3. Mobile Phones (<= 480px)
 *
 * ===========================================
 */

/* * -------------------------------------------
 * 1. Laptops / Small Desktops (max-width: 1200px)
 * -------------------------------------------
 * - Adjusts content to respect the collapsed 85px sidebar.
 * - Shrinks hero section elements.
 */
@media screen and (max-width: 1200px) {
  /* Adjust hero section for smaller laptops */
  .content-x {
    margin-left: 100px; /* Give space for 85px collapsed sidebar */
    margin-right: 20px;
    flex-shrink: 1.5; /* Allow text content to shrink more */
  }

  .image-section-x {
    margin-right: 20px;
    margin-top: 150px;
    flex-shrink: 1; /* Allow image to shrink */
  }

  .phone-mockup-x {
    max-width: 350px; /* Shrink image */
  }

  /* Adjust main content containers to avoid sidebar overlap */
  .container-a,
  .container-b {
    /* This is the key fix for this size to prevent overlap */
    max-width: none; /* Remove 1200px max-width */
    width: auto; /* Let it be fluid */
    margin-left: 85px; /* Width of the collapsed sidebar */
    margin-right: 0;
    padding: 0 2rem; /* Add horizontal padding */
    box-sizing: border-box;
  }
}

/* * -------------------------------------------
 * 2. Tablets (max-width: 992px)
 * -------------------------------------------
 * - Hides the sidebar completely.
 * - Re-centers the main content.
 * - Stacks the hero section and hides the image.
 */
@media screen and (max-width: 992px) {
  /* Hide sidebar on tablets and show top nav */
  .sidebar {
    display: none;
  }

  /* Reset main content margins/padding from laptop view */
  .container-a,
  .container-b {
    margin-left: auto; /* Re-center */
    margin-right: auto;
    max-width: 1200px; /* Restore max-width behavior */
    padding: 0 1rem; /* Standard tablet padding */
  }

  /* Hero section adjustments */
  .container-x {
    flex-direction: column;
    height: auto;
    padding: 2rem 1rem;
  }

  .content-x {
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }

  .image-section-x {
    display: none; /* Hide hero image */
  }

  /* Adjust hero titles */
  .title-x {
    font-size: 2rem;
  }
  .subtitle-x {
    font-size: 1.1rem;
  }

  /* Adjust tabs for smaller screens */
  .tabs-a {
    gap: 0.5rem;
  }
  .tab-a {
    padding: 0.5rem 1rem;
  }
  .tab-a span {
    font-size: 0.9rem;
  }
}

/* * -------------------------------------------
 * 3. Mobile Phones (max-width: 480px)
 * -------------------------------------------
 * - Hides top nav and sidebar.
 * - Shows mobile-specific bottom nav.
 * - Stacks all course cards.
 * - This is based on the styles already in your .php file.
 */
@media screen and (max-width: 480px) {
  /* Navigation */
  nav {
    display: none;
  }

  /* Sidebar */
  .sidebar {
    display: none; /* Hides sidebar as requested */
  }

  /* Adjust main content */
  body {
    padding-top: 0;
    background-color: #fff;
  }

  .container-x {
    padding-top: 10px;
    padding-bottom: 10px;
    height: 380px;
  }

  .content-x {
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }

  .title-x {
    font-size: 34px;
  }

  .subtitle-x {
    font-size: 18px;
    text-align: center;
  }

  .buttons-x {
    /* Corrected invalid CSS from original file */
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .btn-x {
    width: 100%;
    margin-bottom: 10px;
  }

  .btn-primary-x,
  .btn-secondary-x {
    padding: 10px 20px;
    font-size: 16px;
    width: 48%; /* Allows two buttons side-by-side */
    text-align: center;
    margin-bottom: 0;
  }

  .image-section-x {
    display: none;
  }

  /* Adjust course listings */
  .container-a,
  .container-b {
    padding: 1rem;
  }

  .grid-b {
    flex-direction: column;
    align-items: center;
  }

  .card-b {
    width: 100%;
  }

  .subtitle-a {
    margin-top: -170px;
    font-size: 1.4rem;
  }
  .tabs-a {
    margin-bottom: -5px;
  }

  /* Footer */
  footer {
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 77px;
  }

  .footer-content {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding-top: 9px;
  }

  .footer-logo {
    font-size: 16px;
    margin-bottom: 5px;
  }

  .footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
  }

  .footer-links,
  .footer-copyright {
    display: none;
  }

  /* Show Mobile Nav */
  .mobile-nav {
    display: flex;
    padding-top: 10px;
    height: 75px;
    padding-bottom: 5px;
  }

  .mobile-nav p {
    color: #000;
  }
}