/* Header Unificato - Charlie Racconta */

/* Colori pastello del tema */
:root {
  --primary-color: #F9A826;
  --primary-dark: #F59E0B;
  --primary-light: #FEF3C7;
  --secondary-color: #E9B8A8;
  --secondary-dark: #D69E8E;
  --secondary-light: #FCEAE6;
  --tertiary-color: #F9C8D9;
  --accent-color: #F97316;
  --text-color: #4A5568;
  --text-light: #718096;
  --bg-color: #FFF8F0;
}

/* Header principale */
.charlie-header {
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary-light) 50%, var(--secondary-light) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--primary-light);
}

.charlie-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
}

/* Logo */
.charlie-logo {
  color: var(--primary-dark);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  transition: all 0.3s ease;
}

.charlie-logo:hover {
  color: var(--accent-color);
  transform: scale(1.02);
}

.charlie-logo .logo-icon {
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.charlie-logo:hover .logo-icon {
  color: var(--accent-color);
  transform: rotate(5deg);
}

/* Navigazione */
.charlie-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
  position: relative;
}

.charlie-nav a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-color);
  transform: translateY(-1px);
}

.charlie-nav a.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

/* Dropdown menu */
.dropdown-menu {
  background: white;
  border: 1px solid var(--primary-light);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(249, 168, 38, 0.1);
  backdrop-filter: blur(10px);
}

.dropdown-menu a {
  color: var(--text-color);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin: 0.25rem;
  transition: all 0.2s ease;
  border-bottom: none !important;
}

.dropdown-menu a:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateX(4px);
}

.dropdown-menu a.active {
  background-color: var(--secondary-light);
  color: var(--secondary-dark);
  font-weight: 600;
}

/* Pulsanti di ricerca e account */
.header-button {
  color: var(--text-color);
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
  position: relative;
}

.header-button:hover {
  color: var(--primary-dark);
  background-color: var(--primary-light);
  transform: scale(1.1);
}

/* Search box */
.search-box {
  background: white;
  border: 1px solid var(--primary-light);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(249, 168, 38, 0.1);
}

.search-input {
  border: 1px solid var(--secondary-light);
  border-radius: 0.5rem 0 0 0.5rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-button {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: 0 0.5rem 0.5rem 0;
  color: white;
  transition: all 0.3s ease;
}

.search-button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
  transform: scale(1.05);
}

/* Menu mobile */
.mobile-menu-button {
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.mobile-menu-button:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.mobile-menu {
  background: linear-gradient(135deg, white 0%, var(--bg-color) 100%);
  border-top: 1px solid var(--primary-light);
  box-shadow: 0 -5px 25px rgba(249, 168, 38, 0.1);
}

.mobile-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--secondary-light);
  padding: 1rem;
  display: block;
}

.mobile-menu a:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateX(8px);
}

.mobile-menu a.active {
  background-color: var(--secondary-light);
  color: var(--secondary-dark);
  font-weight: 600;
  border-left: 4px solid var(--primary-color);
}

.mobile-submenu {
  background-color: var(--bg-color);
  padding-left: 2rem;
}

.mobile-submenu a {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--primary-light);
}

/* Animazioni */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu {
  animation: slideDown 0.3s ease;
}

.mobile-menu {
  animation: slideDown 0.3s ease;
}

/* Account dropdown */
.account-dropdown {
  background: white;
  border: 1px solid var(--primary-light);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(249, 168, 38, 0.1);
  min-width: 16rem;
}

.account-dropdown .user-info {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem;
  border-bottom: 1px solid var(--primary-light);
}

.account-dropdown a {
  color: var(--text-color);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin: 0.25rem;
  transition: all 0.2s ease;
  display: block;
  text-decoration: none;
  border-bottom: none !important;
}

.account-dropdown a:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateX(4px);
}

.account-dropdown .logout-btn:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
  .charlie-header {
    padding: 0.75rem 0;
  }
  
  .charlie-logo {
    font-size: 1.25rem;
  }
  
  .mobile-menu {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
}

/* Sticky header effect */
.charlie-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.charlie-header.sticky.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(249, 168, 38, 0.1);
}
