*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0a1628; --navy2: #0f1f3d; --blue: #1a6fcc; --cyan: #00aaff;
  --text: #e8edf5; --muted: #8a9ab5; --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04); --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* Okno dialogowe biblioteki Improv WiFi (SSID/hasło) domyślnie ma z-index: 7,
     podnosimy je wyżej niż nasze warstwy nawigacji/modali. */
  --mdc-dialog-z-index: 2000;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--navy); color: var(--text); line-height: 1.6; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: rgba(10,22,40,0.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo img { height: 34px; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; height: 100%; }
.nav-links > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-links > li > a, .nav-links > li > button.nav-top-link {
  color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s;
  background: none; border: none; font-family: var(--font); cursor: pointer;
  display: flex; align-items: center; gap: 0.35rem; height: 100%;
}
.nav-links > li > a:hover, .nav-links > li > button.nav-top-link:hover,
.nav-links > li.has-dropdown:hover > button.nav-top-link,
.nav-links > li.active > a { color: var(--cyan); }
.nav-caret { font-size: 0.6rem; transition: transform 0.2s; opacity: 0.8; }
.nav-links > li.has-dropdown:hover .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--navy2); border: 1px solid var(--border); border-radius: 10px;
  min-width: 240px; padding: 0.5rem; box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav-links > li.has-dropdown:hover .nav-dropdown,
.nav-links > li.has-dropdown:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown a {
  display: block; padding: 0.65rem 0.9rem; border-radius: 6px; color: var(--text);
  text-decoration: none; font-size: 0.87rem; white-space: nowrap;
}
.nav-dropdown a:hover { background: rgba(0,170,255,0.1); color: var(--cyan); }
.nav-dropdown a small { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-account { position: relative; }
.nav-account-btn {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.nav-account-btn:hover { border-color: var(--cyan); background: rgba(0,170,255,0.1); }
.nav-account-btn svg { pointer-events: none; }
.nav-account-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--navy2); border: 1px solid var(--border); border-radius: 10px;
  min-width: 220px; padding: 0.5rem; box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  display: none; z-index: 600;
}
.nav-account.open .nav-account-dropdown { display: block; }
.nav-account-dropdown .acc-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0.5rem 0.75rem 0.25rem; }
.nav-account-dropdown a { display: block; padding: 0.65rem 0.9rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.87rem; }
.nav-account-dropdown a:hover { background: rgba(0,170,255,0.1); color: var(--cyan); }

.nav-burger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ===== PAGE HEADER (kompaktowy baner podstron) ===== */
.page-header {
  margin-top: 64px; padding: 3rem 2rem 2.5rem; background:
    linear-gradient(135deg, rgba(26,111,204,0.18), rgba(10,22,40,0.9)), var(--navy2);
  border-bottom: 1px solid var(--border);
}
.page-header .container { max-width: 1100px; margin: 0 auto; }
.breadcrumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.9rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cyan); }
.page-header h1 { font-size: 2.1rem; color: #fff; margin-bottom: 0.6rem; }
.page-header p { color: var(--muted); max-width: 640px; font-size: 1.02rem; }

/* ===== SEKCJA Z OBRAZEM W TLE (grafika jako tło, treść nad nią, bez zmiany układu) ===== */
.section-with-bg {
  position: relative;
  margin-top: 64px;
  background-image: linear-gradient(180deg, rgba(10,22,40,0.55), rgba(10,22,40,0.95) 65%), url('img/hero.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* ===== HOME HERO (przeskalowany, kompaktowy) ===== */
.hero {
  margin-top: 64px; position: relative; overflow: hidden;
  min-height: 340px; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--navy2), var(--navy));
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.35; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.55), rgba(10,22,40,0.92));
}
.hero-content { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 3.5rem 2rem; width: 100%; }
.hero-content .section-label { color: var(--cyan); }
.hero-content h1 { font-size: 2.4rem; color: #fff; margin: 0.6rem 0 1rem; max-width: 640px; }
.hero-content p { color: var(--muted); max-width: 560px; font-size: 1.05rem; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ===== GENERIC SECTIONS ===== */
section { padding: 4.5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.section-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--cyan); margin-bottom: 0.75rem; }
.section-intro { color: var(--muted); max-width: 640px; margin-bottom: 3rem; font-size: 1.05rem; }

/* ===== OFFER PICKER (home) ===== */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.offer-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: border-color 0.2s, transform 0.2s; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
}
.offer-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.offer-card .offer-icon { width: 46px; height: 46px; border-radius: 10px; background: rgba(0,170,255,0.12); color: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.offer-card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 0.5rem; }
.offer-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; flex-grow: 1; }
.offer-card .offer-link { color: var(--cyan); font-size: 0.85rem; font-weight: 600; }

