/* =========================================
   1. GOOGLE FONTS & VARIABLES
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

:root {
  --header-height: 3.5rem;

  /* Colors */
  --black-color: hsl(220, 24%, 12%);
  --black-color-light: hsl(220, 24%, 15%);
  --black-color-lighten: hsl(220, 20%, 18%);
  --white-color: #fff;
  --body-color: hsl(220, 100%, 97%);

  /* Brand Gradient (Blue to Green) */
  --primary-gradient: linear-gradient(90deg, #0052D4 0%, #7ebd00 100%);

  /* Font & Typography */
  --body-font: "Poppins", sans-serif;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /* Font Weight */
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 400;

  /* z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/* =========================================
   2. BASE & RESET
   ========================================= */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--black-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/* =========================================
   3. HEADER & NAV (MOBILE FIRST)
   ========================================= */
/* .container {
  max-width: 1080px;
  margin-inline: 1.rem;
} */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3);
  z-index: var(--z-fixed);
  height: 4.5em;

}

.nav {
  height: var(--header-height);
}

.nav__data {
  height: 81%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  column-gap: .4rem;
  font-weight: var(--font-semi-bold);
  color: var(--black-color);
}

.nav__logo-img {
  width: 120px;
}

.nav__logo-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  font-size: 1.5rem;
}

.nav__toggle {
  position: relative;
  margin-right: 1.2em;
  width: 32px;
  height: 32px;
}

.nav__burger,
.nav__close {
  position: absolute;
  width: max-content;
  height: max-content;
  inset: 0;
  margin: auto;
  font-size: 1.25rem;
  cursor: pointer;
  transition: opacity .1s, transform .4s;
}

.nav__close {
  opacity: 0;
}

.nav__menu {
  margin-right: 2em;
}

/* Show Menu Logic (Mobile) */
@media screen and (max-width: 768px) {
  .nav__data {
    margin-top: 0.7em;
  }

  .nav__menu {
    position: absolute;
    left: 0;
    top: 2.5rem;
    width: 100%;
    height: calc(100vh - 3.2rem);
    overflow: auto;
    pointer-events: none;
    opacity: 0;
    transition: top .4s, opacity .3s;
  }

  .nav__menu::-webkit-scrollbar {
    width: 0;
  }

  .nav__list {
    background-color: var(--body-color);
    padding-top: 0.8rem;
  }
}

/* Javascript Classes for Mobile Toggle */
.show-menu {
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}

.show-icon .nav__close {
  opacity: 1;
  transform: rotate(90deg);
}

/* =========================================
   4. DROPDOWN (MOBILE STYLES)
   ========================================= */
.dropdown__item {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.25rem;
  font-weight: initial;
  transition: transform .4s;
}

.dropdown__link,
.nav__link {
  padding: 1.05rem 1.05rem 1.05rem;
  color: var(--black-color);
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-weight: var(--font-semi-bold);
  transition: background-color .3.5s;
}

.menu_color {
  color: var(--black-color);

}

.menu_color:hover {
  background-color: transparent;
  color: #0052D4;
}

.dropdown__link i {
  font-size: 1.25rem;
  font-weight: initial;
  color: #0052D4;
  /* Blue Icon */
}

.dropdown__link:hover,
.nav__link:hover {
  background-color: var(--black-color-light);
  color: var(--white-color);
}

.dropdown__link:hover i {
  color: var(--white-color);
}

/* -- IMPORTANT: Animation Logic -- */
.dropdown__menu,
.dropdown__submenu {
  max-height: 0;
  /* Start Hidden */
  overflow: hidden;
  /* Hide overflow */
  transition: max-height .4s ease-out;
  /* Smooth Animation */
}

/* Nested Submenu Links */
.dropdown__sublink {
  display: block;
  padding: 0.5rem 0.5rem 0.5rem 3rem;
  /* Indent for hierarchy */
  color: var(--black-color-lighten);
  font-size: var(--small-font-size);
  background-color: #fff;
  border-left: 2px solid transparent;
}

