/* =========================================================
   STRONA ARTYKUŁÓW — WSPÓLNE STYLE
   korzysta z globalnego layoutu:
   .dd-page-shell, .dd-page-layout, .dd-page-main, .dd-page-sidebar
   oraz zmiennych globalnych z frontend.css
   ========================================================= */

.dd-articles-page {
    font-family: inherit;
}

.dd-articles-main,
.dd-articles-sidebar {
    min-width: 0;
}

/* Ukrycie domyślnego tytułu strony WP */
body:has(.dd-articles-page) .entry-title {
    display: none !important;
}

/* Linki bez podkreśleń */
.dd-articles-page a,
.dd-articles-page a:hover,
.dd-articles-page a:focus {
    text-decoration: none !important;
}

/* =========================================================
   HERO STRONY ARTYKUŁÓW
   ========================================================= */

.dd-articles-hero {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.dd-articles-icon {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dd-orange-soft);
    color: var(--dd-orange);
}

.dd-articles-icon svg {
    width: 48px;
    height: 48px;
    display: block;
}

.dd-articles-icon svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dd-articles-hero h1 {
    margin: 0 0 8px;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dd-navy);
}

.dd-articles-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--dd-text);
}

/* =========================================================
   WYSZUKIWARKA
   ========================================================= */

.dd-articles-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px 190px;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
    padding: 18px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-articles-search-field label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
}

.dd-articles-search input,
.dd-articles-search select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--dd-border);
    border-radius: 12px;
    background: var(--dd-white);
    color: var(--dd-navy);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.dd-articles-search input:focus,
.dd-articles-search select:focus {
    border-color: var(--dd-orange);
    box-shadow: 0 0 0 3px rgba(224, 111, 88, 0.12);
}

.dd-articles-search button {
    height: 46px;
    border: 1px solid var(--dd-orange-strong);
    border-radius: 12px;
    background: var(--dd-orange-strong);
    color: var(--dd-white);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dd-articles-search button:hover {
    background: var(--dd-orange-hover);
    border-color: var(--dd-orange-hover);
}

/* =========================================================
   POLECANY / WYRÓŻNIONY ARTYKUŁ
   ========================================================= */

.dd-featured-article {
    margin-bottom: 22px;
    padding: 16px;
    background: var(--dd-white);
    border: 1px solid rgba(224, 111, 88, 0.42);
    border-radius: 20px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-featured-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.dd-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--dd-navy);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.dd-featured-label::before {
    content: "✦";
    color: var(--dd-navy);
    font-size: 14px;
    line-height: 1;
}

.dd-editor-choice {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--dd-orange-soft);
    color: var(--dd-orange);
    font-size: 12px;
    font-weight: 700;
}

.dd-featured-inner {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.dd-featured-image {
    display: block;
    min-height: 245px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--dd-border-soft);
}

.dd-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dd-featured-content {
    display: flex;
    flex-direction: column;
    padding: 8px 6px 6px 0;
}

.dd-featured-content h2 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dd-navy);
}

.dd-featured-content h2 a {
    color: inherit;
    text-decoration: none;
}

.dd-featured-content h2 a:hover {
    color: var(--dd-orange);
}

.dd-featured-content p {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--dd-text);
}

.dd-featured-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

/* =========================================================
   META ARTYKUŁU
   ========================================================= */

.dd-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dd-article-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--dd-orange-soft);
    color: var(--dd-orange);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.dd-article-meta small {
    color: #6f7894;
    font-size: 12px;
    line-height: 1.3;
}

/* =========================================================
   AUTOR
   ========================================================= */

.dd-article-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dd-article-author-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--dd-orange-soft);
    color: var(--dd-orange-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.dd-article-author-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dd-article-author strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--dd-navy);
}

.dd-article-author small {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    color: #7d859f;
}

/* =========================================================
   LINK CZYTAJ
   ========================================================= */

