/* =============================================
   PPX Website - Header Styles
   Standalone CSS — loaded by Next.js and WordPress
   ============================================= */

.ppx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ppx-header-inner {
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

/* Logo */
.ppx-header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 700;
  color: #4b0a98;
  letter-spacing: -0.025em;
  margin-right: auto;
}

.ppx-header-logo-img {
  height: 45px;
  width: auto;
}

.ppx-header-logo:hover {
  color: #3d0880;
}

/* Navigation */
.ppx-header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .ppx-header-nav {
    display: flex;
  }
}

.ppx-header-nav > a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b0a98;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.15s, color 0.15s;
}

.ppx-header-nav > a:hover {
  background-color: #F1F1F1;
  color: #4b0a98;
}

.ppx-header-nav > a.active {
  background-color: #f0e6fb;
  color: #4b0a98;
}

/* Services dropdown */
.ppx-header-dropdown {
  position: relative;
}

.ppx-header-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b0a98;
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.ppx-header-dropdown-btn:hover {
  background-color: #F1F1F1;
  color: #4b0a98;
}

.ppx-header-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  background: #7c3aed;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  z-index: 60;
  overflow: visible;
  padding: 0.375rem 0;
}

/* Upward caret arrow */
.ppx-header-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #7c3aed;
  transform: translateX(-50%) rotate(45deg);
}

.ppx-header-dropdown-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.375rem;
  margin: 0.125rem 0.375rem;
  transition: background-color 0.15s, color 0.15s;
}

.ppx-header-dropdown-menu a:hover {
  background-color: #ffffff;
  color: #4b0a98;
}

/* Actions (right side) */
.ppx-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

/* Buttons */
.ppx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
}

.ppx-btn-primary {
  background: linear-gradient(180deg, #5a1aad 0%, #4b0a98 100%);
  color: #ffffff;
  box-shadow:
    0 4px 10px rgba(75, 10, 152, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ppx-btn-primary:hover {
  background: linear-gradient(180deg, #6b1ec0 0%, #5a1aad 100%);
  box-shadow:
    0 6px 20px rgba(75, 10, 152, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.ppx-btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 2px 4px rgba(75, 10, 152, 0.3),
    inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ppx-btn-ghost {
  background-color: transparent;
  color: #111111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ppx-btn-ghost:hover {
  background-color: #F1F1F1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.ppx-btn-ghost:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ppx-btn-accent {
  background: linear-gradient(180deg, #ff6a5e 0%, #FF574A 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(255, 87, 74, 0.35), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ppx-btn-accent:hover {
  background: linear-gradient(180deg, #FF574A 0%, #e64438 100%);
  box-shadow: 0 4px 12px rgba(255, 87, 74, 0.4), 0 2px 4px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.ppx-btn-accent:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(255, 87, 74, 0.3);
}

/* User avatar dropdown */
.ppx-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #1F5E63;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.ppx-header-avatar:hover {
  border-color: #4b0a98;
}

.ppx-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* User dropdown menu */
.ppx-header-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 200px;
  background-color: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 60;
  overflow: hidden;
}

.ppx-header-user-info {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E5E7EB;
}

.ppx-header-user-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111111;
}

.ppx-header-user-email {
  margin: 0;
  font-size: 0.75rem;
  color: #6B7280;
}

.ppx-header-user-nav {
  padding: 0.25rem 0;
}

.ppx-header-user-nav a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #111111;
  text-decoration: none;
}

.ppx-header-user-nav a:hover {
  background-color: #F1F1F1;
}

.ppx-header-admin-link {
  color: #4b0a98 !important;
  font-weight: 500;
}

.ppx-header-user-divider {
  border-top: 1px solid #E5E7EB;
  margin: 0.25rem 0;
}

.ppx-header-logout-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #DC2626;
  background: none;
  border: none;
  cursor: pointer;
}

.ppx-header-logout-btn:hover {
  background-color: #FEF2F2;
}

/* Mobile menu button */
.ppx-header-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: #111111;
  border-radius: 0.375rem;
}

.ppx-header-menu-btn:hover {
  background-color: #F1F1F1;
}

@media (min-width: 768px) {
  .ppx-header-menu-btn {
    display: none;
  }
}

/* Mobile nav overlay */
.ppx-mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  z-index: 40;
  padding: 1rem;
  overflow-y: auto;
}

.ppx-mobile-nav.open {
  display: block;
}

@media (min-width: 768px) {
  .ppx-mobile-nav {
    display: none !important;
  }
}

.ppx-mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #111111;
  text-decoration: none;
  border-radius: 0.5rem;
}

.ppx-mobile-nav a:hover {
  background-color: #F1F1F1;
  color: #4b0a98;
}
