/* Join Area */
.join-area {
  text-align: center;
  margin: 0;
}

.btn-join {
  display: inline-block;
  background-color: #0065cb;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 4px;
}

/* Preserve Join Now text color on hover */
.btn-join:hover {
  color: #ffffff;
}

/* Align Join Now button to far right */
.menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ensure nav items are horizontal */
.menu-bar nav {
  flex: 1;
}

.menu-bar .navbar-collapse {
  display: flex !important;
}

.menu-bar .navbar-nav {
  display: flex !important;
  flex-direction: row !important;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Push join-area to the right */
.menu-bar .join-area {
  margin-left: auto;
}

.course-filters {
  display: inline-flex;
  gap: 12px;
}
.course-filters .filter-btn {
  background: #FFF;
  border: 1px solid #0065CB;
  color: #0065CB;
  padding: 6px 16px;
  border-radius: 4px;
  border-color: #0065CB;
  font-family: 'Poppins', sans-serif;  /* added */
  font-size: 16px; 
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center; /* Add this line */
  text-decoration: none; /* Add this to remove link underline */
  display: inline-block;
}
.course-filters .filter-btn.active,
.course-filters .filter-btn:hover {
  background: #0065CB;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;  /* inherited, but you can repeat */
  font-size: 16px;
}
.course-item {
  transition: opacity 0.3s, transform 0.3s;
}
.course-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  height: 0; /* collapse */
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: none !important;
}

/* CUSTOM NAV ITEMS STYLING */
/* 1) Remove the blue dot */
.header .nav li > a::after {
  display: none !important;
}

.user-profile-area {
    margin-left: 20px;
}

.user-profile-area .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.user-profile-area .dropdown-menu {
    padding: 0;
    min-width: 240px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.user-profile-area .dropdown-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.user-profile-area .user-info {
    margin-left: 12px;
    display: flex;
    align-items: center;
}

.user-profile-area .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* Remove or comment out the user-email styles since we're not using it anymore */
/* .user-profile-area .user-email {
    display: none;
} */

.user-profile-area .dropdown-item {
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
}

.user-profile-area .dropdown-item i {
    margin-right: 10px;
    color: #666;
    width: 16px;
}

.user-profile-area .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2BA0FF;
}

.btn-signin {
    padding: 8px 20px;
    background: #2BA0FF;
    color: #fff;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: #1a90ef;
    color: #fff;
    text-decoration: none;
}

.btn-signin i {
    margin-right: 8px;
}

/* User Profile Dropdown Styles */
.user-profile {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.avatar-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s ease;
}

.avatar-trigger:hover {
    transform: scale(1.05);
}

.avatar-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-img-sm {
    width: 35px; /* Match the nav avatar size */
    height: 35px; /* Match the nav avatar size */
    border-radius: 50%;
    object-fit: cover;
}

.fa-angle-down {
    font-size: 12px; /* Reduced from default size */
    color: #fff;
}

.sign-out-btn {
    background: #2BA0FF !important;
    color: #fff !important;
    border-radius: 4px;
    text-align: center;
}

.sign-out-btn:hover {
    background: #1a90ef !important;
    color: #fff !important;
}

.sign-out-btn i {
    color: #fff !important;
}

/* Additional styles for user profile dropdown */
.user-profile .dropdown-menu {
    z-index: 1050;
    display: none;
}

.user-profile .dropdown-menu.show {
    display: block;
}

.user-profile .dropdown-item {
    padding: 8px 20px;
    clear: both;
    white-space: nowrap;
}

.filter-search-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    position: relative;
    min-width: 250px;
    margin-left: 24px;
    display: flex;
    align-items: center;
}

.search-box input {
    border-radius: 4px 0 0 4px;
    border: 1px solid #ddd;
    height: 38px;
    padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

.search-box .search-btn {
    border-radius: 0 4px 4px 0;
    height: 38px;
    padding: 6px 16px;
    margin-left: -1px;
    background: #0065CB;
    color: white;
    border: 1px solid #0065CB;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box .search-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
}

@media (max-width: 768px) {
    .filter-search-container {
        flex-direction: column;
    }
    .search-box {
        width: 100%;
        margin-left: 0;
        margin-top: 15px;
    }
}


/* Add these media queries at the end of the file */
@media (max-width: 480px) {
    .course-filters {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .course-filters .filter-btn {
        width: 100%;
        margin-bottom: 8px;
    }

    .filter-search-container {
        gap: 15px;
    }
}

/* For extremely small devices like Apple Watch */
@media (max-width: 197px) {
    .course-filters .filter-btn {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/*
=================================================
MOBILE HEADER AND NAVIGATION FIXES (REVISED)
=================================================
*/

/* Part A: Fix Logo and Menu Button Alignment (Updated) */
@media (max-width: 991px) {
    .header .header-inner .row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 15px 0;
    }

    .header .logo {
        margin: 0 !important;
        padding: 0 !important;
    }

    .header .mobile-menu-trigger {
        margin: 0 !important;
        padding: 0 !important;
        height: 100%;
        display: flex !important;
        align-items: center !important;
    }

    .header .logo img {
        max-height: 40px;
        vertical-align: middle;
    }
}

/* Part B: Styles for the new JavaScript-powered mobile profile menu */

/* First, hide the cloned profile item on desktop views */
.nav.menu .mobile-profile-item {
    display: none;
}

@media (max-width: 991px) {
    /* On mobile, hide the original user profile that's outside the menu */
    .header .menu-bar > .user-profile {
        display: none !important;
    }
    
    /* Show the new cloned profile item inside the mobile menu list */
    .nav.menu .mobile-profile-item {
        display: block;
    }

    /* Style the profile item to integrate seamlessly */
    .mobile-profile-item .dropdown-menu {
        position: static !important;
        display: block !important;
        width: 100%;
        float: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-profile-item .avatar-trigger {
        display: none; /* Hide the avatar image itself */
    }

    .mobile-profile-item .dropdown-header {
        padding: 12px 15px;
        color: #fff;
    }

    .mobile-profile-item .dropdown-item {
        padding: 12px 15px 12px 40px;
        color: #fff;
        background: transparent !important;
    }

    .mobile-profile-item .dropdown-item i {
        color: #fff !important;
    }

    .mobile-profile-item .dropdown-item:hover {
        background-color: #0065cb !important;
        color: #fff !important;
    }

    .mobile-profile-item .dropdown-divider {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
    }
}

