﻿/*
Theme Name: AutoVeto Clanky
Theme URI: https://autoveto.cz/clanky/
Author: AutoVeto
Author URI: https://autoveto.cz
Description: Custom lightweight WordPress theme for AutoVeto blog section.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: autoveto-clanky
*/

:root {
  --av-bg: #eff6ff;
  --av-hero: #dbeafe;
  --av-primary: #2563eb;
  --av-primary-dark: #1d4ed8;
  --av-title: #1e3a8a;
  --av-text: #334155;
  --av-border: #bfdbfe;
  --av-card-bg: #ffffff;
  --av-footer-bg: #1e3a8a;
  --av-footer-text: #93c5fd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--av-bg);
  color: var(--av-text);
  line-height: 1.7;
}

a {
  color: var(--av-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--av-border);
  box-shadow: 0 1px 8px -4px rgba(37, 99, 235, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid var(--av-border);
  background: #f8fbff;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--av-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.menu-is-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.menu-is-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.menu-is-open {
  overflow: hidden;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 88vw;
  background: #fff;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(15, 23, 42, 0.18);
}

body.menu-is-open .menu-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--av-border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.drawer-logo {
  font-size: 18px;
  font-weight: 900;
  color: var(--av-primary);
}

.drawer-logo:hover {
  text-decoration: none;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--av-border);
  background: #f8fbff;
  color: var(--av-title);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.drawer-search {
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--av-border);
}

.drawer-search .av-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drawer-search .av-search-form label {
  flex: 1;
}

.drawer-top-links {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--av-border);
}

.drawer-top-links a {
  display: block;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--av-primary);
  border-top: 1px solid #eef2ff;
}

.drawer-top-links a:first-child {
  border-top: 0;
}

.drawer-top-links a:hover {
  text-decoration: none;
  background: #f5f9ff;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--av-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid var(--av-border);
  color: var(--av-title);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-logo:hover {
  text-decoration: none;
}

.site-top-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 60vw;
  justify-content: flex-end;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.site-top-links::-webkit-scrollbar {
  display: none;
}

.site-top-links a {
  display: inline-block;
  color: var(--av-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  flex: 0 0 auto;
}

.site-top-links a:hover {
  text-decoration: underline;
}

.site-top-links a.is-active {
  color: var(--av-title);
  border-bottom: 2px solid var(--av-primary);
  padding-bottom: 2px;
}

.drawer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-nav li {
  border-bottom: 1px solid #eef2ff;
}

.drawer-nav a {
  display: block;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--av-primary);
}

.drawer-nav a:hover {
  text-decoration: none;
  background: #f5f9ff;
}

.drawer-section {
  border-top: 1px solid var(--av-border);
}

.drawer-section-title {
  margin: 0;
  padding: 12px 20px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.drawer-categories {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-categories li {
  margin: 0;
  border-bottom: 1px solid #f0f4ff;
}

.drawer-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--av-primary);
}

.drawer-categories a:hover {
  text-decoration: none;
  background: #f5f9ff;
}

.drawer-cat-count {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 6px;
}

.drawer-social {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--av-border);
  margin-top: auto;
}

/* Search icon button */
.av-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 15px;
}

.av-search-form button {
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5efff;
  border: 1px solid var(--av-border);
  color: var(--av-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.social-link:hover {
  background: var(--av-primary);
  color: #fff;
  text-decoration: none;
}

.hero {
  background: linear-gradient(135deg, var(--av-hero), var(--av-bg));
  color: var(--av-title);
  border-bottom: 1px solid var(--av-border);
  margin-top: -1px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 20px 38px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.2;
}

.hero p {
  margin: 0;
  color: var(--av-primary);
  font-size: clamp(16px, 2.4vw, 20px);
}

.site-main {
  max-width: 1100px;
  margin: 20px auto 34px;
  padding: 0 20px 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}

.content-grid > aside {
  position: sticky;
  top: 96px;
  align-self: start;
}

.card {
  background: var(--av-card-bg);
  border: 1px solid var(--av-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px -8px rgba(37, 99, 235, 0.12);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compact-news-grid {
  margin-top: 18px;
}

.compact-news-card .news-image,
.compact-news-card .news-image-fallback {
  height: 230px;
}

.compact-news-card .news-title {
  font-size: 20px;
}

.news-card {
  overflow: hidden;
  padding: 0;
}

.news-card-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.news-image,
.news-image-fallback {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.35s ease;
}

.news-image-fallback {
  background: radial-gradient(circle at 20% 20%, #93c5fd 0%, #2563eb 45%, #1e3a8a 100%);
}

.news-card:hover .news-image,
.news-card:hover .news-image-fallback {
  transform: scale(1.06);
}

.news-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 35%, rgba(15, 23, 42, 0.85) 100%);
  color: #fff;
  padding: 14px;
}

.news-meta-row-bottom {
  margin-top: 10px;
  margin-bottom: 0;
}

.news-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 12px;
}

.news-meta-chip {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 3px 8px;
  line-height: 1.2;
}

.news-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  color: #fff;
}

.news-title a {
  color: inherit;
}

.news-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.news-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}

