/*
Theme Name: Pivovar Choc
Theme URI: https://www.pivovarchoc.sk/
Author: Andrej Latka
Author URI: https://latka.online/
Description: Ľahká bloková téma pre osobný pivovarský denník Pivovar Choč.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.31
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pivovar-choc
Tags: blog, full-site-editing, block-patterns, custom-colors, custom-logo, featured-images, threaded-comments, translation-ready, wide-blocks

Pivovar Choč WordPress Theme, Copyright 2026 Andrej Latka.
Pivovar Choč is distributed under the terms of the GNU GPL.
*/

:root {
  --pc-shadow: 0 18px 45px rgba(29, 24, 16, 0.12);
  --pc-radius: 0.35rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(167, 112, 32, 0.035), transparent 25rem),
    radial-gradient(circle at 80% 70%, rgba(43, 90, 62, 0.025), transparent 28rem);
}

a { text-underline-offset: 0.18em; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--wp--preset--color--amber);
  outline-offset: 3px;
}

:where(.wp-block-button__link, .wp-element-button, .pc-year-filter button, .pc-to-top, .pc-age-gate__button, .pc-facebook-link) {
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, filter .18s ease;
}

@media (hover: hover) {
  :where(.wp-block-button__link, .wp-element-button, .pc-year-filter button, .pc-to-top, .pc-age-gate__button, .pc-facebook-link):hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(29, 24, 16, .22);
    filter: brightness(.91) saturate(1.06);
  }

  .wp-block-button.is-style-outline > :where(.wp-block-button__link, .wp-element-button):hover {
    border-color: var(--wp--preset--color--amber);
    color: var(--wp--preset--color--charcoal);
    background: var(--wp--preset--color--amber);
    filter: none;
  }
}

:where(.wp-block-button__link, .wp-element-button, .pc-year-filter button, .pc-age-gate__button):active {
  transform: translateY(0);
  box-shadow: none;
}

.wp-site-blocks { min-height: 100vh; }

/* Remove the default block gap between the header and the page content. */
.wp-site-blocks > * {
  margin-block-start: 0 !important;
}

.pc-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
}

.pc-site-header > .wp-block-group.alignwide {
  width: calc(100% - 2rem);
  max-width: 1380px !important;
}

.admin-bar .pc-site-header { top: 32px; }

.pc-brand-logo {
  flex: 0 0 auto;
  margin: 0;
  line-height: 0;
}

.pc-brand-logo img {
  display: block;
  object-fit: contain;
}

@media (max-width: 600px) {
  .pc-brand-logo-header img {
    width: 68px !important;
    height: 62px !important;
  }
}

.pc-site-header .wp-block-navigation-item__content {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.pc-site-header .current-menu-item > .wp-block-navigation-item__content,
.pc-site-header .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--amber);
  border-bottom-color: currentColor;
}

.pc-hero {
  min-height: clamp(32rem, 67vh, 47rem);
}

.pc-hero .wp-block-cover__image-background { object-position: 50% 58%; }

.pc-eyebrow {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
}

.pc-hero h1 {
  max-width: 13ch;
  text-wrap: balance;
}

.pc-section { padding-block: clamp(3.5rem, 7vw, 7rem); }

.pc-section-title-row { margin-bottom: clamp(1.75rem, 4vw, 3rem); }

.pc-card-grid.wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.pc-card-grid > li {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  background: var(--wp--preset--color--paper);
  box-shadow: 0 8px 28px rgba(29, 24, 16, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pc-card-grid > li:hover {
  transform: translateY(-4px);
  box-shadow: var(--pc-shadow);
}

.pc-card-grid .wp-block-post-featured-image { margin: 0; }

.pc-card-grid .wp-block-post-featured-image img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

/* Keep the journal archive as wide as the beer archive, including an older
   category template saved in the Site Editor. */
.category-pivny-dennik main .wp-block-query,
.category-vsetko-o-pive main .wp-block-query {
  width: min(100%, var(--wp--style--global--wide-size, 1180px));
  max-width: var(--wp--style--global--wide-size, 1180px);
}

.pc-card-content { padding: 1.15rem 1.2rem 1.35rem; }

.pc-card-content .wp-block-post-title a { text-decoration: none; }

.pc-card-content .wp-block-post-title a:hover { text-decoration: underline; }

.pc-about {
  position: relative;
  overflow: hidden;
}

.pc-about::after {
  content: "";
  position: absolute;
  width: 26rem;
  height: 26rem;
  right: -10rem;
  bottom: -14rem;
  border: 1px solid rgba(202,155,78,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(202,155,78,.035), 0 0 0 6rem rgba(202,155,78,.025);
  pointer-events: none;
}

.pc-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .75rem;
}

.pc-fact {
  padding: 1.1rem 0;
  border: 0;
  border-top: 2px solid rgba(202,155,78,.65);
  background: transparent;
}

.pc-fact strong {
  display: block;
  margin-bottom: .35rem;
  color: var(--wp--preset--color--amber);
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.pc-about-image {
  margin: 0;
}

.pc-about-image img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--pc-radius);
  box-shadow: 0 18px 45px rgba(0,0,0,.24);
}

.pc-about-page-hero h1 {
  max-width: 13ch;
  text-wrap: balance;
}

.pc-about-page-hero .wp-block-cover__image-background {
  object-position: 50% 48%;
}

.pc-about-story .wp-block-columns,
.pc-brewing-values .wp-block-columns {
  gap: clamp(2rem, 6vw, 5rem);
}

.pc-story-image {
  margin-top: 2rem;
}

.pc-story-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 58%;
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
}