.dropdown__sublink:hover {
  border-left: 2px solid #7ebd00;
  /* Green Border */
  background-color: #f0f0f0;
}

/* Rotation Effect on Open (Desktop Hover) */
.dropdown__item:hover .dropdown__arrow {
  transform: rotate(180deg);
}

/* For Mobile JS Toggle Class */
.show-dropdown .dropdown__arrow {
  transform: rotate(180deg);
}

.dropdown__add {
  margin-left: auto;
  /* Pushes + icon to right */
  font-size: 1.25rem;
  transition: transform .4s;
}

.show-dropdown .dropdown__add {
  transform: rotate(45deg);
  /* Turns + into x */
}


/* =========================================
   5. DESKTOP STYLES (Screen > 1118px)
   ========================================= */
@media screen and (min-width: 768px) {
  .head_container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    justify-content: space-between;
  }

  .nav__toggle {
    display: none;
  }

  .nav__list {
    height: 100%;
    display: flex;
    column-gap: 3rem;
  }

  .nav__link {
    height: 82%;
    padding: 0;
    justify-content: initial;
    column-gap: .25rem;
  }

  .nav__link:hover {
    background-color: transparent;
    color: #0052D4 !important;
    /* Blue Text on Hover */
  }

  .dropdown__item,
  .dropdown__subitem {
    position: relative;
  }

  /* -- Desktop Dropdown (Absolute) -- */
  .dropdown__menu,
  .dropdown__submenu {
    max-height: initial;
    /* Reset mobile height */
    overflow: initial;
    position: absolute;
    left: -2.2em;
    top: 6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, top .3s;
    background-color: var(--white-color);
    box-shadow: 0 4px 16px hsla(220, 32%, 8%, .15);
    border-radius: .5rem;
    padding: 1rem;
    width: 260px;
    /* Fixed width for dropdown */
  }

  .dropdown__submenu {
    top: 0;
    left: 100%;
    /* Opens to the right */
    margin-left: .5rem;
  }

  /* Show on Hover */
  .dropdown__item:hover .dropdown__menu {
    opacity: 1;
    top: 4.1rem;
    pointer-events: initial;
  }

  .dropdown__subitem:hover>.dropdown__submenu {
    opacity: 1;
    top: 0;
    pointer-events: initial;
  }

  /* Styling improvements for Desktop Dropdown Items */
  .dropdown__link {
    padding: 1rem;
    border-radius: .25rem;
    background-color: transparent;
  }

  .dropdown__link:hover {
    background-color: #f1f1f1;
    color: var(--black-color);
  }

  .dropdown__link:hover i {
    color: var(--primary-color);
  }

  .dropdown__sublink {
    padding: 0.8rem 1rem;
    background-color: transparent;
    border-radius: .25rem;
  }

  /* Hide the + icon on desktop */
  .dropdown__add {
    display: none;
  }
}

/* new hover code */

/* =========================================
   UNDERLINE HOVER EFFECT (Blue to Green)
   ========================================= */

/* 1. Link ki position relative honi chahiye */
.nav__link {
  position: relative;
  /* Purana color hata kar transparent rakhein */
  background-color: transparent !important;
  font-size: 1.3em;
  color: var(--black-color);
}

/* 2. Ye hai wo Jaadui Line (Hidden) */
.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2.5px;
  /* Line ki motayi */
  bottom: 22px;
  /* Text ke bilkul neeche */
  left: 0;

  /* WO PURANA BLUE-GREEN THEME */
  background: linear-gradient(90deg, #0052D4 0%, #7ebd00 100%);

  transition: width 0.3s ease;
  /* Smooth speed */
  border-radius: 2px;
}

/* 3. Hover karne par Line full hogi */
.nav__link:hover::after {
  width: 100%;
}

/* Text ka color bhi hover pe Blue ho */
.nav__link:hover {
  color: #0052D4;
}