/*
Theme Name: Image Power 2026
Description: Lekki motyw klasyczny dla imagepower.pl – bez Divi, treść w edytorze bloków, barwy marki (bordo, czerwień), relacje inwestorskie z menu działów.
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 7.4
Author: Image Power S.A.
Text Domain: imagepower-2026
*/

:root {
	--ground: #F5F4F2;
	--surface: #FFFFFF;
	--ink: #141414;
	--muted: #4F4B4B;
	--line: #E3DEDC;
	--brand: #B5121B;
	--brand-dark: #8F0E15;
	--tint: #F6ECEC;
	--head: #2B0A0A;
	--head-ink: #FFFFFF;
	--head-muted: #E3C9C9;
	--head-active: #E0202C;
	--foot: #161414;
	--foot-ink: #FFFFFF;
	--foot-muted: #C9C4C4;
	--foot-line: #3A3434;
	--radius: 12px;
	--wrap: 1200px;
	--font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 16px; }

/* ---------- nagłówek ---------- */

.site-header { background: var(--head); color: var(--head-ink); position: relative; z-index: 20; }
.header-inner { min-height: 84px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.site-logo { display: inline-flex; align-items: center; background: #FFFFFF; padding: 8px 12px; text-decoration: none; color: var(--ink); line-height: 1; }
.site-logo-img { display: block; height: 56px; width: auto; }
.site-logo-text { font-weight: 700; letter-spacing: 0.1em; font-size: 18px; }

.main-nav { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 28px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav .menu { display: flex; flex-wrap: wrap; gap: 0 26px; }
.main-nav .menu > li { position: relative; }
.main-nav .menu > li > a {
	display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 12px 0;
	color: var(--head-ink); text-decoration: none; font-size: 15.5px; border-bottom: 2px solid transparent;
}
.main-nav .menu > li > a:hover { color: var(--head-ink); border-bottom-color: var(--head-muted); }
.main-nav .menu > .current-menu-item > a,
.main-nav .menu > .current-menu-ancestor > a,
.main-nav .menu > .current-page-ancestor > a { font-weight: 600; border-bottom-color: var(--head-active); }
.main-nav .chevron { flex: 0 0 auto; }

.main-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: -12px; min-width: 280px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 0 12px 32px rgba(20, 10, 10, 0.16); padding: 8px; z-index: 30;
}
.main-nav .menu > li:hover > .sub-menu,
.main-nav .menu > li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu .current-menu-item > a { background: var(--tint); color: var(--ink); }

.lang-switch { display: flex; gap: 10px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.lang-switch a { color: var(--head-muted); text-decoration: none; padding: 12px 2px; display: inline-block; }
.lang-switch .current-lang a { color: var(--head-ink); font-weight: 600; }

.menu-toggle {
	display: none; margin-left: auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
	background: transparent; color: var(--head-ink); border: 1px solid var(--head-muted); border-radius: 8px; font: inherit; font-size: 15px; cursor: pointer;
}

@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; }
	.main-nav { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding-bottom: 16px; }
	.main-nav.is-open { display: flex; }
	.main-nav .menu { flex-direction: column; }
	.main-nav .menu > li > a { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
	.main-nav .sub-menu { display: block; position: static; box-shadow: none; border: none; background: transparent; padding: 0 0 8px 16px; min-width: 0; }
	.main-nav .sub-menu a { color: var(--head-muted); }
	.main-nav .sub-menu a:hover { background: transparent; color: var(--head-ink); }
	.main-nav .chevron { display: none; }
}

/* ---------- układ treści ---------- */

.site-main { display: block; }
.page-wrap { padding-top: 40px; padding-bottom: 72px; }
.page-wrap.narrow { max-width: 860px; }
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }
.page-title { margin: 0 0 24px; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
.single-date { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.post-nav { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- treść z edytora bloków ---------- */

.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2 { font-size: 28px; line-height: 1.25; font-weight: 600; margin: 1.6em 0 0.6em; }
.entry-content h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 1.4em 0 0.5em; }
.entry-content h4 { font-size: 18px; font-weight: 600; margin: 1.2em 0 0.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--surface); }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content th { font-weight: 600; background: var(--tint); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); color: var(--muted); }
.entry-content .wp-block-image figcaption { font-size: 14px; color: var(--muted); }

.wp-block-button__link, .button {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 8px;
	background: var(--brand); color: #FFFFFF; text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid var(--brand);
}
.wp-block-button__link:hover, .button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #FFFFFF; }
.is-style-outline > .wp-block-button__link, .wp-block-button.is-style-outline .wp-block-button__link { background: var(--surface); color: var(--ink); border-color: var(--line); }
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.wp-block-file .wp-block-file__button { background: var(--brand); border-radius: 6px; font-size: 14px; padding: 6px 14px; }

.has-marka-color { color: #B5121B; } .has-marka-background-color { background-color: #B5121B; }
.has-bordo-color { color: #2B0A0A; } .has-bordo-background-color { background-color: #2B0A0A; }
.has-grafit-color { color: #141414; } .has-grafit-background-color { background-color: #141414; }
.has-szary-color { color: #4F4B4B; } .has-szary-background-color { background-color: #4F4B4B; }
.has-jasne-tlo-color { color: #F5F4F2; } .has-jasne-tlo-background-color { background-color: #F5F4F2; }
.has-rozowe-tlo-color { color: #F6ECEC; } .has-rozowe-tlo-background-color { background-color: #F6ECEC; }
.has-bialy-color { color: #FFFFFF; } .has-bialy-background-color { background-color: #FFFFFF; }

/* ---------- strona główna ---------- */

.hero { background: var(--ground); }
.hero-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 40px; padding-bottom: 40px; }
.hero-text { flex: 1 1 520px; min-width: 0; }
.hero-text h1, .hero-text h2:first-child { font-size: clamp(38px, 5.2vw, 56px); line-height: 1.06; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.4em; }
.hero-text p { font-size: 20px; color: var(--muted); max-width: 640px; }
.hero-text p.eyebrow, .eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.hero-reports { flex: 1 1 380px; min-width: 0; padding: 24px 24px 8px; }

.band { background: var(--ground); border-top: 1px solid var(--line); padding: 64px 0; }
.band-white { background: var(--surface); }
.band h2 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 600; }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.more { font-weight: 500; text-decoration: none; }

.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.news-card { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; text-decoration: none; color: var(--ink); }
.news-card:hover { color: var(--ink); border-color: var(--brand); }
.card-date { font-size: 14px; color: var(--muted); }
.card-title { font-size: 19px; line-height: 1.35; font-weight: 600; }
.card-more { margin-top: auto; color: var(--brand); font-weight: 500; font-size: 15px; }

.media-card { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px; text-decoration: none; color: var(--ink); }
.media-card:hover { color: var(--ink); border-color: var(--brand); }
.media-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.entry-content ul li a { text-decoration: none; }
.entry-content ul li a:hover { text-decoration: underline; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px 20px; }
.games-full { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.games .game { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.game-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--tint); display: block; }
.game-title { margin: 0; font-size: 17px; font-weight: 600; }
.game-text { margin: 0; color: var(--muted); font-size: 15px; }
.game-link { font-size: 15px; font-weight: 500; text-decoration: none; }

.tiles { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.tile { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--tint); border-radius: var(--radius); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.tile:hover { color: var(--ink); border-color: var(--brand); }
.tile-title { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; font-weight: 600; }
.tile-title span { color: var(--brand); }
.tile-text { font-size: 15px; color: var(--muted); }

/* ---------- relacje inwestorskie ---------- */

.ir-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.ir-nav { flex: 1 1 230px; min-width: 0; }
.ir-nav-title { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 12px 8px; }
.ir-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ir-nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.ir-nav a:hover { background: var(--surface); }
.ir-nav .current_page_item > a { background: var(--tint); font-weight: 600; }
.ir-content { flex: 999 1 640px; min-width: 0; }

/* ---------- aktualności ---------- */

.news-list { padding: 0 24px; }
.news-row { display: flex; flex-wrap: wrap; gap: 4px 32px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.news-row:first-child { border-top: none; }
.news-row:hover .news-title { color: var(--brand); }
.news-date { flex: 0 0 170px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-title { flex: 1 1 420px; min-width: 0; font-size: 17px; font-weight: 500; line-height: 1.4; }
.news-more { font-size: 14px; color: var(--brand); font-weight: 500; }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
	border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.pagination .page-numbers.dots { border: none; background: transparent; }
.pagination .prev, .pagination .next { border: none; background: transparent; color: var(--brand); font-weight: 500; }

/* ---------- stopka ---------- */

.site-footer { background: var(--foot); color: var(--foot-muted); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px 64px; padding-top: 48px; padding-bottom: 32px; }
.footer-info { flex: 2 1 320px; min-width: 0; }
.footer-info p { margin: 0 0 8px; }
.footer-legal { font-size: 13.5px; max-width: 760px; }
.footer-name, .footer-widget-title { color: var(--foot-ink); font-weight: 700; letter-spacing: 0.1em; font-size: 15px; margin: 0 0 8px; }
.site-footer a { color: var(--foot-ink); }
.footer-nav { flex: 1 1 200px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-copy { flex: 1 1 100%; margin: 0; padding-top: 20px; border-top: 1px solid var(--foot-line); font-size: 14px; }

@media (max-width: 600px) {
	body { font-size: 16px; }
	.hero-inner { padding-top: 28px; padding-bottom: 28px; gap: 28px; }
	.band { padding: 48px 0; }
	.news-list { padding: 0 16px; }
}
