/* ==============================================================
   tygodnik.css v3.0 — Profitownia Weekly Digest
   Aligned with main theme: white cards / 12px radius / box-shadow
   ============================================================== */

/* ------------------------------------------------------------------
   Article wrapper — matches .single-post
   ------------------------------------------------------------------ */
.single-tygodnik {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    overflow-x: hidden;
    margin-bottom: 2rem;
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.tygodnik-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    padding: 3rem 2.5rem 2.5rem;
    text-align: center;
}
.tygodnik-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}
.tygodnik-badge {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    padding: .3rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}
.tygodnik-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 .75rem;
}
.tygodnik-meta {
    font-size: .85rem;
    opacity: .8;
}
.tygodnik-meta-sep { margin: 0 .4rem; }

/* ------------------------------------------------------------------
   Content area — inherits .post-content from theme
   ------------------------------------------------------------------ */
.tygodnik-content {
    /* No max-width — fills .site-main (1200px) naturally */
}

/* ------------------------------------------------------------------
   Market header — subtle card inside content
   ------------------------------------------------------------------ */
.tygodnik-market-header {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.04);
}
.tygodnik-week-badge {
    display: inline-block;
    background: #1e3a5f;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 4px;
    padding: .2rem .6rem;
    margin-bottom: .4rem;
}
.tygodnik-date-range {
    font-size: .85rem;
    color: #666;
    margin-bottom: .75rem;
}
.tygodnik-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tygodnik-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #fff;
    border-radius: 8px;
    padding: .35rem .7rem;
    font-size: .78rem;
    white-space: nowrap;
    line-height: 1.35;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.tygodnik-pill:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.tygodnik-pill strong {
    font-weight: 700;
    color: #333;
}
.pill-change { font-weight: 600; }
.tygodnik-pill.up .pill-change   { color: #16a34a; }
.tygodnik-pill.down .pill-change { color: #dc2626; }
.tygodnik-pill.flat .pill-change { color: #999; }

.tygodnik-pill.up   { border-left: 3px solid #16a34a; }
.tygodnik-pill.down  { border-left: 3px solid #dc2626; }
.tygodnik-pill.flat  { border-left: 3px solid #ccc; }

.tygodnik-pill-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

/* ------------------------------------------------------------------
   Content sections
   ------------------------------------------------------------------ */
.tygodnik-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #e5e7eb;
}
.tygodnik-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 1.3;
}

/* Section SVG icons */
.tygodnik-section h2::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: currentColor;
}
.tygodnik-section.main-event h2::before {
    -webkit-mask-image: url('../../images/icon-main-event.svg');
    mask-image: url('../../images/icon-main-event.svg');
    background-color: #2563eb;
}
.tygodnik-section.news-brief h2::before {
    -webkit-mask-image: url('../../images/icon-news-brief.svg');
    mask-image: url('../../images/icon-news-brief.svg');
    background-color: #d97706;
}
.tygodnik-section.crypto h2::before {
    -webkit-mask-image: url('../../images/icon-crypto.svg');
    mask-image: url('../../images/icon-crypto.svg');
    background-color: #7c3aed;
}
.tygodnik-section.next-week h2::before {
    -webkit-mask-image: url('../../images/icon-next-week.svg');
    mask-image: url('../../images/icon-next-week.svg');
    background-color: #0891b2;
}
.tygodnik-section.advice h2::before {
    -webkit-mask-image: url('../../images/icon-advice.svg');
    mask-image: url('../../images/icon-advice.svg');
    background-color: #16a34a;
}

/* text nodes inside sections can be unwrapped — apply to the block itself too */
.tygodnik-section {
    font-size: .95rem;
    line-height: 1.8;
    color: #555;
}
.tygodnik-section p {
    font-size: .95rem;
    line-height: 1.8;
    color: #555;
    margin: 0 0 .65rem;
}
.tygodnik-section ul {
    padding-left: 1.3rem;
    margin: .5rem 0;
}
.tygodnik-section li {
    font-size: .95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: .4rem;
}

/* Accent left borders per section type */
.tygodnik-section.main-event { border-left-color: #2563eb; }
.tygodnik-section.news-brief { border-left-color: #d97706; }
.tygodnik-section.crypto     { border-left-color: #7c3aed; }
.tygodnik-section.next-week  { border-left-color: #0891b2; }
.tygodnik-section.advice     { border-left-color: #16a34a; }

/* News tags */
.news-tag {
    display: inline-block;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 4px;
    margin-right: .35rem;
    vertical-align: middle;
    background: #eff6ff;
    color: #2563eb;
}

/* ------------------------------------------------------------------
   Footer / disclaimer / nav
   ------------------------------------------------------------------ */
.tygodnik-footer {
    padding: 0 2rem 2rem;
}
.tygodnik-disclaimer {
    font-size: .8rem;
    color: #999;
    line-height: 1.6;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}
.tygodnik-disclaimer a {
    color: #11345a;
    text-decoration: none;
}
.tygodnik-disclaimer a:hover { text-decoration: underline; }

.tygodnik-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}
.tygodnik-nav-link {
    font-size: .85rem;
    font-weight: 600;
    color: #11345a;
    text-decoration: none;
    padding: .5rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    transition: background .2s, box-shadow .2s;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tygodnik-nav-link:hover {
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ------------------------------------------------------------------
   Archive section (below main article)
   ------------------------------------------------------------------ */
.tygodnik-archive-section {
    margin-bottom: 2rem;
}
.tygodnik-archive-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    padding: 2rem;
}
.tygodnik-archive-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1rem;
}
.tygodnik-section-icon {
    flex-shrink: 0;
    color: #666;
}
.tygodnik-archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.tygodnik-archive-item { margin: 0; padding: 0; }
.tygodnik-archive-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .2s, box-shadow .2s;
}
.tygodnik-archive-link:hover {
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tygodnik-archive-badge {
    display: inline-block;
    background: #1e3a5f;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 4px;
    padding: .15rem .5rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.tygodnik-archive-link-title {
    font-size: .9rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tygodnik-archive-date {
    font-size: .78rem;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------ */
.tygodnik-empty {
    text-align: center;
    color: #999;
    padding: 4rem 2rem;
    font-size: .95rem;
}

/* ------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
    .tygodnik-hero { padding: 2rem 1.5rem 1.75rem; }
    .tygodnik-title { font-size: 1.35rem; }
    .tygodnik-section { padding: 1.1rem 1.2rem; }
    .tygodnik-pills { gap: .35rem; }
    .tygodnik-pill { font-size: .72rem; padding: .25rem .5rem; }
    .tygodnik-pill-icon { width: 16px; height: 16px; }
    .tygodnik-nav { flex-direction: column; }
    .tygodnik-nav-link { max-width: 100%; }
    .tygodnik-archive-inner { padding: 1.25rem; }
    .tygodnik-archive-link { flex-wrap: wrap; gap: .4rem; }
    .tygodnik-archive-link-title { width: 100%; order: 2; }
    .tygodnik-archive-date { order: 3; }
}
@media (max-width: 480px) {
    .tygodnik-hero { padding: 1.5rem 1rem 1.25rem; }
    .tygodnik-title { font-size: 1.15rem; }
    .tygodnik-market-header { padding: 1rem; }
    .tygodnik-section h2::before { width: 18px; height: 18px; }
}

/* ==============================================================
   DARK MODE
   Theme palette: body #1a1a1a, card #2d2d2d,
   border #404040, text #e0e0e0, muted #999,
   accent #6db644, shadow rgba(0,0,0,.3)
   ============================================================== */

/* Article wrapper */
html.dark-mode .single-tygodnik,
body.dark-mode .single-tygodnik {
    background: #2d2d2d;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

/* Hero */
html.dark-mode .tygodnik-hero,
body.dark-mode .tygodnik-hero {
    background: linear-gradient(135deg, #0f1f33 0%, #1a3656 100%);
}
html.dark-mode .tygodnik-badge,
body.dark-mode .tygodnik-badge {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
}

/* Market header */
html.dark-mode .tygodnik-market-header,
body.dark-mode .tygodnik-market-header {
    background: #252525;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
html.dark-mode .tygodnik-week-badge,
body.dark-mode .tygodnik-week-badge {
    background: #1a3656;
}
html.dark-mode .tygodnik-date-range,
body.dark-mode .tygodnik-date-range {
    color: #999;
}

/* Pills */
html.dark-mode .tygodnik-pill,
body.dark-mode .tygodnik-pill {
    background: #353535;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
html.dark-mode .tygodnik-pill strong,
body.dark-mode .tygodnik-pill strong {
    color: #e0e0e0;
}
html.dark-mode .tygodnik-pill.up .pill-change,
body.dark-mode .tygodnik-pill.up .pill-change     { color: #4ade80; }
html.dark-mode .tygodnik-pill.down .pill-change,
body.dark-mode .tygodnik-pill.down .pill-change   { color: #f87171; }
html.dark-mode .tygodnik-pill.flat .pill-change,
body.dark-mode .tygodnik-pill.flat .pill-change   { color: #777; }

/* Sections */
html.dark-mode .tygodnik-section,
body.dark-mode .tygodnik-section {
    background: #252525;
    border-left-color: #404040;
}
html.dark-mode .tygodnik-section h2,
body.dark-mode .tygodnik-section h2 {
    color: #e0e0e0;
}
html.dark-mode .tygodnik-section,
body.dark-mode .tygodnik-section,
html.dark-mode .tygodnik-section p,
body.dark-mode .tygodnik-section p,
html.dark-mode .tygodnik-section li,
body.dark-mode .tygodnik-section li {
    color: #ccc;
}

/* Section icon brightness for dark bg */
html.dark-mode .tygodnik-section.main-event h2::before,
body.dark-mode .tygodnik-section.main-event h2::before { background-color: #60a5fa; }
html.dark-mode .tygodnik-section.news-brief h2::before,
body.dark-mode .tygodnik-section.news-brief h2::before { background-color: #fbbf24; }
html.dark-mode .tygodnik-section.crypto h2::before,
body.dark-mode .tygodnik-section.crypto h2::before     { background-color: #a78bfa; }
html.dark-mode .tygodnik-section.next-week h2::before,
body.dark-mode .tygodnik-section.next-week h2::before  { background-color: #22d3ee; }
html.dark-mode .tygodnik-section.advice h2::before,
body.dark-mode .tygodnik-section.advice h2::before     { background-color: #4ade80; }

/* Accent left borders — brighter in dark */
html.dark-mode .tygodnik-section.main-event,
body.dark-mode .tygodnik-section.main-event { border-left-color: #3b82f6; }
html.dark-mode .tygodnik-section.news-brief,
body.dark-mode .tygodnik-section.news-brief { border-left-color: #f59e0b; }
html.dark-mode .tygodnik-section.crypto,
body.dark-mode .tygodnik-section.crypto     { border-left-color: #8b5cf6; }
html.dark-mode .tygodnik-section.next-week,
body.dark-mode .tygodnik-section.next-week  { border-left-color: #06b6d4; }
html.dark-mode .tygodnik-section.advice,
body.dark-mode .tygodnik-section.advice     { border-left-color: #22c55e; }

/* News tags */
html.dark-mode .news-tag,
body.dark-mode .news-tag {
    background: rgba(37,99,235,.12);
    color: #60a5fa;
}

/* Footer */
html.dark-mode .tygodnik-disclaimer,
body.dark-mode .tygodnik-disclaimer {
    color: #999;
    border-top-color: #404040;
}
html.dark-mode .tygodnik-disclaimer a,
body.dark-mode .tygodnik-disclaimer a {
    color: #6db644;
}

/* Nav links */
html.dark-mode .tygodnik-nav-link,
body.dark-mode .tygodnik-nav-link {
    color: #6db644;
    background: #353535;
}
html.dark-mode .tygodnik-nav-link:hover,
body.dark-mode .tygodnik-nav-link:hover {
    background: #3d3d3d;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Archive section */
html.dark-mode .tygodnik-archive-inner,
body.dark-mode .tygodnik-archive-inner {
    background: #2d2d2d;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
html.dark-mode .tygodnik-archive-title,
body.dark-mode .tygodnik-archive-title {
    color: #e0e0e0;
}
html.dark-mode .tygodnik-section-icon,
body.dark-mode .tygodnik-section-icon {
    color: #999;
}
html.dark-mode .tygodnik-archive-link,
body.dark-mode .tygodnik-archive-link {
    background: #353535;
}
html.dark-mode .tygodnik-archive-link:hover,
body.dark-mode .tygodnik-archive-link:hover {
    background: #3d3d3d;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
html.dark-mode .tygodnik-archive-badge,
body.dark-mode .tygodnik-archive-badge {
    background: #1a3656;
}
html.dark-mode .tygodnik-archive-link-title,
body.dark-mode .tygodnik-archive-link-title {
    color: #e0e0e0;
}
html.dark-mode .tygodnik-archive-date,
body.dark-mode .tygodnik-archive-date {
    color: #999;
}

/* Empty state */
html.dark-mode .tygodnik-empty,
body.dark-mode .tygodnik-empty {
    color: #999;
}
