/* ═══════════════════════════════════════════════════════════
   FRONTEND CSS — CMS CodeIgniter 4
   Plik: public/assets/css/frontend.css
   Wersja językowa EN i każda kolejna korzysta z pliku
   na domenie domyślnej (PL) przez absolutny URL.
═══════════════════════════════════════════════════════════ */

/* ── ZMIENNE ────────────────────────────────────────────── */
:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --dark:         #0f172a;
    --dark-2:       #1e293b;
    --text:         #374151;
    --text-light:   #64748b;
    --text-muted:   #94a3b8;
    --border:       #e2e8f0;
    --bg-light:     #f8fafc;
    --radius:       12px;
    --transition:   .15s ease;
}

/* ── RESET / BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main { flex: 1; }

img { max-width: 100%; height: auto; }

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark-2) !important;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.navbar-brand .brand-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.navbar .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light) !important;
    padding: 20px 14px !important;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary);
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
}
.navbar-toggler:focus { box-shadow: none; }

/* ── LANGUAGE SWITCHER ──────────────────────────────────── */
.lang-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-light);
    border: 1px solid var(--border);
    transition: all var(--transition);
    white-space: nowrap;
}

.lang-switcher a:hover {
    background: var(--bg-light);
    color: var(--dark-2);
    border-color: #94a3b8;
}

.lang-switcher a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.lang-switcher a .flag { font-size: 14px; }

/* ── HERO ───────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%);
    color: #fff;
    padding: 64px 0;
}

.page-hero h1 { font-weight: 700; }
.page-hero p  { opacity: .75; }

/* ── POST CARDS ─────────────────────────────────────────── */
.post-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    background: #fff;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}

.post-card .thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card .thumb-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e3a5f, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card .card-body { padding: 20px; }

.post-card .category-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--primary);
    text-decoration: none;
}

.post-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-2);
    margin: 8px 0 6px;
    line-height: 1.4;
}

.post-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

.post-card h3 a:hover { color: var(--primary); }

.post-card .excerpt {
    font-size: 14px;
    color: var(--text-light);
}

.post-card .meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ── PAGE / POST CONTENT ────────────────────────────────── */
.page-content,
.post-body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

.page-content h1, .page-content h2, .page-content h3,
.post-body h1,    .post-body h2,    .post-body h3 {
    color: var(--dark-2);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content img,
.post-body img {
    max-width: 100%;
    border-radius: 8px;
}

.page-content pre,
.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    overflow-x: auto;
}

.page-content code,
.post-body code {
    background: #f1f5f9;
    color: #2563eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.page-content pre code,
.post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar-widget {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.sidebar-widget .widget-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-light);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
}

.sidebar-widget a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    font-size: 14px;
    color: var(--text);
    transition: background var(--transition), color var(--transition);
}

.sidebar-widget a:last-child { border-bottom: none; }

.sidebar-widget a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.sidebar-widget .count {
    font-size: 12px;
    background: var(--border);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--text-light); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary); }

/* ── PAGINATION ─────────────────────────────────────────── */
.page-link { border-radius: 6px !important; margin: 0 2px; }
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
    background: var(--dark);
    color: var(--text-muted);
    padding: 48px 0 24px;
}

footer .footer-brand {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

footer a:hover { color: #fff; }

footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .footer-links li {
    margin-bottom: 8px;
    font-size: 14px;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
    font-size: 16px;
    margin-right: 8px;
    transition: background var(--transition);
}

footer .social-links a:hover {
    background: var(--primary);
    color: #fff;
}

footer hr {
    border-color: #1e293b;
    margin: 32px 0 20px;
}

footer .footer-bottom { font-size: 13px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .lang-switcher { margin-top: 8px; }
}

@media (max-width: 768px) {
    .page-hero { padding: 40px 0; }
    .page-hero h1 { font-size: 1.75rem; }
    .post-body,
    .page-content { font-size: 16px; }
    .lang-switcher a { padding: 3px 8px; font-size: 11px; }
}

@media (max-width: 480px) {
    .post-card .thumb,
    .post-card .thumb-placeholder { height: 160px; }
}

/* ── FOOTER COL TITLE ───────────────────────────────────── */
.footer-col-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #475569;
    margin-bottom: 12px;
}
