/* ─── Czcionka ─────────────────────────────────────────────────────────────── */
:root {
    font-size: 17px; /* 1rem = 17px; zmień tę wartość żeby skalować całą typografię */
}

body {
    font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: rgb(250, 250, 250);
    color: #1a1a2e;
}

/* ─── Navbar ────────────────────────────────────────────────────────────────── */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

/* ─── Hero gradient ─────────────────────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.hero-gradient-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.hero-gradient-orange {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: #1a1a2e;
}

/* ─── Karty kategorii ───────────────────────────────────────────────────────── */
.category-card {
    border: none;
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
    color: inherit;
}

.category-card .card-icon {
    font-size: 2.4rem;
    line-height: 1;
}

/* ─── Sekcja statystyk ──────────────────────────────────────────────────────── */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

/* ─── Search bar ────────────────────────────────────────────────────────────── */
.search-hero input {
    border-radius: 50px 0 0 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    box-shadow: none;
}

.search-hero input:focus {
    box-shadow: none;
    outline: none;
}

.search-hero button {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.75rem;
}

/* ─── Karty treści ──────────────────────────────────────────────────────────── */
.content-card {
    border: none;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09) !important;
}

/* ─── Styl Wersja 4 (Glassmorphism & Hover) ─────────────────────────────────── */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hover-lift {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    text-decoration: none;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.text-purple {
    color: #8b5cf6 !important;
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

/* ─── Badge poziomów ────────────────────────────────────────────────────────── */
.badge-level {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3em 0.7em;
    border-radius: 20px;
}

/* ─── Styl Wersja 5 (Edu Inspiracja) ────────────────────────────────────────── */
.bg-dark-purple {
    background-color: #100b2c !important;
}

.bg-dark-purple-light {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #1a153a !important;
}

.text-violet {
    color: #7c3aed !important;
}

.bg-violet {
    background-color: #7c3aed !important;
    color: #fff;
}

.btn-violet {
    background-color: #7c3aed;
    color: white;
    border: none;
    border-bottom: 2px solid #5b21b6 !important;
    transition: background-color .15s ease, transform .1s ease, border-bottom-width .1s ease;
}

.btn-violet:hover {
    background-color: #6d28d9;
    color: white;
    transform: translateY(-1px);
}

.btn-violet:active {
    background-color: #6d28d9;
    color: white;
    transform: translateY(2px);
    border-bottom-width: 1px !important;
}

.btn-outline-violet {
    border: 1px solid #7c3aed;
    border-bottom-width: 2px;
    color: #7c3aed;
    background: transparent;
    transition: background-color .15s ease, transform .1s ease, border-bottom-width .1s ease;
}

.btn-outline-violet:hover {
    background-color: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    border-color: #7c3aed !important;
    border-bottom-width: 2px !important;
    transform: translateY(-1px);
}

.btn-outline-violet:active {
    transform: translateY(2px);
    border-bottom-width: 1px !important;
}

.rounded-xl {
    border-radius: 1.25rem !important;
}

.rounded-4-top {
    border-radius: 1rem 1rem 0 0 !important;
}

.card-image-placeholder {
    aspect-ratio: 16 / 9;
    height: auto;
    background: #e2e8f0;
    object-fit: cover;
    width: 100%;
}
.card-image-placeholder-a4 {
    aspect-ratio: 595 / 842;
    height: auto;
    background: #e2e8f0;
    object-fit: cover;
    width: 100%;
}

.section-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(124, 58, 237, 0.1);
    border-radius: 8px;
}

.newsletter-box {
    background-color: #100b2c;
    border-radius: 1.5rem;
}

/* ─── Custom Navbar ─────────────────────────────────────────────────────────── */
.navbar-dark-custom {
    background-color: #fff !important;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-dark-custom .nav-link {
    color: #374151 !important;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar-dark-custom .nav-link:hover {
    color: #4c1d95 !important;
    background-color: rgba(76, 29, 149, 0.07);
}

.navbar-logo-text {
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #4c1d95 !important;
}

.navbar-dark-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2876%2C 29%2C 149%2C 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.search-input-dark {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

.search-input-dark::placeholder {
    color: #9ca3af;
}

/* ─── Sekcja CTA ────────────────────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ─── Chipy poziomów edukacyjnych ───────────────────────────────────────────── */
.level-chip {
    display: inline-block;
    padding: .2rem .7rem;
    font-size: .8rem;
    border: 1px solid transparent;
    border-radius: 100px;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.level-chip-amber {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.level-chip-amber:hover {
    background: #ffedd5;
    border-color: #fb923c;
    color: #7c2d12;
}

.level-chip-blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.level-chip-blue:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.level-chip-violet {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}
.level-chip-violet:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #4c1d95;
}

/* ─── Scroll z ukrytym scrollbarem ─────────────────────────────────────────── */
.scroll-x {
    overflow-x: auto;
    scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar {
    display: none;
}

/* ─── Animacja wejścia ──────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.5s ease both;
}

.fade-up-1 {
    animation-delay: 0.1s;
}

.fade-up-2 {
    animation-delay: 0.2s;
}

.fade-up-3 {
    animation-delay: 0.3s;
}

.fade-up-4 {
    animation-delay: 0.4s;
}

/* ─── Tekst ──────────────────────────────────────────────────────────────── */
.text-light-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-light-70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── Level Badge (ikona + liczba) ────────────────────────────────── */
.lvl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: .8rem;
    cursor: default;
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
}
.lvl-badge .bi {
    font-size: .9em;
    line-height: 1;
}
.lvl-num {
    font-weight: 800;
    line-height: 1;
    font-size: .9em; /* w lvl-badge; nadpisane dla lvl-ring poniżej */
}
.lvl-ring .lvl-num {
    font-size: 1rem;
}
.lvl-badge.lvl-badge-sm {
    font-size: .7rem;
}
.lvl-badge.lvl-badge-lg {
    font-size: 1.25rem;
    gap: 4px;
}

/* ─── Combined level ring (P2) — wyświetlany tylko na profilu ───────────────── */
.lvl-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3.5px solid currentColor;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    background: #fff;
    flex-shrink: 0;
    cursor: default;
}

/* ─── Pasek poziomów (homepage) ─────────────────────────────────────────────── */
.level-nav-strip {
    background: #f8f7ff;
    border-top: 1px solid #ede9fe;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    padding: .75rem 0;
}

.level-nav-label {
    font-size: .78rem;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.level-chip-nav {
    padding: .35rem 1rem;
    font-size: .85rem;
    font-weight: 700;
}

/* ─── Duolingo-style visual layer ───────────────────────────────────────────── */

/* Bolder headings — override Bootstrap's fw-bold (700 !important) on heading elements */
h1, h2, h3, h4,
h1.fw-bold, h2.fw-bold, h3.fw-bold, h4.fw-bold,
h1.fw-semibold, h2.fw-semibold, h3.fw-semibold, h4.fw-semibold { font-weight: 900 !important; }

/* Heavier button text */
.btn { font-weight: 700; }

/* Cards: szare body + białe karty = naturalny kontrast, shadow zbędny */
.card {
    box-shadow: none !important;
    background-color: #fff;
}

.card.border-0 {
    border: 2px solid rgba(0, 0, 0, .08) !important;
    transition: box-shadow 0.18s ease, transform 0.15s ease, border-color 0.18s ease;
}

.card.border-0:hover {
    border-color: rgba(76, 29, 149, 0.18) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

/* Form controls: more rounded corners; no !important so Bootstrap's
   input-group radius rules (which use !important) still win for search bars */
.form-control,
.form-select {
    border-radius: 12px;
}

/* Modals: softer, more rounded */
.modal-content {
    border-radius: 20px !important;
    overflow: hidden;
}

/* ─── Icon circles (section headers, Duolingo-style) ───────────────────────── */
.icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.icon-circle-sm {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

/* ── Comments (shared) ──────────────────────────────────────────────── */
.comments-empty { text-align: center; padding: 2rem 0 .5rem; color: #94a3b8; }
.comments-empty-icon { font-size: 2.4rem; display: block; margin-bottom: .75rem; opacity: .25; }
.comment-form textarea { border-radius: 12px; border-color: #e2e8f0; font-size: .9rem; resize: none; }
.comment-form textarea:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.1); outline: none; }
.notice-login { display: flex; align-items: center; gap: 10px; background: rgba(124,58,237,.05); border: 1px solid rgba(124,58,237,.15); border-radius: 10px; padding: .8rem 1rem; margin-top: 1rem; font-size: .85rem; color: #4b5563; }
.notice-login i { color: #7c3aed; }
.notice-login a { color: #7c3aed; font-weight: 600; }

/* ─── Tag Input (shared) ────────────────────────────────────────────────────── */
.tags-input-wrapper {
    border: 1px solid #e2e8f0; border-radius: 12px;
    padding: .45rem .75rem; display: flex; flex-wrap: wrap; gap: .35rem;
    min-height: 48px; cursor: text; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.tags-input-wrapper:focus-within { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(124,58,237,.1); color: #7c3aed;
    border-radius: 7px; padding: 3px 10px;
    font-size: .85rem; font-weight: 600;
}
.tag-chip button { background: none; border: none; cursor: pointer; color: #7c3aed; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.tag-chip button:hover { color: #ef4444; }
.tags-input-field { border: none; outline: none; flex: 1; min-width: 140px; font-size: .95rem; padding: 3px 4px; background: transparent; }

/* ─── Content info section — wspólny dla quiz/fiszki/kursy/pdf ──────────────── */
.content-stat-item {
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 9px 15px; font-size: .88rem;
}
.content-stat-item i { font-size: 1.1rem; flex-shrink: 0; }

/* ─── Star rating widget ─────────────────────────────────────────────────────── */
.star-rating { display: flex; gap: 4px; }
.star-btn { background: none; border: none; padding: 0; cursor: pointer; font-size: 1.6rem; color: #d1d5db; line-height: 1; transition: color .1s, transform .1s; }
.star-btn:hover, .star-btn.active { color: #f59e0b; }
.star-btn:hover { transform: scale(1.15); }
.rating-avg { font-size: 2rem; font-weight: 800; color: #0f172a; line-height: 1; }
.rating-count { font-size: .8rem; color: #94a3b8; }
