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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #7c3aed;
  --accent-color: #06b6d4;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #0f172a;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-tech: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #06b6d4 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.03) 0px, transparent 50%);
  min-height: 100vh;
}

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

/* Header i nawigacja */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-image {
  width: 250px;
  height: 50px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.logo-text {
  display: none;
}

.logo:hover {
  transform: scale(1.05);
}

.logo:hover .logo-image {
  transform: rotate(5deg) scale(1.1);
}

/* 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: var(--gradient-tech);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-tech);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.nav-link:hover::before {
  width: 80%;
}

/* Mobile menu styles */
@media (max-width: 768px) {
  .logo-image {
    width: 200px;
    height: 40px;
  }
  
  .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: 3rem 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

section.latest-posts h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

section.latest-posts h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-tech);
  border-radius: 2px;
}

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

.post-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-tech);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.post-card:hover::before {
  transform: scaleX(1);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover img {
  transform: scale(1.05);
}

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

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

.post-card h3 a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.post-card h3 a:hover {
  color: var(--primary-color);
}

.post-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  align-items: center;
}

.post-card-meta time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card-meta time::before {
  content: '📅';
  font-size: 0.75rem;
}

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

.post-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.post-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.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: var(--text-primary);
  transition: color 0.3s ease;
}

.post-item h2 a:hover {
  color: var(--primary-color);
}

.post-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.post-category,
.post-author {
  color: var(--primary-color);
  font-weight: 500;
}

.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: 12px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.article-image:hover img {
  transform: scale(1.02);
}

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

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  font-weight: 700;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  align-items: center;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.article-body h2 {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.article-body h3 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}


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

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

/* Boxy informacyjne */
.box-uwaga,
.box-pamietaj,
.box-wazne {
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
  border-left: 4px solid;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  line-height: 1.7;
}

.box-uwaga:hover,
.box-pamietaj:hover,
.box-wazne:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

/* Box Uwaga - żółty/pomarańczowy */
.box-uwaga {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-left-color: #f59e0b;
  color: #92400e;
  padding-left: 4rem;
}

.box-uwaga::before {
  content: '⚠️';
  position: absolute;
  left: 1.5rem;
  top: 1.25rem;
  font-size: 1.5rem;
  line-height: 1;
}

/* Box Pamiętaj - niebieski */
.box-pamietaj {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  border-left-color: var(--primary-color);
  color: #1e40af;
  padding-left: 4rem;
}

.box-pamietaj::before {
  content: '💡';
  position: absolute;
  left: 1.5rem;
  top: 1.25rem;
  font-size: 1.5rem;
  line-height: 1;
}

/* Box Ważne - czerwony/pomarańczowy */
.box-wazne {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border-left-color: #ef4444;
  color: #991b1b;
  padding-left: 4rem;
}

.box-wazne::before {
  content: '❗';
  position: absolute;
  left: 1.5rem;
  top: 1.25rem;
  font-size: 1.5rem;
  line-height: 1;
}

/* Style dla elementów wewnątrz boxów */
.box-uwaga p,
.box-pamietaj p,
.box-wazne p {
  margin: 0;
  margin-bottom: 0.75rem;
}

.box-uwaga p:last-child,
.box-pamietaj p:last-child,
.box-wazne p:last-child {
  margin-bottom: 0;
}

.box-uwaga ul,
.box-uwaga ol,
.box-pamietaj ul,
.box-pamietaj ol,
.box-wazne ul,
.box-wazne ol {
  margin: 0.75rem 0 0.75rem 1.5rem;
  padding: 0;
}

.box-uwaga li,
.box-pamietaj li,
.box-wazne li {
  margin-bottom: 0.5rem;
}

/* Responsywność dla boxów */
@media (max-width: 768px) {
  .box-uwaga,
  .box-pamietaj,
  .box-wazne {
    padding: 1rem 1.25rem;
    padding-left: 3.5rem;
    margin: 1.5rem 0;
  }
  
  .box-uwaga::before,
  .box-pamietaj::before,
  .box-wazne::before {
    left: 1.25rem;
    top: 1rem;
    font-size: 1.25rem;
  }
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

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

.tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: var(--gradient-tech);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.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: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.sidebar-section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.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: var(--text-primary);
  transition: all 0.3s ease;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
}

.sidebar-list a:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  padding-left: 0.75rem;
}

/* 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: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination-link:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pagination-active {
  background: var(--gradient-tech);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.pagination-active:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 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 var(--border-color);
  border-radius: 12px;
  text-align: center;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.author-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.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: var(--text-primary);
  transition: color 0.3s ease;
}

.author-content h2 a:hover {
  color: var(--primary-color);
}

.author-posts-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.author-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.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: var(--text-secondary);
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--gradient-tech);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

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

.category-description,
.tag-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* 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: 4rem;
  margin-bottom: 1rem;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.error-404 p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.error-404 a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 2rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-block;
}

.error-404 a:hover {
  background: var(--gradient-tech);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav {
  margin-bottom: 1.5rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  display: inline-block;
}

.footer-nav a:hover {
  color: var(--accent-color);
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

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

