@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

body {
    font-family: "Montserrat", sans-serif;
    background-color: #ffffff;
    color: #000000;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make scrollbar transparent */
body::-webkit-scrollbar {
    width: 1px; /* Width of the scrollbar */
}

body::-webkit-scrollbar-track {
    background: transparent; /* Transparent background */
}

body::-webkit-scrollbar-thumb {
    background: transparent; /* Transparent thumb */
}

header {
    background-color: #000000;
    color: #ffffff;
    padding: 0.5em 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensure header is above other content */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1em;
}

.cart-icon {
    cursor: pointer;
    font-size: 1.5em;
    padding: 0 1em;
}

#nav-menu {
    display: flex;
}

#nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

#nav-menu ul li {
    margin-right: 1em;
}

#nav-menu ul li a {
    color: #ffffff; /* Black text */
    text-decoration: none;
    font-size: 1em;
    position: relative;
}

#nav-menu ul li a:hover {
    color: #ffffff; /* White text on hover */
}

#nav-menu ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -8px;
    left: 0;
    background-color: #ffffff; /* White underline color */
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

#nav-menu ul li a:hover::after {
    visibility: visible;
    transform: scaleX(1);
}
/* Cart Button CSS */
.cart-btn {
  display: inline-block;
  margin-right: 20px;
}

.cart-btn button {
  background: none;
  border: none;
  cursor: pointer;
}

.cart-btn button img {
  width: 35px;
  height: 35px;
}

.cart-btn button:focus,
.cart-btn button:active {
  outline: none; /* Remove default focus outline */
}

#cart-count {
  justify-content: center;
  align-content: center;
  background-color: red;
  color: white;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  font-size: 12px;
  position: absolute;
  top: 60px; /* Adjust position as needed */
  right: 65px; /* Adjust position as needed */
  transform: translate(50%, -50%);
}

.hidden {
  display: none;
}

main {
    flex: 1;
    padding: 6em 0em 2em; /* Add top padding to push content below the header */
}

#home {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
}

.home-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.home-text {
    flex: 1;
    padding-right: 20px;
}

.home-image {
    flex: 1;
    display: flex;
    justify-content: center;
}
.home-text {
    opacity: 0;
    transform: translateX(-100%);
    animation: slideInLeft 1s forwards;
}

.home-image {
    opacity: 0;
    transform: translateX(100%);
    animation: slideInRight 1s forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Initial state: hidden and translated downwards */
.animate-section {
    opacity: 0;
    transform: translateY(50px); /* Adjust the value as needed */
    transition: opacity 0.6s ease, transform 0.6s ease; /* Smooth fade-in and slide-in transition */
}

/* Visible state: fully opaque and translated to its original position */
.animate-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.home-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.wel-text {
    font-style: italic;
    font-weight: bold;
}

#home p {
    font-size: 1.2em;
}

#home h2 {
    font-size: 5em;
}

.home-footer {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.home-footer p {
    font-size: 1.2em;
}

#about {
    background-color: #000000;
    color: #ffffff;
    padding: 2em 30px; /* Example: 20px padding on both sides */
    margin: 0;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

#about h2 {
    font-size: 3em;
}

#about p {
    font-size: 1.2em;
}

#courses {
    padding: 2em 30px;
}
 
#courses h2 {
    font-size: 3em;
}

.courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2em; /* Increased gap between items */
    justify-items: center;
}

.course {
    border: 1px solid #000000;
    padding: 1em;
    text-align: center;
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
}
.course p{ 
    font-size: 1em;
}

.course img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.course a {
    display: block; /* Ensure the buttons take up the full width */
    margin: 0; /* Remove any default margins */
    text-decoration: none; /* Remove any default underlines */
}

@media (max-width: 600px) {
    .courses-container {
        grid-template-columns: 1fr; /* Ensure one column on smaller screens */
    }
}

.addtocart-button, .detail-button {
    width: 100%; /* Ensure the buttons take up the full width */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    margin: 0.5em 0; /* Add margin between buttons */
    cursor: pointer;
    padding: 0.5em 1em;
    border-radius: 8px; /* Rounded corners for buttons */
}

.addtocart-button {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.addtocart-button:hover {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.detail-button {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.detail-button:hover {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}


#contact {
    padding: 3em 0;
    background-color: #f9f9f9;
}

#contact h2 {
    text-align: left;
    margin-bottom: 1em;
    padding-left: 30px;
    font-size: 3em;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1em;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    margin-right: 2em;
}

.contact-info p {
    margin: 0.5em 0;
    font-size: 1.5em;
}

#contact-form {
    flex: 1;
    padding: 2em;
    border: 1px solid #000000;
    background-color: #ffffff;
    border-radius: 8px; /* Rounded corners */
}

.form-group {
    margin-bottom: 1em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #000000;
    border-radius: 8px; /* Rounded corners */
}

#contact-form button {
    display: block;
    width: 100%;
    padding: 0.75em;
    background-color: #000000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 1em;
    border-radius: 8px; /* Rounded corners */
    margin-top: 1em;
    border: 1px solid #000000;
}

#contact-form button:hover {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 1em 0;
    width: 100%;
}


/* Cart Modal CSS */
.cart-modal {
  display: none; 
  position: fixed;
  z-index: 1; 
  right: 0; /* Position at the right edge */
  top: 0;
  width: 400px; /* Fixed width */
  height: 600px; 
  overflow: none; 
  padding-top: 60px;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateX(100%);
  opacity: 0;
}

