/*
Theme Name: Plantacja Choinek
Theme URI: https://example.com/
Author: Twoja Strona WWW
Description: Ciemnozielony motyw dla plantacji choinek: baner, najnowsze wpisy, sekcja o plantacji, porady, galeria, mapa i newsletter. Ustawienia w Wygląd → Dostosuj.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plantacja-choinek
*/

:root {
	--bg: #0b1f14;
	--bg-2: #0f2a1b;
	--panel: #12301f;
	--line: rgba(201, 164, 92, .22);
	--line-soft: rgba(255, 255, 255, .08);
	--gold: #c9a45c;
	--gold-2: #e0c07a;
	--text: #e7eee8;
	--muted: #9db3a3;
	--serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 15px/1.7 var(--sans);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.screen-reader-text, .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: #10200f; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Przyciski i linki ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 14px 28px; font: 500 12px/1 var(--sans);
	letter-spacing: .14em; text-transform: uppercase;
	border: 1px solid var(--gold); background: transparent; color: var(--text);
	cursor: pointer; transition: background .2s, color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-outline:hover { background: var(--gold); color: #10200f; }
.btn-gold { background: var(--gold); color: #10200f; }
.btn-gold:hover { background: var(--gold-2); color: #10200f; }
.btn-sm { padding: 11px 20px; font-size: 11px; }

.more {
	display: inline-flex; align-items: center; gap: 10px;
	font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.more .icon { width: 16px; height: 16px; }
.more:hover { color: var(--gold-2); }

.ph {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%; min-height: 80px;
	background: linear-gradient(160deg, #173a26, #0d2418);
	color: rgba(201, 164, 92, .55);
}
.ph .icon { width: 36px; height: 36px; }

/* ---------- Pasek górny + nagłówek ---------- */
.topbar { border-bottom: 1px solid var(--line-soft); }
.topbar-inner { display: flex; justify-content: flex-end; padding-top: 8px; padding-bottom: 8px; }
.socials { display: flex; gap: 14px; }
.socials a { display: grid; place-items: center; color: var(--gold); }
.socials-top .icon { width: 14px; height: 14px; }
.socials-round { gap: 12px; }
.socials-round a { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; }
.socials-round a:hover { background: var(--gold); color: #10200f; }
.socials-round .icon { width: 17px; height: 17px; }

.site-header { position: relative; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 84px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.logo .logo-tree { width: 34px; height: 34px; color: var(--gold); stroke-width: 1; }
.logo-text { font: 500 19px/1.1 var(--serif); letter-spacing: .22em; }
.custom-logo { max-height: 56px; width: auto; }

.main-nav { margin-left: auto; }
.main-nav .menu { display: flex; gap: 38px; }
.main-nav a { font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 8px 0; display: block; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a { color: var(--gold-2); }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .sub-menu {
	position: absolute; top: 100%; left: -16px; min-width: 200px; padding: 12px 16px;
	background: var(--panel); border: 1px solid var(--line); display: none;
}
.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { padding: 8px 0; }

.search-toggle, .nav-toggle { background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; display: grid; place-items: center; }
.search-toggle .icon, .nav-toggle .icon { width: 22px; height: 22px; }
.search-toggle:hover { color: var(--gold-2); }
.nav-toggle { display: none; margin-left: auto; }

.search-panel { display: none; border-top: 1px solid var(--line-soft); background: var(--bg-2); padding: 18px 0; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 10px; max-width: 560px; }
.search-form input[type="search"] { flex: 1; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea {
	background: rgba(0, 0, 0, .25); border: 1px solid var(--line); color: var(--text);
	padding: 12px 14px; font: 400 13px/1.4 var(--sans); width: 100%;
}
input::placeholder, textarea::placeholder { color: #7f9886; }

/* ---------- Hero ---------- */
.hero {
	position: relative; display: grid; place-items: center; text-align: center;
	min-height: clamp(460px, 62vh, 620px);
	background:
		linear-gradient(180deg, rgba(8, 24, 15, .55), rgba(8, 24, 15, .35) 55%, rgba(8, 24, 15, .85)),
		var(--hero-img, linear-gradient(160deg, #1b4a2d, #0a1f13 70%)) center / cover no-repeat;
	border-bottom: 1px solid var(--line);
}
.hero-inner { padding-top: 70px; padding-bottom: 70px; }
.hero-trees { display: inline-flex; align-items: flex-end; gap: 6px; color: var(--gold); margin-bottom: 18px; }
.hero-trees .icon { width: 26px; height: 26px; }
.hero-trees .icon.big { width: 38px; height: 38px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); max-width: 640px; margin: 0 auto 22px; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 0 auto 24px; max-width: 380px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider .icon { width: 18px; height: 18px; }
.hero p { max-width: 460px; margin: 0 auto 34px; color: #dfe9e1; font-size: 15px; }

/* ---------- Sekcje ---------- */
.section { padding: 56px 0 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: clamp(26px, 3vw, 34px); margin: 0; }
.section-title .icon, .col-title .icon { color: var(--gold); width: 24px; height: 24px; }
.latest { padding: 44px 0 52px; background: var(--bg-2); border-bottom: 1px solid var(--line); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: rgba(255, 255, 255, .02); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 12 / 7; overflow: hidden; background: #0d2418; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.date-badge {
	position: absolute; left: 14px; top: 0; width: 42px; padding: 8px 0 7px; text-align: center;
	background: #0d2418; border: 1px solid var(--line); border-top: 0; line-height: 1;
}
.date-badge strong { display: block; font: 500 17px/1 var(--sans); color: var(--text); }
.date-badge span { display: block; margin-top: 4px; font: 500 9px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cat { font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-title { font-size: 23px; margin: 0 0 8px; }
.card-body .more { margin-top: auto; }

/* ---------- O plantacji ---------- */
.about { display: grid; grid-template-columns: 1fr 1.05fr .85fr; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 310px; }
.about-media { background: #0d2418 center / cover no-repeat; min-height: 260px; }
.about-text { padding: 46px 48px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.about-text .section-title { margin-bottom: 18px; font-size: 30px; }
.about-text p { color: #cbd9ce; font-size: 13.5px; max-width: 460px; margin-bottom: 24px; }
.features { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 30px 40px 30px 0; }
.features li { display: flex; align-items: center; gap: 18px; }
.feat-icon { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); flex: none; }
.feat-icon .icon { width: 24px; height: 24px; }
.feat-text { font-size: 13px; line-height: 1.45; color: #d6e2d9; }
.feat-text strong { color: var(--gold-2); font-weight: 500; }

/* ---------- Cztery kolumny ---------- */
.quad { padding: 44px 0 52px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.quad-grid { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr 1fr; gap: 36px; }
.col-title { display: flex; align-items: center; gap: 10px; font-size: 23px; margin-bottom: 20px; }
.col-title .icon { width: 20px; height: 20px; }
.quad-col p { font-size: 13px; color: var(--muted); }

.tip-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.tip-list li { display: flex; gap: 14px; align-items: center; }
.tip-thumb { width: 58px; height: 58px; flex: none; border: 1px solid var(--line); overflow: hidden; }
.tip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tip-title { display: block; font: 500 17px/1.25 var(--serif); margin-bottom: 4px; }
.tip-list time { font-size: 11px; color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 22px; }
.gallery-grid > a, .gallery-grid > .ph { aspect-ratio: 1; border: 1px solid var(--line); overflow: hidden; display: block; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.06); }

.pl-map { width: 100%; max-width: 280px; margin: 8px 0 12px; }
.map-address { font-size: 12px; margin-bottom: 14px !important; }

.nl-form { display: flex; margin-bottom: 26px; }
.nl-form input[type="email"] { border-right: 0; min-width: 0; }
.nl-form .btn { padding: 0 16px; font-size: 11px; white-space: nowrap; }
.nl-notice { font-size: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.nl-ok { color: var(--gold-2); }
.nl-err { color: #f0a8a0; border-color: rgba(240, 168, 160, .4); }
.follow { font: 500 12px/1 var(--sans); letter-spacing: .1em; color: var(--gold); margin: 0 0 14px; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--bg); padding-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 36px; }
.footer-brand p { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.footer-col h3 { font-size: 21px; margin-bottom: 14px; }
.footer-col li { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.footer-col a:hover { color: var(--gold-2); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact .icon { width: 16px; height: 16px; color: var(--gold); margin-top: 3px; }
.footer-bottom {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	border-top: 1px solid var(--line-soft); padding-top: 16px; padding-bottom: 18px; font-size: 11px; color: var(--muted);
}
.footer-tree { color: var(--gold); }
.footer-tree .icon { width: 20px; height: 20px; }

/* ---------- Podstrony ---------- */
.page-head { padding: 64px 0 36px; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); text-align: left; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 10px; }
.page-head.center, .center .lead { text-align: center; }
.lead { color: var(--muted); font-size: 16px; }
.entry-date { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.entry-thumb { margin: 36px 0 0; border: 1px solid var(--line); }
.entry-content { padding: 36px 0 20px; font-size: 16px; line-height: 1.85; color: #d8e4db; }
.entry-content h2 { font-size: 34px; margin-top: 1.6em; }
.entry-content h3 { font-size: 26px; margin-top: 1.4em; }
.entry-content a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border: 1px solid var(--line); }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold); font: 500 22px/1.5 var(--serif); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.entry-content ul { list-style: disc; }
.alignwide { max-width: 1100px; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.cards-archive { grid-template-columns: repeat(3, 1fr); }
.empty { color: var(--muted); }
.gallery-full { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-full a { aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); display: block; }
.gallery-full img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-full a:hover img { transform: scale(1.05); }

.pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.page-numbers { padding: 10px 16px; border: 1px solid var(--line); font-size: 12px; }
.page-numbers.current, a.page-numbers:hover { background: var(--gold); color: #10200f; }

.comments { padding: 20px 0 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.comment-form label { display: block; font-size: 12px; margin-bottom: 4px; color: var(--muted); }
.comment-form p { margin-bottom: 14px; }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
	.quad-grid { grid-template-columns: 1fr 1fr; }
	.about { grid-template-columns: 1fr 1fr; }
	.about-media { grid-column: 1 / -1; min-height: 260px; }
	.features { padding: 36px 40px; }
	.main-nav .menu { gap: 24px; }
}
@media (max-width: 860px) {
	.nav-toggle { display: grid; }
	.search-toggle { margin-left: 0; }
	.main-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
		background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); padding: 10px 28px 18px;
	}
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; gap: 0; }
	.main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
	.main-nav .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 14px; background: none; }
	.cards, .cards-archive { grid-template-columns: 1fr; }
	.gallery-full { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.about { grid-template-columns: 1fr; }
	.about-text { padding: 36px 28px; }
	.features { padding: 8px 28px 36px; }
	.section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 560px) {
	.quad-grid, .footer-grid { grid-template-columns: 1fr; }
	.footer-bottom { flex-direction: column; text-align: center; }
	.container { padding: 0 20px; }
	.logo-text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(4, 14, 8, .94); padding: 40px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; border: 1px solid var(--line); }
.lightbox figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }
.lightbox button { position: absolute; background: none; border: 1px solid var(--line); color: var(--gold); width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--gold); color: #10200f; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }
@media (max-width: 560px) { .lightbox { padding: 60px 12px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

/* ---------- Animacja wejścia banera (jedna, przy wczytaniu strony) ---------- */
@keyframes pc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-inner > * { animation: pc-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-inner > :nth-child(2) { animation-delay: .1s; }
.hero-inner > :nth-child(3) { animation-delay: .2s; }
.hero-inner > :nth-child(4) { animation-delay: .3s; }
.hero-inner > :nth-child(5) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .hero-inner > * { animation: none; } }
