/* ============================================================================
   insAId — custom utility classes
   Layered on top of the compiled Tailwind CSS in style.css.
   Edit this file to change component styling; edit index.html for structure.
   ============================================================================ */

/* ---- Buttons ------------------------------------------------------------ */
.btn-primary,
.btn-accent,
.btn-outline,
.btn-secondary,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.btn-primary:focus-visible,
.btn-accent:focus-visible,
.btn-outline:focus-visible,
.btn-secondary:focus-visible,
.btn-cta:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 4px 6px -1px hsl(var(--primary) / 0.2);
}
.btn-primary:hover {
  background: hsl(var(--accent));
  box-shadow: 0 10px 15px -3px hsl(var(--accent) / 0.3);
}

.btn-accent {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: 0 4px 6px -1px hsl(var(--primary) / 0.2);
}
.btn-accent:hover {
  background: hsl(var(--accent) / 0.9);
  box-shadow: 0 10px 15px -3px hsl(var(--accent) / 0.3);
}

.btn-outline {
  border: 2px solid hsl(var(--primary));
  color: hsl(var(--primary));
  background: transparent;
}
.btn-outline:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-secondary {
  border: 2px solid hsl(var(--border));
  color: hsl(var(--foreground));
  background: hsl(var(--card));
}
.btn-secondary:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.btn-cta {
  border: 2px solid hsl(var(--primary-foreground) / 0.3);
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary-foreground) / 0.1);
}
.btn-cta:hover {
  background: hsl(var(--primary-foreground));
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

/* ---- Navigation --------------------------------------------------------- */
.navbar-scrolled {
  background: hsl(var(--background) / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

#mobile-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#mobile-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
#mobile-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- Problem cards ------------------------------------------------------ */
.problem-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  transition: box-shadow 0.3s ease;
}
.problem-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Step list (Step-by-step section) ----------------------------------- */
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.6);
  padding: 1rem 1.25rem;
  background: transparent;
  transition: all 0.5s ease;
  opacity: 0.5;
  transform: scale(0.98);
}
.step-item.step-active {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.04);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  opacity: 1;
  transform: scale(1);
}
.step-icon {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--primary) / 0.06);
  border-radius: 50%;
  transition: color 0.4s ease;
}
.step-item.step-active .step-icon {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}
.step-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--muted-foreground) / 0.7);
  transition: color 0.4s ease;
}
.step-item.step-active .step-label {
  color: hsl(var(--accent));
}
.step-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
  transition: color 0.4s ease;
}
.step-item.step-active .step-title {
  color: hsl(var(--foreground));
}

/* ---- How it works cards ------------------------------------------------- */
.step-badge {
  position: absolute;
  top: -0.25rem;
  left: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, hsl(var(--primary)), hsl(var(--accent)));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: hsl(var(--primary-foreground));
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.step-card {
  position: relative;
  background: hsl(var(--card));
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
  padding-top: 2rem;
  transition: box-shadow 0.3s ease;
  height: 100%;
}
.step-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* ---- Testimonials ------------------------------------------------------- */
.testimonial {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
  color: hsl(var(--foreground) / 0.9);
}
@media (min-width: 1024px) {
  .testimonial-text { font-size: 1.125rem; }
}
.testimonial-bar {
  margin-top: 0.5rem;
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 9999px;
}

