/* --- Global & Variables --- */
:root {
  --color-primary: #ef7220; /* Orange */
  --color-text: #333;
  --color-text-light: #999999;
  --color-border: #eee;
  --color-bg-light: #f9f9f9;
  --color-blue-badge: #007bff;
  --color-red-badge: #dc3545;
}
.container {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: auto;
  margin-left: auto;
}
body {
  font-family: "Inter", sans-serif;
  margin: 0;
  background-color: #fcfcfc;
  color: var(--color-text);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
  padding: 0px;
  margin: 0px;
}
a {
  text-decoration: none;
  color: inherit;
}
/* --- Main Header & Navbar --- */
.main-header {
  background-color: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  height: 70px;
}
.nav-left {
  display: flex;
  align-items: center;
}
.logo {
  margin-right: 30px;
}
.nav-links {
  display: flex;
}

.nav-item > a {
  display: flex;
  align-items: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  transition: color 0.3s ease;
}
.nav-item > a svg {
  margin-left: 4px;
}
/* .nav-item.has-megamenu > a {
  color: var(--color-primary);
  font-weight: 600;
} */
.nav-item:hover > a {
  color: var(--color-primary);
  padding: 12px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.icon-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all 0.3s ease;
}
.icon-btn:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}
.login-btn {
  background-color: transparent;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  border: 1px solid var(--color-primary);
}
.login-btn:hover {
  background-color: var(--color-primary);
  color: #fff;
}
/* --- Mega Menu --- */
.mega-menu {
  position: absolute;
  top: 70px; /* Aligns with navbar bottom */
  left: 6%;
  width: 90%;
  background-color: #f2f6f8;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: 300px 1fr;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  padding: 15px;
}
/* Show mega menu on hover of parent .nav-item */
/*.nav-item.has-megamenu:hover .mega-menu {*/
/*  opacity: 1;*/
/*  visibility: visible;*/
/*  transform: translateY(0);*/
/*  z-index: 9;*/
/*}*/
/* --- Mega Menu Sidebar --- */
.mega-menu-sidebar {
  padding: 0 15px 15px;
  background-color: #f2f6f8;
}
.mega-menu-sidebar h3 {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 10px;
}
.mega-menu-sidebar .partner-title {
  margin-top: 10px;
  border-top: 1px solid #cccccc;
  padding-top: 15px;
}
.domain-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  color: #000;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.domain-list li a:hover {
  color: var(--color-primary);
}
.domain-list li.active a {
  color: #ef7220 !important; /* Forces the orange color */
  font-weight: 600;
}
/* .domain-list li.active span {
  font-size: 18px;
} */
/* --- Mega Menu Content --- */
.mega-menu-content {
  padding: 25px 40px;
  overflow-y: auto;
  background: #fff;
  border-radius: 5px;
}
.menu-section {
  margin-bottom: 30px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #ccc;
}
.section-header div h4 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}
.section-header div p {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-light);
  margin-bottom: 12px;
}
.explore-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}
.explore-link span {
  transition: transform 0.3s ease;
  display: inline-block;
}
.explore-link:hover span {
  transform: translateX(5px);
}
/* --- Course Card Grid --- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card {
  display: flex;
  flex-direction: row;
  gap: 15px;
  background-color: #fff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  align-items: center;
}
.card-icon {
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0%) -30%, #dbdbdb 70%);
}
.card-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  object-position: center;
}
.card-icon.green {
  background-color: #28a745;
}
.card-icon.teal {
  background-color: #17a2b8;
}
.card-icon.purple {
  background-color: #6f42c1;
}
.card-icon.red {
  background-color: #dc3545;
}
.card-badge {
  position: absolute;
  top: 10px;
  right: -30px;
  background-color: var(--color-blue-badge);
  color: #fff;
  padding: 3px 30px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  transform: rotate(45deg);
  transform-origin: top left;
}
.card-badge.red {
  background-color: var(--color-red-badge);
}
.card-category {
  font-size: 8px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: 5px;
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}
.nav-item > .courses {
  color: #fff;
  background: var(--color-primary);
  border-radius: 4px;
  padding: 12px;
}
.nav-item:hover > .courses {
  color: #fff;
  background: var(--color-primary);
  border-radius: 4px;
  padding: 12px;
}
/* --- Search Bar Transition --- */
/* 1. Make the nav-right a positioning container */
.nav-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}
/* --- Simple Dropdown (for 'About Grras') --- */
.nav-item.has-dropdown {
  position: relative; /* Required for positioning the dropdown */
}
.simple-dropdown {
  position: absolute;
  top: 58px;
  left: 0;
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.07);
  border-radius: 0 0 4px 4px;
  min-width: 220px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}
