/*
Theme Name: AB Autoškola
Description: Téma pre AB Autoškolu Brádňanský. Obsah (termíny, ceny, kontakty, vozidlá, recenzie) sa upravuje cez plugin „AB Autoškola – obsah“.
Author: Filip Rohárik
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ab-autoskola
*/

/* Farby a písma zmeníš tu, na jednom mieste. */
:root {
	--ab-ink: #14171C;
	--ab-ink-2: #1E232B;
	--ab-line-dark: #333A45;
	--ab-paper: #F3F1EA;
	--ab-white: #FFFFFF;
	--ab-line: #D9D5C8;
	--ab-muted: #545A64;
	--ab-muted-dark: #AEB5BF;
	--ab-accent: #FFD21F;
	--ab-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--ab-body: 'Barlow', 'Segoe UI', Arial, sans-serif;
	--ab-radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--ab-paper);
	color: var(--ab-ink);
	font-family: var(--ab-body);
	font-size: 17px;
	line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid #2F6FED; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.ab-skip { position: absolute; left: -9999px; top: 0; background: var(--ab-accent); color: var(--ab-ink); padding: 12px 18px; font-weight: 700; z-index: 10; }
.ab-skip:focus { left: 8px; top: 8px; }

.ab-wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
@media (max-width: 600px) { .ab-wrap { padding-left: 20px; padding-right: 20px; } }

/* Nadpisy */
.ab-h1, .ab-h2, .ab-card__code, .ab-fact__big, .ab-price__num, .ab-next__date, .ab-place__name, .ab-steps__num, .ab-logo__name, .ab-logo__mark {
	font-family: var(--ab-display);
}
.ab-h1 { margin: 0; font-weight: 800; font-size: clamp(46px, 7.2vw, 108px); line-height: 0.95; text-transform: uppercase; text-wrap: balance; }
.ab-h2 { margin: 0; font-weight: 800; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; text-transform: uppercase; text-wrap: balance; }
.ab-h2--big { font-size: clamp(42px, 5vw, 72px); line-height: 0.95; }
.ab-h2 a { text-decoration: none; }
.ab-h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.ab-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ab-muted); }
.ab-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; max-width: 720px; }
.ab-head p { margin: 0; font-size: 18px; color: var(--ab-muted); }
.ab-head--dark .ab-eyebrow, .ab-header .ab-eyebrow { color: var(--ab-accent); }
.ab-head--dark p { color: #D5DAE1; }

/* Tlačidlá */
.ab-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 58px; padding: 14px 30px;
	background: var(--ab-accent); color: var(--ab-ink);
	font-weight: 700; font-size: 18px; text-decoration: none;
	border: 2px solid var(--ab-accent); border-radius: 6px;
}
.ab-btn:hover { background: #FFE163; border-color: #FFE163; }
.ab-btn--small { min-height: 48px; padding: 10px 22px; font-size: 16px; }
.ab-btn--ghost { background: transparent; color: var(--ab-white); border-color: #4A525E; }
.ab-btn--ghost:hover { background: var(--ab-ink-2); border-color: var(--ab-white); }

/* Prerušovaná čiara */
.ab-lane { height: 10px; background: repeating-linear-gradient(90deg, var(--ab-accent) 0 64px, transparent 64px 112px); }

/* Hlavička */
.ab-header { background: var(--ab-ink); color: var(--ab-white); }
.ab-topbar { border-bottom: 1px solid var(--ab-line-dark); font-size: 14px; color: var(--ab-muted-dark); }
.ab-topbar__in, .ab-topbar__group { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.ab-topbar__in { justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.ab-topbar a { text-decoration: none; }
.ab-topbar a:hover { color: var(--ab-white); }
.ab-topbar__tel { color: var(--ab-white); font-weight: 600; }
.ab-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 22px; padding-bottom: 22px; }

.ab-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.ab-logo__img { max-height: 52px; width: auto; }
.ab-logo__mark { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--ab-accent); color: var(--ab-ink); font-weight: 800; font-size: 30px; border-radius: 6px; }
.ab-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.ab-logo__name { font-weight: 700; font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; }
.ab-logo__sub { font-size: 13px; color: var(--ab-muted-dark); }

.ab-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; }
.ab-nav__list { display: flex; flex-wrap: wrap; gap: 0 30px; margin: 0; padding: 0; list-style: none; font-weight: 500; font-size: 16px; }
.ab-nav__list a { display: block; padding: 12px 0; text-decoration: none; border-bottom: 2px solid transparent; }
.ab-nav__list a:hover, .ab-nav__list .current-menu-item > a { border-bottom-color: var(--ab-accent); }

/* Úvod */
.ab-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 96px; }
.ab-hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.ab-hero__side { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ab-hero__lead { margin: 0; max-width: 540px; font-size: 20px; line-height: 1.5; color: #D5DAE1; }
.ab-hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }
.ab-hero__img { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--ab-radius); }
.ab-next { background: var(--ab-white); color: var(--ab-ink); border-radius: var(--ab-radius); padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.ab-next__label { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ab-muted); }
.ab-next__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 16px 24px; }
.ab-next__date { display: block; font-weight: 700; font-size: 30px; line-height: 1.1; }
.ab-next__place { font-weight: 600; }
.ab-next__place small { font-size: inherit; font-weight: 400; color: var(--ab-muted); }
@media (max-width: 600px) { .ab-hero { padding-top: 32px; padding-bottom: 64px; gap: 40px; } .ab-hero__cta .ab-btn { width: 100%; } }

