/*
Theme Name: AOP
Theme URI: https://www.obcanskeporadny.cz
Author: L9 Studios
Description: Bloková šablona pro Asociaci občanských poraden. Magazínový web s důrazem na přístupnost a rychlou cestu k poradně.
Version: 0.2.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: aop
*/

/* =====================================================
   Základ: focus, odkazy, drobnosti
   ===================================================== */

:where(a, button, input, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.entry-content a {
	text-underline-offset: 3px;
}

/* =====================================================
   Hlavička a navigace (vlastní, bez JS)
   ===================================================== */

.aop-header {
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 16px;
	padding-bottom: 16px;
}

.aop-header .aop-logo {
	margin: 0;
}
.aop-header .aop-logo img {
	display: block;
	width: 168px;
	height: auto;
}

.aop-nav {
	display: flex;
	align-items: center;
	gap: 28px;
}
.aop-nav-links {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.aop-nav-links a {
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 1rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	padding: 6px 2px;
}
.aop-nav-links a:hover {
	color: var(--wp--preset--color--primary);
}
.aop-nav-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* tlačítka mimo Gutenberg (hlavička) */
.aop-btn,
.aop-btn-ghost {
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 10px;
	padding: 11px 20px;
	display: inline-block;
	line-height: 1.2;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.aop-btn {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--paper);
}
.aop-btn:hover {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--paper);
}
.aop-btn-ghost {
	color: var(--wp--preset--color--primary-dark);
	border: 1.5px solid var(--wp--preset--color--line);
}
.aop-btn-ghost:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* hamburger jen na mobilu */
.aop-burger {
	display: none;
	position: relative;
}
.aop-burger summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 10px;
	box-sizing: border-box;
}
.aop-burger summary::-webkit-details-marker { display: none; }
.aop-burger summary span {
	display: block;
	height: 2px;
	background: var(--wp--preset--color--ink);
	border-radius: 2px;
}
.aop-burger[open] summary {
	border-color: var(--wp--preset--color--primary);
}
.aop-burger-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	z-index: 40;
	min-width: 240px;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(23, 48, 95, .16);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.aop-burger-panel a {
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 500;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 8px;
}
.aop-burger-panel a:hover {
	background: var(--wp--preset--color--primary-tint);
	color: var(--wp--preset--color--primary-dark);
}
.aop-burger-panel a.aop-btn {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--paper);
	text-align: center;
	margin-bottom: 8px;
}

/* =====================================================
   Hero
   ===================================================== */

.aop-hero {
	background: linear-gradient(180deg, #ffffff 0%, #eef3fa 100%);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.aop-panel {
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 4px solid var(--wp--preset--color--primary);
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(23, 48, 95, .10);
}

.aop-stat {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 16px 0;
	color: var(--wp--preset--color--mid);
	font-size: 1rem;
}
.aop-stat:first-child { padding-top: 4px; }
.aop-stat:last-child { border-bottom: 0; padding-bottom: 4px; }
.aop-stat strong {
	display: block;
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--wp--preset--color--primary-dark);
	font-variant-numeric: tabular-nums;
}

/* =====================================================
   Karty, štítky, dlaždice
   ===================================================== */

.aop-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	background: var(--wp--preset--color--paper);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
	height: 100%;
	box-sizing: border-box;
}
.aop-card:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 12px 30px rgba(23, 48, 95, .10);
	transform: translateY(-2px);
}
.aop-card h2 a,
.aop-card h3 a {
	text-decoration: none;
	color: inherit;
}
.aop-card h2 a:hover,
.aop-card h3 a:hover {
	color: var(--wp--preset--color--primary);
}

.aop-chip,
.aop-chip a {
	display: inline-block;
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--primary-tint);
	border-radius: 999px;
	padding: 4px 12px;
	text-decoration: none;
}
.aop-chip a { padding: 0; background: none; }
.aop-chip a:hover { text-decoration: underline; text-underline-offset: 3px; }

.aop-tile {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	background: var(--wp--preset--color--paper);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.aop-tile:hover {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary-tint);
	box-shadow: 0 10px 24px rgba(23, 48, 95, .08);
}
.aop-tile a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 20px;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 1.0625rem;
	line-height: 1.35;
	min-height: 76px;
	box-sizing: border-box;
}
.aop-tile a::after {
	content: "→";
	color: var(--wp--preset--color--primary);
	font-size: 1.25rem;
	flex-shrink: 0;
}

/* =====================================================
   Pruh „Víme, co Česko trápí" a tišší pruh
   ===================================================== */

.aop-band {
	background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-dark) 100%);
	border-radius: 18px;
}
.aop-tz-list a:hover {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.aop-quiet {
	border-top: 1px solid var(--wp--preset--color--line);
}
.aop-quiet a { color: var(--wp--preset--color--primary-dark); }

/* =====================================================
   Patička (tmavě modrá)
   ===================================================== */

.aop-footer {
	background: var(--wp--preset--color--navy);
	color: rgba(255, 255, 255, .78);
}
.aop-footer .aop-footer-brand {
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 700;
	font-size: 1.25rem;
	color: #ffffff;
}
.aop-footer h2 {
	color: rgba(255, 255, 255, .6);
}
.aop-footer p {
	color: rgba(255, 255, 255, .78);
}
.aop-footer a {
	color: rgba(255, 255, 255, .92);
	text-decoration: none;
}
.aop-footer a:hover {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.aop-footer .wp-block-separator {
	border-color: rgba(255, 255, 255, .18);
	background: none;
}

.is-style-no-disc {
	list-style: none;
	padding-left: 0;
}
.is-style-no-disc li { margin: 8px 0; }

/* =====================================================
   Obsah článků
   ===================================================== */

.entry-content h2 { margin-top: 2.2rem; }
.entry-content h3 { margin-top: 1.6rem; }

.entry-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.9375rem;
}
.entry-content th,
.entry-content td {
	border: 1px solid var(--wp--preset--color--line);
	padding: 8px 12px;
	text-align: left;
}

/* =====================================================
   Mobil
   ===================================================== */

@media (max-width: 900px) {
	.aop-nav-links,
	.aop-nav-actions { display: none; }
	.aop-burger { display: block; }
	.aop-header .aop-logo img { width: 140px; }
}

@media (max-width: 781px) {
	.aop-hero-panel { margin-top: var(--wp--preset--spacing--40); }

	.aop-hero .wp-block-buttons { width: 100%; }
	.aop-hero .wp-block-button { width: 100%; }
	.aop-hero .wp-block-button__link {
		display: block;
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

	.aop-footer .wp-block-columns { gap: 0 !important; }
	.aop-footer .is-style-no-disc li {
		display: inline-block;
		margin: 4px 18px 4px 0;
	}
	.aop-footer .wp-block-column { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.aop-card, .aop-tile, .aop-btn, .aop-btn-ghost {
		transition: none;
	}
	.aop-card:hover { transform: none; }
}