/* ---- Comparison table rows ---------------------------------------------- */
.cmp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  border-bottom: 1px solid hsl(var(--border));
}
.cmp-row.cmp-alt { background: hsl(var(--muted) / 0.2); }
.cmp-label {
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
}
.cmp-agency {
  padding: 1rem;
  background: hsl(var(--primary) / 0.05);
  border-left: 1px solid hsl(var(--border));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmp-brand {
  padding: 1rem;
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmp-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-weight: 700;
  font-size: 0.875rem;
}
.cmp-cross {
  color: hsl(var(--muted-foreground));
  font-size: 1.25rem;
}

/* ---- Mobile comparison cards ------------------------------------------- */
.cmp-mobile-card {
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  padding: 1rem;
  background: hsl(var(--card));
}
.cmp-mobile-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.cmp-mobile-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

/* ---- FAQ accordion ------------------------------------------------------ */
.faq-item {
  overflow: hidden;
}
.faq-item.faq-open {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.faq-question {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  padding: 1.25rem 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  gap: 1rem;
}
.faq-question:hover { opacity: 0.9; }
.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: hsl(var(--muted-foreground));
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}
.faq-answer-inner {
  padding-bottom: 1.25rem;
  padding-top: 0;
  white-space: pre-line;
}

/* ---- CTA cards (final section) ----------------------------------------- */
.cta-card {
  background: hsl(var(--primary-foreground) / 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--primary-foreground) / 0.3);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
@media (min-width: 1024px) {
  .cta-card { padding: 2.5rem; }
}

/* ---- Modals ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: hsl(var(--foreground) / 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modal-fade-in 0.2s ease-out;
}
.modal-overlay[hidden] { display: none; }
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: hsl(var(--card));
  border-radius: 1.5rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-slide-up 0.3s ease-out;
}
@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-card.max-w-lg { max-width: 32rem; }
.modal-card.max-w-2xl { max-width: 42rem; }
.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: hsl(var(--card));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  border-top-left-radius: 1.5rem;
  border-top-right-radius: 1.5rem;
}
.modal-close {
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: hsl(var(--foreground));
  transition: background 0.2s ease;
}
.modal-close:hover { background: hsl(var(--muted)); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

/* ---- Scorecard answer buttons ------------------------------------------ */
.sc-answer {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 4.5rem;
}
.sc-answer:hover { background: hsl(var(--muted)); }
.sc-answer.sc-yes {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.sc-answer.sc-not-sure {
  background: hsl(var(--accent) / 0.2);
  color: hsl(var(--accent));
  border-color: hsl(var(--accent) / 0.4);
}
.sc-answer.sc-no {
  background: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / 0.3);
}

/* ---- Misc ---------------------------------------------------------------- */
/* Fix: some elements had inline opacity:0 from Framer Motion in the original.
   We removed those inline styles — but if any remain in the HTML, ensure they
   stay visible instead of hidden. */
[style*="opacity: 0"] { opacity: 1 !important; transform: none !important; }

/* Better focus visibility */
*:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ============================================================================
   Current 20 Animations & Carousel Styles
   ============================================================================ */

/* SVG Gear Animations */
#gear1 {
  animation: rotate-clockwise 10s linear infinite;
  transform-origin: 254.215px 135.61px;
}
#gear2 {
  animation: rotate-counter-clockwise 14s linear infinite;
  transform-origin: 352px 207.815px;
}
#gear3 {
  animation: rotate-clockwise 18s linear infinite;
  transform-origin: 456.505px 194.545px;
}

@keyframes rotate-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rotate-counter-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* Step character transition */
#freepik--Character--inject-59 {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: bottom center;
  transform-box: fill-box;
}

/* Case studies carousel sliding track transition */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

/* Disabled Form submit buttons */
button[type="submit"]:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* Carousel track transition */
.carousel-track {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Mobile responsive fixes to prevent modal clipping (Issue 3) */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0.5rem !important;
  }
  .modal-card {
    max-height: 95vh !important;
    border-radius: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .modal-body {
    padding: 1rem !important;
  }
  .modal-header {
    padding: 1rem !important;
  }
  .modal-footer {
    padding: 1rem !important;
  }
  /* All buttons on mobile should support wrapping text if they are long */
  .btn-primary,
  .btn-accent,
  .btn-outline,
  .btn-secondary,
  .btn-cta,
  .modal-card button {
    white-space: normal !important;
    text-align: center;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    height: auto !important;
    min-height: 3.25rem !important;
  }
  
  /* Alignment of radios on small screens */
  .sc-answer {
    min-width: 4rem !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
}

