/*
Theme Name: LinguaToons Core
Theme URI: https://linguatoons.com/
Author: Brazos Media
Author URI: https://brazos-media.com/
Description: Lekki, dostępny motyw dla głównej strony LinguaToons. Zachowuje natywną nawigację WordPress i kontrakt aplikacji React/Vite.
Version: 1.0.9
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: linguatoons-core
*/

:root {
  --lt-ink: #142044;
  --lt-muted: #5c6887;
  --lt-paper: #f6f7fb;
  --lt-card: #ffffff;
  --lt-line: rgba(20, 32, 68, .13);
  --lt-accent: #ff625f;
  --lt-focus: #087ea4;
  --lt-radius: 24px;
  --lt-shadow: 0 18px 54px rgba(20, 32, 68, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--lt-ink); background: var(--lt-paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.65; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: #c93f47; }
:focus-visible { outline: 3px solid var(--lt-focus); outline-offset: 4px; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; z-index: 100000; top: 12px; left: 12px; width: auto; height: auto; clip: auto; margin: 0; padding: 10px 16px; color: #fff; background: var(--lt-ink); border-radius: 10px; }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.row { display: flex; align-items: center; }
.visible-xs, .visible-sm { display: none; }

#header { position: relative; z-index: 1000; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--lt-line); backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px); }
.header_default > .container > .row { min-height: 86px; gap: 24px; }
.logo-unit { display: flex; align-items: center; flex: 0 0 auto; }
.logo-unit a { display: inline-flex; align-items: center; }
.logo-unit img { display: block; width: 100px; height: 73px; object-fit: contain; }
.header_main_menu_wrapper { display: flex; flex: 1 1 auto; justify-content: flex-end; align-items: center; min-width: 0; }
.navbar-collapse { min-width: 0; }
.header-menu { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 24px); padding: 0; margin: 0; list-style: none; }
.header-menu li { position: relative; margin: 0; }
.header-menu a { display: inline-flex; min-height: 44px; align-items: center; color: var(--lt-ink); font-size: 14px; font-weight: 650; text-decoration: none; }
.header-menu .current-menu-item > a, .header-menu .current-menu-ancestor > a { color: #c93f47; }
.header-menu .sub-menu { position: absolute; top: calc(100% + 8px); left: -18px; z-index: 50; display: none; min-width: 260px; padding: 12px; margin: 0; list-style: none; background: rgba(255,255,255,.98); border: 1px solid var(--lt-line); border-radius: 18px; box-shadow: var(--lt-shadow); }
.header-menu li:hover > .sub-menu, .header-menu li:focus-within > .sub-menu { display: block; }
.header-menu .sub-menu a { width: 100%; padding: 8px 10px; border-radius: 10px; }
.header-menu .sub-menu a:hover { background: #f1f3f9; }

.lt-language-switcher { position: relative; flex: 0 0 auto; margin-left: 8px; }
.lt-language-switcher__toggle { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 8px 13px; color: var(--lt-ink); background: rgba(255,255,255,.86); border: 1px solid var(--lt-line); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lt-language-switcher__flag { display: inline-flex; width: 28px; height: 20px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(20,32,68,.14); border-radius: 5px; box-shadow: 0 3px 9px rgba(20,32,68,.14); }
.lt-language-switcher__flag svg { display: block; width: 100%; height: 100%; }
.lt-language-switcher__option { display: inline-flex; align-items: center; gap: 9px; }
.lt-language-switcher__toggle::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.lt-language-switcher__menu { position: absolute; top: calc(100% + 10px); right: 0; display: none; width: max-content; min-width: 230px; padding: 8px; margin: 0; list-style: none; background: #fff; border: 1px solid var(--lt-line); border-radius: 16px; box-shadow: var(--lt-shadow); }
.lt-language-switcher[data-open="true"] .lt-language-switcher__menu { display: block; }
.lt-language-switcher__menu a, .lt-language-switcher__current { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 11px; color: var(--lt-ink); border-radius: 10px; font-size: 14px; text-decoration: none; }
.lt-language-switcher__menu a:hover { background: #f1f3f9; }
.lt-language-switcher__current { color: var(--lt-muted); background: #f6f7fb; }
.lt-language-switcher__locale { color: var(--lt-muted); font-size: 12px; }

.navbar-toggle { display: none; min-width: 46px; min-height: 46px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 10px; background: #fff; border: 1px solid var(--lt-line); border-radius: 14px; cursor: pointer; }
.navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; background: var(--lt-ink); border-radius: 4px; }

body:not(.lt-react-active) #main { min-height: 60vh; }
.lt-content-shell { width: min(1120px, calc(100% - 40px)); margin: clamp(48px, 8vw, 96px) auto; }
.lt-content-card { padding: clamp(24px, 5vw, 64px); background: var(--lt-card); border: 1px solid var(--lt-line); border-radius: var(--lt-radius); box-shadow: var(--lt-shadow); }
.lt-entry-header { max-width: 780px; margin-bottom: 32px; }
.lt-entry-kicker { margin: 0 0 10px; color: #c93f47; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lt-entry-title { margin: 0; font-size: clamp(36px, 6vw, 72px); line-height: 1.02; letter-spacing: -.045em; }
.lt-entry-meta { margin-top: 16px; color: var(--lt-muted); font-size: 14px; }
.lt-entry-content { font-size: clamp(17px, 1.5vw, 19px); }
.lt-entry-content > * { max-width: 780px; }
.lt-entry-content > .alignwide { max-width: 1080px; }
.lt-entry-content > .alignfull { max-width: none; }
.lt-entry-content h2 { margin-top: 2.4em; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.035em; }
.lt-entry-content h3 { margin-top: 2em; font-size: clamp(23px, 3vw, 32px); line-height: 1.2; }
.lt-entry-content p, .lt-entry-content li { color: #34405f; }
.lt-entry-content a { color: #b8323d; }
.lt-entry-content blockquote { margin: 32px 0; padding: 22px 26px; background: #f3f5fb; border-left: 4px solid var(--lt-accent); border-radius: 0 16px 16px 0; }
.lt-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.lt-post-card { overflow: hidden; background: #fff; border: 1px solid var(--lt-line); border-radius: 20px; box-shadow: 0 12px 36px rgba(20,32,68,.08); }
.lt-post-card__media { display: block; aspect-ratio: 16/9; overflow: hidden; background: #e9edf5; }
.lt-post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.lt-post-card:hover img { transform: scale(1.035); }
.lt-post-card__body { padding: 22px; }
.lt-post-card__title { margin: 0 0 10px; font-size: 22px; line-height: 1.2; }
.lt-post-card__title a { text-decoration: none; }
.lt-post-card__excerpt { margin: 0; color: var(--lt-muted); }

#footer { color: #eef1ff; background: #111a38; }
.lt-footer { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding: 56px 0 34px; }
.lt-footer h2 { margin: 0 0 12px; font-size: 22px; }
.lt-footer p { color: #bdc6df; }
.lt-footer a { color: #fff; }
.lt-footer__nav { padding: 0; margin: 0; list-style: none; }
.lt-footer__nav li + li { margin-top: 8px; }
.lt-footer__legal { padding: 18px 0 26px; color: #aeb8d3; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }

@media (max-width: 991px) {
  .hidden-xs, .hidden-sm { display: none !important; }
  .visible-xs, .visible-sm { display: block; }
  .header_default > .container > .row { justify-content: space-between; }
  .navbar-toggle { display: inline-flex; margin-left: auto; }
  .header-menu-mobile { display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 12px 20px 22px; background: #fff; border-bottom: 1px solid var(--lt-line); box-shadow: 0 18px 42px rgba(20,32,68,.12); }
  .header-menu-mobile.in, .header-menu-mobile.is-open { display: block; }
  .header-menu-mobile .header-menu { display: block; }
  .header-menu-mobile .header-menu a { width: 100%; padding: 6px 4px; }
  .header-menu-mobile .sub-menu { position: static; display: block; padding: 0 0 0 16px; box-shadow: none; border: 0; }
  .lt-language-switcher { margin-left: 0; }
  .lt-language-switcher__toggle { min-width: 54px; justify-content: center; padding-inline: 10px; }
  .lt-language-switcher__toggle .lt-language-switcher__flag { width: 30px; height: 22px; }
  .lt-language-switcher__label { display: none; }
  .lt-language-switcher__menu { right: 0; }
  .lt-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lt-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container, .lt-content-shell { width: min(100% - 28px, 1180px); }
  .header_default > .container > .row { min-height: 74px; gap: 10px; }
  .logo-unit img { width: 82px; height: 60px; }
  .lt-content-card { padding: 24px 20px; border-radius: 20px; }
  .lt-post-grid, .lt-footer { grid-template-columns: 1fr; }
  .lt-language-switcher__menu { position: fixed; top: 80px; right: 14px; left: 14px; width: auto; }
}

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