/* ═══════════════════════════════════════════════════════════════════
   header.css — Single Source of Truth pentru top-bar + header + nav
   Include din: index.html ȘI produse/_inc/head.php (toate paginile site-ului)
   NU duplica aceste rules în alte fișiere — orice modificare aici se propagă peste tot.
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ SKIP LINK (a11y) ═══ */
.skip-link { position: absolute; top: -50px; left: 12px; background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 0 0 12px 12px; z-index: 10000; font-weight: 600; font-size: 0.92em; text-decoration: none; transition: top 0.2s ease; }
.skip-link:focus { top: 0; outline: 3px solid var(--accent); outline-offset: 2px; }

/* ═══ TOP BAR ═══ */
.top-bar { background: #003d7a; color: #fff; padding: 10px 0; font-size: 0.88em; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar a { color: rgba(255,255,255,0.9); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.top-bar a:hover { color: #fff; }
.top-bar-right { color: rgba(255,255,255,0.65); display: inline-flex; align-items: center; gap: 6px; }
.top-bar-brand { color: rgba(255,255,255,0.65); }

/* ═══ TOP BAR contact (anti-scrap) ═══ */
.top-bar-contact { display: inline-flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.top-bar-link { color: rgba(255,255,255,0.92); font-weight: 600; text-decoration: none; font-size: 0.9em; transition: color 0.18s; }
.top-bar-link:hover { color: #fff; }

/* ═══ THEME TOGGLE ═══ */
.theme-toggle { background: rgba(255,255,255,0.12); border: 0; color: #fff; cursor: pointer; font-size: 0.95em; padding: 4px 10px; border-radius: 14px; margin-right: 12px; transition: background 0.2s; line-height: 1; }
.theme-toggle:hover { background: rgba(255,255,255,0.22); }

/* ═══ HEADER ═══ */
.site-header { background: var(--bg); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.header-main { padding: 8px 0; }
.header-content { display: flex; justify-content: space-between; align-items: center; }

/* ═══ SITE LOGO ═══ */
.site-logo .site-logo-link, .site-logo .site-logo-link * { cursor: pointer; }
.site-logo .site-logo-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; transition: opacity 0.2s; }
.site-logo .site-logo-link:hover { opacity: 0.88; }
.site-logo .site-logo-img { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; display: block; }
.site-logo .site-logo-img-night { display: none; }
.site-logo .site-logo-brand { font-size: 1.75em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--primary); font-family: 'Manrope', 'Manrope Fallback', sans-serif; }
.site-logo .tagline { color: var(--text-light); font-size: 0.74em; font-weight: 500; margin-top: 1px; }

/* ═══ NAV BASE ═══ */
nav ul { list-style: none; display: flex; gap: 6px; align-items: center; }
nav a, nav .nav-cta { color: var(--text); font-weight: 600; font-size: 0.9em; padding: 7px 14px; border-radius: 8px; transition: all 0.2s; }
nav a:hover { background: var(--bg-soft); color: var(--secondary); }
nav .nav-cta { background: #c04e00; color: #fff; border: 0; cursor: pointer; font-family: inherit; line-height: 1.2; }
nav .nav-cta:hover { background: #a84300; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,78,0,0.35); }

/* ═══ NAV TRIGGER (mega + dropdowns) ═══ */
.has-mega { display: inline-flex; align-items: center; }
.nav-trigger { background: none; border: 0; font-family: inherit; font-size: 0.9em; line-height: 1.4; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-weight: 600; transition: all 0.25s cubic-bezier(0.2,0.8,0.2,1); vertical-align: middle; }
.nav-trigger:hover { background: var(--bg-soft); color: var(--secondary); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,102,204,0.12); }
.nav-trigger[aria-expanded="true"] { background: var(--bg-soft); color: var(--secondary); }
.nav-trigger.nav-cta { background: #c04e00; color: #fff; }
.nav-trigger.nav-cta:hover, .nav-trigger.nav-cta[aria-expanded="true"] { background: #a84300; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,78,0,0.35); }
.nav-trigger.nav-cta .nav-chevron { color: rgba(255,255,255,0.85); }
.nav-chevron { font-size: 0.7em; transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1); line-height: 1; display: inline-block; }
.nav-trigger:hover .nav-chevron { animation: chevronBounce 0.5s ease; }
@keyframes chevronBounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(3px); } 70% { transform: translateY(-1px); } }
.nav-trigger[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); animation: none; }

/* ═══ MINI-DROP (Contact + Solicită ofertă dropdowns) ═══ */
.has-mini-drop { position: relative; display: inline-flex; align-items: center; }
.mini-drop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--bg-card); border-radius: 12px; box-shadow: 0 16px 50px rgba(0,30,60,0.18), 0 4px 12px rgba(0,30,60,0.06); padding: 8px; z-index: 1000; animation: dropIn 0.18s cubic-bezier(0.2,0.8,0.2,1); border: 1px solid var(--border); }
.mini-drop[hidden] { display: none; }
.mini-drop-right { left: auto; right: 0; min-width: 290px; }
.mini-drop-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--text); font-size: 0.9em; font-weight: 500; text-decoration: none; border-radius: 8px; transition: all 0.15s; background: none; }
.mini-drop-item:hover { background: var(--bg-soft); color: var(--secondary); transform: translateX(2px); }
.mini-drop-hint { color: var(--text-muted); font-size: 0.78em; font-weight: 400; flex-shrink: 0; }
.mini-drop-sep { height: 1px; background: var(--border); margin: 6px 8px; }
.mini-drop-page { color: var(--secondary); font-weight: 600; }
.mini-drop-page:hover { color: var(--accent); }
@keyframes dropIn { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }

