/* ==========================================================================
   Dynamic Page Stylesheet (Scoped for JTI POLIJE)
   ========================================================================== */

/* Page Heading */
.page-header-wrap {
    padding-bottom: 24px;
}

.page-header-wrap .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue, #2563eb);
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 99px;
    padding: 6px 14px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-header-wrap h1 {
    margin: 14px 0 10px;
    max-width: 900px;
    color: var(--navy, #0b1220);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    line-height: 1.22;
    letter-spacing: -.03em;
}

.page-header-wrap .lead {
    max-width: 820px;
    margin: 0;
    color: var(--muted, #64748b);
    font-size: .95rem;
    line-height: 1.65;
}

/* Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

.article-card,
.sidebar-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius, 18px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
}

.article-card {
    overflow: hidden;
}

/* Cover Image */
.page-cover-wrap {
    position: relative;
    overflow: hidden;
    background: #dce7f5;
}

.page-cover-image {
    width: 100%;
    aspect-ratio: 16 / 8.2;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

.page-cover-caption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 7px 13px;
    border-radius: 9px;
    color: white;
    background: rgba(11, 18, 32, .75);
    font-size: .75rem;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Article Body */
.article-inner {
    padding: clamp(22px, 4vw, 38px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line, #e2e8f0);
    color: var(--muted, #64748b);
    font-size: .8rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.meta-item i {
    color: var(--blue, #2563eb);
}

/* Content Typography */
.article-content {
    padding-top: 25px;
    color: #334155;
    font-size: .95rem;
    line-height: 1.85;
}

.article-content h2 {
    margin: 32px 0 14px;
    color: var(--navy, #0b1220);
    font-size: 1.45rem;
    line-height: 1.35;
    letter-spacing: -.02em;
}

.article-content h3 {
    margin: 25px 0 10px;
    color: var(--navy, #0b1220);
    font-size: 1.2rem;
    letter-spacing: -.01em;
}

.article-content p {
    margin: 0 0 18px;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
    margin: 0 0 20px;
}

.article-content li {
    margin: 8px 0;
}

.article-content blockquote {
    margin: 26px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--cyan, #06b6d4);
    border-radius: 0 12px 12px 0;
    color: #1e3a5f;
    background: #f0f9ff;
    font-weight: 500;
}

.article-content a {
    color: var(--blue, #2563eb);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color .2s;
}

.article-content a:hover {
    color: #1d4ed8;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 18px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: .88rem;
}

.article-content table th,
.article-content table td {
    padding: 12px 16px;
    border: 1px solid var(--line, #e2e8f0);
    text-align: left;
}

.article-content table th {
    background: #f8fafc;
    color: var(--navy, #0b1220);
    font-weight: 700;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--line, #e2e8f0);
}

.article-tags span {
    padding: 6px 12px;
    border-radius: 99px;
    color: #475569;
    background: #f1f5f9;
    font-size: .75rem;
    font-weight: 600;
}

/* Creator Panel */
.creator-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 22px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 16px;
    background: #f8fafc;
}

.creator-avatar {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--blue, #2563eb), var(--cyan, #06b6d4));
    font-size: 1.25rem;
}

.creator-info {
    min-width: 0;
    flex: 1;
}

.creator-info small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted, #64748b);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 650;
}

.creator-info strong {
    display: block;
    color: var(--navy, #0b1220);
    font-size: .95rem;
}

.creator-info p {
    margin: 3px 0 0;
    color: var(--muted, #64748b);
    font-size: .8rem;
    line-height: 1.5;
}

.creator-social {
    display: flex;
    gap: 8px;
}

.creator-social a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--blue, #2563eb);
    background: white;
    border: 1px solid var(--line, #e2e8f0);
    font-size: .85rem;
    transition: all .2s;
}

.creator-social a:hover {
    background: var(--blue, #2563eb);
    color: white;
    border-color: var(--blue, #2563eb);
}

/* Sidebar */
.sidebar {
    display: grid;
    gap: 20px;
}

.sidebar-card {
    padding: 24px;
}

.sidebar-title {
    margin: 0 0 16px;
    color: var(--navy, #0b1220);
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -.01em;
}

.sidebar-card p {
    margin: 0;
    color: var(--muted, #64748b);
    font-size: .84rem;
    line-height: 1.6;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--blue, #2563eb);
    background: #eff6ff;
    font-size: .85rem;
}

.info-row small {
    display: block;
    color: var(--muted, #64748b);
    font-size: .74rem;
}

.info-row strong {
    display: block;
    color: var(--navy, #0b1220);
    font-size: .84rem;
    font-weight: 650;
}

.related-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line, #e2e8f0);
    text-decoration: none;
    color: inherit;
    transition: transform .2s;
}

.related-link:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.related-link:hover {
    transform: translateX(3px);
}

.related-thumb {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
    display: grid;
    place-items: center;
    color: var(--blue, #2563eb);
    font-size: 1.1rem;
}

.related-link strong {
    display: block;
    color: var(--navy, #0b1220);
    font-size: .84rem;
    line-height: 1.4;
    font-weight: 650;
}

.related-link small {
    color: var(--muted, #64748b);
    font-size: .72rem;
    margin-top: 2px;
    display: block;
}

/* Responsive */
@media (max-width: 960px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sidebar-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar-card:last-child {
        grid-column: auto;
    }
    .creator-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    .creator-social {
        width: 100%;
    }
}
