/* =========================================
   Academia Logica - GŁÓWNY ARKUSZ STYLÓW
   ========================================= */

/* =========================================
   MODUŁ 1: ZMIENNE (KOLORY, TŁA) I RESET
   ========================================= */
:root {
    --bg: #050810;
    --surface: #0f172a;
    --surface-card: rgba(30, 41, 59, 0.4);
    --accent: #38bdf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --accent-glow: rgba(56, 189, 248, 0.4);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --chem: #a855f7;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 80px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.1) 0%, transparent 30%);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    padding-top: 70px;
}

.container {
    max-width: 1000px;
    margin: auto;
    padding: 0 20px;
}

/* Desktop zoom-out baseline (effect similar to browser 80%) */
@media (min-width: 1200px) {
    html {
        font-size: 85%;
    }

    .container,
    .nav-container,
    .about-container,
    .app-container {
        max-width: 920px;
    }

    h1 {
        font-size: clamp(2.6rem, 8vw, 4.2rem);
    }
}

/* =========================================
   MODUŁ 2: TYPOGRAFIA I NARZĘDZIA
   ========================================= */
h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 800;
    margin: 0;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #fff 60%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hidden { display: none !important; }

.fade-in { animation: fadeIn 0.1s ease forwards; }
.fade-out { animation: fadeOut 0.1s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-15px); }
}

/* =========================================
   MODUŁ 3: NAWIGACJA (STICKY NAVBAR)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    z-index: 2000;
    padding: 25px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    padding: 12px 0;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.2s;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}
.nav-logo:hover { transform: scale(1.05); }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:not(.btn-login) {
    position: relative;
    padding: 5px 0;
}

.nav-links a:not(.btn-login)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:not(.btn-login):hover {
    color: #fff;
}

.nav-links a:not(.btn-login):hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
    border-color: rgba(56, 189, 248, 0.22);
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: all 0.25s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 14px;
    right: 14px;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(5, 8, 16, 0.88) 100%);
    backdrop-filter: blur(18px);
    box-shadow:
        0 20px 50px rgba(2, 6, 23, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.mobile-nav-panel.active {
    display: flex;
    animation: mobileMenuIn 0.22s ease forwards;
}

@keyframes mobileMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-panel-link,
.mobile-nav-panel a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.mobile-nav-panel a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.mobile-panel-cta {
    justify-content: center;
    text-align: center;
}

.mobile-panel-cta-account {
    background: rgba(56, 189, 248, 0.10) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.10);
}

.mobile-panel-cta-account:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(129, 140, 248, 0.16) 100%) !important;
    color: #fff !important;
}

/* =========================================
   MODUŁ 4: LAYOUT BAZOWY (HERO, SEKCJE, STOPKA)
   ========================================= */
header {
    padding: 100px 0 60px;
    text-align: center;
}

.section {
    margin-bottom: 40px;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    width: 100%;
}

.copyright-bar {
    padding-top: 20px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.footer-links {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    column-gap: 18px;
    row-gap: 8px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
}
.footer-links a:hover { color: var(--accent); }

.footer-links .footer-link-secondary {
    grid-column: 1 / span 2;
    justify-self: start;
}

/* =========================================
   MODUŁ 5: KOMPONENTY UI (PRZYCISKI, BADGE)
   ========================================= */
.badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.05);
    color: var(--accent);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(56, 189, 248, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 10px 0 30px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(56,189,248,0.2);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-block;
    cursor: pointer;
}
.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-2px);
}

.btn-back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
}

.btn-card {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
}
.btn-card:hover:not(:disabled) {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}
.btn-card:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: not-allowed;
}

.read-more-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
    width: fit-content;
}
.read-more-btn:hover {
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

/* =========================================
   MODUŁ 6: KARTY, GRIDY, SEKCJE ROZWIJANE
   ========================================= */
.about-container {
    position: relative;
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}
.about-container.expanded {
    max-height: 2000px;
    -webkit-mask-image: none;
    mask-image: none;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-content: start;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.team-card {
    background: rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}
.team-card:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-5px);
}
.member-photo-circle {
    width: 120px;
    height: 120px;
    background-size: cover;
    background-position: center 20%;
    margin: 0 auto 15px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background-color: var(--surface);
}
.team-card h4 { margin: 0; font-size: 1.2rem; color: #fff; line-height: 1.2; }
.team-subject { display: block; font-size: 0.75rem; color: var(--accent); margin: 7px 0 30px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.team-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-top: 2px; }

/* Przedmioty */
.subjects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.subject-card { background: rgba(255,255,255,0.03); padding: 30px 10px; border-radius: 20px; text-align: center; border: 1px solid var(--border); cursor: pointer; transition: 0.3s; }
.subject-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.subject-card .icon { display: flex; justify-content: center; align-items: center; height: 40px; margin-bottom: 10px; font-size: 2rem; }
.img-icon { width: 40px; height: auto; border-radius: 3px; opacity: 0.9; }

/* Nauczyciel i Terminy */
.teacher-selector { margin-bottom: 40px; background: rgba(255,255,255,0.02); padding: 20px; border-radius: 16px; border: 1px solid var(--border); }
.selector-label { display: block; margin-bottom: 15px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.teacher-tabs { display: flex; gap: 15px; flex-wrap: wrap; }
.teacher-tab { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); padding: 6px 20px 6px 6px; border-radius: 50px; color: var(--text); cursor: pointer; transition: all 0.3s ease; font-family: inherit; font-weight: 600; }
.teacher-tab:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.05); transform: translateY(-2px); }
.teacher-tab.active { background: var(--accent-gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3); cursor: default; transform: none; }
.tab-img { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center 20%; border: 2px solid rgba(255,255,255,0.2); background-color: var(--bg); }
.teacher-tab.active .tab-img { border-color: rgba(255,255,255,0.6); }

/* Karty Grup */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 32px;
    align-items: stretch;
}

.group-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 24px;
    padding: 18px 18px 16px;
    position: relative;
    transition: 0.25s;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.28);
}

.group-card:hover {
    border-color: rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.38);
}

.group-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.group-level {
    display: inline-flex;
    align-items: center;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 11px;
    font-size: 0.78rem;
    font-weight: 700;
}

.group-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 800;
}

.group-card-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    line-height: 1.05;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spots-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 12px 0 14px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.spot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid rgba(148,163,184,0.25);
}

