/* Reset i podstawowe style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #6b7280;
  background-color: #fefbf6;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Kolor tła - pastelowe */
.bg-gray-50 {
  background-color: #fefbf6;
}

.bg-white {
  background-color: #ffffff;
}

.bg-blue-100 {
  background-color: #e0f2fe;
}

.bg-blue-50 {
  background-color: #f0f9ff;
}

.bg-blue-200 {
  background-color: #cfe2ff;
}

/* Kolory tekstu - pastelowe */
.text-gray-900 {
  color: #4a5568;
}

.text-gray-700 {
  color: #6b7280;
}

.text-gray-600 {
  color: #9ca3af;
}

.text-blue-600 {
  color: #7c9eff;
}

.leading-relaxed {
  line-height: 1.75;
}

.text-blue-800 {
  color: #5b7bd6;
}

/* Typografia */
.text-4xl {
  font-size: 2.25rem;
  line-height: 1.2;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 1.3;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 1.4;
}

.text-sm {
  font-size: 0.875rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

/* Spacing */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-6 {
  padding: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-12 {
  margin-top: 3rem;
}

.mt-16 {
  margin-top: 4rem;
}

.mt-20 {
  margin-top: 5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

/* Flexbox */
.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.flex-1 {
  flex: 1 1 0%;
}

.min-w-\[300px\] {
  min-width: 300px;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

/* Cienie - delikatne */
.shadow-md {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.shadow-lg {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Zaokrąglenia */
.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Borders - pastelowe */
.border-b {
  border-bottom: 1px solid #e5e7eb;
}

.border-t {
  border-top: 1px solid #e5e7eb;
}

/* Pozycjonowanie */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.top-full {
  top: 100%;
}

.left-0 {
  left: 0;
}

/* Wyświetlanie */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.max-w-none {
  max-width: none;
}

.w-full {
  width: 100%;
}

/* Grid - układ kafelków */
.grid {
  display: grid;
}

.gap-6 {
  gap: 1.5rem;
}

/* Domyślnie 1 kolumna, od 640px → 2 kolumny */
.grid-cols-1 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Kafelek artykułu */
.card-link {
  display: block;
  text-decoration: none;
}

.card {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3 proporcje dla kafelków */
  overflow: hidden;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background: #f0f9ff;
  position: relative;
}

.card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-category-label {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(251, 207, 232, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #831843;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
  white-space: nowrap;
}

.card-title {
  padding: 0.75rem 1rem 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  color: #4a5568;
}

.card-meta {
  padding: 0.75rem 1rem 1rem;
}

.card-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.card-date {
  display: inline-block;
}

.card-author {
  display: inline-block;
  color: #7c9eff;
  font-weight: 500;
}

.card-excerpt {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-more-link {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  display: inline-block;
  width: auto;
  margin: 0 auto;
}

.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem 1.25rem;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.4);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  z-index: 1;
}

/* Layout artykułu: 2 kolumny (75% / 25%) */
.layout-2col {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.5rem;
}

.sidebar-block {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 1rem;
}

@media (max-width: 1024px) {
  .layout-2col {
    grid-template-columns: 1fr;
  }
}

/* Kursor */
.cursor-pointer {
  cursor: pointer;
}

/* Transitions */
.transition-shadow {
  transition-property: box-shadow;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
  transition-property: color, background-color;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects - pastelowe */
.hover\:shadow-lg:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.hover\:text-blue-800:hover {
  color: #5b7bd6;
}

.hover\:bg-blue-50:hover {
  background-color: #f0f9ff;
}

.hover\:bg-blue-200:hover {
  background-color: #cfe2ff;
}

.hover\:underline:hover {
  text-decoration: underline;
}

/* Paginacja */
.pagination {
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  min-width: 2.5rem;
  text-align: center;
}

/* Dropdown */
.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content {
  z-index: 10;
}

/* Linki - pastelowe */
a {
  color: #7c9eff;
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: #5b7bd6;
}

/* Listy */
ul {
  list-style: none;
}

.list-disc {
  list-style-type: disc;
}

.list-inside {
  list-style-position: inside;
}

/* Obraz w artykule */
.article-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.5rem;
}

.article-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0;
}

/* Autor - zdjęcie i opis */
.author-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: block;
}

@media (max-width: 640px) {
  .author-photo {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1;
  }
  
  .min-w-\[300px\] {
    min-width: 100%;
  }
}

/* Prose - style dla treści markdown */
.prose {
  width: 100%;
  max-width: 100%;
  color: #6b7280;
}

.prose-lg {
  font-size: 1.125rem;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: #7c9eff;
  text-decoration: underline;
}

.prose a:hover {
  color: #5b7bd6;
}

.prose strong {
  font-weight: 600;
  color: #4a5568;
}

.prose code {
  background-color: #f9fafb;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

/* Tabele w artykułach */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  border-bottom: 2px solid #7c9eff;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
}

.prose tbody tr:hover {
  background-color: #f9fafb;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Boxy uwaga/ważne */
.alert-box {
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.alert-box.alert-info {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #7c9eff;
}

.alert-box.alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #f59e0b;
}

.alert-box.alert-important {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 4px solid #ef4444;
}

.alert-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #4a5568;
}

@media (max-width: 640px) {
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.5rem 0.75rem;
  }
  
  .alert-box {
    padding: 1.25rem;
  }
}

/* Box z opisem na stronie głównej */
.intro-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #7c9eff;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .intro-box {
    padding: 1.5rem;
  }
}

/* Hamburger menu */
/* Logo w menu */
.nav-home-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo-img {
    height: 32px;
  }
}

.mobile-menu-checkbox {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 20;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: #7c9eff;
  transition: all 0.3s ease;
}

.nav-menu {
  display: flex;
  gap: 1rem;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Responsywność */
@media (max-width: 768px) {
  nav {
    position: relative;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0;
    border-top: 1px solid #e5e7eb;
  }
  
  .nav-menu > * {
    padding: 0.75rem 1rem;
  }
  
  .nav-menu > *:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
  }
  
  /* Pokazuj menu gdy checkbox jest checked */
  .mobile-menu-checkbox:checked ~ .flex .nav-menu {
    max-height: 500px;
  }
  
  /* Animacja hamburgera w X gdy checkbox jest checked */
  .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
}

@media (max-width: 640px) {
  .text-4xl {
    font-size: 1.875rem;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
  
  .text-2xl {
    font-size: 1.25rem;
  }
  
  .px-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .p-6 {
    padding: 1rem;
  }
  
  .dropdown-content {
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Nagłówki sekcji na stronie głównej */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #e0f2fe;
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #7c9eff 0%, #5b7bd6 100%);
  border-radius: 0 0 2px 2px;
}

.section-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.875rem;
  font-weight: 600;
  color: #4a5568;
}

.section-heading .section-emoji {
  font-size: 2rem;
  line-height: 1;
}

/* Stopka */
.footer {
  margin-top: 3rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #7c9eff;
}

.footer-copyright {
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  width: 100%;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .footer-links {
    justify-content: flex-start;
  }
  
  .footer-copyright {
    border-top: none;
    border-left: 1px solid #e5e7eb;
    padding-top: 0;
    padding-left: 1.5rem;
    width: auto;
    text-align: right;
  }
}

/* Wykresy D3.js - skalowanie responsywne */
.chart-container {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 20px auto;
}

.chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}