/* Mriežky a sekcie */
.ab-grid { display: grid; gap: 20px; }
.ab-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.ab-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.ab-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-content: start; }
.ab-section { padding-top: 96px; scroll-margin-top: 16px; }
.ab-section--last { padding-bottom: 96px; }
.ab-split { display: flex; flex-wrap: wrap; gap: 48px 56px; }
.ab-split__narrow { flex: 1 1 380px; min-width: 0; }
.ab-split__wide { flex: 1.3 1 440px; min-width: 0; }
@media (max-width: 600px) { .ab-section { padding-top: 64px; } .ab-section--last { padding-bottom: 64px; } }

/* Fakty */
.ab-facts { background: var(--ab-white); border-bottom: 1px solid var(--ab-line); padding: 36px 0; }
.ab-facts .ab-grid { gap: 24px 32px; }
.ab-fact { display: flex; flex-direction: column; gap: 2px; color: var(--ab-muted); }
.ab-fact__big { font-weight: 800; font-size: 44px; line-height: 1; color: var(--ab-ink); }

/* Karty kurzov */
.ab-card { display: flex; flex-direction: column; gap: 14px; padding: 30px 28px; background: var(--ab-white); border: 1px solid var(--ab-line); border-radius: var(--ab-radius); }
.ab-card p { margin: 0; color: var(--ab-muted); }
.ab-card__code { font-weight: 800; font-size: 84px; line-height: 0.9; }
.ab-card__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ab-line); font-weight: 600; }
.ab-card--dark { background: var(--ab-ink); border-color: var(--ab-ink); color: var(--ab-white); }
.ab-card--dark p { color: #D5DAE1; }
.ab-card--dark .ab-card__code { color: var(--ab-accent); }
.ab-card--dark .ab-card__foot { border-top-color: var(--ab-line-dark); }

/* Cenník */
.ab-prices { background: var(--ab-white); border: 1px solid var(--ab-line); border-radius: var(--ab-radius); padding: 8px 28px; }
.ab-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 22px 0; }
.ab-price + .ab-price { border-top: 1px solid var(--ab-line); }
.ab-price strong { display: block; font-size: 20px; }
.ab-price span { color: var(--ab-muted); }
.ab-price .ab-price__num { font-weight: 800; font-size: 48px; line-height: 1; color: var(--ab-ink); }
.ab-note { margin: 20px 0 0; font-size: 15px; color: var(--ab-muted); }

