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

/* Islandzka paleta kolorów */
:root {
  /* Główne kolory - ciemne niebo i bazalt */
  --iceland-dark: #1a1a2e;
  --iceland-darker: #16213e;
  --iceland-blue-dark: #0f3460;
  --iceland-blue: #1e3a5f;
  
  /* Lodowce i morze - chłodne błękity */
  --iceland-ice: #a8d5e2;
  --iceland-ocean: #5dade2;
  --iceland-sky: #85c1e2;
  --iceland-light-blue: #e3f2fd;
  
  /* Zorza polarna - akcenty */
  --iceland-aurora-green: #2ecc71;
  --iceland-aurora-green-dark: #27ae60;
  --iceland-aurora-purple: #9b59b6;
  --iceland-aurora-pink: #e91e63;
  
  /* Natura i kamienie */
  --iceland-stone: #95a5a6;
  --iceland-moss: #7fb069;
  
  /* Tła */
  --iceland-bg-light: #f8f9fa;
  --iceland-bg: #ffffff;
  --iceland-bg-soft: #f0f4f8;
  
  /* Tekst */
  --iceland-text: #2c3e50;
  --iceland-text-light: #5a6c7d;
  --iceland-text-dark: #1a252f;
  
  /* Akcenty */
  --iceland-accent: #0f3460;
  --iceland-accent-hover: #1e3a5f;
  --iceland-link: #5dade2;
  --iceland-link-hover: #0f3460;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Open Sans", sans-serif;
  line-height: 1.7;
  color: var(--iceland-text);
  background: linear-gradient(180deg, #ffffff 0%, var(--iceland-bg-soft) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

/* Header i nawigacja */
.navbar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 244, 248, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--iceland-light-blue);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(15, 52, 96, 0.05);
}

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

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--iceland-blue-dark) 0%, var(--iceland-ocean) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
  filter: brightness(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: linear-gradient(90deg, var(--iceland-blue-dark) 0%, var(--iceland-ocean) 100%);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

.nav-link {
  text-decoration: none;
  color: var(--iceland-text);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--iceland-ocean) 0%, var(--iceland-aurora-green) 100%);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--iceland-blue-dark);
}

.nav-link:hover::after {
  width: 100%;
}

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

/* Playlist Section */
.playlist-section {
  margin: 3rem 0;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--iceland-bg-soft) 0%, rgba(240, 244, 248, 0.9) 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 52, 96, 0.08);
  border: 1px solid var(--iceland-light-blue);
}

.playlist-section h2 {
  color: var(--iceland-text-dark);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.playlist-description {
  color: var(--iceland-text-light);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.playlist-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 52, 96, 0.12);
  background: var(--iceland-bg);
}

.playlist-embed iframe {
  display: block;
  width: 100%;
  min-height: 380px;
  border: none;
}

@media (max-width: 768px) {
  .playlist-section {
    padding: 1.5rem;
    margin: 2rem 0;
  }
  
  .playlist-section h2 {
    font-size: 1.5rem;
  }
  
  .playlist-embed iframe {
    min-height: 300px;
  }
}

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

.post-card {
  background: var(--iceland-bg);
  border: 1px solid var(--iceland-light-blue);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.08);
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(15, 52, 96, 0.15);
  border-color: var(--iceland-ocean);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: brightness(0.95);
}

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

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

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

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

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

.post-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--iceland-text-light);
  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 var(--iceland-light-blue);
  border-radius: 12px;
  background: var(--iceland-bg);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.05);
}

.post-item:hover {
  box-shadow: 0 4px 15px rgba(15, 52, 96, 0.12);
  border-color: var(--iceland-ocean);
}

.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;
  border-radius: 4px;
  transition: transform 0.3s ease;
  filter: brightness(0.95);
}

.post-item:hover .post-item-image img {
  transform: scale(1.05);
  filter: brightness(1);
}

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

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

.post-item h2 a {
  text-decoration: none;
  color: var(--iceland-text-dark);
  transition: color 0.3s ease;
}

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

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

.post-category,
.post-author {
  color: var(--iceland-ocean);
  font-weight: 600;
}

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

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

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

.homepage-content {
  min-width: 0; /* Zapobiega overflow w grid */
}

.homepage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 968px) {
  .homepage-layout {
    grid-template-columns: 1fr;
  }
  
  .homepage-sidebar {
    order: -1; /* Sidebar na górze na mobile */
  }
}