.dd-read-link {
    white-space: nowrap;
    color: var(--dd-orange-strong);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.dd-read-link:hover {
    color: var(--dd-orange-hover);
}

/* =========================================================
   LISTA ARTYKUŁÓW
   ========================================================= */

.dd-articles-list-section h2 {
    margin: 0 0 14px;
    font-size: 23px;
    line-height: 1.25;
    color: var(--dd-navy);
    font-weight: 700;
}

.dd-articles-list {
    display: grid;
    gap: 14px;
}

.dd-article-row {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    min-height: 190px;
    padding: 14px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-article-sponsored {
    background: #fffdf4;
    border-color: #f1c35e;
}

.dd-article-row-image {
    position: relative;
    display: block;
    height: 160px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--dd-border-soft);
}

.dd-article-row-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dd-sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--dd-orange-strong);
    color: var(--dd-white);
    font-size: 10px;
    font-weight: 700;
}

.dd-article-row-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 4px 4px 2px 0;
}

.dd-article-row-content h3 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--dd-navy);
}

.dd-article-row-content h3 a {
    color: var(--dd-navy);
    text-decoration: none;
}

.dd-article-row-content h3 a:hover {
    color: var(--dd-orange);
}

.dd-article-row-content p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dd-text);
}

.dd-article-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

.dd-article-placeholder,
.dd-sidebar-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef2f7, #dfe6f1);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.dd-articles-sidebar {
    display: grid;
    gap: 16px;
}

/*
   Uwaga:
   .dd-sidebar-card,
   .dd-sidebar-small-article,
   .dd-sidebar-more
   są stylowane globalnie w frontend.css.
   Tu nie duplikujemy ich, żeby nie robić konfliktów.
*/

/* =========================================================
   POPULARNE KATEGORIE
   ========================================================= */

.dd-sidebar-categories {
    padding: 20px;
}

.dd-sidebar-category-list {
    display: grid;
    gap: 0;
}

.dd-sidebar-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--dd-border-soft);
    color: var(--dd-navy);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.dd-sidebar-category-item:hover,
.dd-sidebar-category-item:hover span,
.dd-sidebar-category-item:hover em {
    color: var(--dd-orange-strong);
}

.dd-sidebar-categories em,
.dd-sidebar-category-item em {
    font-style: normal;
    color: #9aa3b8;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
}

.dd-sidebar-category-item span {
    color: var(--dd-navy);
    font-weight: 400;
}

.dd-sidebar-empty {
    margin: 8px 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #7d859f;
}

/* =========================================================
   PROMO
   ========================================================= */

.dd-sidebar-promo {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--dd-orange-soft-2);
    border: 1px solid var(--dd-orange-border);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-sidebar-promo h3 {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
}

.dd-sidebar-promo-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dd-orange-border);
    color: var(--dd-orange);
    font-size: 24px;
}

.dd-sidebar-promo p,
.dd-newsletter-card p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--dd-text);
}

