/* ==========================================================================
   public.css — Shared styles for the public-facing area (landing, quiz, etc.)
   Loads after bootstrap.min.css.
   ========================================================================== */

/* ======================================================================
   1. CSS VARIABLES
   ====================================================================== */
:root {
  --primary:    #004eec;
  --accent:     #b734b7;
  --dark:       #0f172a;
  --gray-dark:  #334155;
  --gray:       #94a3b8;
  --gray-light: #e5e7eb;
  --bg-soft:    #f8fafc;
  --radius:     14px;
  --radius-lg:  24px;
  --nav-height: 72px;
}

/* ======================================================================
   2. BASE RESETS
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--nav-height); }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--dark);
  background: white;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.white {
  color:white !important;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; color: var(--gray-dark); }
a { text-decoration: none; }

.pub-container {
  max-width: 1200px;
  padding: 0 2rem;
  margin: 0 auto;
}

.no-hyphens {
  hyphens: none !important;
};


/* ======================================================================
   3. NAVBAR
   ====================================================================== */

/* Sticky header shell */
#pub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#pub-header.scrolled {
  border-color: var(--gray-light);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* Pin header when mobile menu is open */
#pub-header.menu-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.pub-navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo + desktop nav links */
.pub-navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pub-navbar-brand img { height: 48px; }

/* Desktop nav links list */
.pub-navbar-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-navbar-links li a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--dark);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pub-navbar-links li a:hover {
  background: #f1f5ff;
  color: var(--primary);
  border-color: #d0e0ff;
}

/* Quiz CTA navlink */
.pub-navbar-links li a.pub-nav-cta {
  color: var(--primary);
  font-weight: 600;
  border-color: #d0e0ff;
}

.pub-navbar-links li a.pub-nav-cta:hover {
  background: #f1f5ff;
  border-color: var(--primary);
}

/* Desktop auth buttons group */
.pub-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Outline button (Login) */
.pub-btn-nav-outline {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--gray-light);
  color: var(--dark);
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pub-btn-nav-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Primary button (Create Account) */
.pub-btn-nav-primary {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 78, 236, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-btn-nav-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 78, 236, 0.35);
  color: white;
}

/* Hamburger button (mobile) */
.pub-nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.pub-nav-hamburger:hover { background: #f1f5ff; }

.pub-nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */
.pub-nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pub-nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pub-nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dim overlay (mobile) */
#pub-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#pub-nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile slide-in drawer */
#pub-nav-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(320px, 85vw);
  height: 100dvh;
  background: white;
  z-index: 200;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

#pub-nav-menu.open { right: 0; }

.pub-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-light);
  flex-shrink: 0;
}

.pub-mobile-menu-header img { height: 44px; }

.pub-mobile-menu-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5ff;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.pub-mobile-menu-close:hover { background: #dce8ff; }

/* Mobile nav link list */
.pub-mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
}

.pub-mobile-nav-links li a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--dark);
  font-size: 1rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pub-mobile-nav-links li a:hover {
  background: #f1f5ff;
  color: var(--primary);
  border-color: #d0e0ff;
}

.pub-mobile-nav-links li a.pub-nav-cta {
  color: var(--primary);
  font-weight: 600;
  border-color: #d0e0ff;
}

.pub-mobile-nav-links li a.pub-nav-cta:hover {
  background: #f1f5ff;
  border-color: var(--primary);
}

.pub-mobile-actions-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 0.25rem 0;
  flex-shrink: 0;
}

.pub-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Mobile outline auth button */
.pub-btn-mobile-outline {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--gray-light);
  color: var(--dark);
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pub-btn-mobile-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile primary auth button */
.pub-btn-mobile-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 78, 236, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-btn-mobile-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 78, 236, 0.35);
  color: white;
}

/* ======================================================================
   4. SHARED CONTENT BUTTONS
   ====================================================================== */

/* Primary CTA button used in page sections */
.pub-btn-primary {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  background: var(--primary);
  color: white;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

.pub-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 78, 236, 0.25);
  color: white;
}

/* Ghost/outline CTA button */
.pub-btn-ghost {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease, color 0.2s ease;
  background: transparent;
  color: var(--primary);
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  border: 2px solid var(--primary);
}

.pub-btn-ghost:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 78, 236, 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

/* ======================================================================
   5. FADE-IN SCROLL ANIMATION
   ====================================================================== */

.pub-fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.pub-fade-in.visible { opacity: 1; transform: translateY(0); }

/* ======================================================================
   6. FOOTER
   ====================================================================== */

.pub-footer {
  padding: 4rem 0;
  background: #020617;
  color: #cbd5f5;
  margin-top: 0;
}

.pub-footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 3rem;
}

.pub-footer a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.95rem;
}

.pub-footer a:hover { color: white; }

.pub-footer-language-links {
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

.pub-footer-language-links a {
  color: #e0e7ff;
  text-decoration: none;
  font-weight: 500;
}

.pub-footer-language-links a:hover { color: white; }

.pub-footer-language-links a.active {
  color: white;
  text-decoration: underline;
}

/* ======================================================================
   7. RESPONSIVE
   ====================================================================== */

/* Tablet: hide desktop nav + auth, show hamburger */
@media (max-width: 860px) {
  .pub-navbar-left nav,
  .pub-navbar-actions { display: none; }
  .pub-nav-hamburger  { display: flex; }
}

@media (max-width: 600px) {
  .pub-container { padding: 0 1.2rem; }

  .pub-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/* --- Icon wrapper (inline centering) --- */
.icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}