/*
Theme Name: Psychiatratychy Lite
Theme URI: https://psychiatratychy.pl
Author: rochowski.org
Author URI: https://rochowski.org
Description: Lekki motyw blokowy (FSE) dla prywatnego gabinetu psychiatrycznego. Edytorska, spokojna estetyka, szeryfowa typografia Fraunces, zielona paleta, wysoki kontrast (WCAG AA). Wspolpracuje z pluginem Dr Content Manager.
Version: 2.3.0
Requires at least: 6.1
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psychiatratychy-lite
*/

:root {
	--ps-shadow: 0 18px 50px rgba(31, 61, 28, .10);
	--ps-shadow-sm: 0 6px 22px rgba(31, 61, 28, .08);
	--ps-radius: 18px;
}

/* ===== Atmosfera tla ===== */
body {
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(60rem 40rem at 88% -10%, rgba(79, 138, 51, .10), transparent 60%),
		radial-gradient(50rem 40rem at -10% 18%, rgba(47, 107, 34, .07), transparent 55%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Subtelny grain dla tekstury premium */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	opacity: .045;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.has-text-align-center p, p.has-text-align-center { margin-inline: auto; }

/* ===== Etykieta nadrzedna (eyebrow) ===== */
.eyebrow {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
	margin: 0 0 .35rem;
}
.eyebrow::before {
	content: "";
	width: 1.8rem;
	height: 2px;
	background: var(--wp--preset--color--secondary);
	flex: none;
}
.section-eyebrow { justify-content: center; }

/* ===== Naglowek strony ===== */
.site-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: rgba(246, 244, 238, .82);
	backdrop-filter: saturate(1.1) blur(8px);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-logo-mark { display: inline-flex; line-height: 0; }
.site-logo-mark img { display: block; }
.site-brand .wp-block-site-title { line-height: 1.1; }
.site-brand .wp-block-site-title a {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
}

/* Nawigacja z animowanym podkresleniem */
.wp-block-navigation .wp-block-navigation-item__content {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	padding-bottom: 3px;
	position: relative;
}
.wp-block-navigation .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0; right: 100%;
	bottom: 0;
	height: 2px;
	background: var(--wp--preset--color--secondary);
	transition: right .28s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after { right: 0; }

.site-phone a {
	display: inline-block;
	text-decoration: none;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	border: 1.5px solid var(--wp--preset--color--secondary);
	border-radius: 999px;
	padding: .45rem 1.1rem;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}
.site-phone a:hover { background: var(--wp--preset--color--primary); color: #fff; }

/* ===== HERO (edytorski, asymetryczny) ===== */
.hero {
	position: relative;
	overflow: hidden;
	padding-top: clamp(1.25rem, 0.6rem + 1.4vw, 2.25rem);
	padding-bottom: clamp(2.5rem, 1rem + 5vw, 5rem);
}
.hero::before {
	content: "";
	position: absolute;
	width: 46rem; height: 46rem;
	right: -16rem; top: -22rem;
	background: radial-gradient(closest-side, rgba(79, 138, 51, .22), transparent 70%);
	filter: blur(10px);
	pointer-events: none;
}
.hero::after {
	content: "";
	position: absolute;
	width: 34rem; height: 34rem;
	left: -16rem; bottom: -18rem;
	background: radial-gradient(closest-side, rgba(47, 107, 34, .14), transparent 70%);
	pointer-events: none;
}
.hero__grid { align-items: center; position: relative; z-index: 1; }
.hero__text h1 {
	margin: .3rem 0 1.1rem;
	letter-spacing: -0.02em;
	font-weight: 480;
}
.hero__text h1 em {
	font-style: italic;
	color: var(--wp--preset--color--secondary);
}
.hero__text .lead {
	font-size: 1.18rem;
	color: var(--wp--preset--color--muted);
}
.hero__hours {
	margin-top: 1.6rem !important;
	font-size: .95rem;
	color: var(--wp--preset--color--muted);
	border-left: 3px solid var(--wp--preset--color--soft);
	padding-left: 1rem;
}
.hero__hours strong { color: var(--wp--preset--color--contrast); }

/* Rama zdjecia hero (duotone zieleni + offsetowa ramka) */
.hero__media { position: relative; }
.hero__img {
	position: relative;
	z-index: 1;
	margin: 0;
	border-radius: 150px 150px 20px 20px;
	overflow: hidden;
	box-shadow: var(--ps-shadow);
}
.hero__img img {
	display: block;
	width: 100%;
	height: clamp(380px, 56vh, 600px);
	object-fit: cover;
	filter: saturate(1.06) contrast(1.02);
}
.hero__img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(165deg, rgba(31, 61, 28, .04) 0%, rgba(47, 107, 34, .34) 100%);
	mix-blend-mode: multiply;
	pointer-events: none;
}
.hero__media::before {
	content: "";
	position: absolute;
	inset: 20px -16px -16px 16px;
	border: 1.5px solid var(--wp--preset--color--secondary);
	border-radius: 150px 150px 20px 20px;
	opacity: .45;
	z-index: 0;
}

/* Przyciski */
.wp-block-button.is-style-ghost .wp-block-button__link,
.wp-block-button__link.is-ghost {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border: 1.5px solid var(--wp--preset--color--primary);
}
.wp-block-button__link { box-shadow: var(--ps-shadow-sm); transition: transform .18s ease, background-color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* ===== Sekcje ===== */
.section-eyebrow { text-align: center; }
h2.section-title { text-align: center; margin-bottom: 2.2rem; }

/* Kafelki tematow: edytorskie karty z numerami */
.topics-grid { counter-reset: topic; gap: 1.5rem; }
.topics-grid .drcm-topic-card {
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: var(--ps-radius);
	padding: 2.2rem 1.6rem 1.6rem !important;
	box-shadow: var(--ps-shadow-sm);
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	overflow: hidden;
}
.topics-grid .wp-block-column:nth-child(1) .drcm-topic-card::before { content: "01"; }
.topics-grid .wp-block-column:nth-child(2) .drcm-topic-card::before { content: "02"; }
.topics-grid .wp-block-column:nth-child(3) .drcm-topic-card::before { content: "03"; }
.topics-grid .drcm-topic-card::before {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.6rem;
	font-weight: 500;
	color: var(--wp--preset--color--soft);
	position: absolute;
	top: .6rem; right: 1.1rem;
	line-height: 1;
}
.topics-grid .drcm-topic-card::after {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--wp--preset--color--secondary);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .25s ease;
}
.topics-grid .drcm-topic-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ps-shadow);
	border-color: var(--wp--preset--color--secondary) !important;
}
.topics-grid .drcm-topic-card:hover::after { transform: scaleY(1); }
.topics-grid .drcm-topic-card h3 {
	margin: 0 0 1.1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.topics-grid .drcm-topic-card h3 a { color: var(--wp--preset--color--primary); text-decoration: none; }
.topics-grid .drcm-topic-card p { margin: 0; }
.topics-grid .drcm-topic-card p a {
	text-decoration: none;
	font-weight: 700;
	color: var(--wp--preset--color--secondary);
}
.topics-grid .drcm-topic-card p a:hover { color: var(--wp--preset--color--primary); }

/* ===== Sekcja kontaktu: pelnoszerokie pasmo, bez ramkozy ===== */
.drcm-doctor {
	--drcm-accent: #2f6b22;
	--drcm-text: #1d2a22;
	--drcm-muted: #5c655d;
	--drcm-border: #cfe0c4;
	--drcm-bg-soft: transparent;
}
.kontakt-section .drcm-doctor {
	background: transparent;
	max-width: none;
	padding: 0;
	border: 0;
	box-shadow: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 4rem;
	align-items: start;
}
/* nazwa lekarza jest juz w naglowku strony, nie powtarzamy */
.kontakt-section .drcm-doctor__header { display: none; }
.kontakt-section .drcm-section { margin: 0; }
.kontakt-section .drcm-section--booking {
	grid-column: 1 / -1;
	margin-top: 1.75rem;
	text-align: center;
}
.kontakt-section .drcm-section--booking .drcm-booking-actions { justify-content: center; }
.kontakt-section .drcm-place-card {
	background: transparent;
	border: 0;
	padding: 0;
}
@media (max-width: 781px) {
	.kontakt-section .drcm-doctor { grid-template-columns: 1fr; gap: 2rem; }
}
.drcm-section__title {
	font-family: var(--wp--preset--font-family--display) !important;
	font-weight: 500;
	color: var(--wp--preset--color--primary);
}
.drcm-price-table__value { color: var(--wp--preset--color--primary); }
.drcm-btn--primary { border-radius: 999px !important; }

/* ===== Artykuly (podstrony) ===== */
.entry-content h2, .wp-block-post-content h2 { margin-top: 2.4rem; }
.wp-block-post-title { margin-bottom: 1.6rem; }

/* ===== Stopka ===== */
.site-footer {
	background: var(--wp--preset--color--deep) !important;
	color: #dfe8d8;
}
.site-footer h3 { color: #fff; font-weight: 500; }
.site-footer a { color: #eaf1e1; }
.site-footer a:hover { color: #fff; }

/* ===== Ruch wejscia (delikatny) ===== */
@keyframes ps-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}
.hero__text > *, .hero__media { animation: ps-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero__text .eyebrow { animation-delay: .05s; }
.hero__text h1 { animation-delay: .12s; }
.hero__text .lead { animation-delay: .2s; }
.hero__text .wp-block-buttons { animation-delay: .28s; }
.hero__text .hero__hours { animation-delay: .34s; }
.hero__media { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
	.hero__text > *, .hero__media { animation: none; }
	.wp-block-button__link { transition: none; }
	html { scroll-behavior: auto; }
}

/* ===== Responsywnosc ===== */
@media (max-width: 781px) {
	.hero__img img { height: 340px; }
	.hero__img { border-radius: 90px 90px 16px 16px; }
	.hero__text .lead { max-width: none; }
}

html { scroll-behavior: smooth; }

/* Skip-link dostepnosci */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100000; }
.skip-link:focus {
	left: 8px; top: 8px;
	padding: 10px 16px;
	background: #fff; color: #1d2a22;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
