/* ==========================================================================
   COMPONENTS — BUTTONS, TAGS, CARDS, NAV PILL, FORMS, BADGES
   ========================================================================== */

/* ==========================================================================
   1. SCROLL PROGRESS BAR
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--red);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1200;
  pointer-events: none;
}

/* ==========================================================================
   2. FLOATING GLASS NAVIGATION PILL
   ========================================================================== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-inline: 1rem;
  pointer-events: none;
}

.nav-container {
  pointer-events: auto;
  max-width: 880px;
  margin: 0 auto;
  padding: 0.5rem 0.625rem 0.5rem 1rem;
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 0.75rem;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  min-height: 40px;
  padding-right: 0.25rem;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.9;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.05);
}

.nav-logo-text {
  display: inline-block;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-inline: auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--fg);
  background-color: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .nav-links a:hover {
  background-color: rgba(17, 24, 39, 0.05);
}

.nav-links a.active {
  color: var(--fg);
  font-weight: 600;
  background-color: var(--red-subtle);
  border-color: rgba(239, 68, 68, 0.3);
}

.nav-links a.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--red);
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle {
  border-radius: var(--radius-pill);
}

.nav-toggle {
  display: none;
}

/* ==========================================================================
   3. BUTTONS & EYEBROWS
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background-color: #dc2626;
  padding: 0.825rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  box-shadow: var(--shadow-red);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 0.825rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
}

/* ==========================================================================
   4. TAGS, SOCIAL LINKS, & CARDS
   ========================================================================== */
.tech-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
  background-color: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  width: 100%;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  color: var(--fg);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.social-link:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateY(-2px);
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* ==========================================================================
   5. FLYRANK VERIFIED FOOTER BADGE (CLEANED OF INLINE STYLES)
   ========================================================================== */
.flyrank-badge {
  box-sizing: border-box;
  margin: 0;
  padding: 6px 14px 6px 11px;
  border: 1px solid #dde4e7;
  background: #ffffff;
  text-decoration: none;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-style: normal;
  line-height: 1.25;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.flyrank-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.flyrank-badge-icon {
  display: block;
  flex: none;
  opacity: 1;
  transform: none;
  max-width: none;
}

.flyrank-badge-text {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #051f21;
  font-weight: 600;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  font-size: 13px;
}

/* ==========================================================================
   6. MOBILE NAVIGATION DRAWER (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .navbar {
    top: 0.75rem;
    padding-inline: 0.75rem;
  }

  .nav-container {
    padding: 0.45rem 0.55rem 0.45rem 0.9rem;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    z-index: 1001;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    border-color: var(--red);
  }

  .hamburger-bar {
    width: 18px;
    height: 2px;
    background-color: var(--fg);
    border-radius: 2px;
    transition:
      transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.2s ease,
      background-color 0.2s ease;
    display: block;
  }

  .nav-toggle.open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--red);
  }

  .nav-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--red);
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    background-color: var(--bg-elev);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card-hover);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition:
      max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.25s ease,
      visibility 0.25s ease,
      padding 0.25s ease;
  }

  .nav-links.open {
    max-height: 320px;
    opacity: 1;
    visibility: visible;
    padding: 0.65rem;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    min-height: 44px;
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--fg);
    border-radius: var(--radius-sm);
    text-decoration: none;
  }
}
