/*
Theme Name: Polska.lt
Description: Kelionės vadovo stiliaus Polska.lt tema (atmaina iš Suvalkai.lt temos) su lenkų liaudies – karpinių ir Łowicz dryžių – motyvais.
Version: 1.2.2
Requires at least: 7.1
Requires PHP: 8.3
Text Domain: polska
*/

/* Pagrindas perimtas iš Suvalkai.lt temos. Monetos pakeistos karpinių rozetėmis ir Łowicz dryžiais. */
:root {
  --red: #c8102e;
  --red-dark: #9e0c24;
  --red-soft: #fdf0f1;
  --green: #2e7d32;
  --green-soft: #eef6ee;
  --gold: #e0a100;
  --blue: #1f4e9c;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #e9e2d5;
  --cream: #faf6ef;
  --paper: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(29 36 51 / .05), 0 4px 16px rgb(29 36 51 / .06);
  --rozete: url(assets/rozete.svg);
  --stripes: repeating-linear-gradient(90deg,
    #c8102e 0 14px, #e0a100 14px 20px, #2e7d32 20px 34px, #f26b1d 34px 40px,
    #1f4e9c 40px 54px, #e0a100 54px 58px, #6a1b9a 58px 70px, #2e7d32 70px 76px);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream) url(assets/fonas.svg) top center / 220px repeat;
  color: var(--ink);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-dark); text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { letter-spacing: -.015em; }

.site-stripes { height: 8px; background: var(--stripes); }
.site-shell { max-width: 1180px; margin: 0 auto 40px; }

/* ---------- Antraštė ir meniu ---------- */
.site-header-wrap { background: rgb(255 255 255 / .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px 12px; }
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.site-brand::before { content: ""; flex: 0 0 48px; width: 48px; height: 48px; background: var(--rozete) center / contain no-repeat; transition: transform .6s ease; }
.site-brand:hover::before { transform: rotate(45deg); }
.site-brand-text { display: grid; line-height: 1.1; }
.site-brand-name { font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.035em; color: var(--ink); }
.site-brand-name b { color: var(--red); font-weight: 800; }
.site-brand-tag { font-size: .85rem; color: var(--muted); margin-top: 4px; }

.search-form { display: flex; }
.search-form label { display: contents; }
.search-field { min-height: 42px; padding: 6px 16px; font: inherit; font-size: .95rem; border: 1px solid #d9cfbf; border-right: 0; border-radius: 999px 0 0 999px; background: #fff; width: 100%; }
.search-field:focus { outline: none; border-color: var(--red); }
.search-submit { min-height: 42px; padding: 6px 18px; font: inherit; font-size: .95rem; font-weight: 700; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 0 999px 999px 0; cursor: pointer; }
.search-submit:hover { background: var(--red-dark); }
.site-header .search-field { width: clamp(130px, 22vw, 240px); }

.site-menu { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-menu ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.site-menu .sub-menu, .site-menu .children { display: none; }
.site-menu a { display: block; padding: 8px 0 10px; color: var(--ink); font-weight: 650; font-size: .97rem; text-decoration: none; border-bottom: 3px solid transparent; }
.site-menu a:hover { color: var(--red); }
.site-menu :is(.current-menu-item, .current-menu-ancestor, .current-post-ancestor, .current-category-ancestor) > a { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Pradžia ---------- */
.site-front { padding: 28px 24px 0; }
.block { margin-top: 44px; }
.block-head { margin-bottom: 18px; }
.block-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.45rem, 3vw, 1.85rem); }
.block-head h2::before, .section-title::before, .site-widget h2::before, .group-title::before {
  content: ""; flex: 0 0 26px; width: 26px; height: 26px; background: var(--rozete) center / contain no-repeat;
}
.block-head p { margin: 4px 0 0 36px; color: var(--muted); max-width: 70ch; }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: stretch; }
.intro-main {
  position: relative; overflow: hidden; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 40px 40px;
}
.intro-main::after { content: ""; position: absolute; right: -50px; bottom: -50px; width: 220px; height: 220px; background: var(--rozete) center / contain no-repeat; opacity: .14; }
.intro-main::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--stripes); }
.intro-kicker { margin: 0 0 6px; color: var(--red); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.intro h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; }
.intro-lead { margin: 0 0 22px; color: #3b4456; font-size: 1.12rem; max-width: 52ch; }
.intro .search-form { max-width: 520px; position: relative; z-index: 1; }
.intro .search-field, .intro .search-submit { min-height: 50px; font-size: 1rem; }
.intro-quick { margin: 14px 0 0; font-size: .92rem; color: var(--muted); position: relative; z-index: 1; }
.intro-quick a { font-weight: 600; }

.status { background: var(--ink); color: #e8ebf2; border-radius: var(--radius); padding: 22px 22px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.status-title { margin: 0 0 10px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #aeb6c6; }
.status ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.status li { display: grid; padding: 10px 0 10px 16px; border-left: 4px solid #3d4659; margin-bottom: 6px; }
.status li.status-ok { border-left-color: #4caf50; }
.status li.status-no { border-left-color: #ff5a6e; }
.status-k { font-size: .8rem; color: #aeb6c6; }
.status strong { font-size: 1.12rem; color: #fff; line-height: 1.3; }
.status-ok strong { color: #8fe39a; }
.status-no strong { color: #ff8f9d; }
.status-s { font-size: .85rem; color: #c9cfdb; }
.status-more { margin-top: auto; padding-top: 6px; color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; }
.status-more:hover { color: var(--gold); }

/* Maršruto juosta */
.route { list-style: none; margin: 0; padding: 26px 22px 22px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.route::before { content: ""; position: absolute; left: 40px; right: 40px; top: 37px; height: 4px; background: repeating-linear-gradient(90deg, #b8ad99 0 14px, transparent 14px 24px); }
.route li { position: relative; padding: 0 8px; }
.route-dot { position: relative; z-index: 1; display: block; width: 26px; height: 26px; margin-bottom: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--red); }
.route-start .route-dot { border-color: var(--ink); background: var(--ink); }
.route-end .route-dot { border-style: dashed; border-color: var(--muted); }
.route li:not(.route-start):not(.route-end) .route-dot { width: 30px; height: 30px; margin-top: -2px; border: 0; background: var(--rozete) center / contain no-repeat; }
.route-body { display: grid; gap: 2px; text-decoration: none; color: inherit; padding: 6px 8px 8px; margin: -6px -8px 0; border-radius: 10px; }
a.route-body:hover { background: var(--red-soft); }
.route-body strong { font-size: 1.15rem; color: var(--ink); }
a.route-body:hover strong { color: var(--red); }
.route-pl { font-size: .82rem; color: var(--muted); font-style: italic; }
.route-km { font-size: .85rem; color: var(--ink); }
.route-what { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* Kontrolinis sąrašas */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; counter-reset: chk; }
.checklist li { counter-increment: chk; }
.checklist a { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; padding: 14px 16px; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: inherit; height: 100%; }
.checklist a::before { content: counter(chk); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; display: grid; place-items: center; }
.checklist a:hover { border-color: var(--red); }
.checklist a:hover::before { background: var(--red); color: #fff; }
.checklist strong { color: var(--ink); line-height: 1.3; }
.checklist span { color: var(--muted); font-size: .9rem; line-height: 1.45; margin-top: 2px; }

/* Stulpeliai su nuorodų sąrašais */
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.column { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px 14px; border-top: 5px solid var(--red); }
.column-suvalkai { border-top-color: var(--green); }
.column-balstoge { border-top-color: var(--gold); }
.columns-4 .column:nth-child(2) { border-top-color: var(--blue); }
.columns-4 .column:nth-child(3) { border-top-color: var(--green); }
.columns-4 .column:nth-child(4) { border-top-color: var(--gold); }
.column h3 { margin: 0; font-size: 1.2rem; }
.column h3 a { color: var(--ink); text-decoration: none; }
.column h3 a:hover { color: var(--red); }
.column-sub { margin: 2px 0 8px; color: var(--muted); font-size: .88rem; }
.link-list { list-style: none; margin: 8px 0 0; padding: 0; }
.link-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #f1ebe0; }
.link-list a { color: var(--ink); text-decoration: none; font-weight: 550; line-height: 1.35; }
.link-list a:hover { color: var(--red); text-decoration: underline; }
.km { flex: 0 0 auto; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.ideas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.idea { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--green-soft); border: 1px solid #d4e7d4; text-decoration: none; color: inherit; }
.idea strong { color: var(--ink); line-height: 1.3; }
.idea span { font-size: .88rem; color: var(--muted); }
.idea:hover { background: #e2f0e2; }
.idea:hover strong { color: var(--green); }

/* ---------- Turinio išdėstymas ---------- */
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 26px 24px 0; }
.site-content { min-width: 0; overflow-wrap: anywhere; }

/* Sąrašai (kategorijos, paieška, susiję) */
.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row + .row { border-top: 1px solid #f1ebe0; }
.row a { display: flex; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; color: inherit; }
.row a:hover { background: #fffaf3; }
.row-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.row-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.row-title { font-size: 1.1rem; color: var(--ink); line-height: 1.3; }
.row a:hover .row-title { color: var(--red); }
.row-excerpt { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.row-km { flex: 0 0 auto; display: grid; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-km small { font-weight: 400; font-size: .75rem; color: var(--muted); }
.row-arrow { flex: 0 0 auto; color: var(--red); font-size: 1.2rem; transition: transform .15s; }
.row a:hover .row-arrow { transform: translateX(3px); }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 30px 0 12px; }
.archive-head + .group-title { margin-top: 8px; }

.archive-head { margin-bottom: 20px; }
.archive-head h1 { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.archive-desc { color: var(--muted); max-width: 70ch; margin-top: 6px; font-size: 1.05rem; }
.archive-desc p { margin: 0; }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 26px; }
.nav-links .page-numbers { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.nav-links .current { background: var(--red); border-color: var(--red); color: #fff; }

/* Straipsnis */
.crumbs { font-size: .88rem; color: var(--muted); margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.entry { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px clamp(20px, 4vw, 44px) 36px; }
.entry h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 4.2vw, 2.5rem); line-height: 1.15; }
.entry-lead { font-size: 1.15rem; color: #3b4456; margin: 0 0 22px; max-width: 70ch; }
.entry-content > * { max-width: 72ch; }
.entry-content h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; line-height: 1.25; scroll-margin-top: 16px; }
.entry-content h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.entry-content table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1.2em 0; overflow-wrap: normal; word-break: normal; }
.entry-content th, .entry-content td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: break-word; hyphens: auto; }
.entry-content td:first-child, .entry-content th:first-child { min-width: 7.5em; }
.entry-content thead td, .entry-content th { background: #fbf3e6; font-weight: 700; }
.entry-content tbody tr:nth-child(even) td { background: #fdfbf7; }
.entry-content table.facts { width: auto; min-width: min(100%, 420px); background: #fbf7ef; border: 1px solid var(--line); }
.entry-content table.facts th { background: transparent; width: 42%; color: var(--muted); font-weight: 600; }
.entry-content blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--gold); background: #fffaf0; border-radius: 0 10px 10px 0; }
.entry-content img { border-radius: 10px; }
.entry-content .tip, .entry-content .warn { margin: 1.3em 0; padding: 14px 18px 14px 52px; border-radius: 12px; position: relative; }
.entry-content .tip { background: var(--green-soft); border: 1px solid #cfe6cf; }
.entry-content .tip::before { content: ""; position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; background: var(--rozete) center / contain no-repeat; }
.entry-content .warn { background: #fff4f4; border: 1px solid #f3cccc; }
.entry-content .warn::before { content: "!"; position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; text-align: center; line-height: 24px; }
.entry-content .tip > :first-child, .entry-content .warn > :first-child { margin-top: 0; }
.entry-content .tip > :last-child, .entry-content .warn > :last-child { margin-bottom: 0; }
.toc { background: #fbf7ef; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 0 0 24px; max-width: 72ch; font-size: .95rem; }
.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2 220px; column-gap: 28px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--red); text-decoration: underline; }
.sources { margin-top: 28px; padding: 12px 16px; border-radius: 12px; background: #f6f3ec; font-size: .9rem; }
.sources summary { cursor: pointer; font-weight: 700; }
.sources ul { margin: 10px 0 2px; padding-left: 18px; }
.sources li { margin: 4px 0; }
.entry-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tags a { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: #f3efe6; color: var(--muted); text-decoration: none; }
.entry-tags a:hover { background: var(--ink); color: #fff; }
.related { margin-top: 30px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin: 0 0 14px; }

/* Šoninė juosta */
.site-sidebar { display: grid; gap: 18px; align-content: start; }
.site-widget { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; font-size: .94rem; }
.site-widget h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.05rem; }
.site-widget ul { margin: 0; padding: 0; list-style: none; }
.site-widget li { padding: 7px 0; border-bottom: 1px solid #f2ede4; }
.site-widget li:last-child { border-bottom: 0; }
.site-widget li a { color: var(--ink); text-decoration: none; }
.site-widget li a:hover { color: var(--red); }

/* Poraštė */
.site-footer { margin-top: 48px; background: var(--ink); color: #c9cfdb; font-size: .9rem; }
.site-footer::before { content: ""; display: block; height: 6px; background: var(--stripes); }
.site-footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 24px 30px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.site-footer button { font: inherit; color: #fff; background: transparent; border: 1px solid #5b6475; border-radius: 999px; padding: 4px 12px; cursor: pointer; }

.site-shell :focus-visible, .site-header :focus-visible, .site-front :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.screen-reader-text:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: .75em; background: #fff; color: var(--red); }

/* ---------- Prisitaikymas ---------- */
@media (max-width: 1020px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
  .columns-4, .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .route::before { display: none; }
}
@media (max-width: 900px) {
  .site-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; padding: 12px 14px 8px; gap: 10px; }
  .site-brand::before { flex-basis: 40px; width: 40px; height: 40px; }
  .site-header .search-form { width: 100%; }
  .site-header .search-field { flex: 1; width: auto; }
  .home .site-header .search-form { display: none; }
  .site-menu { padding: 0 14px; }
  .site-menu ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; }
  .site-menu li { flex: 0 0 auto; }
  .site-front { padding: 16px 14px 0; }
  .site-layout { padding: 16px 14px 0; }
  .intro-main { padding: 26px 22px 30px; }
  .block { margin-top: 34px; }
  .block-head p { margin-left: 0; }
  .route { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 8px 18px; row-gap: 0; }
  .route::before { display: block; left: 30px; right: auto; top: 30px; bottom: 30px; width: 4px; height: auto; background: repeating-linear-gradient(180deg, #b8ad99 0 12px, transparent 12px 20px); }
  .route li { display: grid; grid-template-columns: 30px 1fr; column-gap: 14px; padding: 0 0 18px; }
  .route-dot { margin: 2px 0 0; }
  .route li:not(.route-start):not(.route-end) .route-dot { margin-top: 0; }
  .checklist, .columns-4, .ideas { grid-template-columns: minmax(0, 1fr); }
  .row a { padding: 14px 16px; }
  .entry { padding: 22px 18px 26px; }
  .entry-content table:not(.facts) { display: block; overflow-x: auto; }
}