/* Kroky */
.ab-steps { margin: 0; padding: 0; list-style: none; }
.ab-steps li { display: flex; gap: 20px; padding: 20px 0; }
.ab-steps li + li { border-top: 1px solid var(--ab-line); }
.ab-steps__num { flex: 0 0 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--ab-accent); border-radius: 6px; font-weight: 800; font-size: 26px; }
.ab-steps strong { display: block; font-size: 20px; }
.ab-steps div span { color: var(--ab-muted); }

/* O nás */
.ab-dark { background: var(--ab-ink); color: var(--ab-white); margin-top: 96px; padding: 96px 0; scroll-margin-top: 0; }
.ab-dark .ab-head { margin-bottom: 0; }
.ab-perk { display: flex; flex-direction: column; gap: 8px; padding: 26px; background: var(--ab-ink-2); border-radius: var(--ab-radius); border-top: 4px solid var(--ab-accent); }
.ab-perk strong { font-size: 20px; }
.ab-perk span { color: var(--ab-muted-dark); }
@media (max-width: 600px) { .ab-dark { margin-top: 64px; padding: 64px 0; } }

/* Vozidlá */
.ab-car { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.ab-car__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--ab-radius); }
.ab-car__img--empty { background: #E4E0D4; }
.ab-car strong { display: block; font-size: 20px; }
.ab-car span { color: var(--ab-muted); }

/* Recenzie */
.ab-review { margin: 0; display: flex; flex-direction: column; gap: 18px; padding: 30px 28px; background: var(--ab-white); border: 1px solid var(--ab-line); border-radius: var(--ab-radius); }
.ab-review p { margin: 0; font-size: 19px; }
.ab-review footer { margin-top: auto; }
.ab-review footer span { color: var(--ab-muted); }

/* Prihláška */
.ab-apply { display: flex; flex-wrap: wrap; gap: 40px 56px; padding: clamp(24px, 4vw, 56px); background: var(--ab-accent); border-radius: 14px; }
.ab-apply__text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ab-apply__text p { margin: 0; max-width: 420px; font-size: 19px; }
.ab-apply__form { flex: 1.2 1 420px; min-width: 0; }
.ab-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; padding: 28px; background: var(--ab-white); border-radius: var(--ab-radius); }
.ab-form--done { display: block; font-size: 19px; }
.ab-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ab-form__error { grid-column: 1 / -1; margin: 0; padding: 14px 16px; background: #FDECEC; border: 1px solid #B42318; border-radius: 6px; color: #8A1C12; font-weight: 600; }
.ab-field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ab-field--wide, .ab-form__submit { grid-column: 1 / -1; }
.ab-field label { font-weight: 600; font-size: 15px; }
.ab-field__opt { font-weight: 400; color: var(--ab-muted); }
.ab-field input[type="text"], .ab-field input[type="tel"], .ab-field input[type="email"], .ab-field select {
	width: 100%; height: 50px; padding: 0 14px;
	font: inherit; color: var(--ab-ink); background: var(--ab-white);
	border: 1.5px solid #8A8F98; border-radius: 6px;
}
.ab-field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.ab-field--check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; }
.ab-field--check label { font-weight: 400; color: var(--ab-muted); }
.ab-form__submit { min-height: 58px; background: var(--ab-ink); color: var(--ab-white); border: 0; border-radius: 6px; font: inherit; font-weight: 700; font-size: 18px; cursor: pointer; }
.ab-form__submit:hover { background: #2A303A; }

/* Pätička */
.ab-footer { background: var(--ab-ink); color: var(--ab-white); scroll-margin-top: 0; }
.ab-footer__in { display: flex; flex-direction: column; gap: 8px; padding-top: 80px; padding-bottom: 40px; }
.ab-place { display: flex; flex-direction: column; gap: 10px; padding: 30px 28px; background: var(--ab-ink-2); border-radius: var(--ab-radius); }
.ab-place__name { font-weight: 700; font-size: 32px; line-height: 1.1; text-transform: uppercase; }
.ab-place__tag { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ab-muted-dark); }
.ab-place__line { text-decoration: none; }
.ab-place__map { color: var(--ab-accent); text-decoration: underline; }
.ab-place__tel { padding: 8px 0; font-weight: 700; font-size: 20px; text-decoration: none; }
.ab-place__tel:hover { color: var(--ab-accent); }
.ab-place__tel span { font-weight: 400; font-size: 16px; color: var(--ab-muted-dark); }
.ab-footer__bottom, .ab-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.ab-footer__bottom { justify-content: space-between; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--ab-line-dark); font-size: 15px; color: var(--ab-muted-dark); }
.ab-footer__links a:hover { color: var(--ab-white); }

