/* =========================
   RESPONSIVE.CSS
   Overrides & Layout Adjustments
   ========================= */

/* Large Devices (Tablets / Small Laptops) */
@media (max-width: 1024px) {

  .container {
    padding: 0 30px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    width: 250px;
  }

  .content {
    padding: 20px;
  }
}

/* Medium Devices (Tablets) */
@media (max-width: 768px) {

  /* Navigation */
  .nav,
  .navbar,
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  nav ul li {
    width: 100%;
  }

  /* Hero Section */
  .hero {
    text-align: center;
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .btn,
  button {
    width: 100%;
    text-align: center;
  }

  /* Sidebar */
  .sidebar {
    width: 100%;
    position: relative;
  }

  .layout {
    flex-direction: column;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Small Devices (Phones) */
@media (max-width: 480px) {

  .container {
    padding: 0 15px;
  }

  header {
    padding: 15px 0;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  p {
    font-size: 14px;
  }

  .hero {
    padding: 40px 15px;
  }

  .card {
    padding: 15px;
  }

  .btn,
  button {
    font-size: 14px;
    padding: 10px 14px;
  }
}

/* =========================
   MOBILE-FIRST SAFETY FIXES
   ========================= */

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
}

/* Ensure media scales properly */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Tables become scrollable */
table {
  width: 100%;
  display: block;
  overflow-x: auto;
}

/* =========================
   UTILITY RESPONSIVE HELPERS
   ========================= */

.hide-mobile {
  display: block;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .show-mobile {
    display: block !important;
  }
}

/* =========================
   END OF FILE
   ========================= */