.cart-modal.open {
  transform: translateX(0);
  opacity: 1;
}

.cart-modal-content {
    background-color: #ffffff; /* White background */
    color: #000000; /* Black text */
    margin: 5% auto; /* Center vertically and horizontally */
    padding: 20px;
    border: 1px solid #888;
}

.cart-modal-content h2 {
    color: #000000; /* Black text for the cart title */
    text-align: center; /* Center align title */
    margin-bottom: 20px;
}

.close {
    color: #000000; /* Black close icon */
    transition: transform 0.3s ease
}

.close:hover,
.close:focus {
  color: rgb(0, 0, 0);
  text-decoration: none;
  cursor: pointer;
  transform: scale(1.2);
}

/* Cart Items Container */
#cartItems {
  max-height: 300px; /* Set max height for scrollable area */
  overflow-y: auto; /* Enable vertical scrolling */
  margin-bottom: 20px; /* Add margin below cart items */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
#cartItems::-webkit-scrollbar {
  display: none;
}

/* Cart Item CSS */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #000000; /* Black text for cart items */
  padding: 10px; /* Increase padding for better spacing */
}

.cart-item .item-info {
  flex: 1; /* Allow item info to grow */
  white-space: normal; /* Allow wrapping */
}

.cart-item .item-info p {
  margin: 0; /* Remove default margin */
}

.cart-item .quantity-controls {
  display: flex;
  align-items: center;
}

.cart-item button {
    background-color: #fefeff;
    color: #000000;
    border: 1px solid black; /* Border set to 1px solid black */
    padding: 5px 8px;
    cursor: pointer;
    margin-left: 5px; /* Adjust margin for spacing */
    font-size: 12px; /* Adjust font size */
  }
  
  .cart-item .quantity-btn {
    width: 20px; /* Set width */
    height: 20px; /* Set height */
    border-radius: 50%; /* Make rounded */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px; /* Adjust margin between buttons and number */
  }
  
  /* Change button border color on click */
  .cart-item button:focus,
  .cart-item button:active {
    border-color: #000000; /* Change border color on active state */
  }
  
  .cart-modal-content button:hover {
    background-color: #dddddd; /* Light grey on hover */
  }
/* Cart Total CSS */
#cartTotal p {
  color: #000000; /* White text for the total */
  text-align: center; /* Center align total */
  margin-top: 20px; /* Add margin for spacing */
  font-weight: bold;
}

/* Checkout Button CSS */
.checkout-btn {
  display: block;
  width: 100%;
  padding: 15px 0;
  background-color: #000000; /* Red background */
  color: #ffffff; /* White text */
  border: none;
  border-radius: 5px;
  font-size: 18px;
  text-align: center;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
    color: #000000; /* Red background */
    background-color: #ffffff !important; /* White text */
    border: 1px solid black; /* Black border */
}

.menu-icon {
    display: none;
    font-size: 2em;
    cursor: pointer;
    order: -1;
    width: 2em; /* Ensure a fixed width */
    text-align: center; /* Center align the content */
}

@media (max-width: 768px) {
    .cart-modal {
        width: 100%;
    }

    .header-container {
        justify-content: space-between; /* Adjust alignment for mobile */
        padding: 0 1em;
    }

    .menu-icon {
        display: block; /* Display the menu icon */
        font-size: 2em;
        cursor: pointer;
        order: -1; /* Move it to the beginning */
    }

    #nav-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 98px;
        left: -300px; /* Position off-screen to the left */
        width: 165px; /* Set the width of the menu */
        height: 100%;
        background-color: white;
        transition: left 0.3s ease; /* Smooth transition for left */
        z-index: 999; /* Ensure it's above other elements */
        font-size: 0.8em;
    }
    
    /* Class to show the menu */
    #nav-menu.open {
        left: 0; /* Bring the menu into view */
    } 

    /* Ensure nav links are styled properly */
    #nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    }

    #nav-menu ul li {
        margin: 1em 0;
    }
    
    #nav-menu ul li a {
        color: black; /* Black text */
        text-decoration: none;
        font-size: 1.2em;
        position: relative;
    }
    
    #nav-menu ul li a:hover {
        color: black; /* Black text on hover */
    }
    
    #navbar ul li a::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        bottom: -8px;
        left: 0;
        background-color: black; /* Black underline color */
        visibility: hidden;
        transform: scaleX(0);
        transition: all 0.3s ease-in-out;
    }
    
    #nav-menu ul li a:hover::after {
        visibility: visible;
        transform: scaleX(1);
    }

    .home-content {
        flex-direction: column;
        text-align: center;
    }

    #home h2 {
        font-size: 3em;
    }

    .home-image {
        margin-top: 1em;
    }

    .courses-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two columns per row */
        gap: 2em; /* Adjust the gap between items */
    }

    .course {
        width: 90%; /* Ensure each course takes up the full width of its container */
        max-width: none; /* Reset the max-width */
    }

    .course h3 {
        font-size: 0.9em;
    }

    .cart-icon {
        order: 0; /* Move cart icon to the left edge */
    }

    #contact p {
        padding-left: 20px;
        padding-bottom: 20px;
    }

    #about h2,
    #courses h2,
    #contact h2 {
        font-size: 1.5em;
    }

    #about p,
    #courses p,
    #contact p {
        font-size: 1em;
    }

    #home p {
        font-size: 0.9em;
    }

    .contact-form {
        width: 90%; /* Adjust width to fit smaller screens */
    }

    #cart-count {
        right: 50px;
    }
}