/* 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: #333;
  background-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Portal Header - górna część z logo */
.header-top {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
}

.header-top-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

/* Portal Navbar - czerwony pasek nawigacyjny */
.navbar-red {
  background-color: #c00 !important;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Na desktopie zawsze widoczny */
@media (min-width: 769px) {
  .navbar-red {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Na mobile ukryty domyślnie */
@media (max-width: 768px) {
  .navbar-red {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  /* Pokazuj czerwony navbar gdy hamburger jest checked */
  header:has(.mobile-menu-checkbox:checked) .navbar-red {
    max-height: 500px;
  }
}

.navbar-red .container {
  padding: 0 20px;
  background-color: transparent !important;
}

.navbar-red .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.navbar-red .nav-menu {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  background-color: transparent;
}

.navbar-red .nav-link {
  text-decoration: none;
  color: #fff !important;
  font-weight: 500;
  padding: 1rem 1.5rem;
  display: inline-block !important;
  transition: all 0.3s ease;
  white-space: nowrap;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: transparent !important;
  position: relative;
}

.navbar-red .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: #fff;
  transition: width 0.3s ease;
}

.navbar-red .nav-link:hover {
  background-color: #a00;
  transform: translateY(-2px);
}

.navbar-red .nav-link:hover::before {
  width: 100%;
}

.navbar-red .nav-link.active {
  background-color: #a00;
}

.navbar-red .nav-link.active::before {
  width: 100%;
}

/* Portal Container */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 20px;
}

/* Hero Section */
.hero-section {
  background-color: #f9f9f9;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero-section .portal-container {
  padding: 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 60%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.hero-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #c00;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 10;
}

.hero-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card-description {
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.hero-card-date {
  font-size: 0.875rem;
  color: #999;
}

/* Category Page Styles */
.category-page-header {
  margin-bottom: 2rem;
}

.category-page-title {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.category-page-description {
  font-size: 1.125rem;
  color: #666;
  line-height: 1.6;
}

/* Category Articles Grid - wszystkie artykuły w układzie grid */
.category-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 968px) {
  .category-articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.category-featured-article {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-featured-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.category-featured-article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-featured-article-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background-color: #f5f5f5;
}

.category-featured-article-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-featured-article-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-featured-article-content {
  padding: 2rem;
}

.category-featured-article-tag {
  display: inline-block;
  background-color: #c00;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.category-featured-article-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.category-featured-article-excerpt {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.category-featured-article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #999;
}

.category-featured-article-author {
  font-weight: 500;
  color: #666;
}

.category-featured-article-separator {
  color: #ccc;
}

.category-featured-article-date {
  color: #999;
}

/* Category Posts List - pozostałe artykuły */
.category-posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.category-post-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: box-shadow 0.3s ease;
}

.category-post-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-post-item-image {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
}

.category-post-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-post-item-content {
  flex: 1;
}

.category-post-item-content h3 {
  margin-bottom: 0.75rem;
}

.category-post-item-content h3 a {
  text-decoration: none;
  color: #333;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.category-post-item-content h3 a:hover {
  color: #c00;
}

.category-post-item-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.category-post-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #999;
}

.category-post-item-author a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.category-post-item-author a:hover {
  color: #c00;
}

@media (max-width: 768px) {
  .category-post-item {
    flex-direction: column;
  }
  
  .category-post-item-image {
    width: 100%;
    height: 200px;
  }
  
  .category-featured-article-content {
    padding: 1.5rem;
  }
  
  .category-featured-article-title {
    font-size: 1.5rem;
  }
}

/* Category Section */
.category-section {
  margin-bottom: 3rem;
}

.category-header {
  margin-bottom: 1.5rem;
  position: relative;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  text-align: center;
}

.category-line {
  height: 2px;
  background-color: #c00;
  width: 100%;
  margin-top: 0.5rem;
}

/* Category Layout - duży obrazek po lewej, lista po prawej */
.category-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 968px) {
  .category-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Category Featured - duży obrazek po lewej */
.category-featured {
  width: 100%;
}

.category-featured-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.category-featured-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-featured-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background-color: #f5f5f5;
}

.category-featured-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-featured-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-featured-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #c00;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 10;
}