.pc-credential-grid {
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.pc-credential {
  height: 100%;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 3px solid var(--wp--preset--color--amber);
  background: var(--wp--preset--color--cream);
  box-shadow: 0 8px 28px rgba(29,24,16,.08);
}

.pc-credential > :first-child {
  margin-top: 0;
  font-weight: 700;
  letter-spacing: .12em;
}

.pc-values-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-values-list li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid rgba(244,238,224,.18);
}

.pc-values-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--wp--preset--color--amber);
  font-weight: 800;
}

.pc-about-cta .wp-block-group {
  max-width: 52rem;
}

.pc-entry-header { max-width: 54rem; }

/* Align all single-post metadata and titles with the wide article edge. */
.pc-single-beer .pc-entry-header,
.pc-single-journal .pc-entry-header {
  width: min(100%, var(--wp--style--global--wide-size, 1180px));
  max-width: var(--wp--style--global--wide-size, 1180px);
}

.pc-single-beer .pc-entry-header > *,
.pc-single-journal .pc-entry-header > * {
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
}

/* Journal articles use the same wide content measure as the beer archive. */
.pc-single-journal .pc-entry-content {
  width: min(100%, var(--wp--style--global--wide-size, 1180px));
  max-width: var(--wp--style--global--wide-size, 1180px);
}

.pc-single-journal .pc-entry-content > :not(.alignfull) {
  width: 100%;
  max-width: none !important;
}

.pc-entry-featured img {
  width: 100%;
  max-height: 48rem;
  object-fit: cover;
  border-radius: var(--pc-radius);
}

/* Also covers an older Single template saved in the Site Editor. */
.single-post .pc-entry-featured { display: none; }

.pc-entry-content > * { margin-block-start: 1.35rem; }

.pc-entry-content > :where(h2,h3) { margin-block-start: 2.6rem; }

.pc-beer-facts {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 3px solid var(--wp--preset--color--amber);
  background: var(--wp--preset--color--sand);
}

.pc-beer-facts .wp-block-column {
  padding: .75rem 1rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  background: rgba(255,255,255,.28);
}

.pc-beer-facts > p {
  padding: .8rem 1rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  background: rgba(255,255,255,.28);
}

