/* ==========================================================================
   Shared Navbar Styles — PDF Tools Kit
   Extracted from index.html so every tool page can share the same nav look.
   Link this in <head> of EVERY page:
   <link rel="stylesheet" href="/assets/css/navbar.css" />
   ========================================================================== */

:root {
  --red: #e8362a;
  --red-dark: #c22b20;
  --red-light: #fdf1f0;
  --bg: #ffffff;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e5e5e5;
  --radius: 10px;
}

/* ── NAVBAR ── */
nav {
  background: #f6f6f6;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex: 0 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a0a09;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
}
.nav-links a {
  text-decoration: none;
  color: #1a0a09;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  transition:
    color 0.15s,
    background 0.15s;
  text-transform: uppercase;
}
.nav-links a:hover {
  color: #e51c1c;
  background: rgba(255, 255, 255, 0.07);
}
.nav-links a.active {
  color: var(--red);
}

/* plain links */
.nav-links > li > a {
  text-decoration: none;
  color: #1a0a09;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s;
  text-transform: uppercase;
  display: block;
}
.nav-links > li > a:hover {
  color: var(--red);
}

/* ── DROPDOWN ── */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.drop-trigger {
  display: inline-flex;
  text-decoration: none;
  color: #1a0a09;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.drop-trigger:hover,
.drop-trigger.open {
  color: var(--red);
}

.drop-arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-bottom: 3px;
  flex-shrink: 0;
}
.drop-trigger.open .drop-arrow {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}

.drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 1rem 1.25rem;
  width: max-content;
  min-width: 140px;
  max-width: 260px;
  z-index: 300;
  border: 1px solid #eee;
}
.drop-menu.open {
  display: block;
}

.drop-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drop-menu.two-column ul {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  column-gap: 24px;
  row-gap: 2px;
}
.drop-menu.two-column {
  width: fit-content;
  min-width: auto;
}
.drop-menu ul li a {
  display: flex;
  align-items: center;
  justify-content: flex-start;  /* Left align */
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a0a09;
  text-decoration: none;
  padding: 8px 16px;            /* More left padding */
  border-radius: 6px;
  transition:
    background 0.12s,
    color 0.12s;
  white-space: nowrap;
}
.drop-menu ul li a:hover {
  background: var(--red-light);
  color: var(--red);
}
.drop-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.nav-dropdown:hover .drop-menu {
  display: block;
}
.nav-dropdown:hover .drop-trigger {
  color: var(--red);
}
.nav-dropdown:hover .drop-arrow {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}
.drop-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
/* Large dropdowns */
.two-column {
    min-width: 420px;
    max-width: 500px;
}

.two-column ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 6px 16px;
}

/* Mobile */
@media (max-width: 768px) {
    .two-column {
        min-width: 220px;
        max-width: 280px;
    }

    .two-column ul {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 700px) {
  nav {
    padding: 0 1rem;
    overflow-x: auto;
    gap: 0;
  }
  .drop-trigger {
    font-size: 0.7rem;
    padding: 5px 7px;
  }
}
