nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 5%;
  height: 64px;
  background: rgba(6, 14, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  z-index: 2;
}

.nav-logo span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin-left: auto;
  margin-right: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── ACTIVE STATE ── */
.nav-links a.active {
  color: var(--text);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.nav-link-dropdown.active::after {
  bottom: -6px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-dk);
  color: #E1F5EE;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  z-index: 2;
}

.nav-cta:hover {
  background: #17866A;
  transform: translateY(-1px);
}

.nav-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── HAMBURGUESA ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-left: auto;
  background: none;
  border: none;
  padding: 4px;
  z-index: 102;
}

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

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MENÚ MOBILE ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(6, 14, 24, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border);
  padding: 24px 5% 32px;
  z-index: 101;
  flex-direction: column;
  gap: 0;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.nav-mobile li {
  list-style: none;
  border-bottom: 0.5px solid var(--border);
}

.nav-mobile li:last-child {
  border-bottom: none;
}

.nav-mobile a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-mobile a:hover {
  color: var(--text);
}

.nav-mobile .nav-mobile-cta {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal-dk);
  color: #E1F5EE;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  border-bottom: none !important;
}

.nav-mobile .nav-mobile-cta svg {
  width: 16px;
  height: 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }
}

/* ── DROPDOWN ── */
.nav-item-dropdown {
  position: relative;
}

.nav-link-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link-dropdown svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-item-dropdown:hover .nav-link-dropdown svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(6, 14, 24, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  list-style: none;
  width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.nav-item-dropdown:hover .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  color: var(--text);
  font-size: 14px;
}

.nav-dropdown li a:hover {
  background: rgba(55, 138, 221, 0.08);
}

.nav-dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(55, 138, 221, 0.1);
  border: 0.5px solid rgba(55, 138, 221, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-dropdown-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-text strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}

.nav-dropdown-text small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 300;
}

.nav-mobile li a[href^="/servicios/"] {
  padding-left: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.nav-links li {
  display: flex;
  align-items: center;
}