/*
Theme Name: Robert Nawrowski
Template: ollie
Description: Lekki, ciemny motyw strony robertnawrowski.com (motyw potomny Ollie). Miniatury wpisów z YouTube, gdy wpis nie ma obrazka.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.4
Author: Robert Nawrowski
Text Domain: robert-nawrowski
*/

/* Karty wpisów: obrazek 16:9, delikatne podniesienie po najechaniu */
.rn-karta { transition: transform .15s ease, background-color .15s ease; height: 100%; }
.rn-karta:hover { transform: translateY(-3px); background-color: var(--wp--preset--color--tertiary-hover, #1d1d24); }
.rn-karta .wp-block-post-featured-image img,
.rn-hero .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.rn-karta .wp-block-post-title a { text-decoration: none; }
.rn-karta .wp-block-post-title a:hover { color: var(--wp--preset--color--primary-alt); }
.wp-block-post-template.is-layout-grid > li { height: 100%; }

/* Odtwarzacz YouTube na całą szerokość treści */
.wp-block-embed-youtube iframe, .entry-content iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; }

/* Znaczek „film” na miniaturach z YouTube */
.rn-yt { position: relative; display: block; }
.rn-yt::after { content: ""; position: absolute; left: 14px; bottom: 14px; width: 42px; height: 30px; border-radius: 8px;
	background: #e62117 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 22px no-repeat; }

.rn-naglowek { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(10px); }

/* Tytuł sekcji tuż nad siatką wpisów */
main > .rn-sekcja-tytul + .wp-block-query { margin-block-start: 18px !important; }
main > .rn-sekcja-tytul { margin-block-end: 0 !important; }
.rn-sekcja-tytul a { text-decoration: none; font-weight: 600; }

/* Telefon: nagłówek w jednej linii, przycisk YouTube bez łamania */
.rn-subskrybuj .wp-block-button__link { white-space: nowrap; }
.rn-naglowek .wp-block-site-title { white-space: nowrap; }
@media (max-width: 600px) {
	.rn-naglowek .wp-block-site-title { font-size: 1.15rem !important; }
	.rn-subskrybuj .wp-block-button__link { padding: 7px 12px !important; }
	.rn-subskrybuj .rn-tekst { display: none; }
	.rn-naglowek .alignwide > .wp-block-group:last-child { gap: 12px !important; }
}
