/* ==========================================================================
   TerraCare – style motywu (uzupełnienie theme.json)
   ========================================================================== */

:root {
	--tc-header-h: 80px;
	--tc-ease: cubic-bezier(.22, .61, .36, 1);
	--tc-radius: 6px;
}
html { scroll-padding-top: calc(var(--tc-header-h) + var(--wp-admin--admin-bar--height, 0px)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; text-underline-offset: .2em; }
b, strong { font-weight: 500; }
img { height: auto; max-width: 100%; }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip-path: none; color: #005c7d; display: block; height: auto; left: 5px; padding: 15px 23px 14px; top: 5px; width: auto; z-index: 100000; }
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks > .tc-main { flex: 1 0 auto; }
:where(.tc-main) > .wp-block-post-content > :first-child { margin-block-start: 0; }
a { transition: color .2s ease, opacity .2s ease, background-color .2s ease; }
:focus-visible { outline: 2px solid var(--wp--preset--color--secondary); outline-offset: 2px; }

/* Przyciski */
.wp-element-button, .wp-block-button__link { transition: opacity .2s ease, transform .2s ease, background-color .2s ease; }
.wp-element-button:hover, .wp-block-button__link:hover, .wp-element-button:focus-visible { opacity: .82; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; padding: .7em 1em; }

/* --------------------------------------------------------------------------
   Nagłówek
   -------------------------------------------------------------------------- */
.tc-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: var(--wp--preset--color--background);
	box-shadow: 0 0 0 1px var(--wp--preset--color--surface);
	transition: box-shadow .3s ease;
	padding-inline: var(--wp--style--root--padding-left);
}
.tc-header__bar { max-width: var(--wp--style--global--wide-size); min-height: var(--tc-header-h); transition: min-height .3s ease; gap: 1rem; margin-inline: auto; }
.tc-header.is-shrink { box-shadow: 0 5px 20px rgb(0 0 0 / 6%); }
.tc-header.is-shrink .tc-header__bar { min-height: 60px; }
.tc-logo img { width: 250px; max-width: 42vw; height: auto; transition: width .3s ease; }
.tc-header.is-shrink .tc-logo img { width: 210px; }
.tc-header__right { gap: var(--wp--preset--spacing--xs); }
.tc-nav .wp-block-navigation-item__content { padding: .4em .1em; }
.tc-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--secondary); }
.tc-nav .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-radius: var(--tc-radius);
	box-shadow: 0 10px 30px rgb(0 40 60 / 12%);
	padding: .5em 0;
	min-width: 220px !important;
}
.tc-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55em 1.2em; }
.tc-nav .wp-block-navigation-submenu__toggle svg { width: 10px; height: 10px; margin-top: 2px; }
.tc-header__phone .wp-block-button__link { padding: .75em 1.1em; white-space: nowrap; }
.tc-header__social { padding-left: var(--wp--preset--spacing--xs); border-left: 1px solid var(--wp--preset--color--surface); gap: .35em !important; }
.tc-header__social .wp-social-link { color: #00000091 !important; }
.tc-header__social .wp-social-link svg { width: 20px; height: 20px; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 2rem 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { font-size: 18px; gap: .6em; }
@media (max-width: 1100px) { .tc-header__social { display: none !important; } }
@media (max-width: 781px) {
	.tc-header__right { flex-direction: row-reverse; }
	.tc-header__phone .wp-block-button__link { font-size: 13px; padding: .6em .8em; }
}
@media (max-width: 480px) { .tc-header__phone { display: none; } }

/* --------------------------------------------------------------------------
   Hero (blok Okładka)
   -------------------------------------------------------------------------- */
.tc-hero.wp-block-cover { min-height: min(calc(100vh - 100px), 640px) !important; color: #fff; padding-block: var(--wp--preset--spacing--lg); overflow: hidden; }
.tc-hero .wp-block-cover__inner-container { color: #fff; }
.tc-hero h1 { color: #fff; margin-block-end: .35em; }
.tc-hero__text { margin-top: -40px; }
.tc-hero__text p { color: #fff; }
.tc-hero__note { margin: 0; }
.tc-scroll-more { margin-top: var(--wp--preset--spacing--sm); }
.wp-block-button.is-style-scroll-more .wp-block-button__link {
	background: transparent !important; color: #fff; padding: .3em .5em 1.3em; position: relative; font-size: 16px;
}
.wp-block-button.is-style-scroll-more .wp-block-button__link::after {
	content: ""; position: absolute; left: 50%; bottom: .25em; width: .5em; height: .5em;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translate(-50%, 0) rotate(45deg);
}

/* --------------------------------------------------------------------------
   Sekcje strony głównej
   -------------------------------------------------------------------------- */
.tc-section { padding-block: var(--wp--preset--spacing--xxl); margin-block: 0 !important; }
.tc-lead { line-height: 1.8; color: var(--wp--preset--color--heading); }
.wp-block-separator.is-style-tc-short { width: 100px; max-width: 100px; border: 0; border-top: 1px solid currentColor; margin: var(--wp--preset--spacing--md) auto !important; opacity: 1; }
.tc-section > .wp-block-heading + .wp-block-separator.is-style-tc-short { margin-block: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--md) !important; }
.tc-section, .tc-split, .tc-main > .wp-block-post-content > .alignfull { margin-block: 0 !important; }

/* Liczniki */
.tc-counters { gap: 15px 2rem; margin-top: var(--wp--preset--spacing--sm) !important; }
.tc-counters > .wp-block-column { display: flex; flex-direction: column; align-items: center; justify-content: flex-start !important; align-self: flex-start; gap: .8rem; }
.tc-counter, .is-style-counter {
	width: 100px; aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto !important;
	border: 2px solid var(--wp--preset--color--secondary); border-radius: 99px;
	color: var(--wp--preset--color--heading); line-height: 1; font-variant-numeric: tabular-nums;
}
.tc-counter-label { line-height: 1.8; margin: 0 !important; }
@media (max-width: 781px) { .tc-counters { display: grid !important; grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tc-counters { grid-template-columns: 1fr; } }

/* Listy z myślnikami */
ul.wp-block-list { list-style: none; padding-left: 0; }
ul.wp-block-list > li { position: relative; padding-left: 1.75em; margin-block: .35em; }
ul.wp-block-list > li::before {
	content: ""; position: absolute; left: .25em; top: .9em; width: 1em; height: 2px; background: currentColor; opacity: .2;
}
.tc-hero ul.wp-block-list > li::before { opacity: .45; }
ul.tc-dash-list > li { margin-block: .55em; }

/* Bloki "Media i tekst" (usługi, sekcje zdjęcie + tekst) */
.wp-block-media-text.tc-split { margin-block: 0 !important; grid-template-columns: 50% 1fr; }
.wp-block-media-text.tc-split.has-media-on-the-right { grid-template-columns: 1fr 50%; }
.wp-block-media-text.tc-split > .wp-block-media-text__content {
	padding: 50px 80px; max-width: 680px; width: 100%; box-sizing: border-box; justify-self: start;
}
.wp-block-media-text.tc-split.has-media-on-the-right > .wp-block-media-text__content { justify-self: end; }
.tc-split .wp-block-media-text__content > * { margin-block: 0; }
.tc-split .wp-block-media-text__content > * + * { margin-block-start: 1rem; }
.tc-split .tc-kicker { font-weight: 400; color: var(--wp--preset--color--heading); }
.tc-split .tc-kicker + .tc-service-title { margin-top: 0; }
.tc-service-title { text-transform: uppercase; }
.tc-service-text { line-height: 1.8; }
.tc-split .wp-block-media-text__media { overflow: hidden; align-self: stretch; }
.tc-split.is-image-fill-element > .wp-block-media-text__media { min-height: 420px; }
.tc-split.is-image-fill-element > .wp-block-media-text__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-split.is-image-fill-element > .wp-block-media-text__media { position: relative; }

/* Wariant portretowy (PNG wycięte, wyrównane do dołu) */
.tc-split--portrait > .wp-block-media-text__media { align-self: end; display: flex; justify-content: center; align-items: flex-end; }
.tc-split--portrait > .wp-block-media-text__media img { width: auto; max-width: 100%; max-height: 770px; object-fit: contain; object-position: 50% 100%; display: block; }
.tc-split--portrait > .wp-block-media-text__content { padding: 60px 80px 80px; align-self: center; }
.tc-intro > .wp-block-media-text__media img { max-height: 400px; }
.tc-intro > .wp-block-media-text__content { padding-block: 60px; }
.tc-signature { margin-top: .5rem !important; }
.tc-signature img { width: 158px; }

@media (max-width: 991px) {
	.wp-block-media-text.tc-split, .wp-block-media-text.tc-split.has-media-on-the-right { grid-template-columns: 100% !important; }
	.wp-block-media-text.tc-split > .wp-block-media-text__media { grid-column: 1; grid-row: 1 !important; }
	.wp-block-media-text.tc-split > .wp-block-media-text__content { grid-column: 1; grid-row: 2 !important; padding: 40px; max-width: none; justify-self: stretch !important; }
	.tc-split.is-image-fill-element > .wp-block-media-text__media { min-height: 0; aspect-ratio: 16 / 10; }
	.tc-split--portrait > .wp-block-media-text__media img { max-height: 330px; }
}
@media (max-width: 767px) {
	.wp-block-media-text.tc-split > .wp-block-media-text__content { padding: 50px 20px; }
}

/* --------------------------------------------------------------------------
   Zespół
   -------------------------------------------------------------------------- */
.tc-team-list { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--lg); }
.tc-team-card { display: grid; grid-template-columns: 55% 1fr; align-items: center; }
.tc-team-card__media { margin: 0 !important; overflow: hidden; border-radius: var(--tc-radius); }
.tc-team-card__media img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tc-team-card__box {
	position: relative; z-index: 2; margin: 0 0 0 -100px !important; width: calc(100% + 100px);
	padding: 40px; border-radius: 10px;
}
.tc-team-card__box > * { margin-block: 0; }
.tc-team-card__box > * + * { margin-block-start: 1.1rem; }
.tc-team-card__box .wp-block-post-title { color: var(--wp--preset--color--heading); }
.tc-team-card__box .wp-block-post-excerpt__excerpt { margin: 0; font-size: 14px; line-height: 1.6; }
.tc-team-list > li:nth-child(even) .tc-team-card { grid-template-columns: 1fr 55%; }
.tc-team-list > li:nth-child(even) .tc-team-card__media { order: 2; }
.tc-team-list > li:nth-child(even) .tc-team-card__box { order: 1; margin: 0 -100px 0 0 !important; }
.wp-block-read-more.tc-button, .tc-button {
	display: inline-block; width: auto; background: var(--wp--preset--color--secondary); color: #fff !important;
	padding: .75em 1.2em; border-radius: var(--tc-radius); text-decoration: none; font-size: 14px; line-height: 1; transition: opacity .2s ease;
}
.wp-block-read-more.tc-button:hover { opacity: .82; }
.tc-team-single .wp-block-post-content { line-height: 1.6; font-size: 14px; }
.tc-team-more { border-radius: 2px; }
.tc-team-nav { margin-top: var(--wp--preset--spacing--sm); gap: 1rem; }
.tc-team-nav > * { flex: 1 1 0; }
.tc-team-nav__link a, .tc-team-nav__link { display: block; text-decoration: none; }
.tc-team-nav .wp-block-post-navigation-link { background: rgb(75 150 79 / 8%); padding: 14px 16px; border-radius: 4px; font-size: 18px; color: var(--wp--preset--color--secondary); line-height: 1.3; }
.tc-team-nav .wp-block-post-navigation-link:empty { visibility: hidden; padding: 0; }
.tc-team-nav .post-navigation-link__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
.tc-team-nav .post-navigation-link-next { text-align: right; }
@media (max-width: 767px) {
	.tc-team-card, .tc-team-list > li:nth-child(even) .tc-team-card { grid-template-columns: 1fr; }
	.tc-team-list > li:nth-child(even) .tc-team-card__media { order: 0; }
	.tc-team-card__box, .tc-team-list > li:nth-child(even) .tc-team-card__box { margin: -60px 20px 0 !important; width: auto; padding: 30px 24px; }
	.tc-team-nav { flex-wrap: wrap !important; }
}

/* --------------------------------------------------------------------------
   Cenniki
   -------------------------------------------------------------------------- */
.tc-price-heading { text-transform: uppercase; margin-block: var(--wp--preset--spacing--lg) 0 !important; }
.tc-price-heading + .wp-block-table { margin-top: 1.2rem; }
figure.pricing-table, .wp-block-table.is-style-pricing { margin: 0; font-size: 14px; }
.pricing-table table, .is-style-pricing table { border-collapse: collapse; width: 100%; }
.pricing-table td, .is-style-pricing td { border: 0 !important; padding: 15px 16px; vertical-align: middle; line-height: 1.5; }
.pricing-table tr:nth-child(odd), .is-style-pricing tr:nth-child(odd) { background: transparent; }
.pricing-table tr:nth-child(even), .is-style-pricing tr:nth-child(even) { background: var(--wp--preset--color--surface); }
.pricing-table td:nth-child(2), .is-style-pricing td:nth-child(2) { width: 80px; text-align: right; font-weight: 500; white-space: nowrap; }
.pricing-table tr, .is-style-pricing tr { transition: background-color .25s ease; }
.pricing-table tr:hover, .is-style-pricing tr:hover { background: #e2f3ed; }
.tc-crosslink { border-radius: 2px; }
.tc-crosslink .wp-block-heading { margin-top: 0; }
@media (max-width: 600px) {
	.pricing-table td:nth-child(2) { width: auto; }
}

/* --------------------------------------------------------------------------
   FAQ (blok Szczegóły)
   -------------------------------------------------------------------------- */
.tc-faq-intro { font-weight: 500; margin-bottom: var(--wp--preset--spacing--sm) !important; }
.wp-block-details.tc-faq { background: var(--wp--preset--color--surface); border-radius: 2px; margin-block: 8px 0 !important; overflow: hidden; }
.tc-faq > summary {
	list-style: none; cursor: pointer; padding: 16px 48px 16px 16px; position: relative;
	font-weight: 500; font-size: 14px; color: var(--wp--preset--color--heading);
}
.tc-faq > summary::-webkit-details-marker { display: none; }
.tc-faq > summary::after {
	content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(-45deg); transition: transform .35s var(--tc-ease);
}
.tc-faq[open] > summary::after { transform: translateY(-70%) rotate(45deg); }
.tc-faq > :not(summary) { padding-inline: 16px; }
.tc-faq > :last-child { padding-bottom: 16px; }
@supports (interpolate-size: allow-keywords) {
	.tc-faq { interpolate-size: allow-keywords; }
	.tc-faq::details-content { height: 0; overflow: clip; transition: height .45s var(--tc-ease), content-visibility .45s allow-discrete; }
	.tc-faq[open]::details-content { height: auto; }
}

/* --------------------------------------------------------------------------
   Kontakt i formularz
   -------------------------------------------------------------------------- */
@media (min-width: 782px) { .tc-contact-info { position: sticky; top: calc(var(--tc-header-h) + 20px); } }
.tc-contact a { text-decoration: underline; }
.tc-form { display: grid; gap: 0; }
.tc-form__row { margin: 0 0 1.25rem; }
.tc-form label { display: block; font-weight: 500; font-size: 12px; color: var(--wp--preset--color--heading); margin-bottom: .5em; }
.tc-form input, .tc-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; color: var(--wp--preset--color--heading);
	background: var(--wp--preset--color--surface); border: 0; border-bottom: 1px solid var(--wp--preset--color--outline);
	padding: .7em .8em; border-radius: 2px; transition: border-color .2s ease, background-color .2s ease;
}
.tc-form input:focus, .tc-form textarea:focus { outline: none; border-bottom-color: var(--wp--preset--color--secondary); background: #e4f5ee; }
.tc-form__submit { width: 100%; background: var(--wp--preset--color--secondary) !important; color: #fff; border: 0; border-radius: var(--tc-radius); padding: .9em 1.2em; font: inherit; cursor: pointer; }
.tc-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tc-form__notice { padding: 1em 1.2em; border-radius: var(--tc-radius); margin: 0 0 1.25rem; }
.tc-form__notice.is-success { background: #e3f4e4; color: #2b6a2f; }
.tc-form__notice.is-error { background: #fdecec; color: #9b1c1c; }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.tc-post-list { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--xl); }
.tc-post-list .wp-block-post-featured-image { margin-bottom: 1rem; overflow: hidden; border-radius: var(--tc-radius); }
.tc-post-list .wp-block-post-title { margin-block: 1rem; }
.tc-post-list .wp-block-post-excerpt__excerpt { font-size: 14px; }
.wp-block-post-excerpt__more-link {
	display: inline-block; background: var(--wp--preset--color--secondary); color: #fff !important; text-decoration: none;
	padding: .75em 1.2em; border-radius: var(--tc-radius); font-size: 14px; margin-top: .5rem; transition: opacity .2s ease;
}
.wp-block-post-excerpt__more-link:hover { opacity: .82; }
.tc-single .wp-block-post-content { font-size: 15px; }

/* --------------------------------------------------------------------------
   CTA i stopka
   -------------------------------------------------------------------------- */
.tc-cta-part, .tc-cta { margin-block: 0 !important; }
.tc-cta .wp-block-heading { margin-top: 0; }
.tc-site-footer a { color: inherit; }
.tc-footer { color: var(--wp--preset--color--heading); }

/* ==========================================================================
   Animacje – subtelne, uruchamiane tylko gdy działa JS i użytkownik nie
   ograniczył ruchu (prefers-reduced-motion). Bez JS wszystko jest widoczne.
   ========================================================================== */
/* Ukrycie bez przejścia (natychmiast), pojawienie się z przejściem. */
html.tc-js:not(.tc-nomotion) [data-tc-reveal] { opacity: 0; transform: translate3d(0, 18px, 0); }
html.tc-js:not(.tc-nomotion) [data-tc-reveal="image"] { transform: none; }
html.tc-js:not(.tc-nomotion) [data-tc-reveal="image"] img { transform: scale(1.045); }
html.tc-js:not(.tc-nomotion) [data-tc-reveal].is-revealed {
	opacity: 1; transform: none;
	transition: opacity .9s var(--tc-ease), transform .9s var(--tc-ease);
	transition-delay: var(--tc-delay, 0ms);
}
html.tc-js:not(.tc-nomotion) [data-tc-reveal="image"].is-revealed img { transform: none; transition: transform 1.6s var(--tc-ease); transition-delay: var(--tc-delay, 0ms); }

/* Łagodne pojawienie się całej strony po wczytaniu */
@keyframes tc-page-in { from { opacity: 0; } to { opacity: 1; } }
html.tc-js .wp-site-blocks { animation: tc-page-in .5s ease both; }

/* Hero: delikatne pojawienie się tła i tekstu po wczytaniu */
@keyframes tc-hero-bg { from { transform: scale(1.06); opacity: .001; } to { transform: scale(1); opacity: 1; } }
@keyframes tc-fade-up { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes tc-nudge { 0%, 100% { transform: translate(-50%, 0) rotate(45deg); } 50% { transform: translate(-50%, 4px) rotate(45deg); } }
html.tc-js .tc-hero .wp-block-cover__image-background { animation: tc-hero-bg 1.8s var(--tc-ease) both; }
html.tc-js .tc-hero__text > * { animation: tc-fade-up 1s var(--tc-ease) both; }
html.tc-js .tc-hero__text > :nth-child(1) { animation-delay: .25s; }
html.tc-js .tc-hero__text > :nth-child(2) { animation-delay: .4s; }
html.tc-js .tc-hero__text > :nth-child(3) { animation-delay: .55s; }
html.tc-js .tc-hero .tc-scroll-more { animation: tc-fade-up 1s var(--tc-ease) .75s both; }
html.tc-js .wp-block-button.is-style-scroll-more .wp-block-button__link::after { animation: tc-nudge 2.4s ease-in-out 2s infinite; }
html.tc-js .wp-block-button.is-style-scroll-more .wp-block-button__link:hover::after { animation-play-state: paused; }

/* Obrazy: płynne pojawienie się po doładowaniu (lazy-load) */
html.tc-js img.tc-img-pending { opacity: 0; }
html.tc-js img.tc-img-loaded { opacity: 1; transition: opacity .6s ease; }

/* Delikatne uniesienie kart przy najechaniu */
.tc-team-card__media img, .tc-post-list .wp-block-post-featured-image img { transition: transform 1.2s var(--tc-ease); }
.tc-team-card:hover .tc-team-card__media img, .tc-post-list .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* CTA z widgetem ZnanyLekarz */
.tc-cta__widget { background: none !important; padding: 20px; box-shadow: none; min-height: 120px; }
.tc-cta__widget iframe { width: 100% !important; display: block; border: 0; }
.tc-cta__widget .zl-facility-url { display: inline-block; color: var(--wp--preset--color--background); }
@media (max-width: 781px) { .tc-cta__cols { gap: var(--wp--preset--spacing--md) !important; } }