.dd-sidebar-promo a,
.dd-newsletter-card button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--dd-orange-strong);
    border-radius: 11px;
    background: var(--dd-orange-strong);
    color: var(--dd-white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dd-sidebar-promo a:hover,
.dd-newsletter-card button:hover {
    background: var(--dd-orange-hover);
    border-color: var(--dd-orange-hover);
}

/* =========================================================
   NEWSLETTER
   ========================================================= */

.dd-newsletter-card input {
    width: 100%;
    height: 42px;
    margin-bottom: 10px;
    padding: 0 12px;
    border: 1px solid var(--dd-border-soft);
    border-radius: 11px;
    background: #f8fafc;
    font-size: 13px;
    font-family: inherit;
}

.dd-newsletter-card input:focus {
    border-color: var(--dd-orange-border);
    box-shadow: 0 0 0 3px rgba(224, 111, 88, 0.14);
    outline: none;
}

.dd-newsletter-card button {
    width: 100%;
}

/* =========================================================
   PAGINACJA
   ========================================================= */

.dd-articles-pagination {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.dd-articles-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 4px;
    padding: 0 12px;
    border: 1px solid var(--dd-border-soft);
    border-radius: 10px;
    background: var(--dd-white);
    color: var(--dd-navy);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.dd-articles-pagination .page-numbers.current {
    background: var(--dd-orange-strong);
    border-color: var(--dd-orange-strong);
    color: var(--dd-white);
}

.dd-no-articles {
    padding: 24px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 18px;
    color: var(--dd-text);
}

/* =========================================================
   STRONA KATEGORII ARTYKUŁÓW
   ========================================================= */

.dd-category-page {
    padding-top: 32px;
}

.dd-category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 28px;
    align-items: center;
    margin: 0 0 20px;
    padding: 28px 32px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 20px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-category-hero-content {
    min-width: 0;
}

.dd-category-hero .dd-article-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #7d859f;
}

.dd-category-hero .dd-article-breadcrumbs a {
    color: #7d859f;
    text-decoration: none;
    font-weight: 500;
}

.dd-category-hero .dd-article-breadcrumbs a:hover {
    color: var(--dd-orange-strong);
}

.dd-category-hero .dd-article-breadcrumbs span {
    color: #b8becc;
}

.dd-category-hero .dd-article-breadcrumbs span:last-child {
    color: var(--dd-orange-strong);
    font-weight: 600;
}

.dd-category-hero h1 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--dd-navy);
    font-weight: 700;
}

.dd-category-hero p {
    max-width: 640px;
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dd-text);
}

.dd-category-hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dd-category-hero-image img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 18px;
}

.dd-category-hero:not(:has(.dd-category-hero-image)) {
    grid-template-columns: 1fr;
}

.dd-category-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.dd-category-topics span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--dd-orange-soft);
    color: var(--dd-navy);
    font-size: 13px;
    line-height: 1;
    font-weight: 500;
}

.dd-category-topics span::before {
    content: "•";
    margin-right: 7px;
    color: var(--dd-orange-strong);
    font-size: 18px;
    line-height: 1;
}

.dd-articles-search--category {
    grid-template-columns: minmax(0, 1fr) 190px;
    margin-bottom: 24px;
}

.dd-category-page .dd-articles-list-section {
    margin-top: 22px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
    .dd-articles-sidebar {
        grid-template-columns: 1fr;
    }

    .dd-newsletter-card {
        grid-column: 1 / -1;
    }

    .dd-category-hero {
        grid-template-columns: 1fr;
    }

    .dd-category-hero-image {
        display: none;
    }
}

@media (max-width: 767px) {
    .dd-articles-hero {
        gap: 14px;
    }

    .dd-articles-icon {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .dd-articles-icon svg {
        width: 36px;
        height: 36px;
    }

    .dd-articles-hero h1,
    .dd-category-hero h1 {
        font-size: 34px;
    }

    .dd-articles-search,
    .dd-articles-search--category {
        grid-template-columns: 1fr;
    }

    .dd-featured-inner,
    .dd-article-row {
        grid-template-columns: 1fr;
    }

    .dd-featured-image {
        min-height: 220px;
    }

    .dd-article-row-image {
        height: 210px;
    }

    .dd-featured-bottom,
    .dd-article-row-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .dd-articles-sidebar {
        grid-template-columns: 1fr;
    }

    .dd-category-hero {
        padding: 22px;
    }
}

/* =========================================================
   FIX FINAL — STRONA ARTYKUŁÓW: ODSTĘP OD MENU
   ========================================================= */

.dd-articles-page.dd-page-shell {
    padding-top: 0 !important;
}

.dd-articles-page.dd-page-shell .dd-articles-layout.dd-page-layout {
    margin: 20px auto 0 !important;
}

/* tablet */
@media (max-width: 1024px) {
    .dd-articles-page.dd-page-shell .dd-articles-layout.dd-page-layout {
        margin-top: 48px !important;
    }
}

/* mobile */
@media (max-width: 767px) {
    .dd-articles-page.dd-page-shell .dd-articles-layout.dd-page-layout {
        margin-top: 32px !important;
    }
}