/* Podstránky */
.ab-page { padding-top: 72px; padding-bottom: 96px; }
.ab-article { max-width: 780px; }
.ab-article + .ab-article { margin-top: 56px; }
.ab-content { margin-top: 28px; font-size: 18px; }
.ab-content h2, .ab-content h3 { font-family: var(--ab-display); text-transform: uppercase; line-height: 1.1; margin: 1.6em 0 0.5em; }
.ab-content h2 { font-size: 36px; }
.ab-content h3 { font-size: 28px; }
.ab-content a { color: var(--ab-ink); text-decoration: underline; text-decoration-color: var(--ab-accent); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.ab-content img { border-radius: var(--ab-radius); }
.ab-content table { width: 100%; border-collapse: collapse; }
.ab-content th, .ab-content td { padding: 12px 14px; border-bottom: 1px solid var(--ab-line); text-align: left; }
.ab-content .wp-block-button__link { background: var(--ab-accent); color: var(--ab-ink); border-radius: 6px; font-weight: 700; text-decoration: none; }

/* ---------- Podstránky (verzia 1.1) ---------- */
.ab-pagehead { padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.ab-pagehead__title { font-size: clamp(46px, 6vw, 92px); }
.ab-pageimg { padding-top: 56px; }
.ab-pageimg img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--ab-radius); }
.ab-page { padding-top: 64px; padding-bottom: 0; }
.ab-page .ab-content { max-width: 820px; margin-top: 0; }
.ab-content > :first-child { margin-top: 0; }
.ab-content p { margin: 0 0 1em; }
.ab-content .ab-lead, .ab-content .is-style-lead { font-size: 22px; line-height: 1.5; }

/* Karty v obsahu: blok „Stĺpce“ s triedou ab-cards */
.ab-content .ab-cards { gap: 16px; margin: 40px 0; }
.ab-content .ab-cards > .wp-block-column { padding: 26px; background: var(--ab-white); border: 1px solid var(--ab-line); border-top: 4px solid var(--ab-accent); border-radius: var(--ab-radius); }
.ab-content .ab-cards h3 { margin: 0 0 8px; font-family: var(--ab-body); text-transform: none; font-size: 20px; }
.ab-content .ab-cards p { margin: 0; color: var(--ab-muted); font-size: 17px; }

/* Zvýraznený blok: „Skupina“ s triedou ab-box */
.ab-content .ab-box { margin: 40px 0; padding: 32px; background: var(--ab-ink); color: var(--ab-white); border-radius: var(--ab-radius); }
.ab-content .ab-box h2, .ab-content .ab-box h3 { margin-top: 0; color: var(--ab-accent); }
.ab-content .ab-box p:last-child { margin-bottom: 0; }

/* Tlačidlá z editora */
.ab-content .wp-block-button__link { display: inline-flex; min-height: 54px; align-items: center; padding: 12px 26px; font-size: 17px; }
.ab-content .wp-block-embed, .ab-content .wp-block-video { margin: 40px 0; }
.ab-content .wp-block-embed iframe, .ab-content video { width: 100%; border-radius: var(--ab-radius); }

