@tailwind base;
@tailwind components;
@tailwind utilities;

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevents horizontal scroll */
  scroll-behavior: smooth;
}

.hljs-copy-button {
  background-color: rgb(129, 129, 129) !important;
  padding: 0 0.5rem;
}

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 202 100% 41%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.5rem;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;

    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.floating-btn {
  animation: float 2s ease-in-out infinite;
  font-size: 1.05rem;
}

.float-card {
  background-color: rgba(255, 255, 255, 0.1); /* bg-white bg-opacity-10 */
  border-radius: 0.5rem;                      /* rounded-lg */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
  padding: 1.5rem;                            /* p-6 */
  backdrop-filter: blur(0.1rem);               /* backdrop-filter + backdrop-blur-lg */
  transition: all 0.3s ease;                 /* transition-all duration-300 */
}

.float-card:hover {
  box-shadow: 0 10px 20px -12px rgb(255, 255, 255); /* hover:shadow-lg + hover:shadow-slate-100/50 */
  transform: translate(-0.25rem, -0.25rem);
  cursor: default;               /* hover:-translate-y-1 hover:translate-x-1 */
}

.shine-text {
  position: relative;
  background: linear-gradient(
    90deg,
    #32C6FC 0%,
    #32C6FC 40%,
    #ffffff 50%,
    #32C6FC 60%,
    #32C6FC 100%
  );
  background-size: 200% 100%;

  /* Key for text gradient animation */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Webkit hack to ensure transparent text color */
  -webkit-text-fill-color: transparent;

  animation: shine-text 5s linear infinite;
}

@keyframes shine-text {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#benefitModal .modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

.electrolize-regular {
  font-family: "Electrolize", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Custom scrollbar for Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px; /* width of the scrollbar */
}

::-webkit-scrollbar-track {
  background: #1a1a1a; /* color of the track */
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: #4a90e2; /* color of the scrollbar thumb */
  border-radius: 6px;
  border: 3px solid #1a1a1a; /* space around thumb */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #357ABD; /* color on hover */
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #4a90e2 #1a1a1a;
}

/* Custom scrollbar for specific elements */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(18, 43, 117, 0.3);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #2B77EE;
  border-radius: 4px;
  border: 2px solid rgba(18, 43, 117, 0.3);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #7FB8F9;
}

@media (min-width: 768px) {
  .custom-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto 1fr;
  }
}

/* Modern FAQ Section */
.faq-container {
    /* max-width: 900px; */
    margin: 0 auto;
    /* background-color: red; */
    display: flex;
    flex-direction: row;
}

.faq-header {
    text-align: left;
    margin-bottom: 3rem;
    width: 40%;
}

.faq-content {
    flex: 1;
}

.faq-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 85, 254, 0.2);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    text-align: left;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
}

.faq-question span {
    width: 90%;
}

.faq-question:hover {
    color: #0055FE;
}

.faq-question.active {
    color: #0055FE;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: none;
    box-shadow: none;
}

.faq-icon {
    width: 24px;
    height: 24px;
    background: rgba(0, 85, 254, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-icon.active {
    background: #0055FE;
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 2rem;   /* no vertical padding initially */
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer.active {
    max-height: 1000px;
    padding: 1rem 2rem 1.5rem;  /* add top/bottom padding on expand */
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

