/*
Theme Name: Autopůjčovna Vsetín
Theme URI: https://autopujcovnavsetin.cz
Author: Autopůjčovna Vsetín
Description: Klasická šablona s nastavením přes Vzhled → Přizpůsobit: obrázek v záhlaví (banner na všech stránkách), menu, barvy, písmo, widgety, patička, úvodní stránka a další CSS. Obsah stránek se upravuje blokovým editorem.
Version: 2.0.2
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autopujcovna
*/

/* Barvy, písmo a šířka se nastavují v Přizpůsobit (proměnné se vypisují do <head>). */
:root {
	--header-bg: #111111;
	--header-text: #ffffff;
	--card-bg: #ffffff;
	--text: #111111;
	--link: #111111;
	--btn-bg: #FFD500;
	--btn-text: #111111;
	--width: 1060px;
	--radius: 16px;
	--base-size: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-size); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background-color: #f5f5f5;
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
:focus-visible { outline: 3px solid #FFD500; outline-offset: 2px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(var(--width), 100% - 2.5rem); margin-inline: auto; }

/* ---------- Hlavička ---------- */
.site-header { background: var(--header-bg); color: var(--header-text); }
.site-header .wrap {
	display: flex; flex-wrap: wrap; align-items: center;
	justify-content: space-between; gap: 0.5rem 1.5rem;
	padding-block: 1.5rem;
}
.site-branding { display: flex; align-items: center; gap: 1rem; }
.site-title {
	margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3;
	text-transform: uppercase;
}
.site-title a { color: inherit; text-decoration: none; }
.custom-logo { display: block; max-height: 60px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.main-nav li { position: relative; }
.main-nav a {
	display: inline-block; padding: 0.25rem 0;
	color: inherit; text-decoration: none; font-weight: 600;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_ancestor > a {
	text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px;
}
/* podmenu */
.main-nav ul ul {
	display: none; position: absolute; top: 100%; left: 0; z-index: 20;
	min-width: 12rem; flex-direction: column; gap: 0;
	background: var(--header-bg); padding: 0.5rem 0.9rem; border-radius: 0 0 8px 8px;
}
.main-nav li:hover > ul, .main-nav li:focus-within > ul { display: flex; }

.nav-toggle {
	display: none; background: none; color: inherit; font: inherit; font-weight: 600;
	border: 2px solid currentColor; border-radius: 8px; padding: 0.3rem 0.8rem; cursor: pointer;
}

/* ---------- Banner (obrázek v záhlaví) ---------- */
.site-banner { margin-top: 20px; }
.site-banner img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

/* ---------- Obsah ---------- */
.site-main { margin-block: 20px 0; }
.site-banner + .site-main { margin-top: 55px; }
.content-card {
	background: var(--card-bg); border-radius: var(--radius); padding: 35px;
}
.entry-title, .page-title { margin: 0 0 0.6rem; font-size: 2rem; font-weight: 700; line-height: 1.25; }
.entry-meta { color: #6b6b6b; font-size: 0.9rem; margin-bottom: 0.9rem; }
.entry-content > * { margin-block: 0 0.9rem; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 1.6rem; line-height: 1.3; margin-top: 1.6rem; }
.entry-content h3 { font-size: 1.25rem; line-height: 1.3; margin-top: 1.3rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-weight: 700; }
.entry-content .alignwide, .entry-content .alignfull { max-width: none; width: 100%; }
.entry-content .alignleft { float: left; margin: 0 1.2rem 0.6rem 0; }
.entry-content .alignright { float: right; margin: 0 0 0.6rem 1.2rem; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content img { border-radius: 8px; }

.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td, .entry-content td, .entry-content th {
	border: 1px solid #e3e3e3; padding: 0.55rem 0.75rem; text-align: left;
}
.wp-block-table thead { border-bottom: 0; }
.wp-block-table th { background: var(--header-bg); color: var(--header-text); }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: #f5f5f5; }

.wp-block-button__link:where(:not(.has-background)) { background: var(--btn-bg); }
.wp-block-button__link:where(:not(.has-text-color)) { color: var(--btn-text); }
.wp-block-button__link { font-weight: 700; border-radius: 8px; text-decoration: none; }

.car-card { height: 100%; border: 1px solid #e3e3e3; border-radius: 12px; padding: 1rem; }
.car-card img { width: 100%; height: auto; border-radius: 8px; }
.wp-block-columns { gap: 1.5rem; }

/* seznamy článků, stránkování */
.post-item { margin-bottom: 1.6rem; }
.post-item h2 { margin: 0; font-size: 1.4rem; }
.post-item h2 a { text-decoration: none; }
.navigation.pagination { margin-top: 1.5rem; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-numbers { padding: 0.2rem 0.7rem; border: 1px solid #e3e3e3; border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--header-bg); color: var(--header-text); }

/* šablona „Plná šířka (bez karty)“ */
.content-plain { padding: 0; background: none; }

/* ---------- Patička ---------- */
.site-footer { margin-top: 2.5rem; background: var(--header-bg); color: var(--header-text); padding-block: 1.5rem; font-size: 0.9rem; }
.site-footer a { color: inherit; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; margin-bottom: 1rem; }
.footer-widgets .widget-title { font-size: 1rem; margin: 0 0 0.4rem; }
.site-footer p { margin: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
	.nav-toggle { display: inline-block; }
	.main-nav { display: none; width: 100%; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0.2rem; }
	.main-nav ul ul { display: flex; position: static; padding: 0 0 0 1rem; }
	.content-card { padding: 20px; }
	.entry-title, .page-title { font-size: 1.6rem; }
	.site-banner + .site-main { margin-top: 30px; }
}

/* ---------- Elementor uvnitř karty: stejné zarovnání jako u běžných stránek ---------- */
.content-card .elementor-section.elementor-section-boxed > .elementor-container { max-width: 100%; }
.content-card .elementor-top-section > .elementor-container > .elementor-column:first-child > .elementor-widget-wrap { padding-left: 0; }
.content-card .elementor-top-section > .elementor-container > .elementor-column:last-child > .elementor-widget-wrap { padding-right: 0; }
.content-card .e-con.e-parent { --padding-left: 0px; --padding-right: 0px; --content-width: 100%; }
.content-card .e-con.e-parent > .e-con-inner { max-width: 100%; }
.content-card .elementor-widget-container > :first-child { margin-top: 0; }
.content-card .elementor-card > .elementor,
.content-card .elementor-card > .elementor > :first-child { margin-top: 0; }
