/*
Theme Name: W stronę dziecka
Description: Motyw bloga „W stronę dziecka” — klimat dawnego bloga (domek z kaczkami, pomarańcz i błękit) w nowoczesnej, czytelnej formie.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: wstronedziecka
*/

/* ---------- Ogólne ---------- */
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

/* ---------- Nagłówek ---------- */
.wsd-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.wsd-header .wsd-logo img { width: 120px; height: auto; }
.wsd-header .wp-block-site-title a { text-decoration: none; }
.wsd-nav { border-top: 1px solid var(--wp--preset--color--line); }
.wsd-nav .wp-block-navigation-item__content { text-decoration: none; }
.wsd-nav .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { padding: .35em 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
.wsd-nav .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.wsd-nav .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary-dark); }
.wsd-nav .wp-block-navigation__submenu-container { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--wp--preset--color--line) !important; border-radius: 10px; box-shadow: 0 10px 30px rgba(80, 50, 10, .10); padding: .4em 0 !important; min-width: 230px !important; text-transform: none; letter-spacing: 0; }
.wsd-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .45em 1.1em !important; font-size: var(--wp--preset--font-size--small); }
.wsd-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--primary-dark); }

/* ---------- Karty wpisów ---------- */
.wsd-card { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; overflow: hidden; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.wsd-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(80, 50, 10, .10); }
.wsd-card .wp-block-post-featured-image { margin: 0; }
.wsd-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.wsd-card .wp-block-post-title a { text-decoration: none; }
.wsd-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary-dark); }
.wsd-card .wp-block-post-excerpt__more-link { font-weight: 600; text-decoration: none; }
.wsd-grid > .wp-block-post { display: flex; }
.wsd-grid > .wp-block-post > .wsd-card { flex: 1; }

/* Kategorie jako „etykietki” */
.wsd-chips a { display: inline-block; background: var(--wp--preset--color--accent-soft); color: #1d5f86; border-radius: 999px; padding: .15em .7em; margin: 0 .25em .3em 0; text-decoration: none; font-size: .78rem; font-weight: 600; }
.wsd-chips a:hover { background: var(--wp--preset--color--accent); color: #fff; }
.wsd-chips .wp-block-post-terms__separator { display: none; }

/* ---------- Panel boczny ---------- */
.wsd-box { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; }
.wsd-box h2 { letter-spacing: .08em; }
.wsd-about img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; object-position: top; }
.wsd-cats ul { list-style: none; padding: 0; margin: 0; }
.wsd-cats li { border-bottom: 1px dashed var(--wp--preset--color--line); padding: .35em 0; }
.wsd-cats li:last-child { border-bottom: 0; }
.wsd-cats a { text-decoration: none; display: inline-block; }
.wsd-cats a::first-letter { text-transform: uppercase; }

/* ---------- Treść wpisu (stare wpisy z Bloggera) ---------- */
.wsd-content { overflow-wrap: anywhere; }
.wsd-content img { border-radius: 8px; }
.wsd-content a:has(> img) { display: inline-block; }
.wsd-content .separator { margin: 1.2em 0; }
.wsd-content [style*="font-family"] { font-family: inherit !important; }
.wsd-content [style*="color: #222222"], .wsd-content [style*="color: black"] { color: inherit !important; }
.wsd-content [style*="justify"] { text-align: left !important; }
.wsd-content table { max-width: 100%; }
.wsd-content iframe { max-width: 100%; }

/* Pierwsza litera nazw kategorii wielka */
.wp-block-query-title::first-letter { text-transform: uppercase; }

/* ---------- Stopka ---------- */
.wsd-footer a { text-decoration: none; }
.wsd-footer a:hover { text-decoration: underline; }

/* ---------- Telefony ---------- */
@media (max-width: 781px) {
	.wsd-header .wsd-logo img { width: 90px; }
	.wsd-layout { flex-direction: column; }
}