.spot.filled {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

.spot.full {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.group-info-list {
    margin-top: 2px;
}

.group-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 0.92rem;
    border-bottom: 1px dashed rgba(255,255,255,0.12);
    padding: 11px 0;
    margin: 0;
}

.group-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.group-info-row strong {
    color: #fff;
    font-size: 0.92rem;
    text-align: right;
}

.group-duration {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.88rem;
}

.group-price {
    color: var(--accent) !important;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.group-card .btn-card,
.btn-group-join {
    width: 100%;
    margin-top: 18px;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Kalendarz */
.calendar-container { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px 20px; overflow-x: auto; margin-bottom: 20px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 10px; text-align: center; }
.cal-day-header { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
.time-slot { background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: var(--accent); border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; height: 56px; padding: 4px 6px; font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; margin-bottom: 4px; }
.time-slot:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.time-slot.group { background: rgba(167, 139, 250, 0.1); border: 1px solid rgba(167, 139, 250, 0.3); color: #a78bfa; }
.time-slot.group:hover { background: #a78bfa; color: #fff; }
.time-slot.empty { background: transparent; border: 1px dashed var(--border); color: var(--text-muted); cursor: not-allowed; opacity: 0.4; }
.time-slot-helper-label { font-size: 0.7rem; line-height: 1.05; }

/* Tooltip dla kalendarza */
.group-info-row strong.tooltip-trigger {
    position: relative;
    cursor: help;
    color: var(--accent);
    border-bottom: none;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}

.group-info-row strong.tooltip-trigger:hover {
    transform: scale(1.05);
    color: var(--accent);
}
.tooltip-box { visibility: hidden; width: 200px; background-color: var(--surface); color: #fff; text-align: center; border-radius: 8px; padding: 10px; border: 1px solid var(--accent); position: absolute; z-index: 100; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; font-size: 0.8rem; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.tooltip-trigger:hover .tooltip-box { visibility: visible; opacity: 1; }

/* Karty Kursów */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
    align-items: stretch;
}

.course-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.course-card--package {
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 24px;
    background: linear-gradient(180deg, #1d2943 0%, #0f1a31 100%);
    padding: 16px;
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.36);
}

.course-card--package:hover {
    border-color: rgba(56, 189, 248, 0.24);
    background: linear-gradient(180deg, #22304d 0%, #111d36 100%);
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(2, 6, 23, 0.42);
}

.course-card__top,
.course-card__bottom {
    display: flex;
    flex-direction: column;
}

.course-card__subject {
    text-align: center;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.course-card__title {
    margin: 10px 0 0;
    font-size: 1.56rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.course-card--package .course-card__title {
    font-size: 1.42rem;
}

.course-card__duration {
    margin: 4px 0 0;
    font-size: 0.92rem;
    color: #cbd5e1;
}

.course-card__meta {
    margin-top: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    padding: 14px;
    text-align: left;
}

.course-card__meta-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.course-card__meta-row + .course-card__meta-row {
    margin-top: 14px;
}

.course-card__meta-icon {
    font-size: 1rem;
    line-height: 1;
}

.course-card__meta-copy {
    line-height: 1.2;
}

.course-card__meta-label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.course-card__meta-value {
    font-size: 0.92rem;
    color: #fff;
}

.course-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 15px 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.course-price--package {
    margin: 20px 0 0;
    font-size: 1.85rem;
    line-height: 1.05;
    font-weight: 900;
}

.course-card__installments {
    min-height: 18px;
    margin: 8px 0 14px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.course-card__details-button {
    width: 100%;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 10px 14px;
    cursor: default;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.course-card__details-button:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(56, 189, 248, 0.3);
    color: #fff;
}

/* Metody */
.methods-container { position: relative; max-height: 105px; overflow: hidden; padding: 0 10px; transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s; -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%); mask-image: linear-gradient(to bottom, black 50%, transparent 100%); }
.methods-container.expanded { max-height: 2500px; padding: 20px 10px; -webkit-mask-image: none; mask-image: none; margin-top: 20px; }
.methods-container:not(.expanded) .full-text-only { opacity: 0; transition: opacity 0.3s; }
.methods-container.expanded .full-text-only { opacity: 1; }
.methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.method-card { background: rgba(255, 255, 255, 0.02); padding: 20px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s ease; }
.method-card:hover { background: rgba(56, 189, 248, 0.04); border-color: rgba(56, 189, 248, 0.2); transform: translateY(-3px); }
.method-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.method-icon { font-size: 1.5rem; }
.method-card h3 { margin: 0; font-size: 1.05rem; color: #fff; font-weight: 600; }
.method-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.safety-buffer { margin-top: 30px; padding: 20px; background: rgba(56, 189, 248, 0.05); border-radius: 12px; border: 1px dashed rgba(56, 189, 248, 0.3); text-align: center; font-size: 0.9rem; }

/* Karty Kontaktowe */
.contact-method { background: rgba(255, 255, 255, 0.03); padding: 25px 20px; border-radius: 20px; display: flex; align-items: center; gap: 15px; text-decoration: none; border: 1px solid var(--border); transition: all 0.3s ease; height: 100%; }
.contact-method:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.05); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.contact-icon { font-size: 1.8rem; flex-shrink: 0; }
.contact-method .label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.contact-method strong { font-size: 1.15rem; color: #fff; display: block; word-break: break-word; }

/* =========================================
   MODUŁ 7A: MAŁY MODAL COOKIES (PRAWY DÓŁ)
   ========================================= */
.cookie-consent-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(92vw, 380px);
    z-index: 3200;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.cookie-consent-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-banner.is-hiding {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.cookie-consent-card {
    display: flex;
    gap: 12px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    padding: 16px;
}

.cookie-consent-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.cookie-consent-icon svg {
    width: 18px;
    height: 18px;
}

.cookie-consent-content h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.2;
}

.cookie-consent-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.cookie-consent-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.cookie-consent-links a {
    color: rgba(103, 232, 249, 0.95);
    font-size: 0.72rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(103, 232, 249, 0.35);
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.cookie-consent-actions button {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-consent-accept {
    flex: 1;
    background: #22d3ee;
    color: #0b1220;
}

.cookie-consent-accept:hover {
    filter: brightness(1.08);
}

.cookie-consent-settings {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.26) !important;
    color: #cbd5e1;
}

.cookie-consent-settings:hover {
    border-color: rgba(56, 189, 248, 0.42) !important;
    color: #e2e8f0;
}

/* =========================================
   MODUŁ 7B: USTAWIENIA COOKIES (MODAL)
   ========================================= */
.cookie-settings-overlay {
    z-index: 3300;
    background: rgba(5, 8, 16, 0.72);
    backdrop-filter: blur(8px);
}

.cookie-settings-modal {
    width: min(76vw, 432px) !important;
    max-width: 432px !important;
    border-radius: 28px;
    padding: 22px 22px 18px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.15), transparent 45%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(6, 12, 26, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.cookie-settings-modal .cookie-settings-close {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.92);
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-settings-modal .cookie-settings-close:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.cookie-settings-header h2 {
    margin: 0;
    border: 0;
    padding: 0;
    font-size: 1.5rem;
    color: #fff;
}

.cookie-settings-header p {
    margin: 5px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cookie-settings-tabs {
    margin-top: 14px;
    display: flex;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cookie-settings-tab {
    appearance: none;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #94a3b8;
    padding: 9px 14px;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 800;
    cursor: pointer;
}

.cookie-settings-tab.is-active {
    color: #fff;
    border-bottom-color: #22d3ee;
}

.cookie-settings-body {
    margin-top: 12px;
    max-height: 42vh;
    overflow: auto;
    padding-right: 6px;
}

.cookie-settings-body::-webkit-scrollbar {
    width: 5px;
}

.cookie-settings-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35);
    border-radius: 999px;
}

.cookie-settings-panel {
    display: none;
}

.cookie-settings-panel.is-active {
    display: block;
}

.cookie-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    margin-bottom: 8px;
}

.cookie-setting-copy h4 {
    margin: 0;
    color: #fff;
    font-size: 0.8rem;
}

.cookie-setting-copy p {
    margin: 5px 0 0;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.45;
}

.cookie-switch {
    width: 38px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.cookie-switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.cookie-switch span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.9);
    transition: all 0.2s ease;
}

.cookie-switch span::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #64748b;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.cookie-switch input:checked + span {
    border-color: rgba(34, 211, 238, 0.5);
}

.cookie-switch input:checked + span::after {
    transform: translateX(18px);
    background: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
}

.cookie-switch-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.cookie-switch-disabled span {
    border-color: rgba(34, 211, 238, 0.48);
}

.cookie-switch-disabled span::after {
    transform: translateX(18px);
    background: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
}

.cookie-settings-panel p {
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 0.76rem;
    line-height: 1.7;
}

.cookie-settings-panel a {
    color: #67e8f9;
}

.cookie-settings-info-note {
    margin-top: 10px !important;
    color: #67e8f9 !important;
    font-size: 0.7rem !important;
}

.cookie-settings-actions {
    margin-top: 14px;
}

.cookie-settings-btn-primary,
.cookie-settings-btn-secondary {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
}

.cookie-settings-btn-primary {
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.08);
    color: #fff;
    padding: 11px 12px;
    font-size: 0.62rem;
}

.cookie-settings-actions-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cookie-settings-btn-secondary {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
    padding: 10px 10px;
    font-size: 0.6rem;
}

.cookie-settings-btn-primary:hover,
.cookie-settings-btn-secondary:hover {
    filter: brightness(1.08);
}

/* =========================================
   MODUŁ 7: MODALE (WYSKAKUJĄCE OKNA)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--surface);
    width: 95%;
    max-width: 900px;
    border-radius: 30px;
    border: 1px solid var(--border);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}
.close-modal:hover { color: #fff; }

/* Modal Nauczyciela */
.teacher-modal-content {
    max-width: 820px;
    padding: 30px;
    border-radius: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(255, 255, 255, 0.05);
}

.teacher-modal-content::-webkit-scrollbar {
    width: 9px;
}

.teacher-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.teacher-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.7), rgba(129, 140, 248, 0.65));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.8);
}

.teacher-detail-wrapper { display: grid; grid-template-columns: 0.9fr 1.5fr; gap: 30px; margin-bottom: 14px; }
.teacher-image-big img { width: 100%; max-width: 290px; border-radius: 18px; border: 1px solid rgba(56, 189, 248, 0.3); -webkit-mask-image: radial-gradient(circle, black 80%, transparent 100%); mask-image: radial-gradient(circle, black 80%, transparent 100%); }
.teacher-name-big { font-size: 2.2rem; margin: 0 0 5px; color: #fff; }
.teacher-subject-tag { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 20px; }
.teacher-bio { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.teacher-bio strong { color: #fff; }
.teacher-contact-mini { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; background: rgba(255,255,255,0.03); padding: 20px; border-radius: 15px; border: 1px solid var(--border); }
.contact-item { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.reviews-container { border-top: 1px solid var(--border); padding-top: 30px; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 15px; flex-wrap: wrap; }
.ekorki-link { color: var(--accent); text-decoration: none; font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid transparent; transition: 0.2s; }
.ekorki-link:hover { border-color: var(--accent); }
.review-card { background: rgba(255,255,255,0.02); padding: 20px; border-radius: 15px; margin-bottom: 15px; border: 1px solid var(--border); }
.review-user { font-weight: 700; color: #fff; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.review-user span { color: #fbbf24; font-size: 0.9rem; }
.review-card p { margin: 0; color: var(--text-muted); font-style: italic; font-size: 0.95rem; }

/* Modal kontaktowy po kliknięciu slotu/grupy */
.teacher-contact-request-modal {
    max-width: 560px;
    padding: 30px 28px 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 52%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(5, 10, 24, 0.98) 100%);
}

.teacher-contact-request-modal h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.2;
}

.teacher-contact-request-modal p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

.teacher-contact-request-box {
    margin-top: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
}

.teacher-contact-request-name {
    margin: 0 0 10px;
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 800;
}

.teacher-contact-request-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 0.9rem;
    margin-top: 8px;
    word-break: break-word;
}

.teacher-contact-request-row span {
    color: var(--accent);
}

.teacher-contact-request-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* Modal regulaminu */
.platform-terms-modal-content {
    max-width: 920px;
    max-height: min(88vh, 840px);
    padding: 30px 28px 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.10), transparent 45%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(5, 10, 24, 0.98) 100%);
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(255, 255, 255, 0.05);
}

.platform-terms-modal-content::-webkit-scrollbar {
    width: 9px;
}

.platform-terms-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.platform-terms-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.72), rgba(129, 140, 248, 0.65));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.8);
}

