:root {
  --bg: #1f242e;
  --card-bg: #2f3448;
  --text: #e3e9ff;
  --primary: #fca311;
  --muted: #8f9bb3;
  --nav-bg: #1b1f33;
  --radius: 10px;
  --shadow: 0 14px 40px -10px rgba(0,0,0,0.4);
  --transition: 0.3s cubic-bezier(.25,.8,.25,1);
  --max-width: 1120px;
}

/* reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  font-size: clamp(0.8rem, 1vw + 0.5rem, 1.1rem);


  flex-direction: column;
}

main {
  flex: 1; /* wypełnia całą przestrzeń */
}

/* Nawigacja */
nav {
  background: var(--nav-bg);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;     
  justify-content: space-between;
  gap: 1rem;
}
.brand a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: clamp(1.3rem, 1vw + 1rem, 1.8rem);
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.nav-list li a {
  position: relative;
  padding: 0.55rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  font-size: clamp(0.9rem, 0.8vw + 0.5rem, 1.05rem);
}
.nav-list li a:hover,
.nav-list li a.active {
  background: rgba(255,255,255,0.08);
  color: var(--primary);
}
.nav-home a.active {
  color: #ffe100;
}

/* hamburger (mobile) */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
}
.nav-label {
  display: none;
  cursor: pointer;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  z-index: 1100; /* zawsze nad menu */
}
.nav-label span,
.nav-label span::before,
.nav-label span::after {
  display: block;
  background: var(--text);
  height: 3px;
  width: 25px;
  border-radius: 2px;
  position: relative;
  transition: var(--transition);
}
.nav-label span::before,
.nav-label span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-label span::before { top: -8px; }
.nav-label span::after { top: 8px; }
.nav-toggle:checked + .nav-label span {
  background: transparent;
}
.nav-toggle:checked + .nav-label span::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle:checked + .nav-label span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Layout główny */
header {
  background-image:url("../img/blog6.jpg");  
  height: 350px;
  background-position: center;
  background-size: cover; 
  position: relative;
  margin-bottom: 1rem;
  border-radius: 0px;
  overflow: hidden;
}
.fade {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}
.content-wrapper {
  display: flex;
  gap: 2rem;
}

h2{

  padding: 1rem;
}
.posts {
  flex: 3;
}
.sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Widgety w sidebarze */
.widget {
  background: var(--card-bg);
  padding: 1rem 1rem 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.widget h3 {
  margin-bottom: 0.6rem;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.3rem);
  color: var(--primary);
}
.widget ul {
  list-style: none;
  padding: 0;
}
.widget li + li {
  margin-top: 0.5rem;
}
.widget a {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(0.8rem, 0.8vw + 0.4rem, 1rem);
}
.widget a:hover {
  text-decoration: underline;
}

/* Karty postów */
.post {
  margin-bottom: 2.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.post-inner {
  display: flex;
  flex-direction: column;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}
/*przyciemnianie zdjęc w artykułach*/
.image-wrapper::after {
  content: "";
  position: absolute; 
  inset: 0;
  background: rgba(0,0,0,0.2); /* 0.35 = przezroczystość */
}

.post-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.post-content {
  padding: 1rem 1rem 1.25rem;
}
.post h3 {
  font-size: clamp(1.2rem, 1.2vw + 0.7rem, 1.7rem);
  margin: 0 0 0.5rem;
}
.post h3 a {
  color: var(--primary);
  text-decoration: none;
}
.post h3 a:hover {
  text-decoration: underline;
}
.post .excerpt {
  color: #d7dce8;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: clamp(0.8rem, 1vw + 0.4rem, 1rem);
}

/* Czytaj więcej */
.post .read-more {
  display: inline-block;
  background-color: var(--primary);
  color: var(--nav-bg);
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: filter var(--transition);
  font-size: clamp(0.7rem, 0.8vw + 0.4rem, 1rem);
}
.post .read-more:hover {
  filter: brightness(1.1);
}

/* Stopka */
footer {
  background: var(--nav-bg); 
  text-align: center;
  padding: 0.5rem 0.5rem;
  color: var(--text);
  font-size: clamp(0.75rem, 2vw, 1rem);
  margin-top: 2rem;
}
footer a.polityka {
  color: var(--text);
  text-decoration: underline;
}
footer a.polityka:hover {
  color: var(--primary);
}

/* BANER COOKIES */
#cookie-banner {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  color: #333;
  padding: 20px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  font-family: 'Montserrat', system-ui, sans-serif;
  flex-wrap: wrap;
  gap: 10px;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

#cookie-banner a {
  color: #0066cc;
  text-decoration: underline;
}

#cookie-banner button {
  background-color: #0066cc;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}


/* RESPONSYWNOŚĆ */
@media (max-width: 980px) {
  .nav-label {
    display: flex;
  }

  /* menu rozwijane pod brandem */
  .nav-list {
    position: absolute;
    top: 100%;       /* od razu pod paskiem */
    left: 0;
    right: 0;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.1s ease;
    background: var(--nav-bg);
    z-index: 100;
  }
  .nav-toggle:checked + .nav-label + .nav-list {
    max-height: 600px;
    padding: 0.5rem 0.5rem;
  }

  .content-wrapper {
    flex-direction: column;
  }
  .sidebar {
    margin-top: 0.75rem;
    width: 100%;
  }
}

/* Header – mniejsze wysokości na mobile */
@media (max-width: 600px) {
  header {
    height: 220px;
  }
}

/* Siatka postów na większych ekranach */
@media (min-width: 768px) {
  .posts ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }
  .post {
    margin-bottom: 0;
  }
}


