/*
Theme Name: Eye-tracking KGI UP
Theme URI: https://eyetracking.upol.cz
Author: jsmefaktory
Description: Clean, modern, responsive block (FSE) theme for the Eye-tracking research group, Department of Geoinformatics, Palacký University Olomouc. No plugin dependencies; all content and design are edited directly in the WordPress editor. UP brand blue (#006FAD); simple blue header & footer, rounded content cards.
Version: 0.4.0
Requires at least: 6.1
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eyetracking
Tags: full-site-editing, block-templates, education, one-column, custom-colors, translation-ready
*/

/* Layout, colours and typography live in theme.json. This file holds the
   details theme.json can't express. */

html { scroll-behavior: smooth; }

/* Sticky footer: keep the footer at the bottom on short pages */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > footer { margin-top: auto; }

/* Typographic polish */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, .wp-block-heading { text-wrap: balance; }
p { text-wrap: pretty; max-width: 70ch; }
.wp-block-post-content { font-size: 1.075rem; }

/* Eyebrow / kicker label */
.eyebrow {
	text-transform: uppercase;
	letter-spacing: .09em;
	font-weight: 700;
	font-size: .8rem;
	line-height: 1.2;
	margin: 0 0 .25rem;
}

/* ---------- Header (light) ---------- */
.site-header-sticky {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 0 rgba(21, 24, 27, .04);
}
.brand .wp-block-site-title { margin: 0; }
.site-header-sticky .wp-block-site-title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.brand .custom-logo { border-radius: 8px; display: block; }

.main-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-underline-offset: .35em;
	text-decoration-thickness: 1px;
}
.main-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.main-nav .current-menu-item > .wp-block-navigation-item__content,
.main-nav .current_page_item > .wp-block-navigation-item__content { color: var(--wp--preset--color--primary); }
.site-header-sticky .wp-block-navigation__responsive-container-open,
.site-header-sticky .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--contrast); }

/* ---------- Hero ---------- */
.hero-image { margin: 0; }
.hero-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 20px;
	display: block;
}
.arrow-link { margin: 0; }
.arrow-link a { font-weight: 600; text-decoration: none; }
.arrow-link a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Content cards ---------- */
.is-style-card {
	background-color: #fff;
	transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
	height: 100%;
}
.is-style-card:hover {
	box-shadow: 0 16px 40px rgba(21, 24, 27, .10);
	transform: translateY(-4px);
	border-color: #d2d7dd !important;
}
.study-card { overflow: hidden; }
.study-card .card-media { margin: 0; }
.study-card .card-media a { display: block; line-height: 0; }
.study-card .card-media img,
.study-card .wp-block-post-featured-image img {
	width: 100%;
	display: block;
	object-fit: cover;
}
.study-card .wp-block-post-title { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
.study-card .wp-block-post-title a { text-decoration: none; }
.study-card .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: .15em; }
.study-card .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: 1rem; line-height: 1.55; margin: 0; }
.study-card .wp-block-post-excerpt__more-text { display: none; }

/* News grid breathing room */
.news-grid.is-layout-grid { gap: 2rem; }
@media (max-width: 640px) { .news-grid.is-layout-grid { grid-template-columns: 1fr; } }

/* ---------- Single post ---------- */
.post-meta { align-items: center; }
.post-meta .wp-block-post-date,
.post-meta .wp-block-post-terms { margin: 0; color: var(--wp--preset--color--muted); }
.post-meta .wp-block-post-terms a { color: var(--wp--preset--color--muted); text-decoration: none; }
.post-meta .wp-block-post-terms a:hover { color: var(--wp--preset--color--primary); }