.platform-terms-modal-header {
    margin-bottom: 14px;
    padding-right: 36px;
}

.platform-terms-modal-header h2 {
    margin: 6px 0 8px;
}

.platform-terms-modal-body {
    max-height: calc(min(88vh, 840px) - 170px);
    overflow-y: auto;
    padding-right: 8px;
}

.platform-terms-modal-body a,
.terms-content a {
    color: var(--accent);
    text-decoration-color: rgba(56, 189, 248, 0.6);
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.platform-terms-modal-body a:hover,
.terms-content a:hover {
    color: #7dd3fc;
    text-decoration-color: #7dd3fc;
}

.terms-checkbox-example {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.08);
    padding: 6px 10px;
}

.terms-checkbox-example-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.55);
    background: rgba(15, 23, 42, 0.95);
    position: relative;
}

.terms-checkbox-example-box::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.terms-checkbox-example-label {
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 600;
}

/* Mały modal wyboru przedmiotu teachera */
.subject-choice-modal-overlay {
    z-index: 3100;
}

.subject-choice-modal {
    max-width: 460px;
    padding: 30px 28px 24px;
    border-radius: 24px;
}

.subject-choice-header {
    margin-bottom: 20px;
}

.subject-choice-eyebrow {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.subject-choice-header h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1.2;
}

.subject-choice-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.subject-choice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subject-choice-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.subject-choice-button:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
}

.subject-choice-button span:last-child {
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.subject-choice-cancel {
    width: 100%;
    margin-top: 16px;
}

/* Modal Kursu */
.course-info-block { margin-bottom: 25px; }
.course-info-block h3 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.course-info-block p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin: 0; }
.course-info-block strong { color: #fff; }
.highlight-block { background: rgba(56, 189, 248, 0.05); border: 1px solid rgba(56, 189, 248, 0.2); padding: 20px; border-radius: 16px; margin-top: 30px; }
.highlight-block h3 { color: var(--accent); }
.highlight-block p { color: #e2e8f0; }

/* =========================================
   MODUŁ 8: APLIKACJA MOBILNA (MOCKUP)
   ========================================= */
.app-container {
    position: relative;
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
.app-container.expanded {
    max-height: 2000px;
    -webkit-mask-image: none;
    mask-image: none;
}

.app-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 769px) {
    .app-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}

.app-text-side p { font-size: 1rem; color: var(--text-muted); }
.app-features-list { list-style: none; padding: 0; margin: 20px 0; }
.app-features-list li { margin-bottom: 15px; position: relative; padding-left: 25px; color: var(--text-muted); font-size: 0.95rem; }
.app-features-list li::before { content: '🚀'; position: absolute; left: 0; top: 0; font-size: 1rem; }
.app-features-list strong { color: #fff; }

.app-visual-side { display: flex; justify-content: center; perspective: 1000px; }

/* Smart Learning: sekcja premium kursu */
#aplikacja.smart-section {
    background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.05) 0%, rgba(2, 6, 23, 0.7) 60%);
}

#aplikacja .smart-header {
    max-width: 860px;
    margin: 0 0 26px;
    text-align: left;
}

#aplikacja .smart-badge {
    display: inline-block;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.24);
    color: #22d3ee;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 10px 0 0;
}

#aplikacja .smart-title {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.18;
    letter-spacing: -0.5px;
    margin: 0;
    color: #fff;
}

#aplikacja .smart-subtitle {
    display: block;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-top: 4px;
    font-weight: 700;
}

#aplikacja .smart-desc {
    margin: 14px 0 0;
    max-width: 760px;
    color: #94a3b8;
    line-height: 1.68;
    font-size: 1rem;
}

#aplikacja .smart-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#aplikacja .smart-features .feature-item:last-child {
    grid-column: auto;
}

#aplikacja .feature-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.62);
    border-radius: 18px;
    padding: 18px;
}

#aplikacja .feature-item h3 {
    color: #fff;
    font-size: 1rem;
    margin: 8px 0 8px;
}

#aplikacja .feature-item p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

#aplikacja .app-showcase { margin-top: 28px; }

#aplikacja .app-window {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    background: #060b14;
    box-shadow: 0 30px 75px -18px rgba(0, 0, 0, 0.92);
}

#aplikacja .app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#aplikacja .mac-dots { display: flex; gap: 6px; }
#aplikacja .mac-dot { width: 10px; height: 10px; border-radius: 50%; }
#aplikacja .dot-red { background: #ef4444; }
#aplikacja .dot-yellow { background: #facc15; }
#aplikacja .dot-green { background: #22c55e; }
#aplikacja .topbar-center-label { font-size: 0.67rem; font-weight: 800; color: #94a3b8; letter-spacing: 1px; }
#aplikacja .topbar-user-label { color: #94a3b8; font-size: 0.72rem; }
#aplikacja .privacy-blur { filter: blur(3px); opacity: 0.82; }
#aplikacja .privacy-blur:hover { filter: blur(0); opacity: 1; }
#aplikacja .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22d3ee, #0284c7);
    color: #020617;
    font-weight: 800;
}

#aplikacja .app-content {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#aplikacja .widget {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #0f172a;
    padding: 14px;
}

#aplikacja .widget-header {
    font-size: 0.66rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#aplikacja .widget-copy { color: #94a3b8; font-size: 0.82rem; line-height: 1.5; }
#aplikacja .ai-score-large { color: #22d3ee; font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 10px; }
#aplikacja .module-title { color: #fff; font-weight: 800; font-size: 1.2rem; }
#aplikacja .module-subtitle { color: #94a3b8; font-size: 0.76rem; margin-bottom: 12px; }

#aplikacja .stage-list { display: grid; gap: 8px; }
#aplikacja .stage-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#aplikacja .stage-item.active { border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.08); }
#aplikacja .stage-item.completed { border-color: rgba(74, 222, 128, 0.45); }
#aplikacja .stage-icon { font-size: 0.72rem; font-weight: 700; }
#aplikacja .stage-name { color: #e2e8f0; font-size: 0.82rem; flex: 1; }

#aplikacja .btn-message,
#aplikacja .btn-learn {
    border-radius: 8px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 7px 10px;
}

#aplikacja .col-span-2 { grid-column: span 2; }
#aplikacja .chart-widget { grid-column: span 3; }
#aplikacja .premium-chart-container {
    height: 130px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

#aplikacja .scanner-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
    animation: smartScan 6s ease-in-out infinite alternate;
}

@keyframes smartScan {
    0% { left: 5%; opacity: 0.2; }
    100% { left: 95%; opacity: 0.9; }
}

@media (max-width: 900px) {
    #aplikacja .smart-features {
        grid-template-columns: 1fr;
    }
    #aplikacja .feature-item {
        padding: 14px;
    }
    #aplikacja .feature-item h3 {
        font-size: 0.9rem;
        margin: 6px 0;
    }
    #aplikacja .feature-item p {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    #aplikacja .app-content {
        grid-template-columns: 1fr;
    }
    #aplikacja .col-span-2,
    #aplikacja .chart-widget {
        grid-column: span 1;
    }
    #aplikacja .topbar-center-label { display: none; }
}

/* Smart Learning 1:1 visual tuning */
#aplikacja.smart-section {
    --al-bg: #020617;
    --al-surface: #0f172a;
    --al-surface-light: #1e293b;
    --al-accent: #22d3ee;
    --al-accent-glow: rgba(34, 211, 238, 0.4);
    --al-text: #f8fafc;
    --al-text-muted: #94a3b8;
    --al-border: rgba(255, 255, 255, 0.08);
    --al-success: #4ade80;
    --al-warning: #facc15;
    --al-danger: #f87171;
    background: var(--glass);
}

/* Domyslnie sekcja ma byc zajawka z delikatnym rozmyciem dolu */
#aplikacja .app-container {
    max-height: 248px;
    opacity: 1;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 98%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 98%);
}

