.semester-overview {
        padding: 10px 0;
        background-color: var(--off-white);
        border-bottom: 1px solid var(--border-color);
        text-align: center;
      }
      .semester-overview p {
        font-size: 1.1rem;
        line-height: 1.8;
        margin-bottom: 1rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
      }
      .semester-overview a {
        color: var(--primary-color);
        font-weight: 600;
        text-decoration: none;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s ease;
      }
      .semester-overview a:hover {
        border-bottom-color: var(--secondary-color);
      }
      .semester-grid-section {
        padding: 20px 0 80px 0;
      }
      .subject-grid {
        display: grid;
        /* Responsive grid with a minimum item width of 300px */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
      }
      .subject-card {
        background-color: #fff;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        padding: 25px;
        display: flex;
        flex-direction: column;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        overflow: hidden;
      }
      .subject-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow);
      }
      .subject-card h3 {
        color: var(--dark-blue);
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 10px;
        /* Ensure consistent height alignment */
        min-height: 56px;
      }
      .subject-card p {
        color: var(--text-color);
        margin-bottom: 20px;
        flex-grow: 1; /* Pushes button to the bottom */
        font-size: 0.95rem;
      }
      .subject-card .btn {
        width: 100%;
        margin-top: auto; /* Aligns button to the bottom */
      }
      .subject-code {
        background-color: var(--primary-color);
        color: #fff;
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 500;
      }
      .no-subjects {
        grid-column: 1 / -1; /* Span full grid width */
        text-align: center;
        padding: 50px 20px;
        background-color: var(--off-white);
        border-radius: var(--border-radius);
      }
      .no-subjects h2 {
        color: var(--dark-blue);
        margin-bottom: 10px;
      }
      @media (max-width: 768px) {
        .page-header h1 {
          font-size: 2.2rem;
        }
        .semester-overview p {
          font-size: 1rem;
        }
        .subject-card h3 {
          min-height: auto;
        }
      }