/* Prev / next — VitePress-style rounded clickable cards */
.post-nav .wp-block-column { display: flex; }
.post-nav .nav-card {
	position: relative;
	width: 100%;
	height: 100%;
	background: #fff;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.post-nav .nav-card:hover {
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: 0 10px 28px rgba(21, 24, 27, .08);
	transform: translateY(-2px);
}
.post-nav .nav-eyebrow {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-weight: 600;
	font-size: .78rem;
	color: var(--wp--preset--color--muted);
	margin: 0;
}
.post-nav .nav-card:hover .nav-eyebrow { color: var(--wp--preset--color--primary); }
.post-nav .wp-block-post-navigation-link { margin: 0; }
.post-nav .wp-block-post-navigation-link a {
	display: inline-flex;
	align-items: baseline;
	gap: .45rem;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.post-nav .nav-next .wp-block-post-navigation-link a { justify-content: flex-end; }
.post-nav .nav-card:hover .wp-block-post-navigation-link a { color: var(--wp--preset--color--primary); }
/* whole card clickable (stretched link) */
.post-nav .wp-block-post-navigation-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
}
/* arrow lives on the Previous/Next label and matches its colour */
.post-nav .nav-arrow {
	color: inherit;
	font-weight: 700;
	font-size: 1.15em;
}
.post-nav .wp-block-post-navigation-link:empty { display: none; }
/* hide a whole card/column when there is no adjacent post */
.post-nav .wp-block-column:not(:has(.wp-block-post-navigation-link a)) { display: none; }
@media (max-width: 640px) { .post-nav.wp-block-columns { gap: 0.75rem; } }

/* ---------- Pagination (rounded pills) ---------- */
.pagination { margin-top: 1rem; align-items: center; }
.pagination .wp-block-query-pagination-numbers { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pagination .page-numbers,
.pagination .wp-block-query-pagination-previous,
.pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 .9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.pagination a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}
.pagination .page-numbers.current {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: #fff;
}
.pagination .page-numbers.dots {
	border: 0;
	min-width: 1.25rem;
	padding: 0;
	color: var(--wp--preset--color--muted);
}

/* Featured images rounded to match */
.wp-block-post-featured-image img { border-radius: 16px; }

/* ---------- Footer (blue, minimal) ---------- */
.site-footer,
.site-footer a,
.site-footer .wp-block-site-title a { color: #fff !important; }
.site-footer .wp-block-site-title { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; line-height: 1.2; }
.site-footer .wp-block-site-title a { text-decoration: none; }
.site-footer p { color: rgba(255, 255, 255, .9); max-width: none; }
.site-footer .footer-meta { color: rgba(255, 255, 255, .72); line-height: 1.85; margin: 0; }
.site-footer .footer-meta a { color: inherit !important; text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; opacity: .9; }
.site-footer .footer-meta a:hover { opacity: 1; }
.site-footer .footer-brand { line-height: 1.7; }
.site-footer .footer-brand .fb-title { display: inline-block; font-weight: 700; font-size: 1.45rem; letter-spacing: -0.01em; margin-bottom: .4rem; }
.site-footer .footer-brand a { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.site-footer .footer-brand a:hover { opacity: .85; }
.site-footer .footer-eyebrow { color: rgba(255, 255, 255, .7) !important; margin: 0; }
.site-footer .footer-address { line-height: 1.75; }
.site-footer .footer-address a { text-decoration: underline; text-underline-offset: .15em; }
.site-footer .footer-address a:hover { opacity: .85; }
.site-footer .footer-link a { text-decoration: underline; text-underline-offset: .2em; opacity: .95; }
.site-footer .footer-link a:hover { opacity: 1; }
.site-footer .footer-rule { border: 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.site-footer .footer-copy { color: rgba(255, 255, 255, .72) !important; }
.site-footer .footer-logo { margin: 0; }
.site-footer .footer-logo img { width: 210px; max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* Outline button helper (if used elsewhere) */
.wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
	background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { color: #fff; background: var(--wp--preset--color--primary); }

/* Content links underline on hover */
.wp-block-post-content a:not(.wp-element-button) { text-underline-offset: .15em; }

/* Visible focus for keyboard users */
:where(a, button, .wp-block-button__link, input):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Accessibility: skip link */
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}
