/* ============================================
   GŁĘBOKA DROGA – GŁÓWNY DESIGN SYSTEM
   ============================================ */

/* ---------- ZMIENNE ---------- */
:root {
    /* TŁA */
    --gd-page-bg: #F0EBE0;
    --gd-content-bg: #FFFDF5;
    --gd-sidebar-bg: #E8DFD0;
    --gd-header-bg: #FFFDF5;
    --gd-header-border: #D4C9B0;
    
    /* AKCENTY */
    --gd-sun: #C8850A;
    --gd-lotus: #1E6E4E;
    --gd-violet: #5B3A8A;
    
    /* TEKST */
    --gd-ink: #1C1710;
    --gd-ink-mid: #4A3F2C;
    --gd-ink-soft: #8A8070;
    
    /* LINIE */
    --gd-line: #D4C9B0;
    --gd-line-mid: #BDB39A;
    
    /* TYPOGRAFIA */
    --gd-serif: 'Cardo', Georgia, 'Times New Roman', serif;
    --gd-sans: 'Inter', system-ui, sans-serif;
    
    /* WYMIARY */
    --gd-content-w: 640px;
    --gd-sidebar-w: 25%;
    --gd-wide-w: 1200px;
    --gd-narrow-w: 680px;
    --gd-nav-h: 64px;
    --gd-px: clamp(20px, 5vw, 48px);
}

/* ---------- RESET I BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--gd-sans);
    font-size: 1.0625rem;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    background: var(--gd-page-bg);
    color: var(--gd-ink);
}

/* ---------- NAGŁÓWEK ---------- */
.gd-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--gd-header-bg);
    border-bottom: 1px solid var(--gd-line);
    transition: background 0.2s ease;
}

.gd-header-inner {
    max-width: var(--gd-wide-w);
    margin: 0 auto;
    padding: 0 var(--gd-px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--gd-nav-h);
}

.gd-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gd-header-icon img {
    width: 44px;
    height: 44px;
    display: block;
}

.gd-header-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-site-title {
    font-family: var(--gd-serif);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.2;
}

.gd-site-title a {
    text-decoration: none;
    color: var(--gd-ink);
}

.gd-site-tagline {
    font-family: var(--gd-sans);
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gd-ink-soft);
}

.gd-header-nav-area {
    display: flex;
    align-items: center;
    gap: 28px;
}

.gd-main-nav .wp-block-navigation__container {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.gd-main-nav .wp-block-navigation-item__label {
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--gd-ink-mid);
    transition: color 0.2s;
}

.gd-main-nav .wp-block-navigation-item__label:hover {
    color: var(--gd-lotus);
}

.gd-header-search .wp-block-search__input {
    border: 1px solid var(--gd-line);
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    background: transparent;
    transition: width 0.2s, border-color 0.2s;
    width: 140px;
}

.gd-header-search .wp-block-search__input:focus {
    width: 200px;
    border-color: var(--gd-lotus);
    outline: none;
}

.gd-header-search .wp-block-search__button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gd-ink-mid);
}

/* ---------- WARIANTY NAGŁÓWKA ---------- */
body.gd-header-dark .gd-site-header {
    background: #1C1710;
    border-color: #2C2820;
}

body.gd-header-dark .gd-site-title a {
    color: #FFFDF5;
}

body.gd-header-dark .gd-site-tagline {
    color: rgba(255, 255, 255, 0.4);
}

body.gd-header-dark .wp-block-navigation-item__label {
    color: rgba(255, 255, 255, 0.6);
}

body.gd-header-dark .gd-header-icon img {
    filter: invert(1) brightness(2);
}

body.gd-header-gold .gd-site-header {
    background: #FEF3DC;
    border-color: #E8D59A;
}

body.gd-header-gold .gd-site-title a {
    color: #7A4A00;
}

body.gd-header-gold .wp-block-navigation-item__label {
    color: #7A4A00;
}

/* ---------- PASER POSTĘPU ---------- */
.gd-progress {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gd-line);
}

.gd-progress__bar {
    height: 100%;
    background: var(--gd-lotus);
    width: 0%;
    transition: width 0.1s linear;
}