#aplikacja .app-container.expanded {
    max-height: 5200px;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
}

#aplikacja .demo-dashboard-container {
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#aplikacja .smart-features { gap: 25px; margin-top: 10px; }
#aplikacja .feature-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--al-border);
    padding: 30px 25px;
    border-radius: 24px;
    transition: 0.3s;
}
#aplikacja .feature-item:hover {
    border-color: rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.02);
    transform: translateY(-3px);
}

#aplikacja .app-showcase { margin: 80px auto 0; position: relative; max-width: 1050px; }
#aplikacja .demo-dashboard-showcase { max-width: none; }
#aplikacja .demo-dashboard-showcase { margin: 14px 0 0; }
#aplikacja .demo-dashboard-mobile-host { display: none; }
#aplikacja .app-window {
    background: #060b14;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 80px -10px rgba(0, 0, 0, 0.9), 0 0 50px rgba(34, 211, 238, 0.03);
}

#aplikacja .demo-dashboard-host {
    padding: 10px;
    background:
        linear-gradient(160deg, rgba(34, 211, 238, 0.12), rgba(15, 23, 42, 0.75) 45%, rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 22px;
    box-shadow:
        0 22px 50px -28px rgba(2, 6, 23, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 35px -22px rgba(34, 211, 238, 0.5);
}

#aplikacja .demo-dashboard-iframe-wrap {
    position: relative;
    width: 100%;
    min-height: 1200px;
    background: #020617;
    border-radius: 14px;
    overflow: hidden;
}

#aplikacja .demo-dashboard-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    transform: none;
    pointer-events: auto;
    border-radius: 0;
}

#aplikacja .demo-dashboard-mobile-wrap {
    position: relative;
    width: 100%;
    height: min(82dvh, 760px);
    min-height: 560px;
    background: #020617;
    border-radius: 14px;
    overflow: hidden;
}

#aplikacja .demo-dashboard-mobile-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    transform: none;
    pointer-events: auto;
    border-radius: 0;
}
#aplikacja .app-topbar {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-bottom: 1px solid var(--al-border);
}
#aplikacja .user-profile { display: flex; align-items: center; gap: 10px; }
#aplikacja .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--al-accent), #0284c7);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.65rem;
    color: var(--al-bg);
    box-shadow: 0 0 10px var(--al-accent-glow);
}
#aplikacja .privacy-blur { filter: blur(5px); user-select: none; opacity: 0.8; transition: filter 0.3s ease; cursor: default; }
#aplikacja .privacy-blur:hover { filter: blur(0px); opacity: 1; }

#aplikacja .app-content {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: radial-gradient(circle at 100% 100%, rgba(34, 211, 238, 0.02) 0%, transparent 60%);
}
#aplikacja .widget {
    background: var(--al-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
#aplikacja .widget:hover {
    border-color: rgba(34, 211, 238, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3), inset 0 0 15px rgba(34, 211, 238, 0.02);
}
#aplikacja .widget-header {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--al-text-muted);
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#aplikacja .stat-value { font-size: 2.2rem; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -1px; }
#aplikacja .rating-badge { background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.3); padding: 8px 12px; border-radius: 10px; display: flex; align-items: center; gap: 8px; margin-top: auto; }
#aplikacja .ai-score-large { font-size: 2.5rem; font-weight: 800; color: var(--al-accent); text-shadow: 0 0 20px rgba(34,211,238,0.4); line-height: 1; margin-bottom: 5px; }
#aplikacja .countdown-box { display: flex; gap: 6px; margin-top: auto; }
#aplikacja .cd-item { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 6px 8px; text-align: center; flex: 1; }
#aplikacja .cd-num { font-family: 'Courier New', Courier, monospace; font-weight: 800; font-size: 1.1rem; color: #fff; line-height: 1; }
#aplikacja .cd-label { font-size: 0.55rem; color: var(--al-text-muted); text-transform: uppercase; margin-top: 2px; }

#aplikacja .weak-point { margin-bottom: 10px; }
#aplikacja .wp-header { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; margin-bottom: 4px; }
#aplikacja .wp-bar-bg { width: 100%; height: 5px; background: rgba(0,0,0,0.5); border-radius: 3px; overflow: hidden; }
#aplikacja .wp-bar-fill { height: 100%; border-radius: 3px; position: relative; }
#aplikacja .wp-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); }

#aplikacja .teacher-card { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
#aplikacja .teacher-avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 10px; display: flex; justify-content: center; align-items: center; font-weight: 800; border: 1px solid var(--al-border); font-size: 0.8rem; color: #fff;}
#aplikacja .btn-message { width: 100%; padding: 10px; background: transparent; color: var(--al-accent); border: 1px solid rgba(34, 211, 238, 0.3); border-radius: 10px; font-weight: 700; font-size: 0.75rem; cursor: pointer; transition: all 0.3s; margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 8px;}
#aplikacja .btn-message:hover { background: rgba(34, 211, 238, 0.1); border-color: var(--al-accent); }

#aplikacja .module-title { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 2px; letter-spacing: -0.5px; }
#aplikacja .module-subtitle { font-size: 0.75rem; color: var(--al-text-muted); margin-bottom: 15px; font-weight: 600;}
#aplikacja .stage-list { display: flex; flex-direction: column; gap: 8px; }
#aplikacja .stage-item { background: rgba(255,255,255,0.02); padding: 12px 16px; border-radius: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,0.03); transition: 0.3s; }
#aplikacja .stage-item.completed { border-color: rgba(74, 222, 128, 0.2); }
#aplikacja .stage-item.active { background: linear-gradient(90deg, rgba(34, 211, 238, 0.05) 0%, transparent 100%); border-color: rgba(34, 211, 238, 0.4); border-left: 3px solid var(--al-accent); }
#aplikacja .stage-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
#aplikacja .completed .stage-icon { background: rgba(74, 222, 128, 0.15); color: var(--al-success); }
#aplikacja .active .stage-icon { background: var(--al-accent); color: var(--al-bg); box-shadow: 0 0 10px rgba(34, 211, 238, 0.5); }
#aplikacja .locked .stage-icon { background: rgba(255,255,255,0.05); color: var(--al-text-muted); }
#aplikacja .stage-name { flex: 1; font-size: 0.85rem; font-weight: 700; color: #fff; }
#aplikacja .locked .stage-name { color: var(--al-text-muted); font-weight: 500;}
#aplikacja .progress-bar-container { flex: 1; max-width: 80px; height: 4px; background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden; margin: 0 10px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);}
#aplikacja .progress-fill { height: 100%; background: linear-gradient(90deg, #0284c7, var(--al-accent)); border-radius: 10px; }
#aplikacja .btn-learn { background: var(--al-accent); color: var(--al-bg); border: none; padding: 8px 16px; border-radius: 8px; font-weight: 800; font-size: 0.75rem; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(34, 211, 238, 0.2); }
#aplikacja .btn-learn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(34, 211, 238, 0.4); filter: brightness(1.1);}

#aplikacja .chart-widget { grid-column: span 3; }
#aplikacja .col-span-2 { grid-column: span 2; }
#aplikacja .premium-chart-container {
    position: relative;
    height: 180px;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    border-radius: 12px;
    border: 1px inset rgba(255,255,255,0.03);
    overflow: hidden;
    margin-top: 10px;
}
#aplikacja .scanner-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--al-accent);
    box-shadow: 0 0 15px 2px var(--al-accent);
    animation: scan 6s ease-in-out infinite alternate;
    z-index: 5;
}
@keyframes scan {
    0% { left: 5%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 95%; opacity: 0; }
}

@media (max-width: 900px) {
    #aplikacja .app-content { grid-template-columns: 1fr 1fr; }
    #aplikacja .chart-widget { grid-column: span 2; }
    #aplikacja .col-span-2 { grid-column: span 1; }
    #aplikacja .app-container { max-height: 272px; }
    #aplikacja .demo-dashboard-iframe-wrap { min-height: 1000px; }
    #aplikacja .demo-dashboard-host { padding: 8px; border-radius: 18px; }
    #aplikacja .smart-title { font-size: clamp(1.55rem, 5.8vw, 2rem); }
    #aplikacja .smart-subtitle { font-size: clamp(0.95rem, 4.2vw, 1.2rem); }
}
@media (max-width: 600px) {
    #aplikacja .app-content { grid-template-columns: 1fr; padding: 16px; }
    #aplikacja .chart-widget { grid-column: span 1; }
    #aplikacja .demo-dashboard-iframe-wrap { min-height: 900px; }
    #aplikacja .demo-dashboard-host { padding: 6px; border-radius: 14px; }
}

@media (max-width: 768px) {
    #aplikacja .demo-dashboard-desktop-host { display: none; }
    #aplikacja .demo-dashboard-mobile-host { display: block; }
    #aplikacja .demo-dashboard-mobile-wrap {
        height: min(78dvh, 700px);
        min-height: 540px;
    }
}

