:root {
  --text: #000000;
  --background: #feeff0;
  --primary: #020061;
  --secondary: #5d8e29;
  --accent: #adf351;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text);
}

/* 
  =========================================
          HELPER CLASSES 
  =========================================
*/

/* =========================================
   GLASSY PRIMARY GRADIENT OVERLAY
   ========================================= */
.glassy-primary {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--primary) 90%, transparent) 0%,
    color-mix(in srgb, var(--primary) 70%, transparent) 60%,
    transparent 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s ease, transform 0.3s ease;
}

.glassy-accent {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--accent) 90%, transparent) 0%,
    color-mix(in srgb, var(--accent) 70%, transparent) 60%,
    transparent 100%
  );
  backdrop-filter: blur(6px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

/* 
  =========================================
          HELPER CLASSES ENDS
  =========================================
*/

.main-nav-link {
  /* Default text color is primary */
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600 !important;
  transition: all 0.2s ease-in-out;
  position: relative;
}

/* Hover effect for text color and border color */
.main-nav-link:hover {
  color: var(--accent);
}

/* Custom border bottom on hover for main links only */
.main-nav-link:hover::after {
  content: "";
  position: absolute;
  bottom: -8px; /* Adjust to sit below padding */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

/* Sublink hover color (only text color change, no border) */
.sublink-item:hover {
  color: var(--accent) !important;
  background-color: var(
    --background
  ); /* Use a light background for hover effect */
}

/* Utility to hide the dropdown by default, controlled by JS */
#mega-menu-full-dropdown {
  display: none;
}

#mega-menu-full-dropdown.active {
  display: block;
}

.mega-menu-dropdown {
  display: none;
  transition: all 0.25s ease-in-out;
}

.mega-menu-dropdown.active {
  display: block;
}

header nav {
  position: relative;
  z-index: 50;
}

.mega-menu-dropdown {
  z-index: 40;
}

/* Ensure responsive font for the span */
.logo-text {
  font-size: 1.25rem; /* Default size */
}

@media (min-width: 768px) {
  .logo-text {
    font-size: 1.5rem; /* Larger on desktop */
  }
}

/* Custom styles for the Login button */
.login-button {
  position: relative;
  overflow: hidden; /* Important for the slide effect */
  background-color: transparent !important; /* Start with transparent background */
  border: 2px solid var(--white); /* Primary color border */
  color: var(--white); /* Primary color text by default */
  transition: color 0.3s ease-in-out; /* Smooth text color change */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem; /* Tailwind's px-4 py-2 */
  font-size: 0.875rem; /* Tailwind's text-sm */
  font-weight: 500 !important; /* Tailwind's font-medium */
  z-index: 0; /* ✅ Add this */
}

.login-button .svg-icon {
  margin-left: 0.5rem; /* Space between text and icon */
  width: 1em; /* Make icon scale with font size */
  height: 1em;
  stroke-width: 2; /* Consistent stroke width */
  transition: stroke 0.3s ease-in-out; /* Smooth icon color change */
}

/* Overlay for the slide-in hover effect */
.login-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%; /* Start off-screen to the left */
  width: 100%;
  height: 100%;
  border-color: var;
  background-color: var(--accent); /* Accent color for the slide-in */
  transition: left 0.3s ease-in-out; /* Smooth slide transition */
  z-index: -1; /* Place behind text and icon */
}

/* On hover, slide the accent background in */
.login-button:hover::before {
  left: 0;
}

/* On hover, change text and icon color to white */
.login-button:hover {
  color: white !important;
  border-color: var(--accent); /* Change border color to accent on hover */
}

.login-button:hover .svg-icon {
  stroke: white; /* Change icon color to white on hover */
}

/* For the bottom banner */
.amfi-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary); /* Uses your primary brand color */
  color: white;
  text-align: center;
  font-size: 0.875rem; /* Slightly smaller text for professionalism */
  font-weight: 500;
  padding: 0.5rem 1rem;
  letter-spacing: 0.5px;
  z-index: 50; /* Ensures it sits above most elements */
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms ease, padding 250ms ease;
  padding-top: 0;
  opacity: 0;
}

/* When open */
.faq-item.open .faq-answer {
  max-height: 600px; /* you can increase this if longer text */
  padding-top: 0.75rem;
  opacity: 1;
}

/* Rotate plus icon when open */
.faq-item .faq-icon svg {
  transform-origin: center;
  transition: transform 300ms ease;
}
.faq-item.open .faq-icon svg {
  transform: rotate(45deg);
}

/* Prevent FAQ items from stretching to same height */
.faq-item {
  align-self: flex-start;
}

.counter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.counter.visible {
  opacity: 1;
  transform: translateY(0);
}
