/* General */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.main-navbar {
  background-color: #ff6600; /* naranja brillante */
  padding: 10px 0;
  position: relative;
  z-index: 1000;
}

.main-navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Encabezado móvil */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 15px;
}

.mobile-header span {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.mobile-icons {
  display: flex;
  gap: 15px;
}

.mobile-icons i {
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.3s;
}

.mobile-icons i:hover {
  color: #222;
}

/* Navegación principal */
.navbar-nav {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 20px;
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #222;
  background: #fff;
  border-radius: 5px;
}

.navbar-nav .active > .nav-link {
  background: #fff;
  color: #ff6600;
  border-radius: 5px;
}

/* Íconos */
.nav-icon {
  font-size: 16px;
}

/* Dropdown / Submenús */
.nav-item.dropdown {
  position: relative;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 5px;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 100;
  padding: 8px 0;
}

.nav-item.dropdown:hover .submenu {
  display: block;
}

.submenu-item {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s;
}

.submenu-item:hover {
  background: #f2f2f2;
}

.dropdown-arrow {
  margin-left: 5px;
  transition: transform 0.3s;
}

/* Animación de apertura del menú */
@keyframes slideIn {
  from {
    right: -100%;
  }
  to {
    right: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .mobile-header {
    display: flex;
  }

  .navbar-nav {
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: #fff;
    align-items: flex-start;
    padding: 70px 20px 20px;
    overflow-y: auto;
    gap: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .navbar-nav.open {
    right: 0;
    animation: slideIn 0.3s ease-out;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    color: #333 !important;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    font-weight: 500;
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    background: #ff6600 !important;
    color: #fff !important;
  }

  .navbar-nav .active > .nav-link {
    background: #ff6600 !important;
    color: #fff !important;
  }

  .nav-icon {
    font-size: 1.1rem;
    margin-right: 8px;
  }

  .nav-item.dropdown .submenu {
    display: none;
    position: static;
    box-shadow: none;
    background: #f9f9f9;
    padding: 0;
    width: 100%;
    border-left: 3px solid #ff6600;
  }
  .dropdown-arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
  }
  .nav-item.dropdown.active .submenu {
    display: block;
  }

  .nav-item.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
  }

  .submenu-item {
    padding: 10px 25px;
    color: #555;
    font-size: 0.95rem;
  }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
  .mobile-header {
    padding: 0 10px;
  }

  .mobile-icons {
    gap: 10px;
  }

  .navbar-nav {
    width: 85%;
  }
}
