/* =========================
   VARIABLES
   ========================= */
.gradient-bg {
  background: linear-gradient(90deg, #ff4fae, #ffb000, #4fd2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root {
  --max-width: 1200px;
  --pink: #ff51c9;
  --orange: #ff9a3c;
  --yellow: #ffd93d;
  --blue: #5d76ff;
  --radius-pill: 999px;
  font-family: "Poppins", sans-serif;
}

/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #222;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   LAYOUT HELPERS
   ========================= */

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   HEADER
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e0e6ff;
  box-shadow: 0 10px 25px rgba(93, 118, 186, 0.14);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

/* =========================
   BRAND
   ========================= */

.brand img {
  height: 72px;
  transition: transform 0.3s ease;
}

.brand:hover img {
  transform: scale(1.05);
}

/* =========================
   NAVIGATION
   ========================= */

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9rem;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--blue));
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* =========================
   SUBMENU (DESKTOP - HORIZONTAL)
   ========================= */

.nav-item {
    position: relative;
}

/* Fix Wonder Library alignment */
.has-submenu > a {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding-right: 18px; /* space for arrow */
}

.has-submenu > a::after {
  content: "";
  position: absolute;
  right: 0;               
  top: 50%;
  transform: translateY(-50%);  /* perfect vertical center */

  width: 10px;
  height: 10px;

  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23151827' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}



.submenu {
  position: absolute;
  top: 100%;
  left: 0;

  background: #fff;
  border-radius: 16px;
  padding: 12px 20px;

  display: flex;
  flex-direction: row;   /* HORIZONTAL */
  align-items: center;
  gap: 20px;

  min-width: max-content;

  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  border: 1px solid #f0f0f0;

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;

  z-index: 100;
}

.submenu a {
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 6px 2px;
  position: relative;
}

.submenu a:hover {
  color: var(--pink);
}

/* Show on hover (desktop only) */
@media (min-width: 769px) {
  .has-submenu:hover .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* =========================
   CTA BUTTON
   ========================= */

.btn-primary {
  border-radius: var(--radius-pill);
  padding: 9px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--orange), var(--blue));
  border: none;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(255, 102, 188, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 22px 55px rgba(255, 81, 201, 0.65);
}

.btn-nav {
  margin-left: 12px;
}

/* =========================
   MOBILE TOGGLE
   ========================= */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: #333;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  background: #181526;
  color: #f2f0ff;
  font-size: 0.8rem;
  padding: 18px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {

  .brand img {
    height: 56px;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: #fff;
    flex-direction: column;
    align-items: flex-start;

    padding: 16px 20px;
    gap: 14px;

    border-bottom: 1px solid #e0e6ff;
    box-shadow: 0 14px 30px rgba(128, 139, 210, 0.45);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
  position: relative;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  }

  .btn-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* SUBMENU - MOBILE (VERTICAL) */

  .nav-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border: none;

    flex-direction: column;  /* VERTICAL */
    gap: 8px;

    padding: 6px 0 0 14px;

    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    width: 100%;
  }

  .nav-item.open .submenu {
    display: flex;
  }

  .has-submenu > a::after {
    margin-left: auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
