/* Posts pages — supplements ../styles.css */

/* ── Navbar ── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--primary-color);
}

/* ── Section title (override broken selector in styles.css) ── */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Posts index page ── */
.posts-main {
  padding-top: 100px;
  min-height: 100vh;
}

.posts-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.posts-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ── Video grid ── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding-bottom: 4rem;
}

/* ── Video card ── */
.video-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0f;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.video-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.video-card:hover .video-card-overlay {
  opacity: 1;
}

.video-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.video-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-date {
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Empty & loading states ── */
.empty-state,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 6rem 0;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* ── Individual post page ── */
.post-main {
  padding-top: 100px;
  min-height: 100vh;
  padding-bottom: 4rem;
}

.post-article {
  max-width: 900px;
  margin: 0 auto;
}

.post-header {
  padding: 3rem 0 2rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-back {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.post-back:hover {
  opacity: 0.7;
}

.post-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.post-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: pre-line;
  max-width: 75ch;
}

/* ── 16:9 responsive iframe wrapper ── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 2rem 0;
  background: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* ── Post action buttons ── */
.post-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-card);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.site-footer p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .post-actions {
    flex-direction: column;
  }

  .post-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