.category-featured-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 10;
}

.category-featured-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
  padding: 2rem 1.5rem 1.5rem;
  margin: 0;
  line-height: 1.3;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  z-index: 10;
}

.category-featured-content {
  padding: 2rem;
}

.category-featured-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

.category-featured-cta {
  margin-top: 1.5rem;
  text-align: center;
}

.btn-category {
  background-color: #c00;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-category:hover {
  background-color: #a00;
  transform: translateY(-2px);
  color: #fff;
}

/* Category Sidebar - lista miniaturek po prawej */
.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-sidebar-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-sidebar-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-sidebar-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.category-sidebar-image-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.category-sidebar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-sidebar-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.category-sidebar-date {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.category-sidebar-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 968px) {
  .category-sidebar-image-wrapper {
    width: 100px;
    height: 75px;
  }
  
  .category-featured-content {
    padding: 1.5rem;
  }
  
  .category-featured-title-overlay {
    font-size: 1.5rem;
    padding: 1.5rem 1rem 1rem;
  }
}

/* Portal Card */
.portal-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.portal-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Featured Card - większa karta */
.portal-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 768px) {
  .portal-card-featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Standard Card */
.portal-card-standard {
  grid-column: span 1;
}

/* Portal Card Image */
.portal-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 60%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.portal-card-featured .portal-card-image-wrapper {
  padding-top: 70%;
}

.portal-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-card-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Category Tag - czerwony tag na obrazku */
.portal-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #c00;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 10;
}

/* Portal Card Content */
.portal-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-card-featured .portal-card-content {
  padding: 1.5rem;
}

.portal-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-card-featured .portal-card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  -webkit-line-clamp: 3;
}

