/*
 Theme Name:  Newspaper X RTVFC (Custom)
 Theme URI:   https://ratethisveganfoodclub.com
 Author:      RTVFC
 Description: Forked from Newspaper X with custom templates/styles.
 Version:     1.0.0
 Text Domain: newspaper-x-rtvfc
*/

/* ============ GLOBAL ============ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background-color: #fff;
  color: #333;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  color: #ff6600;
}

/* ============ SIDEBAR ============ */
.recent-posts-sidebar {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
}

.recent-posts-sidebar h2 {
  font-size: 18px;
  margin-bottom: 100px;
  color: #333;
}

.recent-posts-sidebar ul {
  list-style: none;
  padding-left: 0;
}

.recent-posts-sidebar ul li {
  margin-bottom: 12px;
}

.recent-posts-sidebar a {
  color: #222;
  font-weight: bold;
}

.recent-posts-sidebar a:hover {
  color: #ff6600;
}

/* ============ FOOTER ============ */
.site-footer {
  background-color: #000;
  color: #fff;
  padding: 20px;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: #ff6600;
}

/* ============ BACK TO TOP ============ */
.back-to-top-area {
  background-color: #000;
  padding: 10px 0;
}

#back-to-top {
  font-weight: bold;
}

#back-to-top:hover {
  color: #ff6600;
}

/* ============ VIDEO CAROUSEL ============ */
#latest-videos-carousel {
  padding: 50px 20px;
  background: #fefefe;
  text-align: center;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #000;
}

.section-header p {
  color: #666;
  margin-bottom: 30px;
}

.swiper {
  width: 95%;
  margin: 0 auto;
}

.swiper-slide {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease-in-out;
}

.swiper-slide:hover {
  transform: scale(1.02);
}

.swiper-button-next,
.swiper-button-prev {
  color: #000;
}

.swiper-pagination-bullet-active {
  background: #333;
}

/* ============ VIDEO PREVIEW CARD ============ */
.video-preview-card {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.video-preview-card:hover {
  transform: scale(1.02);
}

.video-preview-card img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
}

/* 🔘 PLAY BUTTON OVERLAY */
.video-preview-card .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

.video-preview-card .play-button::after {
  content: '';
  border-left: 22px solid #000;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* ============ VIDEO TITLE ============ */
.video-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  padding: 20px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 80%;
}

.lightbox-video-container iframe {
  width: 100%;
  height: 400px;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

/* ============ RESPONSIVE STYLES ============ */
@media (max-width: 768px) {
  .video-title {
    font-size: 14px;
  }

  .video-preview-card .play-button {
    width: 60px;
    height: 60px;
  }

  .video-preview-card .play-button::after {
    border-left: 16px solid #000;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
  }
}

@media (max-width: 480px) {
  .video-title {
    font-size: 12px;
  }

  .video-preview-card .play-button {
    width: 50px;
    height: 50px;
  }

  .video-preview-card .play-button::after {
    border-left: 12px solid #000;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
  }
}

/* ============ ARCHIVE WRAPPER ============ */
.category-archive-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  text-align: center;
}

.archive-header {
  margin-bottom: 25px;
}

.archive-title {
  font-size: 22px;
  font-weight: bold;
}

.archive-description {
  font-size: 14px;
  color: #555;
}

/* ✅ 2-Column Grid */
.archive-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 30px !important;
  justify-items: center !important;
}

.archive-card {
  width: 100%;
  max-width: 280px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.archive-card:hover {
  transform: scale(1.02);
}

.archive-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.archive-content {
  padding: 15px;
  text-align: center;
}

.archive-content h3 {
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: bold;
}

.archive-content h3 a {
  color: #333;
  text-decoration: none;
}

.archive-content h3 a:hover {
  text-decoration: underline;
}

.archive-meta {
  font-size: 11px;
  color: #666;
}

@media (max-width: 480px) {
  .archive-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
}

/* === Global gradient === */
:root {
  --grad-start: #d19ef1;
  --grad-end: #00BFC4;
}

/* Put the gradient on a fixed layer behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--grad-start) 0%, var(--grad-end) 100%);
  background-attachment: fixed;
}

/* Nuke theme backgrounds so they don't cover it */
html,
body,
#td-outer-wrap,
.td-main-page-wrap,
.td-main-content-wrap,
.td-container,
.td-pb-row,
.td-footer-wrapper,
.td-sub-footer-container {
  background: transparent !important;
}

/* Centre raw Instagram embeds */
.entry-content blockquote.instagram-media {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 326px !important;
  min-width: 326px !important;
  width: 326px !important;
}

/* Centre Instagram once it has rendered */
.entry-content .instagram-media-rendered {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 326px !important;
  min-width: 326px !important;
  width: 326px !important;
}

/* Mobile: remove content padding pressure around Instagram */
@media (max-width: 400px) {
  .entry-content blockquote.instagram-media,
  .entry-content .instagram-media-rendered {
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Instagram embed - desktop/tablet/mobile sizing */
.entry-content blockquote.instagram-media,
.entry-content .instagram-media-rendered,
.entry-content iframe[src*="instagram.com"] {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Tablet */
@media (max-width: 1024px) {
  .entry-content blockquote.instagram-media,
  .entry-content .instagram-media-rendered,
  .entry-content iframe[src*="instagram.com"] {
    max-width: 500px !important;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .entry-content blockquote.instagram-media,
  .entry-content .instagram-media-rendered,
  .entry-content iframe[src*="instagram.com"] {
    max-width: calc(100vw - 12px) !important;
    width: calc(100vw - 12px) !important;
    min-width: 0 !important;
  }
}