/* ---------- UKŁAD Z SIDEBAR ---------- */
.gd-with-sidebar {
    background: var(--gd-page-bg);
}

.gd-layout-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0;
    max-width: var(--gd-wide-w);
    margin: 0 auto;
}

.gd-sidebar {
    width: var(--gd-sidebar-w);
    max-width: 320px;
    min-width: 200px;
    flex-shrink: 0;
    background: var(--gd-sidebar-bg);
    border-right: 1px solid var(--gd-line);
    position: sticky;
    top: var(--gd-nav-h);
    max-height: calc(100vh - var(--gd-nav-h));
    overflow-y: auto;
    align-self: flex-start;
    padding: var(--gd-px);
}

.gd-main-content {
    flex: 1;
    background: var(--gd-content-bg);
    min-width: 0;
    max-width: var(--gd-content-w);
    padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px);
}

/* ---------- SIDEBAR WIDGETS ---------- */
.gd-sidebar-widget {
    margin-bottom: 2rem;
}

.gd-sidebar-widget__title {
    font-family: var(--gd-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gd-line);
}

.gd-sidebar-nav ul {
    list-style: none;
}

.gd-sidebar-nav li {
    margin-bottom: 0.5rem;
}

.gd-sidebar-nav a {
    text-decoration: none;
    color: var(--gd-ink-mid);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-sidebar-nav a::before {
    content: "✦";
    color: var(--gd-sun);
    font-size: 0.625rem;
}

.gd-sidebar-nav a:hover {
    color: var(--gd-lotus);
}

.gd-sidebar-posts {
    list-style: none;
}

.gd-sidebar-posts li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gd-line);
}

.gd-sidebar-posts a {
    text-decoration: none;
    color: var(--gd-ink-mid);
    font-size: 0.875rem;
    display: block;
}

.gd-sidebar-posts a:hover {
    color: var(--gd-lotus);
}

.gd-sidebar-posts .post-date {
    font-size: 0.6875rem;
    color: var(--gd-ink-soft);
    display: block;
    margin-top: 4px;
}

.gd-sidebar-quote {
    background: rgba(0,0,0,0.03);
    border-left: 3px solid var(--gd-sun);
    padding: 1rem;
    font-style: italic;
    font-size: 0.875rem;
    color: var(--gd-ink-mid);
}

.gd-sidebar-tags .tag-cloud-link {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gd-content-bg);
    border-radius: 20px;
    font-size: 0.6875rem;
    text-decoration: none;
    color: var(--gd-ink-mid);
    margin: 0 4px 8px 0;
}

.gd-sidebar-tags .tag-cloud-link:hover {
    background: var(--gd-lotus);
    color: white;
}

