/*
    Theme Name: Hello Elementor (WCAG 2.2 Accessible & Responsive)
    Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
    Description: Hello Elementor optimized for WCAG 2.2 AA compliance and fluid responsiveness.
    Author: Elementor Team
    Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
    Version: 3.1.0
    Stable tag: 3.1.0
    Requires at least: 6.0
    Tested up to: 6.5
    Requires PHP: 7.4
    License: GNU General Public License v3 or later.
    License URI: https://www.gnu.org/licenses/gpl-3.0.html
    Text Domain: hello-elementor
    Tags: accessibility-ready, flexible-header, custom-colors, custom-menu, custom-logo, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ==========================================================================
   Document basic styling
   ========================================================================== */
html {
  line-height: 1.5; /* WCAG 1.4.12 - lepsza czytelność bazowa */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================================================
   Sections & Fluid Typography (RWD + WCAG 1.4.4 / 1.4.10)
   ========================================================================== */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #222222; /* Kontrast 15.9:1 */
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word; /* Zapobiega poziomemu paskowi przy długich słowach i URL-ach */
  overflow-x: clip; /* Zabezpieczenie przed elementami wystającymi poza viewport na mobile */
}

h1, h2, h3, h4, h5, h6 {
  margin-block-start: 0.5rem;
  margin-block-end: 1rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
  text-wrap: balance; /* Nowoczesne, równe łamanie wierszy w nagłówkach na małych ekranach */
}

/* Płynna typografia (Fluid Typography): skaluje się z ekranem ORAZ reaguje na powiększenie czcionki (rem) */
h1 { font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
h4 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem); }
h5 { font-size: clamp(1.05rem, 1rem + 0.25vw, 1.25rem); }
h6 { font-size: 1rem; }

p {
  margin-block-start: 0;
  margin-block-end: 1.2rem;
}

/* ==========================================================================
   Grouping content
   ========================================================================== */
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid #767676; /* WCAG 1.4.11 Kontrast min. 3:1 */
}

pre {
  font-family: monospace, monospace;
  font-size: 1em;
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 100%;
}

/* ==========================================================================
   Text-level semantics & Links (WCAG 1.4.1, 1.4.3, 2.4.7)
   ========================================================================== */
a {
  background-color: transparent;
  color: #B32453; /* Kontrast 6.12:1 */
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover,
a:active {
  color: #242447; /* Kontrast 14.3:1 */
  text-decoration-thickness: 2px;
}

/* Wyraźny fokus klawiaturowy (WCAG 2.4.7 & WCAG 2.2 2.4.11) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid #242447 !important;
  outline-offset: 2px !important;
}

a:not([href]):not([tabindex]),
a:not([href]):not([tabindex]):hover,
a:not([href]):not([tabindex]):focus {
  color: inherit;
  text-decoration: none;
}

abbr[title] {
  border-block-end: none;
  text-decoration: underline dotted;
  cursor: help;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
  overflow-wrap: break-word;
}

small {
  font-size: 85%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

/* ==========================================================================
   Embedded content & Interactive (RWD Media Reset)
   ========================================================================== */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
}

img,
video {
  border-style: none;
  height: auto;
}

details {
  display: block;
}

summary {
  display: list-item;
  cursor: pointer;
  padding: 0.375rem 0; /* Większy obszar dotyku na mobile */
}

figcaption {
  font-size: 1rem;
  color: #333333;
  line-height: 1.5;
  font-style: italic;
  font-weight: 400;
  margin-top: 0.5rem;
}

template,
[hidden] {
  display: none;
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]::after {
    content: " (" attr(href) ")";
  }
  abbr[title]::after {
    content: " (" attr(title) ")";
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }
  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    break-inside: avoid;
    border: 1px solid #767676;
  }
  thead {
    display: table-header-group;
  }
  tr,
  img {
    break-inside: avoid;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    break-after: avoid;
  }
}

/* ==========================================================================
   Form styling (RWD + WCAG 1.4.11, 2.5.8, 2.4.7)
   ========================================================================== */
label {
  display: inline-block;
  line-height: 1.4;
  vertical-align: middle;
  margin-bottom: 0.25rem;
  cursor: pointer;
  max-width: 100%;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 1rem; /* min. 16px zapobiega automatycznemu przybliżaniu (auto-zoom) w iOS Safari */
  line-height: 1.5;
  margin: 0;
  max-width: 100%;
}

