:root {
    --primary-color: #f48c4a;
    --secondary-color: #f8f9fa;
    --accent-color-1: #3e4997;
    --accent-color-2: #f48c4a;
    --accent-color-3: #4caf50;
    --text-color: #333;
    --border-color: #dee2e6;
  }
  .container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 15px;
  }
  body {
    font-family: 'Merriweather', serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #FAF5F0;
}

header {
    background-color: #F48C4A;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: padding-bottom 0.3s ease;
}

/* Logo and title styles */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Fixed height for logo */
    width: auto; /* Maintain aspect ratio */
    margin-right: 10px;
}

.logo span {
    font-weight: bold;
    color: white;
}

/* Centering the nav items */
nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    font-weight: 700;
    color: white;
}

/* Language image size adjustment */
nav ul li img {
    height: 30px; /* Fixed height for language flag */
    width: auto; /* Maintain aspect ratio */
}

/* Toggle button styles */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 20px; /* Position toggle button on the right */
    top: 50%; /* Align it vertically center with logo and text */
    transform: translateY(-99%); /* Center the toggle button */
    z-index: 2;
}

.nav-toggle span {
    background-color: black;
    height: 3px;
    margin: 5px 0;
    width: 25px;
    transition: transform 0.3s ease;
}

/* Media Query for small screens */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex; /* Show the toggle button on small screens */
    }

    header {
        flex-direction: column; /* Stack logo and nav vertically */
    }

    .logo {
        margin-bottom: 10px; /* Add some space between logo and nav */
        margin-right: 120px;
        margin-top: 5px;
        top: 10%;
    }

    nav {
        display: block; /* Stack nav vertically */
        width: 100%;
        position: relative;
    }

    nav ul {
        display: none; /* Hide the links by default */
        flex-direction: column; /* Stack links vertically */
        width: 100%;
        background-color: #F48C4A;
        position: relative;
        padding: 10px 0;
        z-index: 1;
        max-height: 0; /* Initially hide the dropdown */
        opacity: 0; /* Initially hide the dropdown */
    }

    nav ul.show {
        display: flex; /* Show the links when toggled */
        max-height: 200px; /* Allow enough height for the dropdown */
        opacity: 1; /* Show the dropdown */
    }

    nav ul li {
        margin: 10px 0;
        text-align: center; /* Center the links */
    }

    header.open {
        padding-bottom: 200px; /* Adjust padding to fit the open menu */
    }
}

/* Reset styles for larger screens */
@media (min-width: 769px) {
    .nav-toggle {
        display: none; /* Hide the toggle button on larger screens */
    }

    header {
        flex-direction: row; /* Align items horizontally */
        padding-bottom: 10px; /* Reset padding for larger screens */
    }

    nav {
        display: flex;
        justify-content: center; /* Center nav items */
    }

    nav ul {
        display: flex; /* Ensure the links are visible */
        flex-direction: row; /* Ensure links are in a row */
        position: static; /* Position the nav normally */
        width: auto;
        background-color: transparent;
        max-height: none; /* Remove max-height restriction */
        opacity: 1; /* Ensure visible on larger screens */
    }

    nav ul li {
        margin: 0 20px;
        text-align: left; /* Reset alignment */
    }
}


  /* .site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    text-align: center;
  }
  
  .site-header h1 {
    margin: 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  } */
  
  /* .search-container {
    margin-top: 1rem; 
  } */
  
  /* #search-input {
    padding: 0.5rem;
    width: 70%;
    border: none;
    border-radius: 20px 0 0 20px;
    font-size: 1rem;
  }
  
  #search-btn {
    padding: 0.5rem 1rem;
    background-color: var(--accent-color-1);
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
  } */
  
main {
  display: flex;
  margin-top: 2rem;
}

.sidebar {
  width: 250px;
  margin-right: 2rem;
}

.category-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.category-btn:hover,
.category-btn.active {
  background-color: var(--accent-color-2);
  color: white;
  transform: scale(1.05);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 2fr));
  gap: 1rem;
  flex-grow: 2;
}

.course-card {
  background-color: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  border: 1px solid var(--accent-color-2);
  margin-bottom: 3rem;
}

.course-card:hover {
  transform: translateY(-10px);
}

.course-carousel {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  /* width: 100%; */
  height: 100%;
  margin: 0rem 3.5rem;
  object-fit: cover;
}

.carousel-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  background-color: white;
  padding: 15px;
  border-radius: 20px; /* Applique un radius aux coins */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ajoute un effet d'ombre pour plus de style */
}

/* .carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s;
  border: 5px solid var(--accent-color-1); 
}

.carousel-dot.active {
  background-color: white;
  border: 5px solid var(--accent-color-2); 
} */

.course-info {
  padding: 1rem;
}

.course-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-family: Merriwaether;
  color: var(--primary-color);
}

.course-category {
  color: black;
  font-size: 8px;
  /* font-weight: bold; */
  text-align: justify;
  /* font-family: Merriwaether; */
}

.course-actions {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  background-color: var(--secondary-color);
}

.action-btn {
  background: black;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: background-color 0.3s;
}

.action-btn:hover {
  background-color: var(--accent-color-2);
  color: white;
}

.site-footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 2rem;
  }

  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .carousel-item img {
    margin: 0rem 4rem;
  }
  
}



/* Footer section */
footer {
  background-color: #F48C4A; /* Orange background */
  color: white; /* Blue text for entire footer */
  padding: 40px 20px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.footer-content {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: space-around;
  flex-wrap: wrap;
}

footer h4 {
  font-size: 18px;
  font-family: 'Merriweather', serif;
  margin-bottom: 10px;
  color: white; /* Blue text for headings */
}

footer p, footer ul {
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer ul li {
  margin-bottom: 5px;
}

footer ul li a {
  text-decoration: none;
  color: white; /* Blue text for links */
  transition: color 0.3s ease;
  font-weight: bol;
}

footer ul li a:hover {
  color: #FFFFFF; /* Change to white on hover for contrast */
}

.contact-info, .quick-links, .legal, .social-media {
  flex: 1;
  min-width: 200px;
  padding: 10px;
}
