:root{
  --bg0:#070b12; --bg1:#0b1020;
  --panel:rgba(255,255,255,.06); --border:rgba(255,255,255,.12);
  --text:rgba(255,255,255,.92); --muted:rgba(255,255,255,.68);
  --accent1:#00b3ff; --accent2:#FF8C00; /* Orange accent for OZE4HOME */
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --radius: 18px;
  --font: 'Montserrat', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  --font-display: 'Montserrat', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
[hidden]{ display:none !important; }
*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ background: var(--bg0); }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background: none;
  position: relative;
  min-height: 100vh;
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 18% -10%, var(--accent1), transparent 60%),
    radial-gradient(900px 520px at 82% 0%, var(--accent2), transparent 55%),
    radial-gradient(700px 500px at 70% 110%, rgba(255,59,122,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }
.container{
  width:min(1200px, 92vw);
  margin:0 auto;
  padding:18px 0 60px;
  display: grid; /* Use CSS Grid for overall layout */
  grid-template-columns: 1fr;
  gap: 18px;
}


/* Hero banner */
.hero{ margin: 14px 0 18px; }
.hero-img{
  width:100%;
  height: clamp(170px, 22vw, 320px);
  object-fit: cover;
  display:block;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
}

@media (max-width: 720px){
  .hero{ margin: 10px 0 14px; }
  .hero-img{ height: 190px; }
}


/* Topbar */
.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(12px);
  background: rgba(8,10,16,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner{
  width:min(1200px, 92vw); margin:0 auto;
  display:grid; grid-template-columns: auto 1fr auto;
  align-items:center; gap:16px; padding:12px 0;
}
.brand{ display:flex; align-items:center; justify-self:start; }
.brand-logo{
  width:54px; height:54px; border-radius:24px; overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 4px rgba(0,179,255,.08);
  background: rgba(255,255,255,.02);
}
.top-center{ display:flex; align-items:center; justify-content:center; justify-self:center; pointer-events:none; }
.top-title{
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 1.8px;
  font-size: 42px;
  text-transform: uppercase;
  text-shadow: 0 0 18px var(--accent1), 0 0 22px var(--accent2);
}

/* Top title wordmark image (SVG/PNG) */
.top-title-img{
  display:block;
  height: clamp(34px, 4.2vw, 54px);
  width: auto;
  max-width: min(520px, 46vw);
  filter: drop-shadow(0 0 16px var(--accent1)) drop-shadow(0 0 14px var(--accent2));
}
.top-right{ display:flex; align-items:center; justify-content:flex-end; justify-self:end; gap:10px; }
.nav{
  display:flex; align-items:center; gap:10px;
  flex-wrap: nowrap;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background: rgba(255,255,255,.04);
}
.nav a{
  padding:8px 10px;
  white-space: nowrap;
  border-radius:999px;
  color: rgba(255,255,255,.82);
  font-weight:650;
}
.nav a.active{
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border: 1px solid var(--accent1);
}
.nav-toggle{
  display:none;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
}
.mobile-nav{ display:none; width:min(1200px, 92vw); margin:0 auto; padding:0 0 12px; }
.mobile-nav .nav{ display:flex; justify-content:center; flex-wrap:wrap; }
.mobile-nav.open{ display:block; }

.grid{
  display:grid;
  gap:18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid for cards */
}
.card{
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow);
  overflow:hidden;
  transition: transform 0.2s ease-in-out; /* Add animation */
}
.card:hover{
  transform: translateY(-5px); /* Lift card on hover */
}
.card-header{
  padding:16px 18px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.card-title{ font-size:16px; font-weight:800; }
.card-body{ padding:16px 18px; }
.muted{ color: var(--muted); }

.preline{ white-space: pre-line; }

/* News */
.news-list{ display:flex; flex-direction:column; gap:12px; }
.news-item{
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius:14px;
}
.news-date{ font-size:12px; color: rgba(255,255,255,.62); margin-bottom:6px; }
.news-text{ font-size:14px; line-height:1.35; color: rgba(255,255,255,.88); white-space: pre-line; }

/* News – opcjonalne powiększenie wybranych wpisów (content.json → news[].style) */
.news-item.size-1 .news-text{ font-size:15px; line-height:1.40; }
.news-item.size-2 .news-text{ font-size:16px; line-height:1.45; }
.news-item.size-3 .news-text{ font-size:18px; line-height:1.50; font-weight:600; }

.news-body{ display:flex; flex-direction:column; gap:10px; }

.news-body.has-media{ display:grid; gap:14px; align-items:center; }
.news-body.has-thumb.has-qr{ grid-template-columns: 150px 1fr 120px; }
.news-body.has-thumb:not(.has-qr){ grid-template-columns: 150px 1fr; }
.news-body.has-qr:not(.has-thumb){ grid-template-columns: 1fr 120px; }

.news-thumb-wrap, .news-qr-wrap{ display:flex; }
.news-link{ display:block; border-radius:12px; overflow:hidden; }
.news-thumb{
  width:100%; height:auto;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
}
.news-qr{
  width:100%; height:auto;
  max-width:120px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:#fff;
  padding:6px;
}
.news-link:hover{ transform: translateY(-1px); filter: brightness(1.05); }

@media (max-width: 720px){
  .news-body.has-thumb.has-qr{ grid-template-columns: 1fr 1fr; align-items:start; }
  .news-thumb-wrap{ grid-column: 1; }
  .news-qr-wrap{ grid-column: 2; }
  .news-text{ grid-column: 1 / -1; }
  .news-qr, .news-thumb{ max-height: 180px; object-fit: contain; }
}

@media (max-width: 420px){
  .news-body.has-media{ grid-template-columns: 1fr; }
  .news-qr-wrap{ display:none; }
}


/* Videos */
.videos-grid{ display:grid; grid-template-columns: 1fr; gap:16px; } /* Changed to single column */
.video-col-title{ font-weight:900; margin:0 0 10px; }
.video-list{ display:grid; gap:12px; }
.video-card{
  display:flex; /* Changed to flex for vertical layout */
  flex-direction:column; /* Stack thumbnail and meta vertically */
  gap:10px; /* Adjusted gap */
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius:16px;
}
.thumb{
  width:100%; /* Full width thumbnail */
  height:auto; /* Auto height */
  max-height: 180px; /* Max height for consistency */
  border-radius:12px; overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  display:flex; align-items:center; justify-content:center;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.video-meta{
  display:flex;
  flex-direction:column;
  gap:6px; /* Adjusted gap */
  min-width:0;
}
.video-title{
  font-weight:850;
  font-size:16px; /* Slightly larger title */
  line-height:1.4; /* Increased line height for readability */
  white-space:normal; /* Allow title to wrap */
  overflow:visible;
  text-overflow:clip;
}
.video-note{
  font-size:14px; /* Slightly larger note */
  color: var(--muted); /* Use muted variable for consistency */
  border:none; /* Remove border */
  background: none; /* Remove background */
  border-radius:0;
  padding:0;
  line-height:1.5; /* Increased line height for readability */
}

/* Webflasher */
.device-list{ display:grid; gap:14px; }
.device-card{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  display:flex; align-items:center; justify-content:space-between; gap:14px;
}
.device-left{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.device-name{ font-weight:900; }
.device-desc{ color: rgba(255,255,255,.72); font-size:13px; line-height:1.25; }
.device-right{ display:flex; align-items:center; gap:10px; }
.badge{
  font-size:12px; padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.80);
  white-space:nowrap;
}
.btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.90);
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
}
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

.footer{ margin-top:26px; color: rgba(255,255,255,.55); font-size:12px; text-align:center; }

@media (max-width: 980px){
  .top-title{ font-size: 28px; }
  .nav{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .videos-grid{ grid-template-columns: 1fr; }
  .video-card{ grid-template-columns: 1fr; }
  .thumb{ width:100%; height: 180px; }
}


/* Accessibility */
:focus{ outline:none; }
:focus-visible{ outline: 2px solid var(--accent1); outline-offset: 2px; border-radius: 10px; }
.nav a:hover{ text-decoration:none; background: rgba(255,255,255,.06); }


/* Webflasher v2 */
.wf-layout{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:16px;
  align-items:start;
}
.wf-col{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.field{ display:flex; flex-direction:column; gap:8px; }
.field-label{ font-weight:850; font-size:13px; color: rgba(255,255,255,.88); }
.select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  font-weight:650;
}
.select:focus-visible{ outline: 2px solid var(--accent1); outline-offset: 2px; }
.wf-details{ margin-top:14px; display:flex; flex-direction:column; gap:10px; }
.wf-details-title{ font-weight:950; font-size:15px; }
.wf-details-meta{ display:flex; flex-wrap:wrap; gap:8px; }
.wf-details-desc{ color: rgba(255,255,255,.74); font-size:13px; line-height:1.35; white-space:pre-line; }
.wf-features{
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,.74);
  font-size: 13px;
  line-height: 1.45;
}
.wf-install-title{ font-weight:950; font-size:15px; }
.wf-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* Partners */
.partner-list{ display:grid; gap:14px; }
.partner-card{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.partner-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.partner-name{ font-weight:950; font-size:15px; }
.partner-desc{ color: rgba(255,255,255,.74); font-size:13px; line-height:1.35; }
.partner-promo{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.partner-promo-label{ font-weight:850; margin-bottom:6px; }
.partner-code{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,179,255,.28);
  background: rgba(0,179,255,.12);
  margin-right:8px;
  font-weight:900;
}
.partner-links{ display:grid; gap:12px; }
.partner-link-item{ display:flex; flex-direction:column; gap:6px; }
.partner-link-item a.btn{ align-self:flex-start; }
.btn-link{ text-decoration:none; display:inline-flex; align-items:center; }
.btn-link:hover{ text-decoration:none; background: rgba(255,255,255,.08); }

.partner-video-block{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  display:grid;
  gap:10px;
}

.partner-video-card{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap:12px;
  align-items:center;
  text-decoration:none;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.partner-video-card:hover{ background: rgba(255,255,255,.06); }

.partner-video-thumb{
  width:160px;
  height:90px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  object-fit:cover;
  display:block;
}

.partner-video-meta{ min-width:0; display:flex; flex-direction:column; gap:6px; }
.partner-video-title{ font-weight:950; font-size:14px; line-height:1.25; }

.partner-video-links{ display:grid; gap:10px; }

@media (max-width: 720px){
  .partner-video-card{ grid-template-columns: 1fr; }
  .partner-video-thumb{ width:100%; height:auto; max-height:220px; object-fit:cover; }
}

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


/* =========================
   Projekty (projekty.html)
   Edycja: content.json → projects[]
   Pliki: assets/projects/*
   ========================= */
.projects-list{ display:flex; flex-direction:column; gap:12px; }

.project-item{
  padding:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius:14px;
}

.project-head{ display:flex; gap:12px; align-items:flex-start; }
.project-thumb{
  width:150px; height:100px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  object-fit:cover;
  flex:0 0 auto;
}

.project-main{ flex:1 1 auto; min-width:0; }
.project-title{ font-size:16px; font-weight:700; margin:0 0 4px 0; }

/* Project support (Buy me a coffee) */
.project-support{
  margin: 8px 0 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}
.support-link{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color: inherit;
}
.support-thumb{
  width: 150px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
}
.support-text{ min-width:0; }
.support-title{
  font-weight: 800;
  font-size: 18px;
  color: rgba(220,245,255,.92);
  margin-bottom: 3px;
}
.support-body{
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(255,255,255,.86);
}
.support-badge{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent1);
  background: var(--accent1);
  font-weight: 700;
  font-size: 12px;
}
@media (max-width: 720px){
  .support-link{ flex-direction: column; align-items: flex-start; }
  .support-thumb{ width: 180px; }
}
.project-meta{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:8px; }
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  font-size:12px;
  color: rgba(255,255,255,.78);
}
.badge.accent{ border-color: var(--accent1); color: var(--text); }

.project-text{ white-space: pre-line; color: rgba(255,255,255,.88); font-size:14px; line-height:1.4; }
.project-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }

.btn-link{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-size:13px;
}
.btn-link:hover{ filter: brightness(1.05); transform: translateY(-1px); }

.gallery{ display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.gallery img{
  width:160px; height:110px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  object-fit:cover; /* ensure consistency */
}

@media (max-width: 720px){
  .project-head{ flex-direction:column; }
  .project-thumb{ width:100%; height:auto; max-height:220px; }
  .gallery img{ width:100%; height:auto; max-height:260px; object-fit:contain; }
}



/* Project buy links (example) */
.project-buy{
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius:14px;
}
.project-buy-title{
  font-size:14px;
  color: rgba(255,255,255,.92);
  margin-bottom:10px;
}
.project-buy-list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
.project-buy-item{
  display:block;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  text-decoration:none;
  transition: transform .12s ease, filter .12s ease;
}
.project-buy-item:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.project-buy-label{
  font-size:13px;
  color: rgba(255,255,255,.95);
  margin-bottom:4px;
}
.project-buy-desc{
  font-size:12px;
  color: rgba(255,255,255,.70);
  line-height:1.3;
}

@media (max-width: 720px){
  .project-buy-list{ grid-template-columns: 1fr; }
}


/* Visit counter */
.visit-label{ color: rgba(255,255,255,.55); }
.visit-count{ font-weight:700; color: rgba(255,255,255,.85); }