input[type=text],
input[type=date],
input[type=email],
input[type=number],
input[type=password],
input[type=search],
input[type=tel],
input[type=url],
select,
textarea {
  width: 100%;
  border: 1px solid #595959;
  border-radius: 3px;
  padding: 0.5rem 0.875rem;
  min-height: 44px;
  background-color: #ffffff;
  color: #222222;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input[type=text]:focus,
input[type=date]:focus,
input[type=email]:focus,
input[type=number]:focus,
input[type=password]:focus,
input[type=search]:focus,
input[type=tel]:focus,
input[type=url]:focus,
select:focus,
textarea:focus {
  border-color: #242447;
  box-shadow: 0 0 0 1px #242447;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
[type=button],
[type=reset],
[type=submit] {
  width: auto;
  -webkit-appearance: button;
}

button,
[type=submit],
[type=button],
[type=reset] {
  display: inline-block;
  font-weight: 500;
  color: #B32453;
  text-align: center;
  white-space: normal; /* Pozwala zawijać długi tekst w przycisku na małych ekranach */
  overflow-wrap: break-word;
  user-select: none;
  background-color: transparent;
  border: 2px solid #B32453;
  padding: 0.5rem 1rem;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  font-size: 1rem;
  border-radius: 3px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

button:hover,
button:focus-visible,
[type=submit]:hover,
[type=submit]:focus-visible,
[type=button]:hover,
[type=button]:focus-visible,
[type=reset]:hover,
[type=reset]:focus-visible {
  color: #ffffff;
  background-color: #B32453;
  text-decoration: none;
}

button:not(:disabled),
[type=submit]:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled) {
  cursor: pointer;
}

button:disabled,
[type=submit]:disabled,
[type=button]:disabled,
[type=reset]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* RWD Fix: min-width: 0 naprawia błąd przeglądarek, w którym fieldset rozpycha ekran na mobile */
fieldset {
  min-width: 0;
  max-width: 100%;
  padding: 0.5em 0.75em 0.625em;
  border: 1px solid #595959;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0 0.5rem;
  white-space: normal;
}

progress {
  vertical-align: baseline;
  max-width: 100%;
}

textarea {
  overflow: auto;
  resize: vertical;
}

[type=checkbox],
[type=radio] {
  box-sizing: border-box;
  padding: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.375rem;
  vertical-align: middle;
  accent-color: #B32453;
  cursor: pointer;
}

/* Automatyczne powiększenie pól wyboru na ekranach dotykowych (smartfony/tablety) do 24x24px */
@media (pointer: coarse) {
  [type=checkbox],
  [type=radio] {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
  }
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
  height: auto;
}

[type=search] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

select {
  display: block;
}

/* ==========================================================================
   Table styling (RWD + WCAG 1.4.3, 1.4.4, 1.4.10)
   ========================================================================== */
table {
  background-color: transparent;
  width: 100%;
  max-width: 100%;
  margin-block-end: 1rem;
  font-size: 0.95em;
  border-spacing: 0;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.9375rem;
  line-height: 1.5;
  vertical-align: top;
  border: 1px solid #767676;
}

table th {
  font-weight: 700;
  text-align: left;
}

table thead th,
table tfoot th {
  font-size: 1em;
}

table caption + thead tr:first-child th,
table caption + thead tr:first-child td,
table colgroup + thead tr:first-child th,
table colgroup + thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
  border-block-start: 1px solid #767676;
}

table tbody > tr:nth-child(odd) > td,
table tbody > tr:nth-child(odd) > th {
  background-color: rgba(128, 128, 128, 0.06);
}

table tbody tr:hover > td,
table tbody tr:hover > th,
table tbody tr:focus-within > td,
table tbody tr:focus-within > th {
  background-color: rgba(128, 128, 128, 0.1);
}

table tbody + tbody {
  border-block-start: 2px solid #767676;
}

/* Responsywność wszystkich tabel na ekranach mobilnych (a nie tylko zagnieżdżonych) */
@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto; /* Pozwala przewijać szeroką tabelę palcem bez psucia układu strony */
    -webkit-overflow-scrolling: touch;
  }
  table th,
  table td {
    padding: 0.5rem 0.625rem;
    line-height: 1.4;
  }
  table table {
    font-size: 0.9em;
  }
  table table th {
    font-weight: 600;
  }
}

/* ==========================================================================
   List styling (WCAG 2.4.7)
   ========================================================================== */
dl,
dt,
dd,
ol,
ul,
li {
  margin-block-start: 0;
  margin-block-end: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

/* ==========================================================================
   Accessibility: Reduced Motion (WCAG 2.3.3)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}