/* Wider, balanced presentation for the legacy photo + beer facts layout. */
.pc-single-beer .pc-entry-content > .wp-block-columns {
  width: min(var(--wp--style--global--wide-size, 1180px), calc(100vw - 4rem));
  max-width: none;
  margin-inline: 50% 0;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: stretch;
  transform: translateX(-50%);
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column {
  min-width: 0;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:first-child figure,
.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:first-child img {
  width: 100%;
  height: 100%;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:first-child img {
  display: block;
  object-fit: cover;
  border-radius: var(--pc-radius);
  cursor: zoom-in;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > h2:first-of-type {
  display: none;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) .pc-beer-facts h2 {
  display: block;
}

.pc-single-beer .pc-entry-content > .wp-block-columns .pc-beer-facts {
  flex: 1;
  margin-block-start: 0;
  border-radius: var(--pc-radius);
}

/* Legacy beer data stays editable as its original list, styled consistently. */
.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > ul.wp-block-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  list-style: none;
  border-top: 3px solid var(--wp--preset--color--amber);
  border-radius: var(--pc-radius);
  background: var(--wp--preset--color--sand);
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > ul.wp-block-list::before {
  content: "Parametre várky";
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  color: var(--wp--preset--color--charcoal);
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: 700;
  line-height: 1.08;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > ul.wp-block-list > li {
  min-width: 0;
  padding: .8rem 1rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  background: rgba(255,255,255,.28);
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > ul.wp-block-list > li:nth-child(-n+5) strong {
  display: block;
}

.pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:nth-child(2) > ul.wp-block-list > li:nth-child(n+6) {
  grid-column: 1 / -1;
}

.pc-single-beer .pc-beer-facts > .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.pc-single-beer .pc-beer-facts > .wp-block-columns > .wp-block-column {
  min-width: 0;
  border: 1px solid var(--wp--preset--color--line);
}

.pc-beer-card-summary .wp-block-post-excerpt__excerpt {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-bottom: 1rem;
  color: var(--wp--preset--color--ink);
  font-size: .95rem;
}

.pc-beer-card-summary .wp-block-post-excerpt__excerpt span {
  white-space: nowrap;
}

.pc-beer-card-summary .wp-block-post-excerpt__excerpt strong {
  color: var(--wp--preset--color--hop);
  text-transform: uppercase;
}

.pc-pagination a,
.pc-pagination .current {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pc-section-navigation-link a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
}

.pc-site-footer a { color: inherit; }

.pc-site-footer .wp-block-navigation-item__content { min-height: 44px; }

.pc-site-footer {
  font-size: 1rem;
}

.pc-facebook-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: .5rem;
  border: 1px solid rgba(244, 238, 224, .38);
  border-radius: 50%;
  color: var(--wp--preset--color--cream);
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
}

.pc-facebook-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pc-facebook-link:hover {
  border-color: var(--wp--preset--color--amber);
  color: var(--wp--preset--color--charcoal);
  background: var(--wp--preset--color--amber);
  filter: none;
}

.pc-brewer-contact {
  min-width: min(100%, 18rem);
  padding-left: 1.25rem;
  border-left: 2px solid var(--wp--preset--color--amber);
}

.pc-brewer-contact p {
  margin: 0;
}

.pc-brewer-contact a {
  text-decoration-thickness: 1px;
}

.pc-latka-logo {
  display: inline-block;
  line-height: 0;
}

.pc-latka-logo img {
  display: block;
  width: 100px;
  height: auto;
}

.pc-footer-bottom {
  min-height: 48px;
}

.pc-year-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem;
  width: 100%;
  margin-block: 1.5rem 2rem;
  padding: 1rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  background: var(--wp--preset--color--paper);
}

.pc-year-filter label {
  display: grid;
  gap: .35rem;
  font-weight: 700;
}

.pc-year-filter select {
  min-width: 12rem;
  min-height: 48px;
  padding: .65rem 2.5rem .65rem .8rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--pc-radius);
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--white);
  font: inherit;
}

.pc-year-filter button {
  min-height: 48px;
  padding: .65rem 1.1rem;
  border: 0;
  border-radius: var(--pc-radius);
  color: var(--wp--preset--color--charcoal);
  background: var(--wp--preset--color--amber);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pc-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  color: var(--wp--preset--color--charcoal);
  background: var(--wp--preset--color--amber);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.5rem);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.pc-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Lightweight, theme-native age verification. */
html.pc-age-check-required,
html.pc-age-check-required body {
  overflow: hidden;
}

.pc-age-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 1rem;
  color: var(--wp--preset--color--cream, #f4eee0);
  background: rgba(23, 23, 20, .97);
}

html.pc-age-check-required .pc-age-gate { display: grid; }

.pc-age-gate__panel {
  width: min(100%, 34rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.75rem, 6vw, 3.5rem);
  border: 1px solid rgba(202,155,78,.45);
  border-radius: var(--pc-radius);
  background: #20201c;
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  text-align: center;
}

.pc-age-gate__logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 1.15rem;
  object-fit: contain;
}

.pc-age-gate__title {
  margin: 0 0 .75rem;
  color: #f4eee0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.08;
}

.pc-age-gate__text {
  margin: 0 auto 1.5rem;
  max-width: 30rem;
  color: #f4eee0;
  font-size: 1.05rem;
}

.pc-age-gate__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

.pc-age-gate__button {
  min-height: 48px;
  padding: .75rem 1.2rem;
  border: 1px solid #ca9b4e;
  border-radius: .2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pc-age-gate__button--yes {
  color: #171714;
  background: #ca9b4e;
}

.pc-age-gate__button--no,
.pc-age-gate__leave {
  color: #f4eee0;
  background: transparent;
}

.pc-age-gate__denied[hidden] { display: none; }

.pc-age-gate__leave {
  display: inline-block;
  margin-top: .4rem;
  text-underline-offset: .2em;
}

@media (max-width: 900px) {
  .pc-card-grid.wp-block-post-template { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pc-facts { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .pc-site-header { top: 46px; }
  .pc-site-header > .wp-block-group.alignwide {
    width: 100%;
  }
  .pc-site-header .wp-block-navigation__responsive-container.is-menu-open {
    padding: 1.25rem;
    color: var(--wp--preset--color--cream);
    background: var(--wp--preset--color--charcoal);
  }
  .pc-site-header .wp-block-navigation__responsive-container-close,
  .pc-site-header .wp-block-navigation__responsive-container-open {
    min-width: 44px;
    min-height: 44px;
  }
  .pc-single-beer .pc-entry-content > .wp-block-columns {
    width: min(100%, calc(100vw - 2rem));
    gap: 1.25rem;
  }
  .pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:first-child figure,
  .pc-single-beer .pc-entry-content > .wp-block-columns > .wp-block-column:first-child img {
    height: auto;
  }
}

@media (max-width: 620px) {
  .pc-card-grid.wp-block-post-template { grid-template-columns: 1fr; }
  .pc-hero { min-height: 34rem; }
  .pc-hero .wp-block-cover__inner-container { align-self: flex-end; }
  .pc-footer-bottom { padding-right: 4.5rem; }
}

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