/* 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: #1A1A1A;
  background-color: #F7FAFF;
}

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

/* Header i nawigacja */
.navbar {
  background-color: #1B365D;
  border-bottom: 1px solid #1B365D;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

/* 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;
}

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

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

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

.nav-link:hover {
  color: #C2185B;
}

/* Mobile menu styles */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: max-height 0.3s ease;
    margin-top: 1rem;
  }
  
  .flex .mobile-menu-checkbox:checked ~ .nav-menu {
    max-height: 500px;
  }
  
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

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

/* Hero header section */
.hero-header {
  background-image: url('/assets/images/hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem 2rem;
  margin: 2rem -20px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-header h1,
.hero-header p {
  position: relative;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-header p {
  font-size: 1.25rem;
  line-height: 1.8;
  max-width: 800px;
}

/* Hero categories section */
.hero-categories {
  margin: 3rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-tile {
  display: block;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-tile:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-tile:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-tile:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.category-tile:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.category-tile:nth-child(5) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.category-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category-tile h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #fff;
  font-weight: 600;
}

.category-tile p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin: 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;
  box-shadow: 0 2px 4px rgba(27, 54, 93, 0.1);
}

.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: #1A1A1A;
}

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

.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;
  background: #fff;
  box-shadow: 0 2px 4px rgba(27, 54, 93, 0.1);
}

.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: #1A1A1A;
}

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

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

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

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

.post-category a:hover,
.post-author a:hover {
  text-decoration: underline;
  color: #8E1241;
}

/* 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;
}

/* Checklist styling */
.article-body li {
  position: relative;
  margin-bottom: 0.5rem;
}

.article-body input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #1B365D;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  margin-right: 0.75rem;
  margin-left: 0;
  margin-top: 0.1rem;
  vertical-align: middle;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.article-body input[type="checkbox"]:disabled {
  cursor: default;
}

.article-body input[type="checkbox"]:hover {
  border-color: #C2185B;
  background-color: #F7FAFF;
}

.article-body input[type="checkbox"]:checked {
  background-color: #C2185B;
  border-color: #C2185B;
}

.article-body input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.article-body input[type="checkbox"]:focus {
  outline: 2px solid #C2185B;
  outline-offset: 2px;
}

/* List items with checkboxes */
.article-body li:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin-left: 0;
  padding-left: 0;
  padding: 0.5rem 0;
}

.article-body li:has(input[type="checkbox"]) > input[type="checkbox"] {
  margin-left: 0;
  margin-right: 0.75rem;
  margin-top: 0.1rem;
}

/* Checklist container styling */
.article-body ul:has(input[type="checkbox"]) {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(27, 54, 93, 0.1);
  list-style: none;
  margin-left: 0;
}

.article-body ul:has(input[type="checkbox"]) li {
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.article-body ul:has(input[type="checkbox"]) li:last-child {
  margin-bottom: 0;
}

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

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

.article-body th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #1B365D;
}

.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}

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

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

/* Boxes - Uwaga i Ważne */
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #ddd;
  border-radius: 4px;
  background-color: #f5f5f5;
}

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

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Box Uwaga */
.article-body blockquote.box-uwaga {
  background-color: #FFF4E5;
  border-left: 4px solid #FF9800;
}

/* Box Ważne */
.article-body blockquote.box-wazne {
  background-color: #E3F2FD;
  border-left: 4px solid #2196F3;
}

.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: #C2185B;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: background-color 0.3s ease;
}

.tag:hover {
  background-color: #8E1241;
}

.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: #C2185B;
}

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

.pagination-active:hover {
  background-color: #8E1241;
}

/* 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: #1A1A1A;
}

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

.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: #C2185B;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.btn:hover {
  background-color: #8E1241;
}

.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: #C2185B;
  text-decoration: none;
  font-weight: 500;
}

.error-404 a:hover {
  color: #8E1241;
}

.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;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-header {
    padding: 2.5rem 1.5rem;
    margin: 1rem -20px;
  }
  
  .hero-header h1 {
    font-size: 2rem;
  }
  
  .hero-header p {
    font-size: 1.125rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .category-tile {
    padding: 1.5rem;
  }
  
  .category-tile h3 {
    font-size: 1.25rem;
  }
  
  .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;
  }
}

