/* Header y Navegación */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(70, 127, 247, 0.1);
  height: 100px; /* Altura fija para el header */
}

/* Espacio superior para compensar el header fijo en todas las páginas */
body {
  padding-top: 100px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%; /* Ocupar toda la altura del header */
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  transform-origin: left;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  height: 80px; /* Altura controlada dentro del header de 100px */
  width: auto;
  display: flex;
  align-items: center;
}

.logo-icon svg {
  height: 100%;
  width: auto;
  max-width: 100%;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #1e293b;
  text-decoration: none;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  height: 44px;
}

.nav-link:hover,
.nav-link.active {
  color: #467ff7;
  background: rgba(70, 127, 247, 0.08);
}

/* Botones de acción */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-appointment {
  padding: 12px 24px;
  background: linear-gradient(135deg, #467ff7 0%, #2563eb 100%);
  color: white !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(70, 127, 247, 0.3);
  height: 44px;
}

.btn-appointment svg {
  fill: white !important;
}

.btn-appointment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(70, 127, 247, 0.4);
}

/* Estilo botón tienda */
.btn-tienda {
  padding: 12px 20px;
  background: #ffffff;
  color: #467ff7 !important;
  border: 2px solid #467ff7;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
}

.btn-tienda svg {
  stroke: currentColor;
  fill: none;
}

.btn-tienda:hover {
  background: rgba(70, 127, 247, 0.05);
  transform: translateY(-2px);
}

/* Menú Hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #467ff7;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Dropdown Menu Styles (Desktop) */
.nav-item.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-toggle-btn {
  display: none; /* Hidden on desktop by default */
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #1e293b;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none; /* Remove default list bullets */
}

.nav-item.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 10px 20px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 5px;
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  color: #1e293b;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: rgba(70, 127, 247, 0.08);
  color: #467ff7;
}

/* Dropdown Arrow for Desktop Link */
.nav-link.has-dropdown {
  padding-right: 32px; /* Make room for arrow if needed, but we essentially just want the link */
}

/* Responsive */
@media (max-width: 1024px) {
  .header {
    height: 70px; /* Altura menor en móviles */
  }

  body {
    padding-top: 70px; /* Ajuste del padding para móviles */
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Separación entre items */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    transition: all 0.4s ease;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
    max-width: 400px;
    text-align: center;
  }

  .nav-link {
    padding: 16px 24px;
    font-size: 18px;
    justify-content: center;
    width: 100%;
  }

  /* Mobile Dropdown */
  .nav-item.dropdown {
    flex-direction: column;
    width: 100%;
  }

  .nav-item.dropdown > div {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .dropdown-toggle-btn {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    color: #467ff7;
  }

  .dropdown-toggle-btn svg {
    transition: transform 0.3s ease;
  }

  .nav-item.dropdown.active .dropdown-toggle-btn svg {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    background: rgba(70, 127, 247, 0.03);
    display: none; /* Hidden by default in mobile */
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
  }

  .nav-item.dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-item {
    padding: 14px 40px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .dropdown-header {
    display: none; /* Hide header in mobile to save space, or keep it if desired */
  }

  .nav-actions {
    width: 100%;
    display: flex;
    flex-direction: column; /* Apilar botones en mobile */
    align-items: center;
    gap: 16px;
    margin-top: 20px;
  }

  .btn-appointment,
  .btn-tienda {
    width: 80%;
    justify-content: center;
  }

  .logo-icon {
    height: 50px; /* Ajuste proporcional para móvil */
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 16px;
  }
}
