/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
}

<style>
    .text-container {
      max-width: 600px;
      margin: 20px auto;
      font-family: Arial, sans-serif;
      line-height: 1.5;
    }

    .more-text {
      display: none; /* Hidden by default */
      transition: max-height 0.5s ease, opacity 0.5s ease;
      max-height: 0;
      overflow: hidden;
      opacity: 0;
    }

    .more-text.show {
      display: block;
      max-height: 1000px; /* Adjust based on content */
      opacity: 1;
    }

    .read-more-btn {
      background-color: #007BFF;
      color: #fff;
      border: none;
      padding: 10px 20px;
      cursor: pointer;
      font-size: 14px;
      border-radius: 5px;
      transition: background-color 0.3s ease;
      display: inline-block;
      margin-top: 10px;
    }

    .read-more-btn:hover {
      background-color: #0056b3;
    }

#cart-container {
    position: relative;
}

#cart-button {
    background-color: #888888;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

#cart-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    position: absolute;
    top: -5px;
    right: -10px;
}

#cart-dropdown {
    position: absolute;
    top: 100%;
    right: 10;
    width: 300px;
    background-color: #ccc;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: none;
    z-index: 10;
    color: black;
}

/* Ensure the dropdown is hidden initially */
#cart-dropdown.hidden {
    display: none;
}

.course-name {
	width: 500px;
}
course-price {
 	justify-content: right;
}

#cart-dropdown {
    display: block; /* Set default visibility to block */
    border: 1px solid #ccc; /* Optional: border for clarity */
    padding: 10px;
    position: absolute; /* This allows the cart dropdown to appear over other content */
    top: 50px; /* Adjust to position the dropdown below the cart button */
    right: 0; /* Align to the right of the container */
    width: 800px; /* Adjust width if necessary */
    z-index: 1000; /* Ensure dropdown appears above other elements */
   background-color: #666;
color: white;
}


#cart-dropdown li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

#clear-cart {
    margin-top: 1rem;
    background-color: #FF5733;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

#pay-cart {
    margin-top: 1rem;
    margin-left: 10px;
    background-color: blue;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}
main {
    padding: 2rem;
}

/* Course List */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.course-item {
    background-color: #aaa;
    padding: 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    text-align: center;
}

.course-item button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.course-item button:hover {
    background-color: #0056b3;
}
