/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/

* {
  box-sizing: border-box;
}

:root {
  --header-height: 3.5rem;
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(220, 68%, 54%);
  --first-color-lighten: hsl(220, 68%, 97%);
  --title-color: hsl(220, 48%, 28%);
  --text-color: hsl(220, 12%, 45%);
  --body-color: hsl(220, 100%, 99%);
  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  /* --normal-font-size: .938rem; */
  --normal-font-size: 1.2rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;
  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;
  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --custom-font1: 'santoshi';
  --custom-font2: 'switzer';
}

a:active {
  background-color: transparent;
}

@media (hover: none) {
  a:active {
    -webkit-tap-highlight-color: transparent;
  }
}

@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}
.logoContainer {
  display: flex;
  align-items: center; 
  height: 100%;
  transform: translate(-1.8rem);
  font-family: var(--custom-font1);
}

.logoImg {
    height: 40px; /* Fixed height */
    width: auto;
    flex-shrink: 0; /* Don't squash logo */
}

.logoContainer h2 {
  margin-left: 6px; 
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit; /* Match parent color */
  line-height: 1.2;
  white-space: nowrap; /* No wrap */
  margin-bottom: 0;
}

.logoContainer i {
    font-size: 12px;
    opacity: 0.8;
    flex-shrink: 0;
    margin-left: 0.3rem;
}
/*=============== BASE ===============*/
* {
  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(--text-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  box-shadow: 0 2px 8px hsla(220, 68%, 12%, 0.1);
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  border-radius: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header scrolled state */
.header.scrolled {
  top: 1rem;
  width: 95%;
  max-width: 1400px;
  border-radius: 16px;
  box-shadow: 0 4px 12px hsla(220, 68%, 12%, 0.15);
}

/*=============== NAV ===============*/
.nav {
  height: var(--header-height);
  padding: 0 1rem;
}

.nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__data a {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  font-size: 14px;
  letter-spacing: 2px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: 0.25rem;
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color 0.3s;
}

.nav__logo img {
  width: 70px;
  object-fit: scale-down;
}

.nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
}

.nav__toggle-menu,
.nav__toggle-close {
  font-size: 1.25rem;
  color: var(--title-color);
  position: absolute;
  display: grid;
  place-items: center;
  inset: 0;
  cursor: pointer;
  transition: opacity 0.1s, transform 0.4s;
  transform: translate(1rem);
}

.nav__toggle-close {
  opacity: 0;
    transform: translate(1rem) !important;

}

@media screen and (max-width: 1118px) {
  .nav__menu {
    background-color: var(--body-color);
    position: absolute;
    left: 0;
    top: 2.5rem;
    width: 100%;
    height: calc(100vh - 3.5rem);
    overflow: auto;
    padding-block: 1.5rem 4rem;
    pointer-events: none;
    opacity: 0;
    transition: top 0.4s, opacity 0.3s;
  }

  .nav__menu::-webkit-scrollbar {
    width: 0.5rem;
  }

  .nav__menu::-webkit-scrollbar-thumb {
    background-color: hsl(220, 12%, 70%);
  }
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

.nav__link:hover {
  background-color: var(--first-color-lighten);
}

/* Show menu */
.show-menu {
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

/* Show icon */
.show-icon .nav__toggle-menu {
  opacity: 0;
  transform: rotate(90deg);
}

.show-icon .nav__toggle-close {
  opacity: 1;
  transform: rotate(90deg);
}

/*=============== DROPDOWN ===============*/
.dropdown__button {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.5rem;
  font-weight: initial;
  transition: transform 0.4s;
}

.dropdown__content,
.dropdown__group,
.dropdown__list {
  display: grid;
}

.dropdown__container {
  background-color: var(--first-color-lighten);
  height: 0;
  overflow: hidden;
  transition: height 0.4s;
  margin: auto;
}

.dropdown__content {
  row-gap: 1.75rem;
}

.dropdown__group {
  padding-left: 2.5rem;
  row-gap: 0.5rem;
}

.dropdown__group:first-child {
  margin-top: 1.25rem;
}

.dropdown__group:last-child {
  margin-bottom: 1.25rem;
}

.dropdown__icon i {
  font-size: 1.25rem;
  color: var(--first-color);
}

.dropdown__title {
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}

.dropdown__list {
  row-gap: 0.25rem;
}

.dropdown__link {
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  transition: color 0.3s;
}

.dropdown__link:hover {
  color: var(--title-color);
}

/* Rotate dropdown icon */
.show-dropdown .dropdown__arrow {
  transform: rotate(180deg);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 300px) {
  .dropdown__group {
    padding-left: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  .nav__logo img {
    height: 24px;
    width: 60px;
  }

  .nav__logo p {
    font-size: 12px;
  }

  .dropdown__list li i {
    display: none;
  }
  .logoContainer h2{
    font-size: 24px;
    margin-left: 0;
    transform: translateY(0px) !important;
  }
  .logoContainer i{
    font-size: 6px;
  }
}

/* For large devices */
@media screen and (min-width: 1118px) {

  /* Nav */
  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* border: 1px solid red; */
  }

  .nav__data {
    flex-shrink: 0;
  }

  .nav__menu {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .nav__toggle {
    display: none;
  }

  .nav__list {
    display: flex;
    column-gap: 3rem;
    height: 100%;
    align-items: center;
    /* border: 1px solid red; */
    justify-content: space-around;
  }
  .nav li {
    display: flex;
  }

  .nav__link {
    padding: 0;
  }

  .nav__link:hover {
    background-color: initial;
  }

  /* Dropdown */
  .dropdown__button {
    column-gap: 0.25rem;
    pointer-events: none;
  }

  .dropdown__item {
    cursor: pointer;
    position: relative;
  }

  .dropdown__container {
    height: max-content;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90vw;
    padding: 0px 50px;
    border-radius: 0px 0px 20px 20px;
    top: calc(100% + 2rem);
    background-color: var(--body-color);
    box-shadow: 0 6px 8px hsla(220, 68%, 12%, 0.05);
    pointer-events: none;
    opacity: 0;
    transition: top 0.4s, opacity 0.3s;
  }

  /* Create invisible bridge between nav item and dropdown */
  .dropdown__container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: transparent;
  }

  .dropdown__content {
    grid-template-columns: repeat(4, max-content);
    column-gap: 6rem;
    max-width: 950px;
    margin-inline: auto;
  }

  .dropdown__group {
    padding: 4rem 0;
    align-content: baseline;
    row-gap: 1.25rem;
  }

  .dropdown__group:first-child,
  .dropdown__group:last-child {
    margin: 0;
  }

  .dropdown__list {
    row-gap: 0.75rem;
  }

  .dropdown__icon {
    width: 60px;
    height: 60px;
    background-color: var(--first-color-lighten);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
  }

  .dropdown__icon i {
    font-size: 2rem;
  }

  .dropdown__title {
    font-size: 22px;
  }

  .dropdown__link {
    /* font-size: var(--small-font-size); */
    font-size: 16px;
  }

  .dropdown__link:hover {
    color: var(--first-color);
  }

  .dropdown__item:hover .dropdown__arrow {
    transform: rotate(180deg);
  }

  .dropdown__item:hover>.dropdown__container {
    top: calc(100% - 10px);
    opacity: 1;
    pointer-events: initial;
    cursor: initial;
  }
}

@media screen and (min-width: 1152px) {
  .container {
    margin-inline: auto;
  }

  .dropdown__preview {
    height: 0px;
    width: 0px;
  }

  .dropdown__preview img {
    height: 0px;
  }
}

.dropdown__preview {
  height: 100%;
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: black; */
}

.dropdown__preview img {
  position: absolute;
  height: 300px;
  width: 300px;
  object-fit: scale-down;
}

#img {
  transition: 0.8s;
  height: 500px;
}

#img1,
#img2 {
  opacity: 0;
  transition: 0.8s;
  z-index: -999;
}

#img2 {
  height: 220px;
}