.portal-card-description {
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.portal-card-date {
  font-size: 0.875rem;
  color: #999;
}

/* Header i nawigacja - stare style dla kompatybilności */
.navbar:not(.navbar-red) {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Mobile menu toggle - ukryty checkbox */
.mobile-menu-checkbox {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
}

/* Pokazuj hamburger na mobile */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger menu dla czerwonego navbaru */
.navbar-red .mobile-menu-toggle span {
  background-color: #fff;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Override dla navbar-red */
.navbar-red .nav-menu {
  display: flex !important;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #007bff;
}

/* Override dla navbar-red */
.navbar-red .nav-link {
  color: #fff !important;
}

.navbar-red .nav-link:hover {
  color: #fff !important;
  background-color: #a00;
}

/* Mobile menu styles */
@media (max-width: 768px) {
  /* Animacja hamburgera gdy jest checked */
  header:has(.mobile-menu-checkbox:checked) .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  header:has(.mobile-menu-checkbox:checked) .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  
  header:has(.mobile-menu-checkbox:checked) .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Portal navbar mobile - czerwony navbar */
  .navbar-red .flex {
    flex-wrap: wrap;
  }

  .navbar-red .nav-menu {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
  }

  .navbar-red .nav-link {
    padding: 1rem 1.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
  }

  .navbar-red .nav-link:last-child {
    border-bottom: none;
  }

  .navbar-red .nav-link:hover {
    background-color: #a00;
  }
}

/* Main content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.post-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card h3 {
  margin-bottom: 0.5rem;
}

.post-card h3 a {
  text-decoration: none;
  color: #333;
}

.post-card h3 a:hover {
  color: #007bff;
}

.post-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
  margin-top: 1rem;
}

/* Posts list */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.post-item-image {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  overflow: hidden;
  border-radius: 4px;
}

.post-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-item-content {
  flex: 1;
}

.post-item h2 {
  margin-bottom: 0.5rem;
}

.post-item h2 a {
  text-decoration: none;
  color: #333;
}

.post-item h2 a:hover {
  color: #007bff;
}

.post-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
  margin-top: 1rem;
}

.post-category,
.post-author {
  color: #007bff;
}

.post-category a,
.post-author a {
  color: inherit;
  text-decoration: none;
}

.post-category a:hover,
.post-author a:hover {
  text-decoration: underline;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 968px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.article-image {
  margin-bottom: 2rem;
}

.article-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.article-body h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

/* Article Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-body thead {
  background-color: #c00;
  color: #fff;
}

.article-body thead th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-body tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

.article-body tbody tr:last-child {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background-color: #f9f9f9;
}

.article-body tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.article-body tbody tr:nth-child(even):hover {
  background-color: #f5f5f5;
}

.article-body tbody td {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

.article-body tbody td:first-child {
  font-weight: 500;
  color: #333;
}

.article-body tfoot {
  background-color: #f5f5f5;
  font-weight: 600;
}

.article-body tfoot td {
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  color: #666;
}

/* Responsive tables */
@media (max-width: 768px) {
  .article-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .article-body thead th,
  .article-body tbody td,
  .article-body tfoot td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .article-body thead th {
    font-size: 0.8125rem;
  }
}

/* Table wrapper for better scrolling on mobile */
.article-body .table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.article-body .table-wrapper table {
  margin: 0;
  min-width: 600px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.tags-label {
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: background-color 0.3s ease;
}

.tag:hover {
  background-color: #0056b3;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.related-posts h2 {
  margin-bottom: 1.5rem;
}

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-section {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}

.sidebar-section h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.5rem;
}

.sidebar-list a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.sidebar-list a:hover {
  color: #007bff;
}

/* Paginacja */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.pagination-link:hover {
  background-color: #f5f5f5;
}

.pagination-active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.pagination-active:hover {
  background-color: #0056b3;
}

/* Authors */
.authors-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.author-card {
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
}

.author-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.author-content h2 {
  margin-bottom: 0.5rem;
}

.author-content h2 a {
  text-decoration: none;
  color: #333;
}

.author-content h2 a:hover {
  color: #007bff;
}

.author-posts-count {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.author-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.author-header-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-header-content h1 {
  margin-bottom: 1rem;
}

.author-bio {
  font-size: 1.125rem;
  color: #666;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}

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

.category-description,
.tag-description {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Error 404 page */
.error-404 {
  text-align: center;
  padding: 4rem 2rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.error-404 h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #333;
}

.error-404 p {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 1rem;
}

.error-404 a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.error-404 a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: #666;
}

/* Portal Footer - czerwony footer */
.footer-red {
  background-color: #c00;
  color: #fff;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-red .footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-red .footer-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.footer-red .footer-nav a:hover {
  opacity: 0.8;
}

.footer-separator {
  color: #fff;
  margin: 0 0.5rem;
}

.footer-copyright {
  color: #fff;
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .post-item {
    flex-direction: column;
  }
  
  .post-item-image {
    width: 100%;
    height: 200px;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .author-header {
    flex-direction: column;
    text-align: center;
  }
}

/* About Section - sekcja O nas na stronie głównej */
.about-section {
  background-color: #f9f9f9;
  padding: 4rem 0;
  margin-top: 4rem;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1.5rem;
}

.about-intro {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 3rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}

.about-highlight h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #c00;
  margin-bottom: 1rem;
}

.about-highlight p {
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
}

.about-cta {
  margin-top: 2rem;
}

.about-cta .btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: #c00;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.about-cta .btn:hover {
  background-color: #a00;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .about-section {
    padding: 3rem 0;
    margin-top: 3rem;
  }

  .about-title {
    font-size: 2rem;
  }

  .about-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .about-highlights {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .about-highlight h3 {
    font-size: 1.25rem;
  }
}

