body {
    font-family: 'Segoe UI', sans-serif;
    font-size: 18px;
  }

.btn {
        padding: 3px 8px;
        font-size: 12px;
        line-height: 1.2;
      }
 
  .category-icon {
    font-size: 20px;
    color: #6f42c1;
  }

  .copyright {
    background-color: #eaeaea;
    padding: 8px;
    font-size: 12px;
  }
  .btn-purple {
    background-color: #7e43ec;
    color: white;
    font-size: 13px;
    padding: 6px 12px;
  }
  .gap-under-search {
    height: 5px;
    background-color: #e9e9e9;
    margin-top: 10px;
    margin-bottom: 20px;
  }
  .small-stats {
    font-size: 13px;
  }
  h2, h4 {
    font-size: 1.4rem;
  }
  .card-title {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }
  .card-text, small {
    font-size: 0.85rem;
  }

@media (max-width: 767px) {
  .category-icon {
    font-size: 20px;
  }

  .category-title {
    font-size: 14px;
  }

  .category-description {
    font-size: 11px;
  }
}
.course-card {
    border: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    font-size: 13px;
    width: 355px; /* Fixed width for uniformity */
    flex: 0 0 auto; /* Prevents shrinking */
    transition: transform 0.2s ease-in-out;
  }

      .course-card:hover {
          transform: scale(1.05);
      }
  
      /* ✅ Ensure the Card Image Fits Properly */
      .card-img-top {
          max-height: 140px;
          object-fit: cover;
          width: 100%;
      }
      .scroll-to-top {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background-color: black; /* Change to a different color if needed */
        color: white; /* White arrow */
        border: none;
        border-radius: 50%;
        font-size: 28px;
        cursor: pointer;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
        transition: opacity 0.3s, transform 0.3s;
        opacity: 0;
        visibility: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
  
    .scroll-to-top:hover {
        background-color: #333; /* Darker shade on hover */
        transform: scale(1.1);
    }

    .scroll-to-top.show {
        opacity: 1;
        visibility: visible;
    }
  
      .arrow-symbol {
          color: white; /* Ensuring arrow stays white */
      }
  
      /* ✅ Scroll Button */
      #scrollBtn {
          display: none;
          position: fixed;
          bottom: 20px;
          right: 20px;
          z-index: 99;
          background-color: #007bff;
          color: white;
          cursor: pointer;
          padding: 10px 15px;
          border-radius: 50%;
          font-size: 16px;
          border: none;
      }
  
      #scrollBtn:hover {
          background-color: #0056b3;
      }
  
      /* ✅ Search Suggestions */

      .list-group-item {
          cursor: pointer;
      }
  
      .list-group-item:hover {
          background-color: #f8f9fa;
      }
  
      /* ✅ Fix Course Card Size */
      .course-fixed-height {
          height: 100%; /* Ensures all cards have the same height */
          display: flex;
          flex-direction: column;
      }
  
      .course-fixed-height .card-body {
          flex-grow: 1; /* Ensures content is aligned properly */
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          overflow: hidden; /* ✅ Prevents content from overflowing */
      }
  
      /* ✅ Ensure Course Description Does Not Overflow */
      .course-description {
          display: -webkit-box;
          -webkit-line-clamp: 2; /* Ensures exactly 2 lines */
          -webkit-box-orient: vertical;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: normal; /* Allows text wrapping */
          word-wrap: break-word;
          line-height: 1.5em; /* Adjust based on font size */
          max-height: 3em; /* Ensures two full lines */
      }
  
      .course-card .card-body {
          flex-grow: 1;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
      }
  
  
      /* ✅ Scrollable Course Section */
      .course-scroll-container {
          overflow-x: auto;
          white-space: nowrap;
          padding: 10px;
          scroll-behavior: smooth;
      }
  
      .course-list {
          display: flex;
          gap: 15px;
          min-width: 100%;
      }

      .course-list {
          display: flex;
          gap: 15px;
          min-width: 100%;
      }

@media (max-width: 1011px) {
  #courseSearchForm.sticky {
    position: fixed;
    top: 10px; /* Reduced to account for iOS safe areas; adjust as needed */
    left: 2.5%; /* Use percentage margins instead of transform for centering */
    right: 2.5%;
    width: 95%;
    max-width: 100%; /* Optional: limit width for larger screens */
    z-index: 1000;
    border-radius: 20px;
    animation: slideDown 0.3s ease-in-out;
    /* creates purple background outside the form */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15),
                0 0 0 6px #aaa6ff; 
    
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      top: -10px; /* Simplified animation without transform */
    }
    to {
      opacity: 1;
      top: 10px;
    }
  }
}

@media (min-width: 1012px) { 
  nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    z-index: 1100;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }

  /* Compact search style inside navbar */
  #courseSearchForm.in-navbar {
    position: relative !important;
    margin-left: 20px;
    flex: 1; /* allow auto resize */
    max-width: 600px; /* responsive cap */
    min-width: 280px;
    height: 40px;
    border-radius: 50px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.3s ease-in-out;
    transition: all 0.3s ease;
  }

  #courseSearchForm.in-navbar input {
    height: 35px;          
    font-size: 14px;       
    border: none;         
    outline: none; 
    flex: 1;               
    background: transparent; 
    padding: 0 8px;
  }

  #courseSearchForm.in-navbar button {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
  }

  #courseSearchForm.in-navbar ul {
    min-width: 250px; /* match parent */
    max-width: 300px;
  }

  #courseSearchForm.in-navbar #locationSuggestionsContainer {
    min-width: 250px;
    left: 0;
    right: auto;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
