/* =========================================================
   PODSTRONA PROBLEMU
   styl spójny z pojedynczym artykułem
   korzysta ze zmiennych globalnych z frontend.css
   ========================================================= */


/* =========================================================
   RESET KONTENERÓW ASTRY / ELEMENTORA TYLKO DLA STRONY PROBLEMU
   ========================================================= */

body:has(.dd-problem-page) .site-content,
body:has(.dd-problem-page) .site-content .ast-container,
body:has(.dd-problem-page) .content-area,
body:has(.dd-problem-page) .site-main,
body:has(.dd-problem-page) article.page,
body:has(.dd-problem-page) .entry-content,
body:has(.dd-problem-page) .entry-content > *,
body:has(.dd-problem-page) .elementor,
body:has(.dd-problem-page) .elementor-section,
body:has(.dd-problem-page) .elementor-container,
body:has(.dd-problem-page) .e-con,
body:has(.dd-problem-page) .e-con-inner {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Nie ruszamy globalnego headera Astry */
body:has(.dd-problem-page) .site-header .ast-container,
body:has(.dd-problem-page) .ast-primary-header-bar .ast-container,
body:has(.dd-problem-page) .main-header-bar .ast-container {
    max-width: 1180px !important;
    width: auto !important;
}


/* =========================================================
   UKŁAD STRONY — IDENTYCZNIE JAK POJEDYNCZY ARTYKUŁ
   ========================================================= */

.dd-problem-page {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 105px 0 64px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.dd-problem-layout {
    width: min(1180px, calc(100vw - 32px)) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 32px !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

.dd-problem-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.dd-problem-sidebar {
    width: 300px !important;
    max-width: 300px !important;
    min-width: 0 !important;
    display: grid !important;
    gap: 16px !important;
}


/* =========================================================
   GŁÓWNA BIAŁA TAFLA — JAK W POJEDYNCZYM ARTYKULE
   ========================================================= */

.dd-problem-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px !important;
    background: var(--dd-white) !important;
    border: 1px solid var(--dd-border-soft) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02) !important;
    box-sizing: border-box !important;
}


/* =========================================================
   BREADCRUMBS
   ========================================================= */

.dd-problem-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #7d859f;
}

.dd-problem-breadcrumbs a {
    color: #7d859f;
    text-decoration: none;
    font-weight: 500;
}

.dd-problem-breadcrumbs a:hover {
    color: var(--dd-orange);
}

.dd-problem-breadcrumbs span {
    color: #b8becc;
}

.dd-problem-breadcrumbs strong {
    color: var(--dd-orange);
    font-weight: 600;
}


/* =========================================================
   TYTUŁ
   ========================================================= */

.dd-problem-title {
    margin: 0 0 28px !important;
    font-size: 44px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    color: var(--dd-navy) !important;
    font-family: inherit !important;
}

.dd-problem-intro {
    max-width: 780px;
    margin: -12px 0 24px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dd-text);
}


/* =========================================================
   KROKI — SEKCJE WEWNĄTRZ JEDNEJ BIAŁEJ TAFLI
   ========================================================= */

.dd-problem-step {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 24px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 1px solid var(--dd-border-soft) !important;
}

.dd-problem-step:first-of-type {
    border-top: 0 !important;
    padding-top: 0 !important;
}

.dd-problem-step:last-of-type {
    padding-bottom: 0 !important;
}

.dd-step-number,
.dd-step-number-yellow {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dd-orange-strong);
    color: var(--dd-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}

.dd-step-content h2 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-step-content p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    color: var(--dd-text);
    font-family: inherit;
}

.dd-step-content ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.dd-step-content li {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    color: var(--dd-text);
    font-family: inherit;
}

.dd-step-note {
    margin-top: 16px;
    padding: 1px 0 1px 14px;
    border-left: 2px solid var(--dd-orange-border);
    font-size: 15px;
    line-height: 1.7;
    color: var(--dd-text);
    font-family: inherit;
}


/* =========================================================
   BUTTONY / CTA
   ========================================================= */

.dd-problem-buttons {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.dd-problem-page a {
    transition: all 0.2s ease;
}

.dd-step-content a,
.dd-sidebar-box a:not(.dd-problem-btn):not(.dd-sidebar-btn),
.dd-recommended-clinics a:not(.dd-all-clinics-btn) {
    color: var(--dd-navy);
    text-decoration: none;
    font-weight: 600;
}

.dd-step-content a:hover,
.dd-sidebar-box a:not(.dd-problem-btn):not(.dd-sidebar-btn):hover,
.dd-recommended-clinics a:not(.dd-all-clinics-btn):hover {
    color: var(--dd-orange);
    text-decoration: none;
}

.dd-problem-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 54px;
    padding: 0 12px 0 18px;
    background: var(--dd-orange-strong);
    border: 1px solid var(--dd-orange-strong);
    border-radius: 14px;
    color: var(--dd-white) !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    font-family: inherit;
    white-space: normal;
    box-shadow: 0 6px 16px rgba(212, 122, 91, 0.14);
    transition: all 0.2s ease;
}

