/* ============================================================
   TCA WEBSITE — NAVIGATION
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* Transparent by default — every entry page (home hero, or the
     .page-hero on inner pages) is dark at the very top, so white
     text stays legible without a background box. Turns solid once
     .nav--scrolled is toggled by main.js so it stays legible over
     whatever light content scrolls underneath it.
     Kept as a literal rgb (not var(--navy)) because backdrop-filter needs
     an alpha channel and this project's browser targets predate reliable
     color-mix() support. IMPORTANT: this MUST be updated by hand any time
     --navy changes in variables.css — it silently kept the OLD navy
     (29 15 70) through the July 2026 recolor until caught by testing. */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--nav-height);
  border-bottom: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

nav.nav--scrolled {
  background: rgb(29 24 98 / 40%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* border-bottom-color: var(--gold /20%); */
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 48px;
  width: 48px;
  object-fit: contain;
}

.nav-brand .name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.nav-brand .sub {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

/* Links — pushed flush right against the CTA; only the logo sits
   at the opposite (left) edge. margin-left:auto is what creates the
   right-justified cluster instead of the old space-between spread. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
  margin-right: 2.25rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-links li { position: relative; }

.nav-links .has-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-links .caret { font-size: 0.6rem; opacity: 0.7; }

/* Colegio de Tanauan — external link to the college's own site/LMS
   (cdlt-lms.com, not part of this codebase). Visually near-identical
   to the other nav links so it doesn't read as a lesser/bolted-on
   item, just with a small arrow to signal it leaves the site before
   the click, same courtesy the click itself already gets via
   target="_blank" rel="noopener noreferrer". */
.nav-links .nav-external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-external-icon { font-size: 0.75rem; opacity: 0.7; }

.nav-links .has-dropdown {
  /* Extends the hoverable hitbox down through the old gap so the
     mouse never leaves .has-dropdown while moving toward the menu. */
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-dark);
  border: 1px solid rgba(201,151,58,0.35);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 210px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.has-dropdown:hover .dropdown {
  display: flex;
}

.dropdown li a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.85);
}

.dropdown li a:hover {
  background: rgba(201,151,58,0.15);
  color: var(--gold-light);
}

/* CTA button */
.nav-cta {
  background: var(--green);
  color: var(--navy-dark);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--transition);
}

.nav-cta:hover {
  background: var(--green-light);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

/* Responsive */
@media (max-width: 900px) {
  nav {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }
}