/* Show the dropdown on hover */
.nav-item.has-dropdown:hover .simple-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.simple-dropdown li a {
  display: block;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 500;
  color: #000;
  transition: all 0.2s ease;
}
.simple-dropdown li a:hover {
  background-color: #f9f9f9;
  color: var(--color-primary);
}
.mega-menu-pane {
  display: none; /* Hide all panes by default */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.mega-menu-pane.active {
  display: block; /* Show only the active one */
  opacity: 1;
}
.mobile-toggle,
.mobile-close-item,
.mobile-only-item {
  display: none;
}
/* --- Profile Dropdown Styles --- */
/* Wrapper to hold the relative position */
.profile-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
/* The actual dropdown container */
.profile-dropdown {
  position: absolute;
  top: 60px;
  left: 0;
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.07);
  border-radius: 0 0 4px 4px;
  min-width: 220px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  padding: 15px;
}
/* Show on Hover */
.profile-menu-wrapper:hover .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* List Items */
.profile-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}
.profile-contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 12px;
  color: #000;
  font-weight: 500;
}
.profile-contact-list li a:hover {
  color: #ef7220; /* Your theme orange */
}
/* Orange 'Reach Us' Button */
.reach-us-btn {
  display: block;
  width: 100%;
  background-color: #ef7220;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.reach-us-btn:hover {
  background-color: #d66116;
  color: #fff;
}
.profile-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
}
.search-wrapper {
  position: relative;
  height: 40px;
  width: 70px; /* UPDATED: Matches the new SVG width (Pill shape) */
  background: #fff;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #A9A9A9; /* This matches the SVG border color */
  border-radius: 40px;
}
/* State: Open/Active */
.search-wrapper.active {
  width: 200px; /* UPDATED: Made slightly wider to accommodate longer text */
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.search-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}
/* The Input Field */
.search-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  /* UPDATED: Adjusted padding. Left 20px for text, Right 60px to not hit the icon */
  padding: 0 60px 0 20px;
  font-size: 14px;
  color: #333;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease;
  font-family: "Inter", sans-serif;
  pointer-events: none;
}
.search-wrapper.active .search-input {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
/* The Search Icon Container */
.search-icon {
  position: absolute;
  right: 0;
  top: 0;
  width: 70px; /* UPDATED: Full width of the closed button to center the icon */
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
}
/* When active, shrink the icon container so it sits on the right */
.search-wrapper.active .search-icon {
  width: 50px; /* UPDATED: Shrink to button size */
  transform: scale(1); /* No scale needed, just width change */
}
/* Optional: Color change on active */
.search-wrapper.active .search-icon svg path {
  stroke: #555; /* Keep it dark or change to theme color */
}
/* The Close (X) Button */
.close-btn {
  position: absolute;
  right: 55px; /* UPDATED: Moved slightly left to clear the wider icon area */
  top: 50%;
  transform: translateY(-50%) scale(0);
  cursor: pointer;
  opacity: 0;
  transition: all 0.4s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.search-wrapper.active .close-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: all;
}
/* --- START: Responsive Styles --- */
@media (max-width: 1024px) {
  /* --- Body & Navbar --- */
  body.mobile-menu-open {
    overflow: hidden;
  }
  .navbar {
    padding: 0;
    height: 56px; /* Adjust height for mobile */
  }
  .desktop-only {
    display: none !important;
  }
  /* --- Mobile Hamburger Toggle --- */
  .mobile-toggle {
    display: flex;
    z-index: 1001; /* Above mobile menu */
  }
  .nav-right {
    gap: 10px; /* Space out search and hamburger */
    width: 60%;
  }
  .nav-right .search-toggle {
    display: none; /* Hide search toggle on mobile, just show input */
  }
  .nav-right .search-input {
    width: 150px; /* Give search a bit of space */
    opacity: 1;
    visibility: visible;
    border-color: #999999;
    padding-left: 10px;
    padding-right: 10px;
    height: 32px;
    font-size: 12px;
  }
  .nav-right.search-active .search-input {
    width: 150px; /* Keep it consistent */
  }
  /* --- Mobile Menu Container --- */
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 100%; /* Start off-screen */
    width: 100%;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    overflow-y: auto;
    padding-top: 60px; /* Space for close button */
    transition: transform 0.3s ease-in-out;
  }
  .nav-links.is-open {
    transform: translateX(-100%);
  }
  /* --- Mobile Menu Items --- */
  .nav-item {
    width: 100%;
  }
  .nav-item > a {
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    border-bottom: 1px solid #f0f0f0;
    justify-content: space-between;
  }
  .nav-item > a:hover {
    padding: 12px;
    color: var(--color-primary);
  }
  /* Style the 'Courses' button differently */
  .nav-item > .courses,
  .nav-item:hover > .courses {
    background: none;
    color: #000;
    border-radius: 0;
  }
  .nav-item.is-open > .courses {
    color: var(--color-primary);
  }
  /* --- Mobile Close Button --- */
  .mobile-close-item {
    display: list-item;
    position: absolute;
    top: 0;
    border-bottom: none;
  }
  .mobile-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    padding-left: 10px;
    cursor: pointer;
  }
  /* --- Mobile-Only Nav Items --- */
  .mobile-only-item {
    display: block;
    padding: 12px;
  }
  .mobile-only-item .login-btn {
    width: 100%;
    text-align: center;
    border: 1px solid var(--color-primary);
  }
  .mobile-only-item .icon-btn {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    justify-content: flex-start;
    padding: 0 1rem;
    gap: 10px;
  }
  .mobile-only-item .login-btn:hover {
    color: #fff;
  }
  /* --- Responsive Dropdowns (Accordion) --- */
  .nav-item.has-megamenu,
  .nav-item.has-dropdown {
    position: static; /* Reset desktop positioning */
  }
  /* Hide all submenus by default */
  .mega-menu,
  .simple-dropdown {
    display: none;
    position: static;
    width: 100%;
    max-height: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid #eee;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
  }
  /* Show submenu when parent .nav-item is open */
  .nav-item.is-open > .mega-menu,
  .nav-item.is-open > .simple-dropdown {
    display: grid;
  }
  .nav-item.is-open > .simple-dropdown {
    display: block; /* Simple dropdown is block, not grid */
  }
  /* --- Responsive Mega Menu --- */
  .mega-menu {
    grid-template-columns: 1fr; /* Stack sidebar and content */
  }
  .mega-menu-sidebar {
    border-right: none;
    padding: 12px;
  }
  .mega-menu-content {
    padding: 1rem;
    max-height: none;
  }
  .domain-list li a {
    font-size: 12px;
    padding: 12px 0; /* Add padding back for click area */
  }
  .domain-list li.active a {
    border: none; /* Remove border */
  }
  .section-header {
    border-bottom: 1px solid #ddd;
  }
  .course-grid {
    grid-template-columns: 1fr; /* Stack course cards */
    gap: 10px;
  }
  .course-card {
    padding: 10px;
    gap: 10px;
    border-radius: 4px;
  }
  .card-icon img {
    width: 35px;
    height: 35px;
  }
  .card-title {
    font-size: 12px;
  }
  .card-category {
    font-size: 10px;
  }
  /* --- Responsive Simple Dropdown --- */
  .simple-dropdown {
    padding: 0;
  }
  .simple-dropdown li a {
    padding: 1rem 1.5rem;
    font-size: 12px;
    color: #000;
    border-bottom: 1px solid #eee;
  }
  
  @media (max-width: 1024px) {
  .mega-menu-content {
    display: block !important; /* Allow content to show */
    padding: 0;
    border-top: 1px solid #eee;
  }
  
  /* Make sure panes are hidden by default and shown when active */
  .mega-menu-pane {
    display: none; 
    padding: 15px;
  }
  .mega-menu-pane.active {
    display: block; 
  }
}
  
  /* 2. Style the pane itself, as it's now a top-level item in the accordion */
  .mega-menu-pane {
    padding: 1rem;
    background-color: #f0f0f0; /* Use a slightly different bg to show nesting */
  }
  .mega-menu-sidebar h3 {
    font-size: 14px;
  }
  .navbar .nav-item:last-child {
    padding-top: 0;
  }
  .explore-link {
    font-size: 10px;
  }
  .section-header div p {
    font-size: 10px;
  }
  .nav-right .search-wrapper {
    width: 100%; /* Auto width or fixed */
    max-width: 180px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
  }
  .nav-right .search-input {
    opacity: 1;
    transform: none;
    padding: 0 10px;
  }
  .nav-right .search-icon {
        position: static;
        width: 45px;
        height: 45px;
        margin-left: -10px;
  }
  .nav-right .close-btn {
    display: none; /* Hide close button on mobile, space is tight */
  }
  .nav-right .search-wrapper.active .search-icon {
    background: transparent;
    transform: none;
    margin: 0;
  }
  .nav-right .search-wrapper.active .search-icon svg stroke {
    stroke: #555;
  }
}
/* --- END: Responsive Styles --- */
/* --- Default Mobile/Responsive Hides --- */
