/*
Theme Name: ROYALFIELD stavební
Theme URI: https://royalfield-stavebni.cz/
Author: ROYALFIELD
Description: Кастомная тема для ROYALFIELD stavební — ремонт и реконструкция в Праге. Концепция «Сечение» (бетон → финиш, медный разрез). Мультиязычность через Polylang, контентные сущности на нативных CPT + ACF (free). Латинские слаги.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: royalfield
Tags: custom-theme, construction, multilingual, rtl-language-support
*/

/* ============================================================================
   Root style.css — supplementary, WordPress-specific styles only.
   The full component system lives in assets/css/site.css (design verbatim) and
   the design tokens in assets/css/tokens/*.css. This file patches the gaps
   between the static design and dynamic WordPress/editor output.
   ========================================================================== */

/* WP core helper classes the editor/comments may emit */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link { position: absolute; left: -9999px; z-index: 999; padding: 10px 16px;
  background: var(--copper); color: #fff; border-radius: var(--radius-button); }
.skip-link:focus { left: 16px; top: 12px; }

.aligncenter { margin-left: auto; margin-right: auto; }
.alignright { float: right; margin-left: 24px; }
.alignleft { float: left; margin-right: 24px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Inline form feedback (native lead-form handler) */
.rf-formmsg { margin: 0; padding: 12px 14px; border-radius: var(--radius-input);
  font-size: 14px; line-height: 1.5; }
.rf-formmsg--error { background: #FCE9E6; color: #9B2C1A; border: 1px solid #F0C2BA; }
.rf-formmsg--ok { background: var(--success-tint); color: var(--moss); border: 1px solid #CBD9C0; }
.rf-input.is-invalid, .rf-select.is-invalid .rf-select__btn { border-color: #D14A36; }
.rf-leadform.is-busy { opacity: .75; pointer-events: none; }

/* Editor (WYSIWYG) prose inside the collapsible SEO block — give plain
   h2/h3/p/ul the same diamond/typographic treatment as the static design. */
.rf-seo__clip h2 { margin: 0; font: 700 clamp(24px,3vw,32px)/1.2 var(--font-display);
  letter-spacing: -.3px; color: var(--text-heading); }
.rf-seo__clip h3 { margin: 10px 0 0; display: flex; align-items: center; gap: 10px;
  font: 700 20px/1.3 var(--font-display); color: var(--text-heading); }
.rf-seo__clip h3::before { content: ""; flex: none; width: 8px; height: 8px;
  background: var(--copper); transform: rotate(45deg); }
.rf-seo__clip p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.rf-seo__clip ul { margin: 0; padding-left: 22px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* Legal-doc headings get the copper diamond marker (matches rf-doc__head) */
.rf-doc.rf-prose h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.rf-doc.rf-prose h2::before { content: ""; flex: none; width: 10px; height: 10px;
  background: var(--copper); transform: rotate(45deg); }

/* Generic WYSIWYG prose (article body, privacy doc) rendered from the editor */
.rf-prose > :first-child { margin-top: 0; }
.rf-prose p { margin: 0 0 18px; font-size: 16px; line-height: 1.7; color: var(--text-body); }
.rf-prose h2 { margin: 28px 0 12px; font: 700 26px/1.2 var(--font-display); color: var(--text-heading); }
.rf-prose h3 { margin: 22px 0 10px; font: 700 21px/1.25 var(--font-display); color: var(--text-heading); }
.rf-prose ul, .rf-prose ol { margin: 4px 0 18px; padding-left: 24px; }
.rf-prose li { margin-bottom: 8px; font-size: 16px; line-height: 1.6; color: var(--text-body); }
.rf-prose a { color: var(--copper-dark); text-decoration: underline; }
.rf-prose img { border-radius: var(--radius-card); margin: 18px 0; }
.rf-prose blockquote { margin: 18px 0; padding: 18px 24px; background: var(--surface-sunken);
  position: relative; font: 600 18px/1.5 var(--font-body); color: var(--text-heading); }
.rf-prose blockquote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--copper); }

/* Pagination */
.rf-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.rf-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px; border: 1.5px solid var(--hairline);
  border-radius: var(--radius-button); text-decoration: none; font-weight: 600; font-size: 14px;
  color: var(--text-body); }
.rf-pagination .page-numbers.current { background: var(--copper); border-color: var(--copper); color: #fff; }
.rf-pagination a.page-numbers:hover { border-color: var(--copper); color: var(--copper-dark); }

/* Real before/after photos override the CSS placeholder when set */
.rf-ba__before[style*="url"], .rf-ba__after[style*="url"] { background-color: transparent; }

/* Language flags in the switcher (Polylang flag PNGs) */
.rf-flag { display: inline-block; width: 20px; height: 14px; flex: none; object-fit: cover;
  border-radius: 2px; box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.18); vertical-align: middle; }
.rf-dd__item .rf-flag { margin-right: 9px; }
.rf-langpill { display: inline-flex; align-items: center; gap: 7px; }

/* Rotated diamond badges (steps / principles) use transform:rotate(45deg), so
   the square's visual box is ~1.41× its layout box and its bottom corner spills
   ~20px past the box — which crowded/overlapped the heading below. Reserve that
   space so the title clears the diamond's point (matches the React spacing). */
.rf-sdia__badge { margin-bottom: 22px; }
.rf-pdia__badge { margin-bottom: 22px; }
.rf-sdia, .rf-pdia { padding-top: 6px; }

/* WP admin bar offset for the sticky header */
@media screen and (max-width: 782px){ .admin-bar .rf-header { top: 46px; } }
@media screen and (min-width: 783px){ .admin-bar .rf-header { top: 32px; }
  .admin-bar .rf-drawer { top: calc(var(--header-height) + 32px); } }

/* ---- Cookie consent banner (ICECAT-466) ---- */
.rf-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  background: var(--finish); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  box-shadow: 0 12px 40px rgba(26,26,26,.18); }
.rf-cookie[hidden] { display: none; }
.rf-cookie__inner { max-width: var(--container-max); margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rf-cookie__body { flex: 1 1 320px; min-width: 0; }
.rf-cookie__title { display: block; font: 700 15px/1.3 var(--font-display); color: var(--text-heading); margin-bottom: 3px; }
.rf-cookie__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.rf-cookie__text a { color: var(--copper-dark); text-decoration: underline; }
.rf-cookie__opts { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 11px; }
/* The `hidden` attribute must beat the display rules above (author CSS otherwise
   overrides the UA [hidden] rule, so the options/Save button never toggle). */
.rf-cookie__opts[hidden], .rf-cookie__actions .rf-btn[hidden] { display: none; }
.rf-cookie__opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-body); cursor: pointer; }
.rf-cookie__opt input { accent-color: var(--copper); width: 16px; height: 16px; }
.rf-cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }
@media (max-width: 640px) { .rf-cookie__actions { width: 100%; } .rf-cookie__actions .rf-btn { flex: 1 1 auto; justify-content: center; } }
