/* Large tablets and small desktops */
@media (min-width: 993px) and (max-width: 1123px) {
  .search-form input {
    width: 90px;
    height: 40px;
    margin-left: 1px;
  }

  .nav-links a {
    margin: 0 16px;
  }

  .contact a {
    margin-right: 0;
  }
}

/* Tablets and below (0px – 992px) */
@media (max-width: 992px) {
  .logo {
    margin-right: 1px;
    padding-top: 10px;
  }

  .nav-links a {
    margin: 0 16px;
  }

  .search-form input {
    width: 80px;
    height: 40px;
  }

  .contact a {
    margin-right: 0;
  }

  .watermark {
    position: fixed;
    top: 55%;
    left: 50%;
  }

  .scroll-bar-wrapper {
    margin-top: -1px;
  }

  /* Hide sidebar */
  .sidebar {
    display: none !important;
  }

  /* Custom dropdown (visible only on mobile/tablets) */
  .chapter-dropdown-wrapper {
    display: block !important;
    margin: 0 auto;
    width: 55%;
    text-align: center;
    position: fixed;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
  }

  .custom-dropdown {
    background-color: #5c0000;
    border: 2px solid #ff8c00;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #ffda96;
    position: relative;
    user-select: none;
    height: 30px;
    text-align: center;
  }

  .dropdown-selected {
    padding: 1px;
    border-radius: 8px;
    position: relative;
  }

  .dropdown-selected::after {
    content: "🢗";
    position: absolute;
    right: 10px;
    top: 100%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #ffda96;
  }

  .custom-dropdown.open .dropdown-options {
    display: block;
  }

  .dropdown-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 160px;
    overflow-y: auto;
    background-color: #ffe4b3;
    border: 2px solid #ff8c00;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
  }

  .dropdown-options li {
    padding: 4px;
    font-size: 14px;
    font-weight: bold;
    color: #5c0000;
    transition: background 0.2s;
    cursor: pointer;
  }

  .dropdown-options li:hover {
    background-color: #ffda96;
    color: #5c0000;
  }

  .dropdown-options li.selected {
    background-color: #ff8c00;
    color: #450000;
  }
}

/* Tablets (0px – 924px) */
@media (max-width: 924px) {
  .logo {
    margin-right: 1px;
    padding-top: 10px;
  }

  .nav-links a {
    margin: 0 16px;
  }

  .search-form input,
  .search-form button {
    display: none;
  }

  .contact a {
    margin-right: 0;
  }

  .watermark {
    position: fixed;
    top: 55%;
    left: 50%;
  }

  .scroll-bar-wrapper {
    margin-top: -1px;
  }

  .sidebar {
    display: none !important;
  }
}

/* Mobile (0px – 712px) */
@media (max-width: 712px) {
  .watermark {
    position: fixed;
    width: 300px;
    height: auto;
  }

  .hamburger {
    display: block;
    font-size: 28px;
    color: #ffda96;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    bottom: 0;
  }

  /* Slide menu */
  .nav-links {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: hsl(8, 97%, 15%);
    box-shadow: 2px 0 10px rgba(83, 0, 0, 0.151);
    display: flex;
    flex-direction: column;
    padding-top: 0;
    transition: left 0.2s ease;
    z-index: 999;
    background-image: 
      url("SP-Logo-png/jayshriramtext.png"),
      url("SP-Logo-png/krishnaarjunrath.png");
    background-repeat: no-repeat, no-repeat;
    background-size: contain, contain;
    background-position: center 20px, center bottom;
    background-size: 170px auto, contain;
  }

  .nav-links a.home {
    display: block;
    margin-top: 120px;
  }

  .nav-links a {
    margin-top: 12px;
    background-color: #450000;
    width: 215px;
    text-align: center;
  }

  /* Overlay shadow */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .close-btn {
    position: absolute;
    top: 1%;
    right: 65%;
    width: 30%;
    height: 5%;
    background: url("SP-Logo-png/crosssbhala.png");
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    cursor: pointer;
    z-index: 1002;
  }
}

/* Small phones (0px – 500px) */
@media (max-width: 500px) {
  .notify {
    display: none;
  }

  .notify-onmenu a {
    display: block;
    background-color: transparent;
  }

  .notify-onmenu button {
    width: 85%;
    padding: 6px 12px;
    font-size: 17px;
    font-weight: bold;
    border-radius: 10px;
    background-color: #ff8c00;
    color: #450000;
    border: none;
    margin-top: 12px;
  }

  .notify-onmenu button:hover {
    background-color: #bd0000;
    color: #ffda96;
  }

  .hamburger {
    display: block;
    font-size: 28px;
    color: #ffda96;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: -15px;
  }
}

/* Extra small phones (0px – 320px) */
@media (max-width: 320px) {
  .hamburger {
    display: block;
    font-size: 28px;
    color: #ffda96;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: -15px;
    margin-left: -10px;
  }
}
