/*
Theme Name:   DJ WORLD
Description:  Motyw portalu DJ WORLD na bazie Twenty Twenty-Four, bez wtyczki PostX. Wymaga wtyczki „DJ WORLD – funkcje portalu”.
Author:       DJ WORLD
Template:     twentytwentyfour
Version:      0.3.9
Requires at least: 6.4
Requires PHP: 7.4
Text Domain:  djworld-motyw
*/

:root {
	--djw-zolty: #ffba00;
	--djw-tekst: #292929;
	--djw-ciemny: #2c2c2c;
	--djw-szer: 1140px;
	--djw-szer-w: min(var(--djw-szer), calc(100% - 32px));
}

body { background: var(--wp--preset--color--base, #fff); color: var(--djw-tekst); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}

/* ---------- Nagłówek ---------- */
.djw-naglowek-strony {
	position: relative; z-index: 20; background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}
.djw-naglowek-strony .djw-pasek {
	width: var(--djw-szer-w); margin: 0 auto; min-height: 74px;
	display: flex; align-items: center; gap: 22px;
}
.djw-naglowek-strony .wp-block-site-logo { flex: none; }
.djw-naglowek-strony .wp-block-site-logo img { width: 110px; height: auto; }
.djw-naglowek-strony .wp-block-navigation { flex: 1; font-size: 15px; }
.djw-naglowek-strony .wp-block-navigation .wp-block-navigation__container { gap: 12px; }
.djw-naglowek-strony .wp-block-navigation-item__content { color: var(--djw-tekst); text-decoration: none; }
.djw-naglowek-strony .wp-block-navigation-item__content:hover,
.djw-naglowek-strony .current-menu-item > .wp-block-navigation-item__content { color: var(--djw-zolty); text-decoration: underline; }
.djw-naglowek-strony .djw-prawa { display: flex; align-items: center; gap: 14px; flex: none; margin-left: auto; }
.djw-naglowek-strony .wp-block-social-links { gap: 10px; margin: 0; }
.djw-naglowek-strony .wp-block-social-links .wp-social-link svg { width: 18px; height: 18px; }
.djw-naglowek-strony .wp-block-search__button {
	background: var(--djw-ciemny); color: #fff; border: 0; border-radius: 2px; padding: 7px; margin: 0;
}
.djw-naglowek-strony .wp-block-search__button svg { width: 20px; height: 20px; fill: currentColor; }
.djw-naglowek-strony .wp-block-search__input { border: 1px solid #ddd; border-radius: 2px; font-size: 14px; }
.djw-przycisk .wp-block-button__link,
.djw-przycisk.wp-block-button .wp-block-button__link {
	background: var(--djw-zolty); color: var(--djw-tekst); border-radius: 30px;
	padding: 9px 22px; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none;
}
.djw-przycisk .wp-block-button__link:hover { background: var(--djw-tekst); color: #fff; }

/* Podmenu Charts (przeniesione z dodatkowego CSS) */
.wp-block-navigation .djc-menu .wp-block-navigation__submenu-container {
	min-width: 290px !important; background: #fff !important; border: 0 !important;
	border-top: 3px solid var(--djw-zolty) !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
	padding: 10px 0 !important; z-index: 50;
}
.wp-block-navigation .djc-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 20px !important; font-size: 15px; font-weight: 600; color: var(--djw-tekst) !important; white-space: nowrap; text-decoration: none;
}
.wp-block-navigation .djc-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: #fff8e1; color: #c98f00 !important; }
.wp-block-navigation .djc-menu .wp-block-navigation__submenu-container li:last-child { border-top: 1px solid #eee; margin-top: 6px; padding-top: 6px; }
.wp-block-navigation .djc-menu .wp-block-navigation__submenu-container li:last-child .wp-block-navigation-item__content { color: #c98f00 !important; font-weight: 700; }

/* ---------- Strona główna ---------- */
.djw-glowna { padding-bottom: 60px; }
.djw-kontener { width: var(--djw-szer-w); max-width: none; margin-left: auto !important; margin-right: auto !important; }
.djw-glowna > * + * { margin-top: 0; }
.djw-sekcja { margin-top: 40px !important; }
.djw-sekcja:first-child { margin-top: 28px !important; }

.djw-baner { margin: 0 !important; }
.djw-baner img { display: block; width: 100%; height: auto; border-radius: 4px; }
.djw-baner figure { margin: 0; }

/* Nagłówek sekcji z liniami po bokach */
.djw-naglowek {
	display: flex; align-items: center; gap: 16px;
	margin: 0 0 26px !important; font-size: 28px !important; font-weight: 400 !important; line-height: 1.2;
	letter-spacing: 0; color: inherit; text-transform: none;
}
.djw-naglowek::before,
.djw-naglowek::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .85; }
.djw-naglowek--maly { font-size: 26px !important; margin-bottom: 20px !important; }

/* Ciemna sekcja TECH */
.djw-ciemne-tlo { background: var(--djw-ciemny); color: #fff; padding: 36px 0 34px; }
.djw-ciemne-tlo .djw-naglowek { color: #fff; }

/* Kolumny: Najnowsze + boczne */
.djw-dwie-kolumny { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 34px; align-items: start; }
.djw-boczna > * + * { margin-top: 40px !important; }
.djw-boczna .djw-baner img { border-radius: 0; }

/* ---------- Wpis ---------- */
.djw-wpis .djw-okruszki { margin-bottom: 16px; }
.djw-tagi { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 26px; font-size: 0; }
.djw-tagi a {
	display: inline-block; padding: 3px 6px; border-radius: 1px; background: var(--djw-zolty);
	color: var(--djw-tekst); font-size: 10px; line-height: 13px; text-transform: uppercase; text-decoration: none;
}
.djw-tagi a:hover { background: #ff3866; color: #fff; }
.djw-tagi .wp-block-post-terms__separator { display: none; }
.djw-wpis__glowna > * + * { margin-top: 18px; }
.djw-wpis__tytul { margin: 0 !important; font-size: 32px !important; line-height: 1.2; font-weight: 400; letter-spacing: 0; }
.djw-wpis__obraz { margin-top: 24px !important; }
.djw-wpis__obraz img { display: block; width: 100%; height: auto; border-radius: 4px; }
.single-post:has(.djr-ramka) .djw-wpis__obraz { display: none; }

.djw-tresc { margin-top: 26px !important; font-size: 16px; line-height: 1.6; color: #717171; }
.djw-tresc > * { margin-top: 0; margin-bottom: 1.25em; }
.djw-tresc h2 { font-size: 30px; line-height: 1.25; color: var(--djw-tekst); margin: 1.4em 0 .6em; font-weight: 400; }
.djw-tresc h3 { font-size: 24px; line-height: 1.3; color: var(--djw-tekst); margin: 1.3em 0 .5em; font-weight: 400; }
.djw-tresc h4 { font-size: 20px; color: var(--djw-tekst); margin: 1.2em 0 .5em; font-weight: 400; }
.djw-tresc a { color: #111; text-decoration: underline; }
.djw-tresc a:hover { color: #c98f00; }
.djw-tresc img { max-width: 100%; height: auto; }
.djw-tresc figcaption { font-size: 12.8px; color: #636363; margin-top: 8px; }
.djw-tresc ul, .djw-tresc ol { padding-left: 1.6em; }
.djw-tresc blockquote { border-left: 4px solid var(--djw-zolty); margin-left: 0; padding: 4px 0 4px 20px; color: var(--djw-tekst); }
.djw-tresc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.djw-tresc th, .djw-tresc td { border: 1px solid #e3e3e3; padding: 8px 10px; }
.djw-tresc iframe { max-width: 100%; }

.djw-wpis .djw-udostepnij { padding-top: 6px; }
.djw-autor { display: flex; align-items: center; gap: 20px; background: #efefef; padding: 24px; margin-top: 30px !important; }
.djw-autor__foto { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.djw-autor__imie { font-size: 15px; font-weight: 700; color: var(--djw-tekst) !important; text-decoration: none; }
.djw-autor__opis { font-size: 13px; color: #717171; margin: 4px 0 0; }
.djw-nawigacja {
	display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
	border-top: 1px solid var(--djw-tekst); border-bottom: 1px solid var(--djw-tekst);
	padding: 18px 0; margin-top: 30px !important; font-size: 14px;
}
.djw-nawigacja a { color: var(--djw-tekst); text-decoration: none; }
.djw-nawigacja a:hover { color: #c98f00; }
.djw-nawigacja .post-navigation-link__label { display: block; font-size: 11px; color: #717171; text-transform: uppercase; margin-bottom: 4px; }

/* Kolumna boczna wpisów i archiwów */
.djw-ramka-ciemna { background: var(--djw-ciemny); color: #fff; padding: 24px 20px 26px; }
.djw-ramka-ciemna .djw-naglowek { color: #fff; }
aside .djw-boczna,
aside.djw-boczna { position: relative; }

/* ---------- Strony (O nas, Kontakt, regulaminy) ---------- */
.djw-strona .djw-okruszki { margin-bottom: 10px; }
.djw-strona__tytul { margin: 18px 0 0 !important; font-size: 32px !important; line-height: 1.2; font-weight: 400; }
.djw-tresc--strona { margin-top: 28px !important; }

/* ---------- Archiwa (kategorie, tagi, autor, data, wyszukiwanie, blog) ---------- */
.djw-pasmo { background: #efefef; padding: 46px 0; margin-top: 18px !important; }
.djw-pasmo h1 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 400; letter-spacing: 0; }
.djw-pasmo .wp-block-term-description { margin-top: 12px; font-size: 14px; color: #717171; }
.djw-pasmo .wp-block-term-description p { margin: 0; }
.djw-szukaj { margin-top: 18px; max-width: 520px; }
.djw-szukaj .wp-block-search__input { border: 1px solid #ccc; border-radius: 2px; padding: 10px 12px; font-size: 15px; }
.djw-szukaj .wp-block-search__button { background: var(--djw-zolty); color: var(--djw-tekst); border: 0; border-radius: 2px; font-weight: 700; padding: 10px 18px; }

/* ---------- Stopka ---------- */
.djw-stopka { background: var(--djw-ciemny); color: #fff; font-size: 13px; }
.djw-stopka a { color: #fff; text-decoration: none; }
.djw-stopka a:hover { color: var(--djw-zolty); }
.djw-stopka .djw-stopka__gora {
	width: var(--djw-szer-w); margin: 0 auto; padding: 48px 0 40px;
	display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
}
.djw-stopka .djw-stopka__marka { border-right: 1px solid rgba(255, 255, 255, .15); padding-right: 30px; }
.djw-stopka .djw-stopka__marka img { width: 100px; height: auto; display: block; }
.djw-stopka .djw-stopka__haslo { margin: 18px 0; font-weight: 700; }
.djw-stopka .djw-obserwuj { display: flex; align-items: center; gap: 16px; font-weight: 700; }
.djw-stopka .djw-obserwuj p { margin: 0; }
.djw-stopka h2 { margin: 0 0 18px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: #fff; }
.djw-stopka ul { list-style: none; margin: 0; padding: 0; }
.djw-stopka li { margin: 0 0 10px; }
.djw-stopka .wp-block-categories a,
.djw-stopka .djw-kategorie--lista a { text-transform: uppercase; font-size: 11px; }
.djw-stopka .djw-stopka__dol {
	border-top: 1px solid rgba(255, 255, 255, .12);
}
.djw-stopka .djw-stopka__dol-w {
	width: var(--djw-szer-w); margin: 0 auto; padding: 18px 0;
	display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.djw-stopka .djw-stopka__dol p { margin: 0; font-weight: 700; }
.djw-stopka .wp-block-navigation { font-size: 13px; }
.djw-stopka .wp-block-navigation .wp-block-navigation__container { gap: 22px; }

/* Ikony społecznościowe w kolorach marek (stopka) */
.djw-stopka .wp-social-link-facebook svg { fill: #1877f2; }
.djw-stopka .wp-social-link-instagram svg { fill: #e1306c; }
.djw-stopka .wp-social-link-youtube svg { fill: #ff0000; }
.djw-stopka .wp-block-social-links { gap: 12px; margin: 0; }

/* ---------- Telefon i tablet ---------- */
@media (max-width: 1024px) {
	.djw-naglowek-strony .wp-block-social-links { display: none; }
	.djw-stopka .djw-stopka__gora { grid-template-columns: 1fr 1fr; }
	.djw-stopka .djw-stopka__marka { border-right: 0; padding-right: 0; grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.djw-dwie-kolumny { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	.djw-naglowek-strony .djw-pasek { min-height: 62px; gap: 12px; }
	.djw-naglowek-strony .wp-block-site-logo img { width: 92px; }
	.djw-naglowek-strony .djw-przycisk .wp-block-button__link { padding: 7px 14px; font-size: 13px; }
	.djw-naglowek { font-size: 23px !important; }
	.djw-sekcja { margin-top: 32px !important; }
	.djw-stopka .djw-stopka__gora { grid-template-columns: 1fr; gap: 28px; }
	.djw-stopka .djw-stopka__dol-w { justify-content: center; text-align: center; }
	.djw-wpis__tytul { font-size: 26px !important; }
	.djw-tresc h2 { font-size: 24px; }
	.djw-nawigacja { grid-template-columns: 1fr; }
	.djw-pasmo { padding: 30px 0; }
	.djw-pasmo h1 { font-size: 26px; }
}

/* ---------- Przełącznik trybu jasny / ciemny ---------- */
.djw-przelacznik {
	display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
	padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--djw-tekst); cursor: pointer;
}
.djw-przelacznik:hover { background: rgba(127, 127, 127, .14); }
.djw-przelacznik svg { width: 19px; height: 19px; fill: currentColor; }
.djw-przelacznik__slonce { display: none; }
html[data-djw-motyw="ciemny"] .djw-przelacznik__slonce { display: block; }
html[data-djw-motyw="ciemny"] .djw-przelacznik__ksiezyc { display: none; }

/* ---------- Tryb ciemny ---------- */
html[data-djw-motyw="ciemny"] {
	color-scheme: dark;
	--djw-tekst: #e8e8e8;
	--djw-ciemny: #232323;
	--wp--preset--color--base: #141414;
	--wp--preset--color--base-2: #202020;
	--wp--preset--color--contrast: #e8e8e8;
	--wp--preset--color--contrast-2: #c4c4c4;
	--wp--preset--color--contrast-3: #a0a0a0;
}
html[data-djw-motyw="ciemny"] body { background: #141414; color: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony { background: #1b1b1b; box-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-navigation-item__content { color: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-social-links .wp-social-link,
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-social-links .wp-social-link a { color: #e8e8e8 !important; fill: #e8e8e8 !important; }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-search__button { background: #333; }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-search__input { background: #222; border-color: #444; color: #eee; }
html[data-djw-motyw="ciemny"] .wp-block-navigation .djc-menu .wp-block-navigation__submenu-container { background: #1f1f1f !important; }
html[data-djw-motyw="ciemny"] .wp-block-navigation .djc-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: #e8e8e8 !important; }
html[data-djw-motyw="ciemny"] .wp-block-navigation .djc-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: #2b2510; color: #ffba00 !important; }
html[data-djw-motyw="ciemny"] .wp-block-navigation .djc-menu .wp-block-navigation__submenu-container li:last-child { border-top-color: #333; }
html[data-djw-motyw="ciemny"] .wp-block-navigation__responsive-container.is-menu-open { background: #1b1b1b !important; color: #e8e8e8 !important; }
html[data-djw-motyw="ciemny"] .wp-block-navigation__responsive-container-open,
html[data-djw-motyw="ciemny"] .wp-block-navigation__responsive-container-close { color: #e8e8e8; }

/* Karty i listy */
html[data-djw-motyw="ciemny"] .djw-wpisy { --djw-tekst: #e8e8e8; --djw-szary: #a0a0a0; }
html[data-djw-motyw="ciemny"] .djw-kat__el { color: #292929 !important; }
html[data-djw-motyw="ciemny"] .djw-karta__foto { background: #222; }
html[data-djw-motyw="ciemny"] .djw-kategorie__el { background: #232323; }
html[data-djw-motyw="ciemny"] .djw-kategorie__el:hover { background: #2e2e2e; }
html[data-djw-motyw="ciemny"] .djw-kategorie__el span { background: #0e0e0e; }
html[data-djw-motyw="ciemny"] .djw-strzalka { background: #333; color: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djw-wiecej:hover { background: #e8e8e8; color: #141414; }
html[data-djw-motyw="ciemny"] .djw-ciemne-tlo,
html[data-djw-motyw="ciemny"] .djw-ramka-ciemna { background: #202020; }

/* Wpis, strony, archiwa */
html[data-djw-motyw="ciemny"] .djw-okruszki { color: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djw-okruszki span[aria-current],
html[data-djw-motyw="ciemny"] .djw-meta-wpisu { color: #a0a0a0; }
html[data-djw-motyw="ciemny"] .djw-tagi a { color: #292929; }
html[data-djw-motyw="ciemny"] .djw-tresc { color: #c4c4c4; }
html[data-djw-motyw="ciemny"] .djw-tresc h1,
html[data-djw-motyw="ciemny"] .djw-tresc h2,
html[data-djw-motyw="ciemny"] .djw-tresc h3,
html[data-djw-motyw="ciemny"] .djw-tresc h4,
html[data-djw-motyw="ciemny"] .djw-tresc strong,
html[data-djw-motyw="ciemny"] .djw-tresc b { color: #f0f0f0; }
html[data-djw-motyw="ciemny"] .djw-tresc a { color: #ffcc4d; }
html[data-djw-motyw="ciemny"] .djw-tresc figcaption { color: #9a9a9a; }
html[data-djw-motyw="ciemny"] .djw-tresc th,
html[data-djw-motyw="ciemny"] .djw-tresc td { border-color: #353535; }
html[data-djw-motyw="ciemny"] .djw-udostepnij__napis { border-color: #3a3a3a; color: #a0a0a0; }
html[data-djw-motyw="ciemny"] .djw-autor { background: #202020; }
html[data-djw-motyw="ciemny"] .djw-autor__opis { color: #a0a0a0; }
html[data-djw-motyw="ciemny"] .djw-nawigacja { border-color: #444; }
html[data-djw-motyw="ciemny"] .djw-pasmo { background: #1e1e1e; }
html[data-djw-motyw="ciemny"] .djw-szukaj .wp-block-search__input { background: #1e1e1e; border-color: #444; color: #eee; }
html[data-djw-motyw="ciemny"] .has-base-2-background-color { background-color: #1e1e1e !important; }
html[data-djw-motyw="ciemny"] .has-base-background-color { background-color: #141414 !important; }
html[data-djw-motyw="ciemny"] .djw-stopka { background: #0f0f0f; }
html[data-djw-motyw="ciemny"] .djw-naglowek-strony .wp-block-site-logo img { content: url("https://djworld.pl/wp-content/uploads/2026/11/djworld-logo-ciemny-300x96-1.png"); }

/* Strona Charts: tytuł H1 tylko dla Google (jak dotąd – na stronie jest grafika z nazwą) */
body.page-id-2930 .djw-strona__tytul { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }

/* Strona Charts i wpisy z listami (klasy djc-*) w trybie ciemnym */
html[data-djw-motyw="ciemny"] .djc,
html[data-djw-motyw="ciemny"] .djc-sekcja,
html[data-djw-motyw="ciemny"] .djc-wpis h3,
html[data-djw-motyw="ciemny"] .djc-meta b,
html[data-djw-motyw="ciemny"] .djc-krok,
html[data-djw-motyw="ciemny"] .djc-jak { color: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djc-sekcja::before,
html[data-djw-motyw="ciemny"] .djc-sekcja::after { background: #e8e8e8; }
html[data-djw-motyw="ciemny"] .djc-lead,
html[data-djw-motyw="ciemny"] .djc-wpis p { color: #c4c4c4; }
html[data-djw-motyw="ciemny"] .djc-meta,
html[data-djw-motyw="ciemny"] .djc small { color: #a0a0a0; }
html[data-djw-motyw="ciemny"] .djc-tagi span,
html[data-djw-motyw="ciemny"] .djc-btn:not(.szary) { color: #292929; }
html[data-djw-motyw="ciemny"] .djc .djc-btn.szary { background: #2a2a2a !important; color: #e8e8e8 !important; }
html[data-djw-motyw="ciemny"] .djc-krok { background: #1f1f1f; }
