/* v20250808-final — Flexnet sticky tabs */

:root {
  --flexnet-red: #d33c14;
  --shadow-s: 0 4px 12px rgba(0,0,0,.1);
}

/* --- desktop sticky tabs --- */
.flexnet-sticky-tabs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 2px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  font-family: 'Helvetica Neue', sans-serif;
  z-index: 9999;
  border-radius: 12px;
}
.flexnet-sticky-tabs.stuck {
  position: fixed;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.95);
  border-radius: 10px;
  box-shadow: var(--shadow-s);
  animation: sticky-in .25s ease-out;
}
body.admin-bar .flexnet-sticky-tabs.stuck {
  top: 86px;
}
@keyframes sticky-in {
  from { opacity: 0; transform: translateY(-24px) translateX(-50%); }
  to   { opacity: 1; transform: translateY(0)    translateX(-50%); }
}

/* --- zakładki desktop --- */
.tab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tab-links a {
  font-weight: 600;
  color: #222;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  padding: 20px;
}
.tab-links a.active,
.tab-links a[aria-current="true"],
.tab-links a.is-active {
  color: var(--flexnet-red);
  border-color: var(--flexnet-red);
}
.tab-links a.is-active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--flexnet-red);
  border-radius: 2px;
}
.tab-links a:hover {
  background-color: rgba(0,0,0,.05);
}
.tab-links a:focus-visible {
  outline: 2px solid var(--flexnet-red);
  box-shadow: 0 0 0 3px rgba(216,0,15,.15);
  outline-offset: 2px;
}

/* --- CTA przycisk --- */
.cta-button {
  margin-left: auto;
  background: linear-gradient(90deg,#4064c3 0%,#d33c14 100%);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 26px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- kotwice sekcji --- */
.flexnet-anchor-section {
  padding: 60px 0px 0px 0px;
  scroll-margin-top: 120px;
}

/* --- widoczność --- */
@media (min-width: 769px) {
  .mobile-only  { display: none !important; }
}
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}

/* --- mobile sticky dropdown --- */
@media (max-width: 768px) {
  .flexnet-sticky-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-s);
    position: relative;
    z-index: 10000;
  }
  .flexnet-sticky-tabs.stuck {
    top: 50px;
  }

  #customDropdown {
    flex: 1;
    margin-right: 12px;
    margin-left: 4px;
    position: relative;
  }
  .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    padding: 0;
  }
  .dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--flexnet-red);
    transition: transform .3s ease;
  }
  #customDropdown.open .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: var(--shadow-s);
    opacity: 0;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.3s ease;
    z-index: 10002;
    white-space: nowrap;
    width: 100%;
    min-width: 100%;
  }
  .mobile-only.open .dropdown-options {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .dropdown-options li {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
  }
  .dropdown-options li:hover,
  .dropdown-options li:focus-visible {
    background: #f0f0f0;
  }
  .dropdown-options li.active {
    color: var(--flexnet-red);
    font-weight: 600;
  }
  #customDropdown.selected .dropdown-toggle {
    color: var(--flexnet-red);
  }

  .dropdown-options::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ccc;
    z-index: 10003;
  }
  .dropdown-options::after {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #fff;
    z-index: 10004;
  }

  .cta-button {
    margin: 0;
  }
}

/* --- Fixy WPBakery / Visual Composer --- */
#fixed-box, .fixed-box, .vc_row, .wpb_row,
.flexnet-sticky-tabs, .mobile-only, #customDropdown {
  overflow: visible !important;
}

