/*
Theme Name: TV-Guide
Author: BirdWeasel
Description: Yep
Version: 1.0
Text Domain: birdweasel-tv-guide
*/

/* ========================================
   CSS Variables
   ======================================== */
:root {
  --sidebar-width: 360px;
  --sidebar-width-mobile: 100%;

  --space: 32px;
  --space-mobile: 20px;

  --gap: 30px;
  --gap-mobile: 20px;

  --color-bg: #f1f1f1;
  --color-text: #444;
  /*--color-dark: #202126;*/
  --color-dark: #111113;
  --color-light: #fff;
  --color-muted: rgba(255, 255, 255, 0.7);

  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.25s ease;
  --shadow-sm: 0 3px 9px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 14px 30px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Base Styles
   ======================================== */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (max-width: 900px) {
  html { font-size: 95%; }
}

@media (max-width: 600px) {
  html { font-size: 90%; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.mont {
  font-family: "Montserrat", sans-serif;
}

/* ========================================
   Layout: Sidebar
   ======================================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 50px;
  box-sizing: border-box;
  background: var(--color-dark);
  color: var(--color-light);
  text-align: center;
  z-index: 100;
  overflow-y: auto;
  height: 100vh;
}

.sidebar .avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .avatar img,
.sidebar .avatar svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar h1 {
  margin: 10px 0;
  font: 600 1.4rem/1.2 "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.sidebar p {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 25px;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 25px 0;
}

.sidebar nav li {
  margin: 12px 0;
}

.sidebar nav a {
  color: var(--color-light);
  font-family: "Montserrat", sans-serif;
  opacity: 0.8;
  transition: var(--transition);
}

.sidebar nav a:hover,
.social-icons a:hover {
  opacity: 1;
}

.social-icons {
  margin-top: 30px;
}

.social-icons a {
  margin: 0 8px;
  font-size: 18px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

/* Mobile Sidebar */
@media (max-width: 1200px) {
  .sidebar {
    position: relative;
    width: var(--sidebar-width-mobile);
    padding: 40px 20px;
    height: auto;
    inset: unset;
  }
}

/* ========================================
   Main Content
   ======================================== */
.main {
  margin-left: var(--sidebar-width);
  max-width: calc(100% - var(--sidebar-width));
  padding: var(--space);
  min-height: 100vh;
}

@media (max-width: 1200px) {
  .main {
    margin-left: 0;
    max-width: 100%;
    padding: var(--space-mobile);
  }
}

/* ========================================
   Grid System
   ======================================== */
.grid {
  width: 100%;
  padding: 2rem 0;
}

/* Standard Grid (Flexbox) */
.grid--standard {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  margin: -10px 0; /* Compensate for card padding if needed */
}

.grid--standard article {
  flex: 1 1 calc(33.333% - var(--gap));
  min-width: 280px;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.grid--standard article:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.grid--standard article img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  z-index: 1;
}

.grid--standard article:hover img {
  transform: scale(1.06);
}

/* Text Overlay */
.grid--standard .post-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #fff;
  z-index: 2;
  pointer-events: none;
}

.grid--standard .post-title {
  font: 600 1.1rem/1.3 "Montserrat", sans-serif;
  margin: 0 0 4px;
  pointer-events: auto;
}

.grid--standard .post-meta {
  font-size: 0.75rem;
  opacity: 0.9;
  margin: 0;
  pointer-events: auto;
}

.grid--standard article a {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ========================================
   Masonry Grid — Now matches Standard Grid overlay style
   ======================================== */

.grid--masonry {
  column-gap: var(--gap);
  column-count: 3;
}

.grid--masonry article {
  display: inline-block;
  width: 100%;
  margin-bottom: var(--gap);
  break-inside: avoid;
  position: relative;                /* ← needed for overlay */
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: #fff;                  /* fallback if no image */
}

.grid--masonry article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Image — same behavior as standard grid */
.grid--masonry img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.grid--masonry article:hover img {
  transform: scale(1.04);
}

/* ——— NEW: Same gorgeous overlay as .grid--standard ——— */
.grid--masonry .post-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  z-index: 2;
  pointer-events: none;
  transition: background 0.3s ease;
}

.grid--masonry .post-title {
  font: 600 1.1rem/1.3 "Montserrat", sans-serif;
  margin: 0 0 4px;
  pointer-events: auto;
}

.grid--masonry .post-meta {
  font-size: 0.75rem;
  opacity: 0.9;
  margin: 0;
  pointer-events: auto;
}

/* Full-card clickable link */
.grid--masonry article a {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Optional: slightly darken overlay on hover for extra pop */
.grid--masonry article:hover .post-info {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* Grid Responsiveness */
@media (max-width: 1600px) {
  .grid--masonry { column-count: 2; }
}

@media (max-width: 1024px) {
  .grid--standard article {
    flex: 1 1 calc(50% - var(--gap));
  }
}

@media (max-width: 800px) {
  :root {
    --gap: var(--gap-mobile);
  }

  .grid--masonry { column-count: 1; }
  .grid--standard article { flex: 1 1 100%; }
}

/* ========================================
   Single Post
   ======================================== */
.single-content {
  max-width: 820px;
  margin: 40px auto;
  padding: 50px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  line-height: 1.8;
}

.single-content h1 {
  font: 600 2.2rem/1.2 "Montserrat", sans-serif;
  margin-bottom: 24px;
  color: #222;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
}

@media (max-width: 600px) {
  .single-content {
    margin: 20px auto;
    padding: 30px 20px;
  }
}

/* ========================================
   Utilities & Misc
   ======================================== */
.not-found {
  text-align: center;
  margin-top: 100px;
  font-size: 1.4rem;
  color: #666;
}

.back-button {
  display: inline-block;
  padding: 10px 18px;
  background: var(--color-dark);
  color: #fff;
  border-radius: 6px;
  font: 600 0.9rem "Montserrat", sans-serif;
  transition: var(--transition);
}

.back-button:hover {
  background: #34353d;
  transform: translateX(-4px);
}

.site-copyright {
    position: fixed;
    bottom: 12px;
    /*left: 16px;*/
    font-size: 0.8rem;
    opacity: 0.6;
    font-family: "Montserrat", sans-serif;
    z-index: 10;
    pointer-events: none; /* optional: prevents blocking clicks */
}

.site-copyright:hover {
    opacity: 1;
}

/* Mobile / Tablet fallback — when UI overlays get tight */
@media (max-width: 1200px) {
    .site-copyright {
        position: relative; /* becomes normal footer content */
        bottom: auto;
        left: auto;

        display: block;
        text-align: center;

        margin: 40px auto 0;
        padding: 16px 0;
        opacity: 0.6;
        pointer-events: auto; /* restore clickability */
    }
}




/* ========================================
   No Thumbnail Placeholder — Fixed for Masonry
   ======================================== */

/* 1. For STANDARD grid (square cards) – keep absolute */
.grid--standard .no-thumbnail {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #12141d 0%, #1a2332 50%, #2a4d5e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2. For MASONRY grid – make it inline/block so it creates real height */
.grid--masonry .no-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* fallback aspect ratio (4:3) – adjust if you prefer 1:1 or 2:3 */
  background: linear-gradient(135deg, #12141d 0%, #1a2332 50%, #2a4d5e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unified SVG icon + styling (works in both grid types) */
.no-thumbnail::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);   /* perfect center */
  width: 88px;
  height: 88px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23fff'%3E%3Cpath d='M16 44l12-20 10 14 10-18 8 24H8Z' opacity='0.6'/%3E%3Ccircle cx='32' cy='20' r='6' opacity='0.4'/%3E%3C/svg%3E") center / 80px no-repeat;
  opacity: 0.8;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  pointer-events: none;               /* so it doesn’t block the link */
}