/* =========================================================
   Mieszkanie Treningowe – Słyszę Serce
   Dostosowania WCAG 2.2 + pasek narzędzi dostępności
   ========================================================= */

/* --- Skip link (WCAG 2.4.1) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffcc00;
  outline-offset: 0;
}

/* --- Pasek dostępności (nad nagłówkiem) --- */
.accessibility-bar {
  background: #2a2a2a;
  color: #e8e8e8;
  padding: 5px 0;
  font-size: 0.8rem;
}

.accessibility-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* --- Pasek WCAG (przyciski) --- */
.wcag-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.wcag-toolbar button {
  background: transparent;
  color: #e8e8e8;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  line-height: 1.4;
}

.wcag-toolbar button:hover,
.wcag-toolbar button:focus-visible {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}

.wcag-toolbar button[aria-pressed="true"] {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
  color: #fff;
}

/* --- Hero — jasny styl --- */
.hero.section {
  background: #f4f7fb;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero.section .container--hero {
  gap: 48px;
}

.hero.section .hero_main {
  flex: 1;
  min-width: 0;
}

.hero.section .hero_main-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  font-weight: 800;
  color: #0d1b2a !important;
  margin-bottom: 20px;
}

.hero.section .text {
  color: #4a5568 !important;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero.section .line {
  background: #235784 !important;
  width: 3px;
  min-height: 60px;
  flex-shrink: 0;
  margin-right: 16px;
}

.hero.section .hero_main-content {
  margin-bottom: 28px;
}

.hero.section .hero_main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Hero — obraz po prawej */
.hero_image {
  flex: 0 0 420px;
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.hero_image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

@media (max-width: 991px) {
  .hero_image {
    display: none;
  }
}

/* --- Przyciski – WCAG focus override --- */
.btn.theme-element:focus-visible,
.link--arrow:focus-visible,
a.home-card__link:focus-visible {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 2px !important;
}

/* --- Przyciski CTA dla stron wewnętrznych --- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
  font-family: Mulish, sans-serif;
  line-height: 1;
}

.btn-cta--accent {
  background: #235784;
  color: #fff !important;
}

.btn-cta--accent:hover {
  background: #1a4268;
  transform: scale(1.05);
}

.btn-cta--light {
  background: #ddeaf6;
  color: #235784 !important;
}

.btn-cta--light:hover {
  background: #c5d8f0;
  transform: scale(1.05);
}

/* --- AOS: pokaż elementy nawet bez JS (fallback) --- */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition-property: opacity, transform;
}

/* --- Wysoki kontrast --- */
html.high-contrast,
html.high-contrast body {
  background: #000 !important;
  color: #fff !important;
}

html.high-contrast a {
  color: #ffff00 !important;
}

html.high-contrast .header,
html.high-contrast .footer {
  background: #000 !important;
  border-bottom: 2px solid #fff;
}

html.high-contrast .brand_name,
html.high-contrast .nav-item {
  color: #fff !important;
}

html.high-contrast .wcag-toolbar button {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

html.high-contrast .card,
html.high-contrast .hero_main-title,
html.high-contrast .about_main-header,
html.high-contrast .rooms_header-title {
  color: #fff !important;
}

html.high-contrast img {
  filter: grayscale(30%) contrast(1.2);
}

html.high-contrast .theme-element {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

html.high-contrast .rooms_list-item .item-wrapper,
html.high-contrast .rooms_list-item .card {
  background: #111 !important;
  color: #fff !important;
}

/* --- Zwiększone odstępy --- */
html.wide-spacing body {
  letter-spacing: 0.05em;
  word-spacing: 0.1em;
}

html.wide-spacing p,
html.wide-spacing li,
html.wide-spacing td {
  line-height: 2 !important;
}

/* --- Fokus widoczny (WCAG 2.4.7) --- */
:focus-visible {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 2px !important;
}

/* --- Nagłówek strony --- */
.header .container {
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Okruszki --- */
.breadcrumbs {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.breadcrumbs .list-item + .list-item::before {
  content: '›';
  margin-right: 6px;
  color: rgba(255,255,255,0.5);
}

.breadcrumbs .link {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}

.breadcrumbs .link:hover,
.breadcrumbs .link:focus {
  color: #fff;
}

/* --- Galeria zdjęć --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.gallery-grid__item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f0f0f0;
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-grid__item:hover img,
.gallery-grid__item:focus-within img {
  transform: scale(1.04);
}

.gallery-grid__item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-grid__item a:focus-visible {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 0 !important;
}

/* --- Strony wewnętrzne (o nas, rekrutacja, kontakt) --- */
.content-section {
  padding: 60px 0;
}

.content-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  margin-bottom: 28px;
}

.content-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0d1b2a;
}

.content-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0d1b2a;
}

.content-card p {
  margin-bottom: 12px;
  line-height: 1.7;
  color: #333;
}

.content-card ul {
  padding-left: 20px;
  margin-bottom: 12px;
  color: #333;
}

.content-card li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.content-card .highlight {
  background: #ddeaf6;
  border-left: 4px solid #235784;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: #1a3a58;
  font-style: italic;
}

/* --- Linki do pobrania --- */
.download-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.download-list li {
  margin-bottom: 12px;
}

.download-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #235784;
  font-weight: 600;
  text-decoration: underline;
  font-size: 0.95rem;
}

.download-list a:hover,
.download-list a:focus-visible {
  color: #1a4268;
}

/* --- Formularz kontaktowy --- */
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #222;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #222;
  background: #fff;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: #235784;
  outline: 2px solid #ffcc00;
  outline-offset: 1px;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .required-note {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 20px;
}

.contact-form .required-note abbr {
  color: #c0392b;
  text-decoration: none;
}

/* --- Dane kontaktowe --- */
.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-item .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #235784;
  margin-top: 2px;
}

.contact-info-item .details {
  line-height: 1.6;
  color: #333;
}

.contact-info-item a {
  color: #235784;
  font-weight: 600;
}

/* --- Info banner (Ważna informacja) --- */
.info-banner {
  background: #f7fafd;
  border-left: 4px solid #235784;
  border-radius: 0 8px 8px 0;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.info-banner__icon {
  font-size: 2rem;
  flex-shrink: 0;
  color: #235784;
  line-height: 1;
}

.info-banner__body {
  flex: 1;
  min-width: 200px;
}

.info-banner__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #0d1b2a;
}

.info-banner__text {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.6;
}

/* --- Stopka – deklaracja dostępności --- */
.footer-accessibility {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
}

.footer-accessibility a {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}

.footer-accessibility a:hover,
.footer-accessibility a:focus-visible {
  color: #fff;
}

/* --- ARIA live region --- */
#wcag-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* --- Responsywność --- */
@media (max-width: 768px) {
  .wcag-toolbar {
    gap: 4px;
  }
  .wcag-toolbar button {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  .content-card {
    padding: 24px 20px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .info-banner {
    padding: 18px 20px;
  }
}

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