/* ===== PRODUCTS ===== */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, transform 0.2s; position: relative; }
.product-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-card-body { padding: 1.5rem; }
.product-card-body h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: #fff; }
.product-card-body p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.btn { display: inline-block; padding: 0.6rem 1.25rem; background: var(--blue); color: #fff; text-decoration: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; transition: background 0.2s; border: none; cursor: pointer; font-family: var(--font); }
.btn:hover { background: var(--cyan); }
.btn-outline { background: transparent; border: 1px solid var(--blue); color: var(--cyan); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.product-card-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.btn-soon { display: inline-block; padding: 0.6rem 1.25rem; background: rgba(255,255,255,0.06); color: var(--muted); border-radius: 6px; font-size: 0.85rem; font-weight: 600; border: 1px dashed var(--border); cursor: default; }
.btn-details { display: inline-block; padding: 0.6rem 1.1rem; background: transparent; color: var(--cyan); border: 1px solid rgba(0,170,255,0.3); border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.2s, border-color 0.2s; font-family: var(--font); }
.btn-details:hover { background: rgba(0,170,255,0.1); border-color: var(--cyan); }
.new-badge { position: absolute; top: 12px; right: 12px; z-index: 2; background: linear-gradient(135deg, #ff8a5b, #ff5b8a); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3rem 0.65rem; border-radius: 20px; }

/* ===== FEATURE GRID (aplikacja serwisowa / kliencka) ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.feature-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon { font-size: 1.4rem; flex-shrink: 0; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: rgba(26,111,204,0.15); border-radius: 8px; color: var(--cyan); }
.feature-item h4 { font-size: 0.92rem; color: #fff; margin-bottom: 0.25rem; }
.feature-item p { font-size: 0.83rem; color: var(--muted); }

/* ===== SPECS ===== */
.specs-section { background: var(--navy2); }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.spec-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.spec-icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(26,111,204,0.15); border-radius: 8px; color: var(--cyan); }
.spec-item h4 { font-size: 0.9rem; color: #fff; margin-bottom: 0.2rem; }
.spec-item p { font-size: 0.82rem; color: var(--muted); }

/* ===== BRANDS / KOMPATYBILNOŚĆ ===== */
.brands-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.brand-chip { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 1rem; font-size: 0.85rem; color: var(--text); transition: border-color 0.2s; }
.brand-chip:hover { border-color: var(--blue); color: var(--cyan); }

.compat-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.88rem; }
.compat-table th { text-align: left; color: var(--cyan); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.compat-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.compat-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== DOWNLOADS ===== */
.downloads-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.download-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--text); transition: border-color 0.2s; }
.download-card:hover { border-color: var(--blue); }
.download-icon { font-size: 1.8rem; color: var(--cyan); flex-shrink: 0; }
.download-card h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.download-card p { font-size: 0.8rem; color: var(--muted); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 800px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 0.95rem; font-weight: 600; padding: 1.1rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font); }
.faq-q:hover { color: var(--cyan); }
.faq-arrow { color: var(--cyan); font-size: 1rem; transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 1.25rem 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.7; border-top: 1px solid var(--border); }
.faq-item.open .faq-a { display: block; }

/* ===== MODALS (szczegóły techniczne) ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(4,9,18,0.8); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 1.5rem; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--navy2); border: 1px solid var(--border); border-radius: var(--radius); max-width: 720px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 2rem; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: 1.2rem; right: 1.2rem; background: rgba(255,255,255,0.06); border: none; color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.modal-close:hover { background: rgba(255,255,255,0.12); }
.modal-box h3 { font-size: 1.3rem; color: #fff; margin-bottom: 0.3rem; }
.modal-box .modal-sub { color: var(--cyan); font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; }
.modal-box h4 { font-size: 0.95rem; color: #fff; margin: 1.4rem 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-box h4:first-of-type { margin-top: 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 0.5rem 0; vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 42%; padding-right: 1rem; }
.spec-table td:last-child { color: var(--text); }
.modal-box ul { margin: 0.4rem 0 0.4rem 1.1rem; color: var(--text); font-size: 0.85rem; line-height: 1.65; }
.modal-box p.note { font-size: 0.8rem; color: var(--muted); background: rgba(255,255,255,0.03); border-left: 2px solid var(--cyan); padding: 0.6rem 0.9rem; border-radius: 0 6px 6px 0; margin-top: 1rem; }

/* ===== CONTACT ===== */
.contact-section { background: var(--navy2); text-align: center; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.contact-form { max-width: 560px; margin: 2rem auto 0; text-align: left; display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem; display: block; }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.7rem 0.9rem; color: var(--text); font-family: var(--font); font-size: 0.9rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ===== BOTTOM CTA STRIP ===== */
.cta-strip { background: linear-gradient(135deg, rgba(0,170,255,0.1), rgba(26,111,204,0.05)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 3rem 2rem; }
.cta-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-strip h3 { color: #fff; font-size: 1.3rem; margin-bottom: 0.35rem; }
.cta-strip p { color: var(--muted); font-size: 0.9rem; }
.cta-strip-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer { background: #060e1c; border-top: 1px solid var(--border); padding: 2.5rem 2rem 1.5rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col h5 { color: #fff; font-size: 0.85rem; margin-bottom: 0.9rem; }
.footer-col p { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.5rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.82rem; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { max-width: 1100px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 0.78rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; background: var(--navy2); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; height: auto; max-height: calc(100vh - 64px); overflow-y: auto;
    padding: 0.5rem; gap: 0; display: none; }
  .nav-links.open { display: flex; }
  .nav-links > li { height: auto; flex-direction: column; align-items: stretch; }
  .nav-links > li > a, .nav-links > li > button.nav-top-link { padding: 0.9rem 0.75rem; width: 100%; }
  .nav-dropdown { position: static; transform: none; opacity: 1; visibility: visible; display: none; box-shadow: none; border: none; background: rgba(255,255,255,0.03); }
  .nav-links > li.has-dropdown.open .nav-dropdown { display: block; }
  .nav-burger { display: block; }
  h2 { font-size: 1.6rem; }
  section { padding: 3rem 1.25rem; }
  .hero-content h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