.hero-rotator {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.hero-rotator-track {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-link {
  position: relative;
  display: block;
  height: 430px;
}

.hero-slide-image,
.hero-slide-image-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slide-image-fallback {
  background: radial-gradient(circle at 20% 20%, #93c5fd 0%, #2563eb 45%, #1e3a8a 100%);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 30%, rgba(15, 23, 42, 0.85) 100%);
  color: #fff;
}

.hero-slide-title {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.15;
}

.hero-slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-rotator-arrows {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.hero-arrow:hover {
  background: rgba(37, 99, 235, 0.92);
}

.hero-rotator-controls {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
}

.hero-dot.is-active {
  background: #fff;
}

.news-card-body {
  padding: 15px 16px 16px;
}

.news-excerpt {
  margin: 0 0 12px;
}

.read-more,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-block;
  background: var(--av-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.read-more:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--av-primary-dark);
  text-decoration: none;
}

.sidebar-title {
  margin-top: 0;
  color: var(--av-title);
  font-size: 20px;
}

.av-cta {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border: 1px solid var(--av-border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 24px;
}

.av-cta strong {
  color: var(--av-title);
}

.av-ad-placeholder {
  border: 1px dashed #60a5fa;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.9));
  color: #1e3a8a;
  box-shadow: 0 10px 26px -18px rgba(30, 64, 175, 0.55);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.av-ad-placeholder--vertical {
  min-height: 260px;
}

.av-ad-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.8;
}

.av-ad-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.archive-heading {
  margin-bottom: 20px;
}

.archive-label {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--av-primary);
}

.archive-title {
  margin: 0;
  font-size: clamp(20px, 4vw, 32px);
  color: var(--av-title);
  line-height: 1.2;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  border: 1px solid var(--av-border);
  background: #fff;
  color: var(--av-primary);
  border-radius: 8px;
  padding: 6px 11px;
  font-weight: 600;
}

.pagination .current {
  background: var(--av-primary);
  color: #fff;
  border-color: var(--av-primary);
}

.site-footer {
  background: var(--av-footer-bg);
  color: var(--av-footer-text);
  text-align: center;
  padding: 28px 16px;
}

.site-footer-inner {
  max-width: 1700px;
  margin: 0 auto;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 0 auto 12px;
  max-width: 980px;
  text-align: center;
}

.site-footer-nav a {
  color: var(--av-footer-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer-note {
  color: var(--av-footer-text);
  font-size: 12px;
  margin: 0 0 4px;
}

.site-footer-copy {
  color: var(--av-footer-text);
  font-size: 12px;
  margin: 0;
}

.site-footer-nav a:hover {
  color: #fff;
}


@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-grid > aside {
    position: static;
  }

  .site-header-inner {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .site-header-right {
    margin-left: auto;
  }

  .site-top-links {
    max-width: 58vw;
  }

  .site-logo-badge {
    font-size: 10px;
    padding: 2px 7px;
  }
}

@media (max-width: 860px) {
  .site-top-links {
    display: none;
  }
}

@media (max-width: 760px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .av-ad-placeholder--vertical {
    min-height: 94px;
  }

  .av-ad-text {
    font-size: 16px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .site-logo {
    font-size: 18px;
    gap: 8px;
  }

  .site-top-links {
    max-width: 62vw;
    gap: 10px;
  }

  .site-top-links a {
    font-size: 12px;
  }

  .site-logo-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .site-footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

@media (min-width: 640px) {
  .site-header-inner {
    padding: 10px 24px;
  }

  .site-logo {
    font-size: 20px;
  }

  .site-top-links {
    gap: 14px;
  }

  .site-top-links a {
    font-size: 13px;
  }
}