.gd-sidebar-cta {
    background: var(--gd-lotus);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.gd-sidebar-cta h4 {
    font-family: var(--gd-serif);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.gd-sidebar-cta p {
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.gd-sidebar-cta .btn-cta {
    background: white;
    color: var(--gd-lotus);
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
}

/* ---------- SEPARATOR ---------- */
.gd-separator {
    margin: 1.5rem 0;
    text-align: center;
    color: var(--gd-sun);
    font-size: 0.75rem;
    letter-spacing: 4px;
}

/* ---------- STRONA GŁÓWNA – HERO ---------- */
.gd-hero {
    background: var(--gd-content-bg);
    border-bottom: 1px solid var(--gd-line);
    padding: clamp(56px, 8vw, 100px) var(--gd-px);
    text-align: center;
}

.gd-hero h1 {
    font-family: var(--gd-serif);
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--gd-ink);
    margin-bottom: 1rem;
}

.gd-hero h1 em {
    color: var(--gd-lotus);
    font-style: italic;
}

.gd-hero-subtitle {
    font-size: 1.125rem;
    color: var(--gd-ink-mid);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.gd-hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gd-hero .btn-primary {
    background: var(--gd-lotus);
    color: white;
    padding: 0.625rem 1.5rem;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.2s;
}

.gd-hero .btn-primary:hover {
    background: #0E3D28;
}

.gd-hero .btn-outline {
    border: 1px solid var(--gd-ink-mid);
    color: var(--gd-ink-mid);
    padding: 0.625rem 1.5rem;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.gd-hero .btn-outline:hover {
    border-color: var(--gd-lotus);
    color: var(--gd-lotus);
}

/* ---------- PASKI TEMATYCZNE ---------- */
.gd-topics-bar {
    background: var(--gd-sidebar-bg);
    padding: 1rem var(--gd-px);
    text-align: center;
}

.gd-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.gd-topic {
    font-size: 0.75rem;
    text-decoration: none;
    color: var(--gd-ink-mid);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--gd-content-bg);
    transition: background 0.2s;
}

.gd-topic:hover {
    background: var(--gd-lotus);
    color: white;
}

/* ---------- LISTA ARTYKUŁÓW Z NUMERACJĄ ---------- */
.gd-article-list {
    margin: 2rem 0;
}

.gd-art-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gd-line);
    transition: transform 0.2s;
}

.gd-art-row:hover {
    transform: translateX(4px);
}

.gd-art-row__num {
    font-family: var(--gd-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--gd-line-mid);
    min-width: 48px;
}

.gd-art-row__body {
    flex: 1;
}

.gd-art-row__cat {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.gd-cat--filozofia {
    color: #2C1654;
    background: #EDE7F6;
}

.gd-cat--medytacja {
    color: #7A4A00;
    background: #FEF3DC;
}

.gd-cat--zdrowie {
    color: #0E3D28;
    background: #E0F2EB;
}

.gd-cat--religia {
    color: #5B1E3A;
    background: #FCE4EC;
}

.gd-art-row__title {
    font-family: var(--gd-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0.25rem 0 0.5rem;
}

.gd-art-row__title a {
    text-decoration: none;
    color: var(--gd-ink);
}

.gd-art-row__title a:hover {
    color: var(--gd-lotus);
}

.gd-art-row__excerpt {
    font-size: 0.875rem;
    color: var(--gd-ink-mid);
    margin-bottom: 0.5rem;
}

.gd-art-row__meta {
    font-size: 0.625rem;
    color: var(--gd-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gd-art-row__arr {
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 1.25rem;
}

.gd-art-row:hover .gd-art-row__arr {
    opacity: 1;
}

/* ---------- SEKCJA FILARÓW (SIATKA 6) ---------- */
.gd-pillars-section {
    padding: clamp(48px, 7vw, 80px) var(--gd-px);
    background: var(--gd-sidebar-bg);
}

.gd-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: var(--gd-wide-w);
    margin: 2rem auto 0;
}

.gd-pillar {
    text-align: center;
    padding: 1.5rem;
    background: var(--gd-content-bg);
}

.gd-pillar__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.gd-pillar h3 {
    font-family: var(--gd-serif);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.gd-pillar p {
    font-size: 0.8125rem;
    color: var(--gd-ink-mid);
}

/* ---------- CYTAT BAND ---------- */
.gd-quote-band {
    background: var(--gd-lotus);
    padding: clamp(48px, 7vw, 80px) var(--gd-px);
    text-align: center;
}

.gd-quote-band__text {
    font-family: var(--gd-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.65;
    max-width: 800px;
    margin: 0 auto;
}

.gd-quote-band__author {
    margin-top: 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- NEWSLETTER ---------- */
.gd-newsletter {
    background: var(--gd-content-bg);
    border-top: 1px solid var(--gd-line);
    padding: clamp(48px, 7vw, 80px) var(--gd-px);
    text-align: center;
}

.gd-newsletter h2 {
    font-family: var(--gd-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.gd-newsletter p {
    color: var(--gd-ink-mid);
    margin-bottom: 1.5rem;
}

.gd-nl-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.gd-nl-form input[type="email"] {
    flex: 1;
    border: 1px solid var(--gd-line-mid);
    border-right: none;
    background: white;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-family: var(--gd-sans);
}

.gd-nl-form input[type="email"]:focus {
    outline: none;
    border-color: var(--gd-lotus);
}

.gd-nl-form button {
    background: var(--gd-ink);
    color: var(--gd-content-bg);
    border: none;
    padding: 12px 20px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.gd-nl-form button:hover {
    background: var(--gd-lotus);
}

.gd-nl-msg {
    margin-top: 1rem;
    font-size: 0.75rem;
    display: none;
}

/* ---------- ARKUSZ – WIDOK CZYTANIA ---------- */
.entry-content > p:first-of-type::first-letter {
    font-family: var(--gd-serif);
    font-size: 4.5rem;
    font-weight: 400;
    float: left;
    line-height: 0.82;
    margin: 7px 13px 0 0;
    color: var(--gd-lotus);
}

.entry-content h2 {
    font-family: var(--gd-serif);
    font-size: 1.5rem;
    font-weight: 500;
    margin: 2rem 0 1rem;
}

.entry-content h3 {
    font-family: var(--gd-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem;
}

/* ---------- BREADCRUMB ---------- */
.gd-breadcrumb {
    font-size: 0.6875rem;
    color: var(--gd-ink-soft);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gd-line);
}

.gd-breadcrumb a {
    text-decoration: none;
    color: var(--gd-ink-mid);
}

.gd-breadcrumb a:hover {
    color: var(--gd-lotus);
}

/* ---------- META BAR ARTYKUŁU ---------- */
.gd-meta-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gd-line);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gd-ink-soft);
}

.gd-meta-bar .gd-cat a {
    text-decoration: none;
    color: var(--gd-sun);
}

.gd-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---------- NAVIGACJA MIĘDZY ARTYKUŁAMI ---------- */
.gd-post-nav {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--gd-line);
}

.gd-post-nav a {
    text-decoration: none;
    font-size: 0.75rem;
    color: var(--gd-ink-mid);
}

.gd-post-nav a:hover {
    color: var(--gd-lotus);
}

/* ---------- STOPKA ---------- */
.site-footer {
    background: #1C1710;
    color: #FFFDF5;
    margin-top: 4rem;
}

.gd-footer-inner {
    max-width: var(--gd-wide-w);
    margin: 0 auto;
    padding: 3rem var(--gd-px);
}

.gd-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.gd-footer-col h4 {
    font-family: var(--gd-serif);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--gd-sun);
}

.gd-footer-col p,
.gd-footer-col ul {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.gd-footer-col ul {
    list-style: none;
}

.gd-footer-col ul li {
    margin-bottom: 0.5rem;
}

.gd-footer-col a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
}

.gd-footer-col a:hover {
    color: var(--gd-sun);
}

.gd-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- TRYBY SZEROKOŚCI ---------- */
body.gd-width-narrow {
    --gd-wide-w: 680px;
    --gd-sidebar-w: 0%;
}

body.gd-width-narrow .gd-sidebar {
    display: none;
}

body.gd-width-narrow .gd-main-content {
    max-width: 680px;
    margin: 0 auto;
}

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 1023px) {
    :root {
        --gd-sidebar-w: 220px;
    }
}

@media (max-width: 860px) {
    .gd-layout-inner {
        flex-direction: column;
    }
    
    .gd-sidebar {
        width: 100%;
        max-width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid var(--gd-line);
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
        padding: 20px var(--gd-px);
    }
    
    .gd-main-content {
        width: 100%;
    }
    
    .gd-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gd-header-inner {
        flex-direction: column;
        height: auto;
        padding: 0.75rem var(--gd-px);
        gap: 0.75rem;
    }
    
    .gd-header-nav-area {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .gd-sidebar {
        grid-template-columns: 1fr;
    }
    
    .gd-art-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gd-art-row__num {
        font-size: 1.5rem;
        min-width: auto;
    }
    
    .gd-hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .gd-nl-form {
        flex-direction: column;
    }
    
    .gd-nl-form input[type="email"] {
        border-right: 1px solid var(--gd-line-mid);
        border-bottom: none;
        text-align: center;
    }
}

/* ---------- DRUK ---------- */
@media print {
    .gd-sidebar,
    .gd-hero,
    .gd-quote-band,
    .gd-newsletter,
    .gd-site-header,
    .site-footer,
    .gd-meta-bar,
    .gd-post-nav {
        display: none !important;
    }
    
    .entry-content {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        background: white;
        color: black;
    }
}