/* =========================================================================
   dropdown-nav.css — rozwijane menu nawigacji (top nav z dropdownami)
   Dodane w refaktoringu 2026-05 (xingke.abc-rc.pl jako samodzielny serwis).
   Style działają z istniejącym .topbar / .topnav z assets/style.css.
   ========================================================================= */

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.topnav-item {
  position: relative;
}

.topnav-item > a,
.topnav > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.topnav-item.has-dropdown > a::after {
  content: '▾';
  font-size: 0.7em;
  opacity: 0.7;
  margin-left: 2px;
}

.topnav-item > a:hover,
.topnav > a:hover {
  background: rgba(255, 106, 0, 0.08);
  color: #ff6a00;
}

.topnav-item > a.active,
.topnav > a.active {
  color: #ff6a00;
  font-weight: 600;
}

/* DROPDOWN PANEL */
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid #e2e0d8;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 1000;
  border-radius: 4px;
}

.topnav-item:hover > .dropdown,
.topnav-item:focus-within > .dropdown,
.topnav-item.is-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 9px 18px;
  color: #1a1a1c;
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.12s, color 0.12s, padding-left 0.18s;
}

.dropdown a:hover {
  background: rgba(255, 106, 0, 0.08);
  color: #ff6a00;
  padding-left: 22px;
}

.dropdown hr {
  border: 0;
  border-top: 1px solid #e8e6df;
  margin: 6px 14px;
}

/* CTA pomarańczowy zostaje */
.topnav-cta {
  background: #ff6a00 !important;
  color: #fff !important;
  font-weight: 700 !important;
  margin-left: 10px;
  padding: 10px 18px !important;
  border-radius: 4px;
  transition: background 0.15s, transform 0.1s;
}
.topnav-cta:hover {
  background: #e85e00 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ========== MOBILE — hamburger + szufladka ========== */
.topnav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.5rem;
  color: inherit;
  line-height: 1;
}

@media (max-width: 980px) {
  .topnav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topnav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(360px, 88vw);
    height: 100vh;
    background: #1a1a1c;
    color: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 18px 24px;
    overflow-y: auto;
    transition: right 0.28s ease;
    z-index: 999;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  }
  .topnav.is-open { right: 0; }

  .topnav > a,
  .topnav-item > a {
    width: 100%;
    color: #ededea;
    border-bottom: 1px solid #2a2a2c;
    border-radius: 0;
    padding: 14px 8px;
  }
  .topnav-item { width: 100%; }
  .dropdown {
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0 0 0 18px;
    display: none;
  }
  .topnav-item.is-open > .dropdown { display: block; }
  .dropdown a {
    color: #b0b0ad;
    padding: 10px 8px;
    border-bottom: 1px solid #2a2a2c;
  }
  .dropdown a:hover {
    background: transparent;
    color: #ff6a00;
    padding-left: 16px;
  }
  .topnav-cta {
    margin: 14px 8px 0;
    text-align: center;
  }
}
