/* ==============================================================
   NV MARKETING DIGITAL — Navegación, Hamburger y Theme Toggle
   Archivo: css/nav.css
============================================================== */

  /* NAV */
  nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.4rem 3.5rem;
    border-bottom: 1px solid var(--border);
    position: relative; z-index: 20;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    position: sticky; top: 0;
    transition: background 0.35s ease, border-color 0.35s ease;
  }
  .nav-logo img { height: 36px; width: auto; }
  .nav-links { display: flex; gap: 2.4rem; list-style: none; align-items: center; }
  .nav-links a { color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
  .nav-links a:hover { color: var(--white); }
  .btn-nav {
    background: linear-gradient(135deg, var(--fucsia), var(--violeta));
    color: #fff; font-family: 'Poppins', sans-serif; font-weight: 500;
    font-size: 0.85rem; padding: 0.58rem 1.4rem; border-radius: 100px;
    border: none; cursor: pointer; transition: opacity 0.2s, transform 0.2s;
  }
  .btn-nav:hover { opacity: 0.85; transform: scale(1.03); }


  /* ── THEME TOGGLE ── */
  .theme-toggle {
    width: 44px; height: 24px;
    border-radius: 100px;
    border: 1px solid rgba(207,42,177,0.35);
    background: rgba(207,42,177,0.1);
    cursor: pointer;
    position: relative;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 2px;
  }

  .theme-toggle:hover { border-color: rgba(207,42,177,0.55); }

  .toggle-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fucsia), var(--violeta));
    position: absolute;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }

  html.light .toggle-thumb { transform: translateX(20px); }

  .toggle-icon-dark,
  .toggle-icon-light {
    position: absolute;
    font-size: 10px;
    transition: opacity 0.3s;
  }

  .toggle-icon-dark { right: 5px; opacity: 1; }
  .toggle-icon-light { left: 5px; opacity: 0; }

  html.light .toggle-icon-dark { opacity: 0; }
  html.light .toggle-icon-light { opacity: 1; }

  html.light .theme-toggle {
    background: rgba(90,37,207,0.1);
    border-color: rgba(90,37,207,0.3);
  }

  /* Smooth transitions for key elements */
  .hero, .clients-section, .nosotros-section,
  .logo-card, .nos-stat-card, .nos-quote, .nos-cert,
  nav, .hero-tag, .service-tag,
  .section-divider, .btn-ghost {
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  }


  /* ═══════════════════════════════════════

  /* ── NAV ── */
  @media (max-width: 768px) {
    nav {
      padding: 1rem 1.25rem;
    }
    .nav-links {
      display: none; /* replaced by hamburger on mobile */
    }
    .nav-mobile-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .hamburger {
      display: flex;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 4px;
      background: none;
      border: none;
    }
    .hamburger span {
      display: block;
      width: 22px; height: 2px;
      background: var(--white);
      border-radius: 2px;
      transition: transform 0.3s, opacity 0.3s;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Mobile nav drawer */
    .mobile-drawer {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: var(--bg);
      z-index: 50;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2.5rem;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    .mobile-drawer.open {
      opacity: 1;
      pointer-events: all;
    }
    .mobile-drawer a, .mobile-drawer button.mobile-link {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 2rem;
      font-weight: 800;
      color: var(--white);
      text-decoration: none;
      background: none;
      border: none;
      cursor: pointer;
      letter-spacing: -0.02em;
      transition: color 0.2s;
    }
    .mobile-drawer a:hover, .mobile-drawer button.mobile-link:hover {
      background: linear-gradient(90deg, var(--fucsia), var(--violeta));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .mobile-drawer .close-btn {
      position: absolute;
      top: 1.2rem; right: 1.2rem;
      font-size: 1.5rem;
      background: none;
      border: none;
      color: var(--white);
      cursor: pointer;
      opacity: 0.6;
    }
  }

  @media (min-width: 769px) {
    .hamburger, .mobile-drawer { display: none !important; }
    .nav-mobile-actions { display: none !important; }
  }


  /* ── NAV PARTNER BADGES ── */
  .nav-partners {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
  }

  .nav-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(210,195,255,0.55);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
  }

  .nav-partner-badge:hover {
    border-color: rgba(207,42,177,0.3);
    color: var(--white);
    background: rgba(207,42,177,0.06);
  }

  .nav-partner-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* Hide text on small screens, keep dot */
  @media (max-width: 1024px) {
    .nav-partners { margin-left: 10px; gap: 5px; }
    .nav-partner-badge { padding: 4px 7px; font-size: 0.6rem; }
  }

  @media (max-width: 768px) {
    .nav-partners { display: none; }
  }

  html.light .nav-partner-badge {
    border-color: rgba(90,37,207,0.15);
    color: rgba(60,30,100,0.55);
    background: rgba(90,37,207,0.04);
  }

  /* ── NAV LEFT GROUP ── */
  .nav-left {
    display: flex;
    align-items: center;
    gap: 0;
  }

  
/* ── MOBILE: logo size fix ── */
@media (max-width: 480px) {
  .nav-logo img {
    height: 28px;
    max-width: 140px;
    width: auto;
  }
}