/* Desktop preview dla sekcji Smart Learning */
.desktop-preview-card {
    width: min(560px, 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.95));
    box-shadow: 0 30px 70px -22px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.desktop-preview-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

.desktop-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.55);
}

.desktop-dot:nth-child(1) { background: #fb7185; }
.desktop-dot:nth-child(2) { background: #facc15; }
.desktop-dot:nth-child(3) { background: #22c55e; }

.desktop-preview-title {
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.78rem;
    letter-spacing: 0.4px;
}

.desktop-preview-body {
    display: grid;
    grid-template-columns: 120px 1fr;
    min-height: 360px;
}

.desktop-preview-sidebar {
    padding: 14px 10px;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.desktop-preview-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    margin-bottom: 8px;
}

.desktop-preview-menu-item {
    font-size: 0.74rem;
    color: rgba(226, 232, 240, 0.75);
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.desktop-preview-menu-item.active {
    color: #f8fafc;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.12);
}

.desktop-preview-main {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.desktop-preview-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.8);
}

.desktop-course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.desktop-course-tile {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 14px;
    padding: 10px;
}

.desktop-course-tile h4 {
    margin: 0 0 3px;
    color: #fff;
    font-size: 0.8rem;
}

.desktop-course-tile p {
    margin: 0 0 8px;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.68rem;
}

.desktop-course-tile span {
    display: inline-block;
    margin-top: 7px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.66rem;
}

.desktop-progress-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
    overflow: hidden;
}

.desktop-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.desktop-progress-fill.w-42 { width: 42%; }
.desktop-progress-fill.w-54 { width: 54%; }
.desktop-progress-fill.w-67 { width: 67%; }

.desktop-preview-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.desktop-preview-panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.52);
    border-radius: 14px;
    padding: 9px;
}

.desktop-preview-panel h5 {
    margin: 0 0 7px;
    color: #f8fafc;
    font-size: 0.72rem;
}

.desktop-preview-panel p {
    margin: 0;
    color: rgba(203, 213, 225, 0.82);
    font-size: 0.66rem;
    line-height: 1.45;
}

.desktop-bars {
    height: 66px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.desktop-bars span {
    flex: 1;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.9));
}

@media (max-width: 900px) {
    .desktop-preview-body {
        grid-template-columns: 1fr;
    }

    .desktop-preview-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.2);
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .desktop-preview-logo {
        margin-bottom: 0;
        margin-right: 2px;
    }
}

@media (max-width: 620px) {
    .desktop-course-grid,
    .desktop-preview-panels {
        grid-template-columns: 1fr;
    }
}

/* Telefon */
.phone-frame {
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 54px;
    border: 12px solid #1e293b;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(56, 189, 248, 0.1);
    overflow: hidden;
}
.phone-notch { display: none; }

.phone-screen {
    position: relative;
    height: 100%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

/* Ekrany i wymiana */
.app-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 55px 20px 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}
.app-screen.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.app-screen.exit { transform: translateX(-40px); opacity: 0; pointer-events: none; }

.brand-header { font-size: 0.8rem; font-weight: 800; color: var(--accent); text-align: center; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; }
.svg-icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.animating-click { animation: tileClick 0.4s ease-out forwards !important; animation-delay: 0s !important; opacity: 1 !important; }
@keyframes tileClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background: rgba(56, 189, 248, 0.2) !important; border-color: var(--accent) !important; }
    100% { transform: scale(1); }
}