.dd-problem-btn:hover {
    background: var(--dd-orange-hover);
    border-color: var(--dd-orange-hover);
    color: var(--dd-white) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(212, 122, 91, 0.20);
}

.dd-problem-btn:focus,
.dd-problem-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 111, 88, 0.22);
}

.dd-problem-btn span {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--dd-white);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.dd-problem-btn:hover span {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.24);
}


/* =========================================================
   POLECANE GABINETY
   ========================================================= */

.dd-recommended-clinics {
    margin-top: 18px;
    padding: 22px;
    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-recommended-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dd-recommended-header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-ad-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--dd-orange-soft);
    color: var(--dd-orange);
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-family: inherit;
}

.dd-clinic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dd-clinic-card {
    padding: 16px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 16px;
}

.dd-clinic-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-clinic-card p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #7d859f;
    font-family: inherit;
}

.dd-rating {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--dd-navy);
    font-weight: 600;
    font-family: inherit;
}

.dd-clinic-card a,
.dd-all-clinics-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--dd-navy);
    border: 1px solid var(--dd-navy);
    color: var(--dd-white);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
}

.dd-all-clinics-btn {
    display: flex;
    margin-top: 14px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 14px;
}

.dd-clinic-card a:hover,
.dd-all-clinics-btn:hover {
    background: #0d1b50;
    border-color: #0d1b50;
    color: var(--dd-white);
    text-decoration: none !important;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.dd-problem-sidebar .dd-sidebar-card,
.dd-problem-sidebar .dd-sidebar-box,
.dd-problem-sidebar .dd-sidebar-ad {
    width: 100% !important;
    box-sizing: border-box !important;
}

.dd-sidebar-box {
    padding: 16px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 16px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-sidebar-box h3 {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-sidebar-box h4 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-sidebar-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #7d859f;
    font-family: inherit;
}


/* =========================================================
   FILM
   ========================================================= */

.dd-video-box {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--dd-navy);
    overflow: hidden;
}

.dd-video-play {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dd-white);
    color: var(--dd-orange);
    font-size: 15px;
    line-height: 1;
}


/* =========================================================
   REKLAMY
   ========================================================= */

.dd-sidebar-ad {
    padding: 18px;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-soft);
    border-radius: 16px;
    box-shadow: 0 1px 0 rgba(9, 19, 58, 0.02);
}

.dd-sidebar-ad span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-bottom: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--dd-orange-soft);
    color: var(--dd-orange);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    font-family: inherit;
}

.dd-sidebar-ad h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--dd-navy);
    font-family: inherit;
}

.dd-sidebar-ad p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dd-text);
    font-family: inherit;
}

.dd-sidebar-ad a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--dd-orange-strong);
    border: 1px solid var(--dd-orange-strong);
    color: var(--dd-white);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
}

.dd-sidebar-ad a:hover {
    background: var(--dd-orange-hover);
    border-color: var(--dd-orange-hover);
    color: var(--dd-white);
    text-decoration: none !important;
}

.dd-ad-green,
.dd-ad-purple {
    background: var(--dd-white);
}


/* =========================================================
   RESPONSIVE — JAK SINGLE ARTICLE
   ========================================================= */

@media (max-width: 1024px) {
    .dd-problem-page {
        padding-top: 72px !important;
    }

    .dd-problem-layout {
        width: min(100%, calc(100vw - 28px)) !important;
        grid-template-columns: 1fr !important;
    }

    .dd-problem-main,
    .dd-problem-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .dd-problem-sidebar {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 767px) {
    .dd-problem-page {
        padding-top: 56px !important;
        padding-bottom: 48px !important;
    }

    .dd-problem-layout {
        width: calc(100vw - 28px) !important;
    }

    .dd-problem-card {
        padding: 18px !important;
        border-radius: 18px !important;
    }

    .dd-problem-breadcrumbs {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .dd-problem-title {
        font-size: 30px !important;
        margin-bottom: 20px !important;
    }

    .dd-problem-intro {
        margin-top: -8px;
        font-size: 15px;
    }

    .dd-problem-step {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 22px 0 !important;
    }

    .dd-step-number {
        margin-bottom: 0;
    }

    .dd-problem-btn {
        min-height: 50px;
        padding: 0 10px 0 16px;
        font-size: 14px;
        border-radius: 12px;
    }

    .dd-problem-btn span {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 15px;
    }

    .dd-clinic-grid {
        grid-template-columns: 1fr;
    }

    .dd-recommended-clinics,
    .dd-sidebar-box,
    .dd-sidebar-ad {
        border-radius: 16px;
    }
}
