/* Contenedor principal de la navegación */
.navbar {
  display: flex;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: var(--bg-color);
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

/* Evita que el navbar se superponga con la barra de administración de WordPress */
.admin-bar .navbar {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .navbar {
    top: 46px; /* Altura de la barra de WP en móviles */
  }
}

/* --- LOGO --- */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text-color);
}

/* Aproximación visual del ícono de cuadros escalonados con CSS */
.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #eaba2a 0%, #d4af3743 100%);
  clip-path: polygon(
    0 0,
    25% 0,
    25% 25%,
    50% 25%,
    50% 50%,
    75% 50%,
    75% 75%,
    100% 75%,
    100% 100%,
    0 100%
  );
}

.logo-text h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: 1px;
  font-weight: 700;
}

.logo-divider {
  width: 3px;
  height: 50px;
  background-color: var(--divisor-color);
  margin: 0 0.5rem;
  border-radius: 2px;
}

.logo-subtitle {
  font-size: 0.6rem;
  line-height: 1.4;
  letter-spacing: 1.5px;
  color: var(--text-color);
  opacity: 0.8;
}

.logo-subtitle::first-line {
  /*text-transform: capitalize;*/
}

/* --- NAVEGACIÓN --- */
.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--secundario);
}

/* --- BOTONES DE ACCIÓN --- */
.action-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Botón de tema */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background-color: rgba(128, 128, 128, 0.2);
}

.hidden {
  display: none;
}

/* Ocultar el hamburger por defecto en escritorio */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

/* --- RESPONSIVE: MÓVILES (< 1100px) --- */
@media (max-width: 1100px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  /* Reducimos un poco el logo para que no se amontone con los botones */
  .logo-icon {
    width: 30px;
    height: 30px;
  }
  .logo-text h1 {
    font-size: 1.1rem;
  }
  .logo-divider {
    height: 40px;
  }
  .logo-subtitle {
    font-size: 0.5rem;
  }

  /* Mostrar botón hamburguesa */
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Convertir la barra de navegación en un menú desplegable */
  .nav-links {
    display: none; /* Oculto por defecto */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color); /* Usamos el fondo principal */
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  /* Clase que se activa con JavaScript */
  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 1rem;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  }

  /* Fijar el botón de Agendar Consulta abajo a la derecha */
  .action-container .btn-primary {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  }
}