/* Pulpit aplikacji */
.profile-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 20px; padding: 14px; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; backdrop-filter: blur(10px); }
.avatar { width: 44px; height: 44px; background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: #fff; box-shadow: 0 8px 15px var(--accent-glow); flex-shrink: 0; }
.user-info { flex: 1; }
.user-info .label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.user-info .name { font-size: 1.05rem; font-weight: 800; margin: 2px 0 6px; line-height: 1.1; color: #fff; }
.groups-label { font-size: 0.55rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.groups-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.app-badge { font-size: 0.6rem; padding: 3px 8px; border-radius: 6px; font-weight: 700; letter-spacing: 0.5px; margin: 0; text-transform: none; border: 1px solid transparent; background: transparent; }
.app-badge.math { background: rgba(56, 189, 248, 0.15); color: var(--accent); border-color: rgba(56, 189, 248, 0.3); }
.app-badge.chem { background: rgba(168, 85, 247, 0.15); color: var(--chem); border-color: rgba(168, 85, 247, 0.3); }
.section-title { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; padding-left: 5px; }

.app-course-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: row; align-items: center; gap: 15px; margin-bottom: 10px; position: relative; overflow: hidden; transition: all 0.3s; text-align: left; }
.app-course-card.active-demo { border-color: rgba(56, 189, 248, 0.3); background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, transparent 100%); }
.course-icon { width: 38px; height: 38px; background: rgba(255,255,255,0.05); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-course-card.active-demo .course-icon { background: rgba(56, 189, 248, 0.15); color: var(--accent); }
.course-info { flex: 1; }
.course-title { font-size: 0.9rem; font-weight: 800; color: #fff; margin-bottom: 2px; }
.course-level { font-size: 0.6rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.mini-progress-track { width: 100%; height: 4px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; }
.mini-progress-fill { height: 100%; border-radius: 4px; }
.mini-progress-fill.math-fill { background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%); width: 34%; }
.mini-progress-fill.chem-fill { background: linear-gradient(90deg, var(--chem) 0%, #d8b4fe 100%); width: 12%; }
.course-percent { font-size: 0.85rem; font-weight: 800; color: #fff; }

.tiles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.tile { background: var(--surface-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 10px; font-size: 0.7rem; font-weight: 700; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Ekran zadania i nawigacja górna */
.top-nav { display: flex; align-items: center; margin-bottom: 20px; gap: 15px; }
.back-btn { width: 36px; height: 36px; background: var(--surface-card); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.header-titles { display: flex; flex-direction: column; }
.screen-title { font-size: 1.1rem; font-weight: 800; line-height: 1.1; color: #fff; }
.screen-subtitle { font-size: 0.65rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-top: 2px; }

.modules-list { flex: 1; overflow-y: scroll; padding-bottom: 70px; -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%); mask-image: linear-gradient(to bottom, black 80%, transparent 100%); }
.modules-list::-webkit-scrollbar { width: 0; }
.module-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 12px; opacity: 0; transform: translateY(15px); animation: cardEnter 0.4s ease forwards; }
@keyframes cardEnter { to { opacity: 1; transform: translateY(0); } }
.module-header { display: flex; gap: 12px; margin-bottom: 15px; }
.module-icon-box { width: 36px; height: 36px; background: rgba(56, 189, 248, 0.1); color: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.module-title { font-size: 0.85rem; font-weight: 700; line-height: 1.3; color: #fff; }
.mastery-label { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; font-weight: 600; }
.mastery-percent { color: var(--accent); font-weight: 800; font-size: 0.75rem; }
.progress-track { width: 100%; height: 6px; background: rgba(0,0,0,0.4); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%); border-radius: 10px; width: 0%; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 10px rgba(56, 189, 248, 0.3); }

/* Animacje matematyczne */
.app-animation-box { margin-bottom: 20px; flex-shrink: 0; background: rgba(0,0,0,0.3); border-radius: 20px; border: 1px solid rgba(56, 189, 248, 0.2); display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.05); overflow: hidden; height: 180px; }
.math-animation-container { position: relative; width: 100%; height: 120px; }
.dynamic-math { display: flex; align-items: center; font-size: 2.5rem; color: #fff; font-weight: 300; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: expressionFade 10s infinite ease-in-out; }
.bracket { font-size: 3.5rem; font-weight: 100; line-height: 1; margin: 0 2px; animation: elementsFade 10s infinite ease-in-out; }
.fraction-box { display: flex; flex-direction: column; align-items: center; margin: 0 2px; position: relative; }
.fraction-bar { width: 100%; height: 2px; background: #fff; margin: 4px 0; animation: elementsFade 10s infinite ease-in-out; }
.num { line-height: 1; animation: numMove 10s infinite ease-in-out; }
.den { line-height: 1; animation: denMove 10s infinite ease-in-out; }
.exponent-box { position: relative; top: -25px; left: 2px; font-size: 1.5rem; color: var(--accent); display: flex; text-shadow: 0 0 10px rgba(56,189,248,0.8); animation: expMove 10s infinite ease-in-out; }
.minus { animation: minusFlash 10s infinite ease-in-out; }
.final-result { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 4.5rem; font-weight: 600; color: var(--accent); text-shadow: 0 0 20px rgba(56,189,248,0.8); opacity: 0; animation: resultFade 10s infinite ease-in-out; }
.animation-hint { position: absolute; bottom: 15px; font-size: 0.55rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

@keyframes minusFlash { 0%, 15% { color: var(--accent); text-shadow: 0 0 10px rgba(56,189,248,0.8); opacity: 1; transform: scale(1); } 20%, 30% { color: #ef4444; text-shadow: 0 0 15px #ef4444; opacity: 1; transform: scale(1.3); } 35%, 100% { opacity: 0; transform: scale(1); } }
@keyframes numMove { 0%, 35% { transform: translateY(0); opacity: 1; } 45% { transform: translateY(140%); opacity: 1; } 50%, 100% { transform: translateY(140%); opacity: 0; } }
@keyframes denMove { 0%, 35% { transform: translateY(0) scale(1); } 45% { transform: translateY(-140%) scale(1); } 50%, 100% { transform: translateY(-60%) translateX(-10px) scale(1.4); } }
@keyframes elementsFade { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes expMove { 0%, 45% { transform: translateX(0) translateY(0); } 50%, 100% { transform: translateX(-22px) translateY(15px); } }
@keyframes expressionFade { 0%, 75% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes resultFade { 0%, 75% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); } 80%, 95% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }

/* Zadania w aplikacji */
.lesson-tasks-container { flex: 1; overflow-y: scroll; padding-bottom: 80px; -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%); mask-image: linear-gradient(to bottom, black 80%, transparent 100%); }
.lesson-tasks-container::-webkit-scrollbar { width: 0; }
.task-row { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.task-math { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: 1px; display: flex; align-items: center; }
.task-math sup { color: var(--accent); position: relative; top: -0.4em; font-size: 0.75em; }
.task-fraction { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-size: 0.75em; line-height: 1.2; margin: 0 4px; transform: translateY(-5%); }
.task-fraction .f-num { border-bottom: 2px solid #fff; padding: 0 2px; width: 100%; text-align: center; }
.task-fraction .f-den { padding: 0 2px; }
.task-input { width: 70px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 8px; padding: 8px; color: var(--accent); font-family: inherit; font-weight: 800; text-align: center; outline: none; transition: all 0.3s; }
.task-input::placeholder { color: rgba(148, 163, 184, 0.3); font-weight: 500; }
.task-input:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }

/* Dolne menu */
.app-bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; height: 70px; background: rgba(10, 15, 29, 0.9); backdrop-filter: blur(15px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: center; padding-bottom: 15px; z-index: 10; }
.nav-item { color: var(--text-muted); font-size: 0.6rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 25%; }
.nav-item.active { color: var(--accent); }
.nav-item .svg-icon { width: 20px; height: 20px; opacity: 0.6; }
.nav-item.active .svg-icon { opacity: 1; }

/* =========================================
   MODUŁ 8A: WEJŚCIA DO STREF I MODALE LOGOWANIA
   ========================================= */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent) !important;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 18px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-login-account {
    font-weight: 700;
}

.hero-auth-btn {
    min-height: 50px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 700;
}

.terms-section {
    margin-top: 18px;
}

.terms-shell {
    max-width: 980px;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.terms-header h2 {
    margin: 6px 0 8px;
}

.terms-eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
}

.terms-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.terms-content {
    margin-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding-top: 18px;
    color: var(--text);
    line-height: 1.68;
}

.terms-content h1,
.terms-content h2,
.terms-content h3 {
    color: #ffffff;
}

.terms-content h1 {
    font-size: clamp(1.3rem, 1.9vw, 1.7rem);
    font-weight: 760;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 20px 0 10px;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: #ffffff;
    border-left: 0;
    padding-left: 0;
}

.terms-content h2 {
    font-size: clamp(1.06rem, 1.25vw, 1.22rem);
    font-weight: 730;
    line-height: 1.33;
    margin: 16px 0 8px;
    border-left: 0;
    padding-left: 0;
}

.terms-content h3 {
    font-size: clamp(0.99rem, 1.05vw, 1.1rem);
    font-weight: 700;
    line-height: 1.34;
    margin: 14px 0 6px;
    border-left: 0;
    padding-left: 0;
}

.terms-content h4 {
    font-size: clamp(0.95rem, 0.95vw, 1.02rem);
    font-weight: 680;
    line-height: 1.35;
    margin: 12px 0 6px;
    color: #e8f6ff;
    border-left: 0;
    padding-left: 0;
}

.terms-content .doc-point-marker {
    color: #7dd3fc;
    font-weight: 800;
    margin-right: 4px;
}

.terms-content .doc-list-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
}

.terms-content .doc-list-marker {
    min-width: 18px;
    color: #7dd3fc;
    font-weight: 700;
}

.terms-content .doc-list-text {
    flex: 1;
}

.terms-content p {
    margin: 0 0 14px;
}

.terms-content ul,
.terms-content ol {
    margin: 8px 0 14px 20px;
}

.terms-content table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    margin: 12px 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.45);
    display: table;
}

.platform-terms-modal-body {
    overflow-x: auto;
}

.terms-content thead th {
    background: rgba(14, 165, 233, 0.18);
    color: #e0f2fe;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.terms-content th,
.terms-content td {
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 10px 11px;
    text-align: left;
    vertical-align: top;
    font-size: 0.9rem;
    line-height: 1.55;
}

.terms-content tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.07);
}

.terms-mode #aboutContainer,
.terms-mode #appContainer,
.terms-mode #methodsContainer {
    max-height: none;
}

.terms-fade-target {
    transition:
        opacity 0.42s ease,
        transform 0.52s ease;
    transform-origin: top center;
    will-change: opacity, transform;
}

.terms-transitioning .terms-fade-target {
    opacity: 0.14;
    transform: translateY(-8px) scale(0.994);
    pointer-events: none;
}

.terms-mode .terms-fade-target {
    display: none;
}

.terms-mode #platformTermsSection {
    display: block !important;
}

.terms-section {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.terms-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.auth-modal-shell {
    width: min(100%, 478px);
    max-width: 478px;
    max-height: min(86vh, 780px);
    overflow-y: auto;
    padding: 34px 32px 28px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at center bottom, rgba(56, 189, 248, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(6, 20, 56, 0.96) 0%, rgba(4, 14, 42, 0.98) 100%);
    box-shadow:
        0 24px 64px rgba(1, 8, 24, 0.74),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-modal-shell::-webkit-scrollbar {
    width: 7px;
}

.auth-modal-shell::-webkit-scrollbar-track {
    background: transparent;
}

.auth-modal-shell::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.20);
    border-radius: 999px;
}

.auth-modal-shell .close-modal {
    top: 16px;
    right: 20px;
    font-size: 24px;
    line-height: 1;
    color: rgba(148, 163, 184, 0.92);
}

.auth-modal-shell .close-modal:hover {
    color: #ffffff;
}

.auth-header-modal {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header-modal h2 {
    margin: 0;
    font-size: 1.72rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header-modal p {
    margin: 10px auto 0;
    max-width: 320px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.auth-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
    position: relative;
    border: none;
    background: transparent;
    color: rgba(203, 213, 225, 0.76);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 11px 2px 13px;
    cursor: pointer;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover {
    color: #dbeafe;
}

.nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.90);
}

.portal-auth-view {
    display: none;
    animation: authFadeInUp 0.28s ease;
}

.portal-auth-view.active {
    display: block;
}

@keyframes authFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.auth-form-compact {
    gap: 17px;
}

.auth-view-description {
    margin: -2px auto 2px;
    max-width: 340px;
    text-align: center;
    color: rgba(203, 213, 225, 0.84);
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-view-description-spacious {
    margin-top: 0;
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group label {
    color: rgba(148, 163, 184, 0.92);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-left: 4px;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.auth-inline-link {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.auth-inline-link:hover {
    opacity: 0.8;
}

.auth-input {
    width: 100%;
    min-height: 48px;
    height: 48px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(2, 8, 24, 0.72);
    padding: 0 15px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.44);
}

.auth-input:focus {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(4, 16, 42, 0.92);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.auth-remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: -2px;
    color: rgba(203, 213, 225, 0.9);
    font-size: 0.79rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.auth-remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-select-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 46px;
    background-image:
        linear-gradient(45deg, transparent 50%, #7dd3fc 50%),
        linear-gradient(135deg, #7dd3fc 50%, transparent 50%);
    background-position:
        calc(100% - 21px) calc(50% - 3px),
        calc(100% - 15px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.auth-select-input option {
    background: #071426;
    color: #e2e8f0;
}

.auth-date-wrap {
    position: relative;
}

.auth-date-input {
    padding-right: 46px;
}

.auth-date-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    stroke: rgba(148, 163, 184, 0.92);
    pointer-events: none;
}

.split-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.auth-role-card {
    position: relative;
    display: flex;
    min-height: 102px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 12px 8px;
    border-radius: 17px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.auth-role-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-role-card i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
}

.auth-role-card svg {
    width: 28px;
    height: 28px;
    stroke: rgba(148, 163, 184, 0.92);
    stroke-width: 1.7;
    transition: stroke 0.25s ease;
}

.auth-role-card span {
    color: #f8fafc;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-role-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.auth-role-card input:checked + i + span,
.auth-role-card input:checked ~ span {
    color: var(--accent);
}

.auth-role-card.active,
.auth-role-card:has(input:checked) {
    border-color: rgba(56, 189, 248, 0.9);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18) inset;
}

.auth-role-card.active svg,
.auth-role-card:has(input:checked) svg {
    stroke: var(--accent);
}

.auth-role-card.active span {
    color: var(--accent);
}

.portal-role-panel {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.portal-role-panel[hidden] {
    display: none !important;
}

.auth-multi-select {
    position: relative;
}

.auth-multi-trigger {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(2, 8, 24, 0.72);
    padding: 0 15px;
    color: rgba(148, 163, 184, 0.72);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-multi-trigger:hover,
.auth-multi-select.open .auth-multi-trigger {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(4, 16, 42, 0.92);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.auth-multi-trigger svg {
    width: 16px;
    height: 16px;
    color: rgba(148, 163, 184, 0.92);
    transition: transform 0.2s ease, color 0.2s ease;
}

.auth-multi-select.open .auth-multi-trigger svg {
    transform: rotate(180deg);
    color: var(--accent);
}

.auth-multi-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 25;
    border-radius: 15px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(7, 20, 38, 0.98);
    box-shadow: 0 20px 54px rgba(2, 8, 24, 0.6);
    overflow: hidden;
}

.auth-multi-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-multi-option:last-child {
    border-bottom: none;
}

.auth-multi-option:hover {
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent);
}

.auth-multi-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.instruction-text {
    margin: 4px 2px 0;
    color: var(--accent);
    font-size: 0.78rem;
    line-height: 1.42;
}

.legal-box {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 2px;
}

.instruction-box {
    border-radius: 18px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(8, 47, 73, 0.22);
    padding: 16px 18px;
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.84rem;
    line-height: 1.7;
}

.instruction-box strong {
    display: block;
    margin-bottom: 6px;
    color: #f8fafc;
}

.instruction-box p {
    margin: 0;
}

.legal-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(203, 213, 225, 0.9);
    font-size: 0.81rem;
    line-height: 1.48;
}

.legal-item input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.legal-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.legal-note {
    margin: -1px 0 0;
    color: rgba(148, 163, 184, 0.68);
    font-size: 0.72rem;
    line-height: 1.44;
}

.auth-alert {
    display: none;
    border-radius: 15px;
    padding: 11px 13px;
    font-size: 0.82rem;
    line-height: 1.42;
}

.auth-alert[hidden] {
    display: none !important;
}

.auth-alert.is-visible {
    display: block;
}

.auth-alert-inline {
    margin-top: 4px;
}

.auth-email-verification {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding-top: 2px;
    animation: authFadeInUp 0.28s ease;
}

.auth-email-verification[hidden] {
    display: none !important;
}

.auth-email-verification.is-visible {
    display: flex;
}

.auth-email-verification-text {
    margin: 0;
    color: #f8fafc;
    font-size: 0.84rem;
    line-height: 1.44;
    text-align: center;
}

.auth-email-verification-resend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-email-verification-email {
    margin: 0;
    color: rgba(203, 213, 225, 0.88);
    font-size: 0.74rem;
    text-align: center;
}

.auth-email-verification-hint {
    margin: 0;
    color: rgba(203, 213, 225, 0.74);
    font-size: 0.77rem;
    line-height: 1.42;
    text-align: center;
}

.auth-resend-btn,
.auth-secondary-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.auth-resend-btn {
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
}

.auth-resend-btn:hover,
.auth-secondary-btn:hover {
    transform: translateY(-1px);
}

.auth-secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: rgba(148, 163, 184, 0.92);
}

.auth-secondary-btn:hover {
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.06);
}

.auth-danger-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 13px;
    border-radius: 15px;
    border: 1px solid rgba(239, 68, 68, 0.26);
    background: rgba(99, 19, 35, 0.36);
    color: #fda4af;
}

.auth-danger-note svg {
    width: 15px;
    height: 15px;
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-danger-note p {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    font-weight: 600;
}

.auth-submit-btn {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 800;
    margin-top: 2px;
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.22);
}

.auth-modal-shell .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 16px;
    border: none;
    background: #43b8ef;
    color: #03111f;
    font-weight: 800;
    transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.auth-modal-shell .btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.auth-modal-shell .btn-primary:disabled,
.auth-resend-btn:disabled,
.auth-secondary-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   MODUŁ 8B: IFAME Z PRAWDZIWYM DEMO W TELEFONIE
   ========================================= */
.demo-phone-screen {
    background: #020617;
    overflow: hidden;
    border-radius: 34px;
}

.demo-phone-iframe-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #020617;
    border-radius: 34px;
}

.demo-phone-iframe {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 118%;
    height: 118%;
    border: 0;
    display: block;
    background: #020617;
    pointer-events: none;
    border-radius: 28px;
    transform: translateX(-50%) scale(0.82);
    transform-origin: top center;
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.08),
        0 10px 30px rgba(2, 6, 23, 0.18);
}

.demo-phone-iframe-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(2, 6, 23, 0.08), transparent 12%, transparent 88%, rgba(2, 6, 23, 0.08)),
        radial-gradient(circle at top, rgba(56, 189, 248, 0.04), transparent 30%);
}

/* =========================================
   MODUŁ 9A: ROZSZERZENIE DEMO TELEFONU
   ========================================= */
.app-status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; background: rgba(148, 163, 184, 0.12); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.18); }
.status-pill-ai { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.25); color: var(--accent); }

.ai-overview-card,
.plan-card,
.chem-group-card,
.ai-tip-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 18px 35px rgba(2, 6, 23, 0.35);
}

.ai-overview-top,
.plan-card-header,
.group-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ai-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
}

.ai-score {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-top: 6px;
}

.ai-pill,
.group-time-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.14);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.22);
    white-space: nowrap;
}