/* Pás s výzvou na konci podstránok */
.ab-apply--band { align-items: center; justify-content: space-between; }
.ab-apply__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.ab-btn--dark { background: var(--ab-ink); border-color: var(--ab-ink); color: var(--ab-white); }
.ab-btn--dark:hover { background: #2A303A; border-color: #2A303A; }
.ab-btn--outline { background: transparent; border-color: var(--ab-ink); color: var(--ab-ink); }
.ab-btn--outline:hover { background: rgba(20, 23, 28, 0.08); border-color: var(--ab-ink); }

/* ---------- Skratky v obsahu podstránok (verzia 1.2) ---------- */
.ab-content .ab-embed { margin: 28px 0 40px; }
.ab-content .ab-card p, .ab-content .ab-price span, .ab-content .ab-next span { margin: 0; }
.ab-content .ab-card .ab-h3 { margin: 0; font-family: var(--ab-body); font-size: 22px; text-transform: none; line-height: 1.25; }
.ab-content .ab-next { border: 1px solid var(--ab-line); }

/* ---------- Formuláre v obsahu, napr. Form Maker na /prihlaska/ (verzia 1.3) ---------- */
.ab-content input[type="text"], .ab-content input[type="email"], .ab-content input[type="tel"],
.ab-content input[type="number"], .ab-content input[type="date"], .ab-content textarea, .ab-content select {
	min-height: 50px; padding: 10px 14px;
	font: inherit; font-size: 17px; color: var(--ab-ink); background: var(--ab-white);
	border: 1.5px solid #8A8F98; border-radius: 6px;
}
.ab-content textarea { min-height: 120px; }
.ab-content input:focus, .ab-content textarea:focus, .ab-content select:focus { border-color: var(--ab-ink); outline: 3px solid var(--ab-accent); outline-offset: 0; }
.ab-content input[type="checkbox"], .ab-content input[type="radio"] { width: 20px; height: 20px; accent-color: var(--ab-ink); vertical-align: -4px; }
.ab-content label { font-size: 17px; }
.ab-content input[type="submit"], .ab-content button[type="submit"], .ab-content .button-submit {
	min-height: 54px; padding: 12px 32px;
	font: inherit; font-weight: 700; font-size: 18px;
	background: var(--ab-accent); color: var(--ab-ink);
	border: 2px solid var(--ab-accent); border-radius: 6px; cursor: pointer;
}
.ab-content input[type="submit"]:hover, .ab-content button[type="submit"]:hover, .ab-content .button-submit:hover { background: #FFE163; border-color: #FFE163; }
.ab-content input[type="submit"]:disabled, .ab-content button[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }
.ab-content input[type="reset"], .ab-content .button-reset {
	min-height: 54px; padding: 12px 24px; font: inherit; font-weight: 600;
	background: transparent; color: var(--ab-ink); border: 2px solid #8A8F98; border-radius: 6px; cursor: pointer;
}

/* ---------- Kontakt (verzia 1.4) ---------- */
.ab-contact { gap: 20px; }
.ab-contact__card { display: flex; flex-direction: column; gap: 8px; padding: 30px 28px; background: var(--ab-white); border: 1px solid var(--ab-line); border-top: 4px solid var(--ab-accent); border-radius: var(--ab-radius); }
.ab-content .ab-contact__name { font-family: var(--ab-display); font-weight: 700; font-size: 32px; line-height: 1.1; text-transform: uppercase; }
.ab-contact__tag { margin-bottom: 6px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ab-muted); }
.ab-contact__line strong { font-weight: 600; }
.ab-content .ab-contact__tel { padding: 6px 0; font-weight: 700; font-size: 20px; text-decoration: none; }
.ab-contact__tel span { font-weight: 400; font-size: 16px; color: var(--ab-muted); }
.ab-contact__map { width: 100%; height: 240px; margin-top: 12px; border: 0; border-radius: 6px; background: #E4E0D4; }
.ab-content .ab-contact__route { align-self: flex-start; padding: 8px 0; font-weight: 600; }
.ab-contact__mail { font-size: 19px; }
.ab-footer__bottom:first-child { margin-top: 0; }
