/* EDAiQ v2 — Shared Component Styles (HTML pages) */

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  z-index: 50;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  /* Gradient text for the "EDAiQ" wordmark */
  background: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-logo img {
  height: 32px;
  width: auto;
}

.navbar-links {
  display: none;
  list-style: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .navbar-links {
    display: flex;
  }
}

.navbar-links a {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: hsl(var(--foreground));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .navbar-mobile-toggle {
    display: none;
  }
}

/* Hide auth buttons on mobile — they live in the mobile menu */
@media (max-width: 767px) {
  .navbar-actions .btn-ghost,
  .navbar-actions .btn-primary {
    display: none;
  }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background-color: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem;
  z-index: 40;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  border-bottom: 1px solid hsl(var(--border));
}

/* Remove border from last direct nav link so it doesn't double up with the <hr> divider */
.mobile-menu > a:last-of-type {
  border-bottom: none;
}

.mobile-menu-divider {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 0.5rem 0;
}

.mobile-menu-auth {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.mobile-menu-auth .btn {
  width: 100%;
  justify-content: center;
  padding: 0.625rem 1rem;
}

/* Restore correct text color for auth buttons inside mobile menu
   (.mobile-menu a has higher specificity and overrides btn colors) */
.mobile-menu-auth .btn-primary {
  color: white;
}
.mobile-menu-auth .btn-outline {
  color: hsl(var(--foreground));
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 3rem 0 1.5rem;
  background-color: hsl(var(--card));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  max-width: 280px;
}

.footer-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-section a {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.footer-section a:hover {
  color: hsl(var(--foreground));
}

.footer-bottom {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1.5rem 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: transparent;
  color: hsl(var(--foreground));
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
  text-decoration: none;
}

.social-btn:hover {
  background-color: hsl(var(--primary));
  color: white;
  transform: scale(1.1);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary));
  color: white;
  box-shadow: 0 4px 14px hsl(var(--primary) / 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
  border-color: hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: white;
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

/* ===== Form Inputs ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input.error {
  border-color: hsl(var(--destructive));
}

.form-error {
  font-size: 0.75rem;
  color: hsl(var(--destructive));
}

/* ===== Cards ===== */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ===== Theme & Language Controls ===== */
.theme-toggle,
.lang-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover,
.lang-select:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.lang-select {
  width: auto;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== FAQ Accordion ===== */
.faq-list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: hsl(var(--accent) / 0.5);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: hsl(var(--muted-foreground));
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}