.ai-track { margin-bottom: 12px; }
.ai-fill { width: 0%; }

.ai-insight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ai-insight-row strong {
    color: #fff;
    font-size: 0.74rem;
    text-align: right;
}

.ai-insight-row.warning strong { color: #fca5a5; }

.ai-tip-card p,
.plan-description,
.group-message p {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.ai-tip-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.22);
}

.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mini-stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
}

.mini-stat-card span {
    display: block;
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.mini-stat-card strong {
    font-size: 0.82rem;
    color: #fff;
}

.mini-manim-scene {
    position: relative;
    height: 180px;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.08), rgba(2, 6, 23, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.18);
    overflow: hidden;
    margin-bottom: 14px;
}

.manim-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

.manim-axis {
    position: absolute;
    background: rgba(226, 232, 240, 0.35);
}

.manim-axis-x { left: 20px; right: 20px; height: 1px; top: 58%; }
.manim-axis-y { top: 16px; bottom: 16px; width: 1px; left: 36%; }

.manim-curve {
    position: absolute;
    width: 210px;
    height: 130px;
    left: 52px;
    top: 28px;
    border: 3px solid transparent;
    border-top-color: #67e8f9;
    border-right-color: #67e8f9;
    border-radius: 0 120px 0 0;
    transform: rotate(135deg) scaleX(1.12);
    filter: drop-shadow(0 0 12px rgba(103, 232, 249, 0.32));
    opacity: 0.9;
}

.manim-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.14), 0 0 14px rgba(34, 211, 238, 0.6);
    animation: manimDotMove 4.5s ease-in-out infinite;
}

.manim-equation {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.5);
    border: 1px solid rgba(103, 232, 249, 0.18);
    border-radius: 12px;
    padding: 7px 10px;
}

@keyframes manimDotMove {
    0% { left: 58px; top: 122px; }
    25% { left: 98px; top: 82px; }
    50% { left: 146px; top: 54px; }
    75% { left: 202px; top: 78px; }
    100% { left: 246px; top: 132px; }
}

.materials-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.material-chip {
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.material-chip.chem {
    color: #f5d0fe;
    border-color: rgba(216, 180, 254, 0.25);
    background: rgba(168, 85, 247, 0.12);
}

.group-message {
    margin: 14px 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255,255,255,0.05);
}

.group-message strong {
    display: block;
    color: #fff;
    font-size: 0.74rem;
    margin-bottom: 6px;
}

@media (max-width: 420px) {
    .mini-stat-grid { grid-template-columns: 1fr; }
}

/* =========================================
   MODUŁ 9: MEDIA QUERIES (RESPONSYWNOŚĆ)
   ========================================= */