/* app */

#app1,
#app2,
#app3,
#game1,
#game2 {
  opacity: 0;
  transition: 0.8s;
}

#game1,
#game2 {
  height: 240px;
}

@media screen and (max-width: 1118px) {
  .dropdown__preview {
    height: 0%;
    width: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dropdown__preview img {
    position: inherit;
    height: 0px;
    object-fit: scale-down;
  }
}

/* Drop Down Hover effect */

.dropdown__list li i {
  font-size: 28px;
  /* display: none; */
  transition: 0.8s;
  transform: translateX(-10px);
  overflow: hidden;
}

.dropdown__list li {
  transition: 0.8s;
}

.dropdown__list li:hover .arrow {
  /* display: block; */
  transition: 0.8s;
  transform: translateX(0);
}

.dropdown__link {
  display: flex;
  align-items: center;
}


/* Base: Desktop CTA visible */
.ctn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.ctn a, .ctnPhn {
  background-color: #131623;
  padding: 10px 20px;
  border-radius: 16px;
  color: white;
  border: 2px solid #131623;
  transition: all 0.5s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
}

.ctn a i, .ctnPhn i {
  font-size: 18px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.ctn a:hover, .ctnPhn:hover {
  background-color: white;
  color: #131623;
  border-color: #131623;
}

.ctn a:hover i, .ctnPhn:hover i {
  transform: rotate(45deg) translateY(-2px);
}

/* Mobile: Hide desktop CTA, style mobile CTA */
@media screen and (max-width: 1117px) {
  .ctn {
    display: none !important;
  }
  
  .mobile-cta {
    margin: 2rem 1.5rem 1rem;
    border-top: 2px solid hsl(220, 12%, 90%);
    padding-top: 1.5rem;
  }
  
  .mobile-cta .ctnPhn {
    display: flex !important;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #131623, #1a2338);
  }

}

/* Tablet/Desktop: Hide mobile CTA */
@media screen and (min-width: 1118px) {
  .mobile-cta {
    display: none !important;
  }
}
/* CRITICAL FIX - Mobile Menu */
@media screen and (max-width: 1118px) {
  .nav__menu {
    background-color: var(--body-color);
    position: fixed;
    left: 0;
    top: 3.5rem;
    width: 100%;
    height: calc(100vh - 3.5rem);
    overflow: auto;
    padding-block: 1.5rem 4rem;
    transform: translateX(100%); /* Start off-screen */
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav__menu.show-menu {
    transform: translateX(0); /* Slide in */
  }
  
  .nav__toggle {
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }
  
  /* Prevent background scroll */
  body.menu-open {
    overflow: hidden;
  }
}