/* 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: 0 4px 15px rgba(15, 52, 96, 0.1);
  border: 2px solid var(--iceland-light-blue);
}

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

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--iceland-text-dark);
  line-height: 1.3;
  background: linear-gradient(135deg, var(--iceland-text-dark) 0%, var(--iceland-blue-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--iceland-text-light);
  font-weight: 500;
}

.article-meta a {
  color: var(--iceland-ocean);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.article-meta a:hover {
  color: var(--iceland-blue-dark);
  text-decoration: underline;
}

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

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--iceland-text-dark);
  font-size: 2rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--iceland-light-blue);
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--iceland-blue-dark);
  font-size: 1.5rem;
  font-weight: 600;
}

.article-body p {
  margin-bottom: 1.5rem;
  color: var(--iceland-text);
}

.article-body a {
  color: var(--iceland-ocean);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.article-body a:hover {
  color: var(--iceland-blue-dark);
  border-bottom-color: var(--iceland-ocean);
}

.article-body strong {
  color: var(--iceland-text-dark);
  font-weight: 700;
}

.article-body em {
  color: var(--iceland-text-light);
  font-style: italic;
}

.article-body blockquote {
  border-left: 4px solid var(--iceland-ocean);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--iceland-text-light);
  background: linear-gradient(90deg, rgba(93, 173, 226, 0.05) 0%, transparent 100%);
  padding: 1rem 1.5rem;
  border-radius: 8px;
}

.article-body code {
  background: var(--iceland-bg-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--iceland-blue-dark);
  font-weight: 600;
  border: 1px solid var(--iceland-light-blue);
}

.article-body pre {
  background: var(--iceland-bg-soft);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--iceland-light-blue);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.05);
}

.article-body pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: var(--iceland-text);
}

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

.article-body ul li {
  margin-bottom: 0.75rem;
  list-style-type: none;
  position: relative;
  padding-left: 1.5rem;
}

.article-body ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--iceland-ocean);
  font-weight: bold;
}

.article-body ol li {
  margin-bottom: 0.75rem;
  color: var(--iceland-text);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--iceland-light-blue) 0%, rgba(240, 244, 248, 0.8) 100%);
  border-radius: 12px;
  border: 1px solid var(--iceland-ocean);
}

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

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, var(--iceland-ocean) 0%, var(--iceland-blue-dark) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(15, 52, 96, 0.2);
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 52, 96, 0.3);
  background: linear-gradient(135deg, var(--iceland-aurora-green) 0%, var(--iceland-ocean) 100%);
}

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

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--iceland-light-blue);
}

.related-posts h2 {
  color: var(--iceland-text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}

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

.sidebar-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, var(--iceland-bg-soft) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--iceland-light-blue);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.05);
}

.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(--iceland-text);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.sidebar-list a:hover {
  color: var(--iceland-ocean);
  padding-left: 5px;
}

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

.pagination-link:hover {
  background: linear-gradient(135deg, var(--iceland-light-blue) 0%, rgba(240, 244, 248, 0.8) 100%);
  border-color: var(--iceland-ocean);
  color: var(--iceland-blue-dark);
}

.pagination-active {
  background: linear-gradient(135deg, var(--iceland-ocean) 0%, var(--iceland-blue-dark) 100%);
  color: #fff;
  border-color: var(--iceland-ocean);
  box-shadow: 0 2px 5px rgba(15, 52, 96, 0.2);
}

.pagination-active:hover {
  background: linear-gradient(135deg, var(--iceland-blue-dark) 0%, var(--iceland-ocean) 100%);
}

/* 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(--iceland-light-blue);
  border-radius: 12px;
  text-align: center;
  background: var(--iceland-bg);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.05);
}

.author-card:hover {
  box-shadow: 0 4px 15px rgba(15, 52, 96, 0.12);
  border-color: var(--iceland-ocean);
  transform: translateY(-3px);
}

.author-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--iceland-light-blue);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.1);
  transition: all 0.3s ease;
}

.author-card:hover .author-image {
  border-color: var(--iceland-ocean);
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.2);
  transform: scale(1.05);
}

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

.author-content h2 a {
  text-decoration: none;
  color: var(--iceland-text-dark);
  transition: color 0.3s ease;
}

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

.author-posts-count {
  color: var(--iceland-text-light);
  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(--iceland-light-blue);
}

.author-header-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--iceland-light-blue);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.1);
}

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

.author-bio {
  font-size: 1.125rem;
  color: var(--iceland-text-light);
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--iceland-ocean) 0%, var(--iceland-blue-dark) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.2);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: linear-gradient(135deg, var(--iceland-blue-dark) 0%, var(--iceland-ocean) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
}

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

.category-description,
.tag-description {
  font-size: 1.125rem;
  color: var(--iceland-text-light);
  margin-bottom: 2rem;
}

/* Islandzkie boxy - stylizowane informacje */
.box-pamietaj,
.box-uwaga,
.box-wazne {
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
  border-left: 4px solid;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 244, 248, 0.9) 100%);
  line-height: 1.7;
}

.box-pamietaj {
  border-left-color: var(--iceland-ocean);
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.1) 0%, rgba(240, 244, 248, 0.9) 100%);
}

.box-pamietaj::before {
  content: "💡";
  font-size: 1.5rem;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.box-uwaga {
  border-left-color: var(--iceland-aurora-green);
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(240, 244, 248, 0.9) 100%);
}

.box-uwaga::before {
  content: "⚠️";
  font-size: 1.5rem;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.box-wazne {
  border-left-color: var(--iceland-aurora-purple);
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.1) 0%, rgba(240, 244, 248, 0.9) 100%);
}

.box-wazne::before {
  content: "⭐";
  font-size: 1.5rem;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.box-pamietaj p,
.box-uwaga p,
.box-wazne p {
  margin: 0;
  color: var(--iceland-text);
  font-size: 1.05rem;
}

.box-pamietaj strong,
.box-uwaga strong,
.box-wazne strong {
  color: var(--iceland-text-dark);
  font-weight: 700;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--iceland-bg-soft) 0%, rgba(240, 244, 248, 0.9) 100%);
  border-top: 2px solid var(--iceland-light-blue);
  padding: 2.5rem 0;
  margin-top: 4rem;
  color: var(--iceland-text-light);
  box-shadow: 0 -2px 10px rgba(15, 52, 96, 0.05);
}

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

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

.footer-link {
  color: var(--iceland-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--iceland-ocean) 0%, var(--iceland-aurora-green) 100%);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--iceland-blue-dark);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-copyright {
  margin: 0;
  font-size: 0.875rem;
  color: var(--iceland-text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .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;
  }
}