@media (min-width: 769px) {
    .copyright-bar {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .split-group,
    .role-grid {
        grid-template-columns: 1fr;
    }

    .auth-modal-shell {
        width: min(calc(100vw - 38px), 470px);
        max-width: 470px;
    }

    .auth-role-card {
        min-height: 98px;
    }
}

@media (max-width: 640px) {
    .auth-modal-shell {
        width: min(calc(100vw - 30px), 438px);
        max-width: 438px;
        max-height: min(84vh, 760px);
        padding: 26px 18px 22px;
        border-radius: 24px;
    }

    .auth-modal-shell .close-modal {
        top: 13px;
        right: 16px;
        font-size: 23px;
    }

    .auth-header-modal {
        margin-bottom: 18px;
    }

    .auth-header-modal h2 {
        font-size: 1.58rem;
    }

    .auth-header-modal p,
    .auth-view-description,
    .auth-alert,
    .instruction-text,
    .legal-item,
    .legal-note {
        font-size: 0.78rem;
    }

    .auth-nav {
        gap: 22px;
        margin-bottom: 20px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 10px 2px 12px;
    }

    .auth-input,
    .auth-multi-trigger,
    .auth-resend-btn,
    .auth-secondary-btn {
        min-height: 46px;
        height: 46px;
    }

    .auth-submit-btn {
        min-height: 52px;
    }

    .auth-role-card {
        min-height: 92px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 56px 0 34px;
    }

    h1 {
        font-size: clamp(2.55rem, 12vw, 3.4rem);
        letter-spacing: -1px;
    }

    h2 {
        font-size: 1.45rem;
        margin-bottom: 18px;
        padding-left: 14px;
    }

    .tagline {
        font-size: 0.98rem;
        line-height: 1.65;
        margin-bottom: 28px;
    }

    .section {
        padding: 24px 16px;
        margin-bottom: 18px;
    }

    .groups-grid,
    .subjects-grid,
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .courses-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .subject-card {
        padding: 24px 10px;
        border-radius: 18px;
    }

    .team-card,
    .method-card,
    .group-card,
    .course-card {
        border-radius: 18px;
    }

    .copyright-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-method {
        padding: 16px 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        border-radius: 18px;
    }

    .contact-method strong {
        font-size: 0.92rem !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        line-height: 1.3;
        display: block;
    }

    .contact-icon {
        font-size: 1.4rem !important;
    }

    .hero-btns {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
        width: 100%;
        margin-top: 24px;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        width: 100% !important;
        max-width: 300px;
        margin: 0 !important;
        text-align: center;
        padding: 14px 22px;
        font-size: 0.96rem;
    }

    .btn-secondary,
    .read-more-btn {
        padding: 12px 22px;
        font-size: 0.9rem;
    }

    .btn-back {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
        margin: 10px;
    }

    .teacher-detail-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .teacher-modal-content {
        max-width: 760px;
        padding: 22px;
        border-radius: 22px;
    }

    .teacher-name-big {
        font-size: 1.75rem;
    }

    .teacher-image-big img {
        max-width: 250px;
        max-height: 280px;
        object-fit: cover;
    }

    .auth-modal-card {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .auth-modal-title {
        font-size: 1.45rem !important;
    }

    .auth-modal-subtitle,
    .auth-input,
    .auth-label {
        font-size: 0.9rem;
    }

    .auth-helper-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-input {
        min-height: 50px;
    }

    .app-text-side p,
    .app-features-list li,
    .method-card p,
    .group-info-row,
    .course-price {
        font-size: 0.88rem;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 16px;
    }

    body {
        padding-top: 64px;
    }

    .nav-container {
        padding: 0 16px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .nav-logo {
        font-size: 1.06rem;
        max-width: calc(100% - 58px);
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .mobile-nav-panel {
        left: 12px;
        right: 12px;
        top: calc(100% + 8px);
        padding: 12px;
        border-radius: 20px;
    }

    .mobile-panel-link,
    .mobile-nav-panel a {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 16px;
    }

    header {
        padding: 48px 0 26px;
    }

    h1 {
        font-size: clamp(2.3rem, 14vw, 3rem);
        letter-spacing: -0.9px;
    }

    h2 {
        font-size: 1.32rem;
        padding-left: 12px;
    }

    .badge {
        font-size: 0.72rem;
        padding: 6px 14px;
        letter-spacing: 1.2px;
        margin: 8px 0 18px;
    }

    .tagline {
        font-size: 0.92rem;
        margin-bottom: 24px;
    }

    .section {
        padding: 20px 14px;
        border-radius: 20px;
    }

    .subject-card,
    .team-card,
    .group-card,
    .course-card,
    .method-card {
        padding: 18px 14px;
    }

    .team-card p,
    .app-text-side p,
    .app-features-list li,
    .method-card p,
    .contact-method .label {
        font-size: 0.84rem;
    }

    .read-more-btn,
    .btn-secondary,
    .btn-back {
        font-size: 0.86rem;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        font-size: 0.92rem;
        padding: 13px 18px;
    }

    .contact-wrapper {
        gap: 14px !important;
    }

    .contact-method strong {
        font-size: 0.88rem !important;
    }

    .auth-modal-card {
        padding: 24px 16px;
        border-radius: 22px;
    }

    .auth-modal-title {
        font-size: 1.3rem !important;
    }

    .auth-modal-subtitle {
        font-size: 0.86rem;
        line-height: 1.6;
    }

    .auth-link-btn {
        font-size: 0.86rem;
    }
}

/* =========================================
   MODUŁ 9B: DOPIESZCZENIE HERO I NAVBARA NA MOBILE
   ========================================= */
header h1 {
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
}

@media (max-width: 1100px) {
    .courses-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-logo {
        font-size: 1.12rem;
        max-width: calc(100% - 62px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    header h1 {
        font-size: clamp(2.15rem, 8.8vw, 2.9rem);
        line-height: 1;
        letter-spacing: -0.8px;
    }

    .tagline {
        font-size: 0.95rem;
        line-height: 1.65;
        max-width: 92%;
    }

    .badge {
        font-size: 0.74rem;
        letter-spacing: 1.3px;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        font-size: 0.94rem;
    }
}

@media (max-width: 520px) {
    .nav-logo {
        font-size: 1rem;
        max-width: calc(100% - 56px);
    }

    header h1 {
        font-size: clamp(1.9rem, 8.2vw, 2.28rem);
        letter-spacing: -0.55px;
    }

    .tagline {
        font-size: 0.9rem;
        line-height: 1.6;
        max-width: 94%;
    }

    .badge {
        font-size: 0.68rem;
        letter-spacing: 1px;
        padding: 6px 14px;
    }
}

/* =========================================
   MODUŁ 9C: RĘCZNA REGULACJA HERO NA MOBILE
   Tu możesz sam sterować:
   1. wielkością napisu "Academia Logica"
   2. odsunięciem całego hero niżej
   3. odstępem między tytułem a badge
   4. odstępem między badge a tagline
   ========================================= */

:root {
    /* GŁÓWNE POKRĘTŁA DLA MOBILE */
    --hero-mobile-title-size: clamp(2.16rem, 8.95vw, 2.74rem);
    --hero-mobile-title-letter-spacing: -0.7px;

    --hero-mobile-header-top-padding: 92px;
    --hero-mobile-header-bottom-padding: 30px;

    --hero-mobile-gap-title-to-badge: 38px;
    --hero-mobile-gap-badge-to-tagline: 36px;

    --hero-mobile-tagline-size: 0.95rem;
    --hero-mobile-tagline-line-height: 1.65;
    --hero-mobile-tagline-max-width: 92%;
}

/* TABLET / TELEFON */
@media (max-width: 768px) {
    header {
        padding-top: var(--hero-mobile-header-top-padding);
        padding-bottom: var(--hero-mobile-header-bottom-padding);
    }

    header h1 {
        font-size: var(--hero-mobile-title-size);
        line-height: 1;
        letter-spacing: var(--hero-mobile-title-letter-spacing);
        white-space: nowrap;
        display: inline-block;
        max-width: 100%;
        margin-bottom: var(--hero-mobile-gap-title-to-badge);
    }

    header .badge {
        display: inline-block;
        margin-top: 0;
        margin-bottom: var(--hero-mobile-gap-badge-to-tagline);
    }

    header .tagline {
        font-size: var(--hero-mobile-tagline-size);
        line-height: var(--hero-mobile-tagline-line-height);
        max-width: var(--hero-mobile-tagline-max-width);
        margin-top: 0;
    }
}

/* BARDZO MAŁE TELEFONY */
@media (max-width: 520px) {
    header h1 {
        font-size: clamp(1.98rem, 8.45vw, 2.38rem);
    }
}

@media (max-width: 900px) {
    .auth-grid-two,
    .auth-choice-grid,
    .auth-subject-grid {
        grid-template-columns: 1fr;
    }

    .auth-modal-card-wide {
        max-width: 640px;
    }
}

@media (max-width: 640px) {
    .auth-modal-card,
    .auth-modal-card-wide {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .auth-mode-switch {
        grid-template-columns: 1fr;
    }

    .auth-choice-card {
        min-height: 120px;
    }

    .auth-checkbox-mark {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .cookie-consent-banner {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }

    .cookie-settings-modal {
        width: min(92vw, 432px) !important;
        max-width: 432px !important;
        padding: 22px 16px 18px;
        border-radius: 24px;
    }

    .cookie-settings-header h2 {
        font-size: 1.35rem;
    }

    .cookie-settings-actions-row {
        grid-template-columns: 1fr;
    }
}