/* ========================================
   RadioAstro Blog – Główny arkusz stylów
   Motyw: Astronomiczny / Kosmiczny
   ======================================== */

:root {
  --bg-deep: #060914;
  --bg-card: #0d1528;
  --bg-card-hover: #111e3a;
  --accent: #f0a500;
  --accent2: #5b9bd5;
  --text: #d0dce8;
  --text-muted: #7a90a8;
  --border: rgba(91, 155, 213, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --font: 'Outfit', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
}

.post-body img:not(.gallery-img):not(.lightbox-img),
.info-page img {
  max-width: 100% !important;
  height: auto !important;
}

body {
  font-family: var(--font);
  background-color: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* ==============================
   HEADER
   ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  transition: opacity 0.2s;
}

.site-logo:hover {
  opacity: 0.85;
  color: #fff;
}

.logo-star {
  color: var(--accent);
  font-size: 1.6rem;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 10px var(--accent);
  }

  50% {
    opacity: 0.7;
    text-shadow: 0 0 20px var(--accent), 0 0 40px #ff8c00;
  }
}

.logo-blog {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--accent);
}

/* ==============================
   HERO
   ============================== */
.hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background: url('images/baner.png') center/cover no-repeat;
  /* Delikatny gradient dla płynnego przejścia na dole sekcji */
  box-shadow: inset 0 -40px 40px -20px var(--bg-deep);
}

.stars-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 60%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 30%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 80%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 55%, rgba(240, 165, 0, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 85%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 50% 50%, rgba(91, 155, 213, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 70%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 10%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 48px 24px;
}

.hero-badge {
  display: inline-block;
  background: rgba(240, 165, 0, 0.15);
  border: 1px solid rgba(240, 165, 0, 0.4);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 2px 30px rgba(91, 155, 213, 0.3);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 300;
}

.hero-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 50px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(240, 165, 0, 0.4);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240, 165, 0, 0.6);
  color: #000;
}

/* ==============================
   POSTS SECTION
   ============================== */
.posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ==============================
   POST CARD
   ============================== */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.post-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow), 0 0 0 1px rgba(91, 155, 213, 0.3);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0d2050, #061230);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(91, 155, 213, 0.3);
}

.card-body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent2);
  transition: color 0.2s;
}

.post-card:hover .card-read-more {
  color: var(--accent);
}

/* ==============================
   POST PAGE
   ============================== */
.post-page {
  max-width: 860px;
  margin: 48px auto;
  padding: 0 24px;
}

.post-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.post-header {
  padding: 40px 44px 32px;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-body {
  padding: 36px 44px;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 1.2em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

/* ==============================
   GALLERY
   ============================== */
.post-gallery {
  padding: 0 44px 44px;
}

.post-gallery h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background-color: #070a10;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.gallery-img,
.post-body .gallery-img,
.gallery-item .gallery-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block !important;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
  opacity: 0.95;
}

/* ==============================
   WSPARCIE DLA BLOKÓW WORDPRESS (GUTENBERG)
   ============================== */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.wp-block-gallery .wp-block-image {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
}

.wp-block-gallery img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.wp-block-media-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0;
}

.wp-block-media-text__media img {
  width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .wp-block-media-text.is-stacked-on-mobile {
    grid-template-columns: 1fr;
  }
}

.wp-block-image {
  margin: 24px 0;
}

.wp-block-image figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.wp-block-image.aligncenter {
  text-align: center;
}

.wp-block-image.alignleft {
  float: left;
  margin-right: 24px;
  max-width: 50%;
}

.wp-block-image.alignright {
  float: right;
  margin-left: 24px;
  max-width: 50%;
}

/* Clearfix */
.post-body::after,
.info-page::after {
  content: "";
  display: table;
  clear: both;
}

/* ==============================
   LIGHTBOX
   ============================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  padding: 16px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==============================
   FOOTER
   ============================== */
.site-footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--accent2);
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 20px 12px;
    gap: 12px;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {

  .post-header,
  .post-body,
  .post-gallery {
    padding-left: 20px;
    padding-right: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* ==============================
   LOGO IMAGE
   ============================== */
.site-logo-img {
  width: auto;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
  transition: filter 0.2s;
}

.site-logo:hover .site-logo-img {
  filter: drop-shadow(0 0 6px var(--accent));
}

.hero-logo {
  max-width: 480px;
  width: 90%;
  height: auto;
  border-radius: 50%;
  display: block;
  margin: 0 auto 32px auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
  animation: logo-glow 6s ease-in-out infinite;
}

@keyframes logo-glow {

  0%,
  100% {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 40px rgba(91, 155, 213, 0.15));
  }

  50% {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 60px rgba(91, 155, 213, 0.3));
  }
}