/* ===== Navbar ===== */

#header,
#header.section {
    background: #1a1a2e !important;
    padding: 0 2rem !important;
    height: 3.5rem !important;
    min-height: 3.5rem !important;
    max-height: 3.5rem !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: none !important;
    font-size: 1rem !important;
}

#header .container {
    display: flex !important;
    align-items: center !important;
    height: 3.5rem !important;
    padding: 0 !important;
    max-width: 100% !important;
}

#header .navbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 3.5rem !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Lewa strona: logo + linki w jednym rzędzie */
#header .navbar-section.logo {
    flex: 0 0 auto !important;
    height: 3.5rem !important;
    margin-right: 2rem !important;
    display: flex !important;
    align-items: center !important;
}

#header .navbar-section.logo a {
    display: flex !important;
    align-items: center !important;
    height: 3.5rem !important;
}

#header .navbar-section.logo img,
#header .logo img {
    height: 1.5rem !important;
    width: auto !important;
    display: block !important;
    margin-top: 0.25rem !important;
}

#header .navbar-section.desktop-menu {
    display: flex !important;
    align-items: center !important;
    height: 3.5rem !important;
    flex: 1 1 auto !important;
    justify-content: space-between !important;
}

/* Lista linków nawigacyjnych – lewa strona */
.psym-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    flex: 1 1 auto;
}

.psym-nav-links li {
    margin: 0;
    padding: 0;
}

.psym-nav-links a {
    color: #ccc !important;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Segoe UI', Roboto, sans-serif;
    transition: color 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 3.5rem;
}

.psym-nav-links a:hover,
.psym-nav-links a.active {
    color: #fff !important;
    text-decoration: none !important;
}

/* Lista akcji (przycisk logowania) – prawa strona */
.psym-nav-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.psym-nav-actions li {
    margin: 0;
    padding: 0;
}

/* Link logowania */
.psym-btn-login {
    color: #ccc !important;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Segoe UI', Roboto, sans-serif;
    transition: color 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 3.5rem;
}

.psym-btn-login:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* Ukryj stare elementy dropmenu quark */
#header .dropmenu {
    display: none !important;
}

/* Body – zachowaj padding-top dla fixed header */
.header-fixed #body-wrapper {
    padding-top: 3.5rem;
}

/* Zablokuj skalowanie font-size z theme.css (domyślnie rośnie do 20px) */
html {
    font-size: 16px !important;
}

@media screen and (min-width: 480px) {
    html { font-size: 16px !important; }
}

@media screen and (min-width: 1280px) {
    html { font-size: 16px !important; }
}

/* Czcionka globalna i tło */
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5 !important;
}

/* ===== Footer ===== */
.psym-footer,
.psym-footer-note {
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
}

.psym-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.psym-footer img {
    height: 1.5rem;
    width: auto;
    display: block;
    line-height: 1.5 !important;
}

.psym-footer-note {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    font-size: 0.65rem;
    text-align: center;
    color: #6b7280;
}

/* Ukryj stary footer quark */
#footer {
    display: none !important;
}

/* ===== Dropdown Navigation ===== */
.psym-dropdown {
    position: relative;
}

.psym-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    z-index: 1000;
    border-top: 2px solid #4361ee;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    /* zapobiega wyjściu poza ekran */
    max-width: calc(100vw - 4rem);
}

.psym-dropdown:hover .psym-dropdown-menu {
    display: block;
}

.psym-dropdown-menu > li {
    margin: 0;
    padding: 0;
    position: relative;
}

.psym-dropdown-menu > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 1.25rem !important;
    color: #ccc !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    font-family: 'Segoe UI', Roboto, sans-serif !important;
    height: auto !important;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.psym-dropdown-menu > li > a:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.06);
}

/* Flyout submenu */
.psym-has-submenu > .psym-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -0.4rem;
    background: #1a1a2e;
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    z-index: 1001;
    border-top: 2px solid #4361ee;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.psym-has-submenu:hover > .psym-submenu {
    display: block;
}

