/* ===========================================
   BORIDESK COMPONENTS
   Reusable UI elements: nav, buttons, cards
   =========================================== */

/* === Navigation === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: var(--nav-bg);
  transition: all 0.4s ease;
}

nav.scrolled {
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

/* === Logo === */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--on-navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

/* === Nav Links === */
.nav-links {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--on-navy-muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--on-navy);
}

.nav-links a:hover::after {
  width: 100%;
}

/* === Nav CTA === */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === Mobile Menu Button === */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--on-navy);
  cursor: pointer;
  padding: 8px;
}

/* === Mobile Menu === */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--menu-bg);
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px;
  z-index: 999;
}

.mobile-menu a {
  padding: 12px 8px;
  font-weight: 500;
  color: var(--on-navy-muted);
}

.mobile-menu a.btn {
  width: 100%;
  justify-content: center;
}

/* === Button Variants === */
.btn {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--frost-2);
  color: var(--accent);
  border-color: var(--accent);
}

/* Nav's ghost button sits on the always-navy nav bar, so it needs
   on-navy text/border instead of the light-background defaults above. */
.nav-cta .btn-ghost {
  color: var(--on-navy);
  border-color: rgba(248, 250, 252, 0.3);
}

.nav-cta .btn-ghost:hover {
  background: rgba(248, 250, 252, 0.08);
  color: var(--accent);
  border-color: var(--accent);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--frost-2);
  border-color: var(--accent);
  color: var(--accent);
}

/* Large Button */
.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

/* === Section Structure === */
section {
  padding: 100px 24px;
  position: relative;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Card Styles === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.4s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* === Badges & Tags === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.badge.success {
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.2);
}

.badge.warning {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.2);
}

.badge.danger {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.2);
}

/* === Avatar === */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
}

.avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 0.8rem;
}

/* === Details (FAQ) === */
details {
  cursor: pointer;
  user-select: none;
}

details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--frost-1);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '▼';
  display: inline-flex;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

details[open] summary::after {
  transform: rotate(180deg);
}

details[open] summary {
  background: var(--frost-2);
  border-color: var(--border-strong);
  color: var(--accent);
}

details summary:hover {
  background: var(--frost-2);
  border-color: var(--border-strong);
}

details > p {
  padding: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 0;
}
