﻿ď»ż/* ===== REGULAMIN.CSS ===== */
/* Dedykowane style dla stron dokumentďż˝w prawnych */

/* === LEGAL PAGE LAYOUT === */
.legal-page {
  padding: 60px 0 80px;
  min-height: calc(100vh - 400px);
  background: var(--bg);
}

.legal-page .container {
  max-width: 900px;
  margin: 0 auto;
}

/* === LEGAL HEADER === */
.legal-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--stroke);
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.2;
}

.legal-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 20px;
  font-weight: 500;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.legal-meta time {
  font-weight: 600;
  color: var(--text);
}

/* === TABLE OF CONTENTS === */
.toc {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 0 0 48px;
  text-align: center;
}

.toc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.toc-title::before {
  content: '';
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><line x1="10" y1="9" x2="8" y2="9"/></svg>');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><line x1="10" y1="9" x2="8" y2="9"/></svg>');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  flex-shrink: 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
  display: inline-block;
  text-align: left;
  max-width: 600px;
}

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 10px;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.toc-list a::before {
  content: counter(toc-counter) '.';
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
  font-size: 0.875rem;
}

.toc-list a:hover {
  background: var(--bg);
  color: var(--accent);
  transform: translateX(4px);
}

.toc-list a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === LEGAL CONTENT === */
.legal-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

/* Legal Sections */
.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px; /* Offset for fixed header when jumping to anchor */
}

.legal-section:last-of-type {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1.3;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}

.section-number {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.legal-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 16px;
}

.legal-section p {
  margin: 0 0 16px;
  text-align: justify;
  hyphens: auto;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

/* Lists */
.legal-list {
  list-style: none;
  counter-reset: legal-counter;
  padding: 0;
  margin: 0 0 20px;
}

.legal-list > li {
  counter-increment: legal-counter;
  margin-bottom: 20px;
  position: relative;
  padding-left: 40px;
}

.legal-list > li::before {
  content: counter(legal-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
}

.legal-list > li:last-child {
  margin-bottom: 0;
}

/* Nested unordered lists (bullets) */
.legal-list ul {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0;
}

.legal-list ul li {
  margin-bottom: 8px;
  padding-left: 8px;
}

.legal-list ul li:last-child {
  margin-bottom: 0;
}

/* Nested nested lists */
.legal-list ul ul {
  list-style: circle;
  margin-top: 8px;
}

/* Strong emphasis in lists */
.legal-list strong {
  font-weight: 600;
  color: var(--text);
}

/* Code elements */
.legal-content code {
  background: var(--soft);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent);
  font-weight: 500;
}

/* Definition List */
.definition-list {
  margin: 20px 0;
}

.definition-list dt {
  font-weight: 700;
  color: var(--text);
  font-size: 1.0625rem;
  margin: 20px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.definition-list dt:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.definition-list dd {
  margin: 0 0 0 24px;
  padding: 12px 16px;
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  text-align: justify;
  hyphens: auto;
}

/* Links in legal content */
.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: var(--accent-2);
}

.legal-content a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* === CONTACT BOX === */
.contact-box {
  background: linear-gradient(135deg, var(--panel) 0%, var(--soft) 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 48px 0 0;
}

.contact-box h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-box h3::before {
  content: '';
  width: 28px;
  height: 28px;
  background: currentColor;
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  flex-shrink: 0;
}

.contact-box p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-box li {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-box li:last-child {
  margin-bottom: 0;
}

.contact-box strong {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.contact-box a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  transition: color 0.2s ease;
}

.contact-box a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.contact-box .text-muted {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

/* === BACK TO TOP === */
.back-to-top-container {
  text-align: center;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--stroke);
}

.back-to-top-container .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
}

.back-to-top-container svg {
  flex-shrink: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .legal-page {
    padding: 40px 0 60px;
  }

  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-subtitle {
    font-size: 1rem;
  }

  .legal-meta {
    font-size: 0.8125rem;
  }

  .toc {
    padding: 24px 20px;
  }

  .toc-title {
    font-size: 1.125rem;
    gap: 10px;
  }
  
  .toc-title::before {
    width: 20px;
    height: 20px;
  }

  .toc-list {
    max-width: 100%;
  }

  .toc-list a {
    font-size: 0.875rem;
    padding: 6px 10px;
  }

  .legal-section {
    margin-bottom: 40px;
  }

  .legal-section h2 {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-number {
    font-size: 1.25rem;
  }

  .legal-section h3 {
    font-size: 1.125rem;
  }

  .legal-content {
    font-size: 0.9375rem;
  }

  .legal-list > li {
    padding-left: 32px;
  }

  .definition-list dd {
    margin-left: 0;
    padding: 10px 14px;
  }

  .contact-box {
    padding: 24px 20px;
  }

  .contact-box h3 {
    font-size: 1.25rem;
    gap: 10px;
  }
  
  .contact-box h3::before {
    width: 24px;
    height: 24px;
  }

}

@media (max-width: 480px) {
  .legal-header h1 {
    font-size: 1.75rem;
  }

  .legal-section h2 {
    font-size: 1.375rem;
  }

  .toc-list a {
    font-size: 0.8125rem;
  }

  .legal-content {
    text-align: left; /* Remove justify on very small screens for readability */
  }

  .definition-list dd {
    text-align: left;
  }
}

/* === PRINT STYLES === */
@media print {
  .promo,
  header,
  footer,
  .back-to-top-container,
  .nav-icons,
  .float-call {
    display: none !important;
  }

  .legal-page {
    padding: 0;
  }

  .legal-header {
    page-break-after: avoid;
  }

  .legal-section {
    page-break-inside: avoid;
  }

  .legal-section h2 {
    page-break-after: avoid;
  }

  .toc {
    page-break-after: always;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .contact-box {
    border-color: #333;
    background: #f5f5f5;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  .toc-list a {
    transition: none;
  }
  
  .toc-list a:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .legal-section h2 {
    border-bottom-width: 3px;
  }

  .definition-list dd {
    border-left-width: 4px;
  }

  .contact-box {
    border-width: 3px;
  }
}
.legal-list {
  padding-left: 2rem;
  text-align: justify;
  margin-left: 0;
}

