/* --- 1. LAPTOP / SMALL DESKTOP (<= 1440px) --- */
@media (max-width: 1440px) {
  /* MODIFICATION: Increased max-width to fill more of the screen 
     on laptops and reduce the large gaps you saw on the 27" monitor. */
  .welcome,
  .container-course,
  .why-us {
    max-width: 1280px; /* Was 1100px */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .slider-container {
    width: 1200px; /* Was 900px */
    height: 480px; /* Increased height slightly to match */
  }

  .slider-container-testi {
    max-width: 1000px; /* Increased from 900px base */
  }
}

/* --- 2. TABLET (<= 1024px) --- */
@media (max-width: 1024px) {
  /* --- MODIFICATION: Hide sidebar on tablet --- */
  .sidebar {
    display: none;
  }

  /* --- MODIFICATION: Adjust main content for full width --- */
  .wrapper,
  body:has(.sidebar:hover) .wrapper {
    margin-left: 0;
    width: 100%;
  }

  /* Stack welcome section */
  .welcome {
    flex-direction: column;
    padding-top: 30px;
  }
  .left-side {
    margin-left: 0;
    padding-right: 0;
    text-align: center;
  }
  .right-side {
    display: none; /* Hide main image */
  }

  /* Stack slider */
  .slider-container {
    width: 90%;
    height: auto;
  }
  .slide {
    flex-direction: column;
    height: auto;
  }
  .slide-image-container,
  .slide-content {
    width: 100%;
    padding: 20px;
  }
  .slide-image-container {
    height: 300px;
    padding-bottom: 10px;
  }

  /* Stack courses */
  .course-content {
    flex-direction: column;
  }
  .tabs-course {
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
  }
  .tab-button {
    white-space: nowrap;
  }

  /* Stack "Why Choose Us" */
  .infographic {
    grid-template-columns: 1fr;
  }
}

/* --- 3. MOBILE PHONE (<= 480px) --- */
@media screen and (max-width: 480px) {
  body {
    margin-top: -30px;
    padding-top: 0; /* Reset body padding */
  }

  /* --- MODIFICATION: Added margin-top for the welcome H1 on mobile --- */
  .welcome h1 {
    margin-top: 40px;
  }
  /* --- END MODIFICATION --- */

  /* Hide Desktop Navs */
  nav {
    display: none;
  }
  .sidebar {
    display: none; /* Hide sidebar as requested */
  }

  /* Reset main wrapper for mobile */
  .wrapper,
  body:has(.sidebar:hover) .wrapper {
    margin-left: 0;
    width: 100%;
  }

  /* Show Mobile Nav */
  .mobile-nav {
    display: flex;
    padding-top: 10px;
    height: 60px;
    padding-bottom: 5px;
  }
  .mobile-nav p {
    color: #000;
  }
  .mobile-nav-item {
    padding-top: 23px;
  }

  /* Adjust Footer for Mobile Nav */
  footer {
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 77px; /* Space for mobile nav */
  }
  .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;
  }

  /* Other Mobile Content Styles */
  h1 {
    font-size: 1.5em;
  }
  .welcome p {
    padding: 5px 15px;
  }
  .recent-update,
  .package {
    display: none;
  }
  .course-content {
    padding: 5px 10px;
  }
  .slider-container-testi {
    width: 100%;
    height: 600px;
    box-sizing: border-box;
    padding: 0 10px;
  }
}
