/* --- POST.CSS | PLAYSU.PL - FULL READY --- */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;600;700&display=swap');

:root {
    --accent-purple: #8b5cf6;
    --accent-dark: #6d28d9;
    --bg-dark: #050506;
    --text-dim: #cbd5e1;
}

/* --- LAYOUT GŁÓWNY --- */
.post-header {
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 60px 10%;
    position: relative;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.post-header-content {
    position: relative;
    z-index: 5;
    max-width: 900px;
    width: 100%;
}

.post-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    padding: 60px 10%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* --- TYTUŁ I AKCENTY --- */
.title-wrapper {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.accent-slidebar {
    width: 6px;
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-dark), transparent);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.title-main {
    position: relative;
    min-width: 0; /* Zapobiega ucinaniu flexa */
}

.title-main::before {
    content: '01';
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 120px;
    font-weight: 900;
    color: rgba(139, 92, 246, 0.07);
    z-index: -1;
    font-family: 'Rajdhani', sans-serif;
}

.post-header h1 {
    font-size: 48px;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 10px 0 20px 0;
    font-family: 'Rajdhani', sans-serif;
}

.post-header h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), transparent);
    margin-top: 10px;
    animation: slideLine 3s ease-in-out infinite;
}

@keyframes slideLine {
    0% { width: 0%; opacity: 0; }
    50% { width: 60%; opacity: 1; }
    100% { width: 0%; opacity: 0; }
}

/* --- TREŚĆ --- */
.post-content {
    color: var(--text-dim);
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
    min-width: 0; /* Ważne dla responsywności */
}

.lead { 
    font-size: 20px; 
    color: #fff; 
    font-weight: 600; 
    margin-bottom: 30px;
}

.post-content h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 32px;
    color: #fff;
    margin: 40px 0 20px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-purple);
}

/* --- KOD I BOXY --- */
.code-block {
    background: #0f172a;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid rgba(139, 92, 246, 0.2);
    overflow-x: auto; /* Scroll poziomy jeśli kod za długi */
}

.code-block code, .code-block pre {
    color: #10b981;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    white-space: pre-wrap; /* Zawijanie tekstu w kodzie */
    word-break: break-all;
}

.pro-tip {
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed var(--accent-purple);
    padding: 25px;
    margin: 35px 0;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pro-tip i { color: var(--accent-purple); font-size: 24px; }

/* --- SIDEBAR --- */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-box {
    background: rgba(255,255,255,0.02);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.sidebar-box h3 {
    font-family: 'Rajdhani', sans-serif;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.related-posts a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-dim);
    transition: 0.3s;
    margin-bottom: 20px;
}

.related-posts img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
}

.rel-title { display: block; font-weight: 700; color: #fff; font-size: 14px; }
.rel-cat { font-size: 11px; color: var(--accent-purple); text-transform: uppercase; }

/* --- RESPONSYWNOŚĆ (NAPRAWA) --- */
@media (max-width: 1200px) {
    .post-header, .post-container { padding: 40px 5%; }
}

@media (max-width: 1024px) {
    .post-container { grid-template-columns: 1fr; } /* Usunięcie ucinania przez Grid */
    .post-header h1 { font-size: 36px; }
    .title-main::before { font-size: 80px; }
    
    .post-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .post-header { min-height: 300px; padding-top: 100px; }
    .post-header h1 { font-size: 28px; }
    
    .post-meta { flex-direction: column; gap: 8px; }
    
    .post-sidebar { grid-template-columns: 1fr; }
    
    .code-block {
        margin: 20px -5%; /* Na mobile kod na całą szerokość */
        border-radius: 0;
    }
    
    .pro-tip { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .title-main::before { display: none; }
    .post-header h1 { font-size: 24px; }
    .post-content h2 { font-size: 24px; }
}