/*
Theme Name: AK Ultra Astra Child
Theme URI: https://kartal.cz/
Description: Ultra lehká child šablona pro Astra. Určeno pro čistý WordPress + Astra + Gutenberg Custom HTML bloky + vlastní CSS systém.
Author: Aleš Kartal
Author URI: https://kartal.cz/
Template: astra
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
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: ak-astra-ultra
*/

/* =========================================================
   AK ULTRA ASTRA CHILD – GLOBAL BASE v1.0
   Cíl: čistý, rychlý, mobile-first základ bez pagebuilderu.
   ========================================================= */

:root {
  --ak-bg: #ffffff;
  --ak-surface: #f6f8fb;
  --ak-card: #ffffff;
  --ak-text: #101828;
  --ak-muted: #667085;
  --ak-border: rgba(16, 24, 40, 0.12);
  --ak-primary: #155eef;
  --ak-primary-hover: #004eeb;
  --ak-dark: #07111f;
  --ak-white: #ffffff;
  --ak-radius-sm: 12px;
  --ak-radius-md: 18px;
  --ak-radius-lg: 28px;
  --ak-shadow-soft: 0 18px 48px rgba(16, 24, 40, 0.08);
  --ak-container: 1160px;
  --ak-container-wide: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--ak-bg);
  color: var(--ak-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ak-primary);
}

button,
input,
textarea,
select {
  font: inherit;
}

/* Astra clean baseline */
.ast-plain-container.ast-no-sidebar #primary,
.ast-page-builder-template #primary,
.ast-separate-container #primary {
  margin-top: 0;
  margin-bottom: 0;
}

.ast-container,
.ast-container-fluid {
  max-width: none;
}

.entry-content,
.entry-content p,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content ul,
.entry-content ol {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.site-content {
  overflow-x: clip;
}

/* Gutenberg Custom HTML block spacing reset */
.entry-content > .wp-block-html,
.entry-content > .wp-block-group,
.entry-content > .wp-block-cover {
  margin-block-start: 0;
  margin-block-end: 0;
}

/* Core layout helpers */
.ak-page {
  background: var(--ak-bg);
  color: var(--ak-text);
}

.ak-container {
  width: min(100% - 32px, var(--ak-container));
  margin-inline: auto;
}

.ak-container-wide {
  width: min(100% - 32px, var(--ak-container-wide));
  margin-inline: auto;
}

.ak-section {
  padding: clamp(56px, 8vw, 104px) 0;
}

.ak-section-sm {
  padding: clamp(40px, 6vw, 72px) 0;
}

.ak-eyebrow {
  margin: 0 0 14px;
  color: var(--ak-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ak-title {
  margin: 0;
  max-width: 880px;
  color: var(--ak-text);
  font-size: clamp(2.05rem, 7vw, 4.9rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.ak-title-md {
  margin: 0;
  max-width: 820px;
  color: var(--ak-text);
  font-size: clamp(1.85rem, 4.8vw, 3.35rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.ak-lead {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--ak-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 1.65;
}

.ak-text {
  color: var(--ak-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.ak-grid {
  display: grid;
  gap: 18px;
}

.ak-grid-2,
.ak-grid-3,
.ak-grid-4 {
  grid-template-columns: 1fr;
}

.ak-card {
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-card);
  box-shadow: var(--ak-shadow-soft);
  padding: clamp(22px, 4vw, 34px);
}

.ak-card h2,
.ak-card h3,
.ak-card h4 {
  margin: 0 0 10px;
  color: var(--ak-text);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.ak-card p {
  margin: 0;
  color: var(--ak-muted);
}

.ak-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.ak-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.ak-btn-primary {
  background: var(--ak-primary);
  color: var(--ak-white);
}

.ak-btn-primary:hover {
  background: var(--ak-primary-hover);
  color: var(--ak-white);
}

.ak-btn-secondary {
  border-color: var(--ak-border);
  background: var(--ak-white);
  color: var(--ak-text);
}

.ak-btn-secondary:hover {
  border-color: rgba(21, 94, 239, 0.4);
  color: var(--ak-primary);
}

.ak-surface {
  background: var(--ak-surface);
}

.ak-dark {
  background: var(--ak-dark);
  color: var(--ak-white);
}

.ak-dark .ak-title,
.ak-dark .ak-title-md,
.ak-dark h1,
.ak-dark h2,
.ak-dark h3 {
  color: var(--ak-white);
}

.ak-dark .ak-lead,
.ak-dark .ak-text,
.ak-dark p {
  color: rgba(255, 255, 255, 0.74);
}

/* Simple responsive grid */
@media (min-width: 700px) {
  .ak-container,
  .ak-container-wide {
    width: min(100% - 48px, var(--ak-container));
  }

  .ak-container-wide {
    width: min(100% - 48px, var(--ak-container-wide));
  }

  .ak-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ak-grid-3,
  .ak-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .ak-grid {
    gap: 24px;
  }

  .ak-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ak-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.45);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   AK SITE FOOTER
   ========================================================= */

.site-below-footer-wrap {
  background: linear-gradient(135deg, #0b2744 0%, #123b63 100%);
  border-top: 0;
}

.site-below-footer-wrap,
.site-below-footer-wrap a,
.site-below-footer-wrap .ast-footer-copyright {
  color: #f4f8fc;
}

.site-below-footer-wrap .ast-builder-grid-row-container-inner {
  max-width: none;
}

.site-below-footer-wrap .site-below-footer-inner-wrap,
.site-below-footer-wrap .ast-builder-footer-grid-columns,
.site-below-footer-wrap .site-footer-section,
.site-below-footer-wrap .ast-footer-copyright {
  width: 100%;
}

.site-below-footer-wrap .ast-footer-copyright {
  display: block;
}

.site-below-footer-wrap .ast-builder-layout-element {
  padding: 0;
}

.ak-site-footer {
  width: min(100% - 32px, 1160px);
  margin: 0 auto;
  padding: 32px 0 18px;
}

.ak-site-footer__inner {
  display: grid;
  gap: 24px;
}

.ak-site-footer__brand h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.ak-site-footer__brand p,
.ak-site-footer__meta,
.ak-site-footer__nav a,
.ak-site-footer__contact a {
  color: rgba(244, 248, 252, 0.88);
}

.ak-site-footer__eyebrow {
  margin: 0 0 10px;
  color: #8fd3ff !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ak-site-footer__nav,
.ak-site-footer__contact {
  display: grid;
  gap: 10px;
}

.ak-site-footer a {
  text-decoration: none;
}

.ak-site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.ak-site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.92rem;
}

@media (min-width: 768px) {
  .ak-site-footer__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.9fr) minmax(220px, 1fr);
    align-items: start;
  }
}