/* ═══ HAMBURGER + mobile secondary menu ═══ */
.show-xs { display: none; }
.nav-hamburger { background: none; border: 0; font-size: 1.35em; cursor: pointer; padding: 4px 10px; line-height: 1; color: var(--text); border-radius: 8px; transition: all 0.18s; }
.nav-hamburger:hover, .nav-hamburger[aria-expanded="true"] { background: var(--bg-soft); color: var(--secondary); }
.has-hamburger { position: relative; }
.mobile-secondary-menu { position: absolute; top: calc(100% + 6px); right: 0; background: var(--bg-card); border-radius: 12px; box-shadow: 0 16px 50px rgba(0,30,60,0.18), 0 4px 12px rgba(0,30,60,0.06); padding: 8px; min-width: 220px; z-index: 999; animation: dropIn 0.2s cubic-bezier(0.2,0.8,0.2,1); border: 1px solid var(--border); }
.mobile-secondary-menu[hidden] { display: none; }
.mobile-secondary-menu a { display: block; padding: 10px 14px; color: var(--text); font-size: 0.9em; text-decoration: none; border-radius: 6px; transition: all 0.15s; }
.mobile-secondary-menu a:hover { background: var(--bg-soft); color: var(--secondary); transform: translateX(2px); }

/* ═══ MEGA-MENU ═══ */
.mega-menu { position: fixed; top: var(--site-header-height, 84px); left: 50%; transform: translateX(-50%); width: min(94vw, 1180px); background: var(--bg-card); border-radius: 18px; box-shadow: 0 24px 70px rgba(0,30,60,0.18), 0 4px 12px rgba(0,30,60,0.08); padding: 0; z-index: 1000; overflow: hidden; animation: megaIn 0.18s cubic-bezier(0.2,0.8,0.2,1); max-height: calc(100vh - var(--site-header-height, 84px) - 20px); overflow-y: auto; }
.mega-menu[hidden] { display: none; }
@keyframes megaIn { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.mega-menu-inner { padding: 28px 32px 22px; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 24px; }
.mega-col h4.mega-cat { font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.mega-col h4.mega-cat:not(:first-child) { margin-top: 22px; }
.mega-col ul { list-style: none; padding: 0; margin: 0; display: block; }
.mega-col li { display: list-item; margin: 0; padding: 0; }
.mega-col li a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: 0.85em; font-weight: 500; text-decoration: none; transition: all 0.15s; line-height: 1.3; background: none; }
.mega-col li a:hover { background: var(--bg-soft); color: var(--secondary); transform: translateX(2px); }
.mega-icon { font-size: 0.95em; opacity: 0.85; flex-shrink: 0; width: 18px; text-align: center; }
.mega-footer { margin-top: 4px; padding: 14px 32px; background: var(--bg-soft); text-align: center; border-top: 1px solid var(--border); }
.mega-all-link { color: var(--secondary); font-weight: 600; font-size: 0.88em; text-decoration: none; }
.mega-all-link:hover { color: var(--accent); }
.mega-backdrop { position: fixed; inset: 0; background: rgba(0,30,60,0.25); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
body.mega-open::before { content: ''; position: fixed; inset: 0; background: rgba(0,30,60,0.18); z-index: 99; pointer-events: none; }

/* ═══ MOBILE BREAKPOINTS ═══ */
@media (max-width: 900px) {
  .mega-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 78vh; overflow-y: auto; border-radius: 18px 18px 0 0; animation: megaInMobile 0.22s cubic-bezier(0.2,0.8,0.2,1); }
  @keyframes megaInMobile { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .mega-menu-inner { padding: 18px 18px 14px; }
  .mega-footer { padding: 12px 18px; }
  .mega-col h4.mega-cat { font-size: 0.66em; margin-bottom: 8px; }
  .mega-col h4.mega-cat:not(:first-child) { margin-top: 16px; }
  .mega-col li a { padding: 8px 6px; font-size: 0.86em; }
}
@media (max-width: 768px) {
  .top-bar { padding: 5px 0; font-size: 0.75em; }
  .top-bar .container { gap: 4px; flex-wrap: nowrap; }
  .top-bar-contact { gap: 12px; }
  .top-bar-link { font-size: 0.92em; }
  .top-bar-right { display: none; }
  .header-main { padding: 6px 0; }
  .site-logo .site-logo-brand { font-size: 1.35em; }
  .site-logo .site-logo-img { width: 26px; height: 26px; }
  .site-logo .site-logo-link { gap: 3px; }
  nav ul { gap: 2px; flex-wrap: nowrap; }
  .nav-trigger, nav a { padding: 5px 7px; font-size: 0.78em; }
  nav .nav-cta { padding: 7px 10px; font-size: 0.78em; }
  .has-mega { position: static; }
  .header-content { gap: 4px; }
}
@media (max-width: 640px) {
  .top-bar-brand { display: none; }
  .theme-toggle { margin-right: 0; }
}
@media (max-width: 600px) {
  .mega-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  nav .hide-xs { display: none; }
  nav .show-xs { display: inline-flex; align-items: center; }
  .nav-trigger, nav a { padding: 4px 6px; font-size: 0.75em; }
  .mobile-secondary-menu { right: -4px; min-width: 200px; }
}