.psym-submenu > li {
    margin: 0;
    padding: 0;
}

.psym-submenu > li > a {
    display: block !important;
    padding: 0.5rem 1.25rem !important;
    color: #ccc !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    font-family: 'Segoe UI', Roboto, sans-serif !important;
    height: auto !important;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.psym-submenu > li > a:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.06);
}

.psym-submenu-arrow {
    margin-left: 0.75rem;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ===== Landing Page Layout ===== */
body.landing-page {
    height: 100vh !important;
    overflow: hidden !important;
}

body.landing-page #page-wrapper {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100% !important;
    padding-top: 3.5rem !important;
}

body.landing-page #start {
    flex: 1 1 auto !important;
    overflow: hidden !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

body.landing-page #start > .section {
    padding: 0 !important;
    height: 100% !important;
}

body.landing-page #body-wrapper {
    padding-top: 0 !important;
    height: 100% !important;
}

body.landing-page .landing-sections {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Grupy zakładek — nakładają się, tylko aktywna jest widoczna */
.section-group {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    scroll-behavior: smooth;
    background: #c8cdd5;
    padding: 0 5rem;
}

.section-group.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Sekcje wewnątrz grupy — stackowane pionowo, każda pełna wysokość */
.landing-section,
.landing-subsection {
    min-height: 100%;
    padding: 3rem 12.5% 3rem 12.5%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    background: #f0f2f5;
    color: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 1px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Podsekcja z tabelą testów — wysokość dopasowana do zawartości */
#dostepne {
    min-height: auto;
}

/* Sekcja kompaktowa — tylko tytuł, wysokość dopasowana do treści */
.landing-section.ls-compact {
    min-height: auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.landing-section.ls-compact h2 {
    margin-bottom: 0;
}

/* Tytuły sekcji — największy, bold, na górze */
.landing-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1.5rem 0;
}

/* Tytuły podsekcji — duży, bold */
.landing-subsection h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1.25rem 0;
}

/* Pozostałe nagłówki wewnątrz sekcji */
.landing-section h1, .landing-section h3, .landing-section h4,
.landing-subsection h1, .landing-subsection h2, .landing-subsection h4 {
    color: #1a1a2e;
}

/* Klasy ls-light / ls-blue zostawione jako no-op dla kompatybilności */
.ls-light, .ls-blue {}

/* ===== Tabela aktywnych testów ===== */
.tests-public-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    color: #1a1a2e;
}

.test-row {
    cursor: pointer;
    border-top: 1px solid #c8cdd5;
}

.test-row:first-child {
    border-top: none;
}

.test-row:hover {
    background: #e8eaed;
}

.test-row-name {
    padding: 0.85rem 1rem;
    font-weight: 500;
}

.test-row-icon {
    width: 2.5rem;
    text-align: center;
    padding: 0.85rem 0.5rem;
    color: #6b7280;
}

.test-expand-icon {
    display: inline-block;
    font-size: 2.4rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.test-desc-row {
    border-top: 1px solid #c8cdd5;
}

.test-desc-cell {
    padding: 2rem 12.5%;
    min-height: 12rem;
    vertical-align: middle;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a2e;
}

/* ── Grupowanie sekcji z podsekcjami ── */

/* Sekcja z podsekcją zaraz po niej: płaski dół, bez odstępu */
.landing-section:has(+ .landing-subsection) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

/* Podsekcja po sekcji lub po innej podsekcji: płaski góra, linia zamiast odstępu */
.landing-section + .landing-subsection,
.landing-subsection + .landing-subsection {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 1px solid #c8cdd5;
    margin-bottom: 0;
}

/* Podsekcja z kolejną podsekcją zaraz po niej: płaski dół */
.landing-subsection:has(+ .landing-subsection) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Ostatnia podsekcja w grupie: przywróć zaokrąglenie dołu i odstęp do następnej sekcji */
.landing-subsection:not(:has(+ .landing-subsection)) {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-bottom: 1px;
}
