/* ================= Global Fixes ================= */
html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  width: 1200px;
  max-width: 95%;
  margin: auto;
}

/* ================= Tablet (up to 992px) ================= */
@media (max-width: 992px) {
  .container { width: 95%; margin: auto; }
  .nav-links ul { flex-wrap: wrap; justify-content: center; }
  .grid, .row { flex-wrap: wrap; }
}

/* ================= Mobile (up to 768px) ================= */
@media (max-width: 768px) {
  body { font-size: 15px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  /* ===== Hamburger Button ===== */
  .menu-toggle {
    display: block;
    font-size: 28px;
    cursor: pointer;
    margin-left: auto;   
    padding: 15px;
    z-index: 1001;
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  /* ===== Mobile Sidebar Menu ===== */
  #mainMenu {
    position: fixed;
    top: 0;
    right: -100%;   /* hidden off screen */
    height: 100%;
    width: 260px;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    padding-top: 60px;
    overflow-y: auto;
  }
  #mainMenu.active {
    right: 0;   /* slide in */
  }

  /* ===== Nav Links ===== */
  .nav-links ul {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #f3f3f3;
    color: #333;
    text-decoration: none;
  }

  /* ===== Dropdown Accordion ===== */
  .dropdown-content,
  .dropdown-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }
  .dropdown.open > .dropdown-content {
    max-height: 500px;   /* expands smoothly */
  }
  .dropdown-sub.open > .dropdown-submenu {
    max-height: 300px;
  }

  /* Sections */
  section { padding: 40px 15px; text-align: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card, .service { width: 100%; margin-bottom: 20px; }
  .btn { width: 100%; padding: 12px; }
}

/* ================= Small Mobile (up to 480px) ================= */
@media (max-width: 480px) {
  body { font-size: 14px; padding: 0 10px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  footer { font-size: 13px; text-align: center; }
}
