/* --------------------------------------------------
   GLOBAL WRAPPER / LAYOUT
-------------------------------------------------- */
.homepage-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
}

.homepage-wrapper::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eee;
  transform: translateX(-50%);
  pointer-events: none;
}

body.home {
  background: #fafafa;
  color: #000;
}

/* --------------------------------------------------
   HERO SECTION
-------------------------------------------------- */
.homepage-hero,
.home-hero {
  text-align: center;
  padding: 4rem 2rem 3rem 2rem;
  background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 3rem;
}

.homepage-title,
.home-hero h1 {
  font-size: 3rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.homepage-subtitle,
.home-hero p {
  font-size: 1.3rem;
  color: #555;
  margin-top: 0;
}

/* --------------------------------------------------
   INTRO TEXT
-------------------------------------------------- */
.homepage-intro {
  font-size: 1.25rem;
  line-height: 1.75;
  max-width: 900px;
  margin: 0 auto 3.5rem auto;
  color: #444;
}

/* --------------------------------------------------
   GLOBAL NAVIGATION BAR
-------------------------------------------------- */
.site-nav {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  color: #000;
}

.site-nav a:hover {
  opacity: 0.7;
}

/* --------------------------------------------------
   HOMEPAGE NAVIGATION CARDS
-------------------------------------------------- */
.homepage-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.nav-card {
  display: block;
  padding: 2rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border-color: #ccc;
}

/* --------------------------------------------------
   LATEST ADDITIONS
-------------------------------------------------- */
.latest-additions {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.latest-additions h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.latest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  transition: transform 0.2s ease, background 0.2s ease;
}

.latest-item:hover {
  transform: translateY(-4px);
  background: #eaeaea;
}

.latest-cover {
  width: auto;
  max-width: 100%;
  height: 260px;
  object-fit: contain;
  margin: 0 auto;
}

.latest-date {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 6px;
}

/* --------------------------------------------------
   KEYWORD GALLERY
-------------------------------------------------- */
.keyword-group {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.3rem;
}

.keyword-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.keyword-card {
  text-align: center;
  border-radius: 6px;
  padding: 0.5rem;
  background: #f5f5f5;
  transition: transform 0.15s ease;
  border: 1px solid #ddd;
}

.keyword-card:hover {
  transform: scale(1.03);
}

.keyword-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 4px;
  background: #ddd;
}

.keyword-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #666;
}

.keyword-name {
  margin-top: 0.5rem;
  font-weight: bold;
}

.keyword-count {
  font-size: 0.8rem;
  color: #777;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dark-toggle {
  margin-left: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* Make header always black */
.header,
.site-header {
  background: #000 !important;
  border-bottom: 1px solid #222 !important;
}

/* Make header links always white */
.header a,
.site-header a,
.top-nav a,
.main-menu a {
  color: #fff !important;
}

/* Make the dark-mode toggle icon always white */
.dark-toggle svg,
.dark-toggle {
  color: #fff !important;
  fill: #fff !important;
}

/* Ensure mobile hamburger menu stays visible */
.hamburger,
.hamburger svg {
  color: #fff !important;
  fill: #fff !important;
}

.main-menu a svg {
  margin-right: 0.4rem;
  vertical-align: middle;
}

.main-menu a span {
  vertical-align: middle;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.email-link:hover {
  opacity: 0.8;
}

.icon-mail {
  stroke: currentColor;
}

/* Make links always red, even in dark mode */
a,
body.dark a {
  color: #cc0000 !important;   /* or your exact red */
}

.main-menu a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.main-menu a svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.site-footer {
  background: #111;        /* dark gray/black */
  color: #fff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: #cc0000;          /* your red */
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.site-footer {
  padding: 0.25rem 0 !important;
  margin: 0 !important;
  background: #111 !important;
  border: none !important;
}

.site-footer p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2;
}

.footer-site-title,
.sub-footer,
.footer,
.site-footer-wrapper,
.site-footer-container {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
}

/* Remove the hero styling but keep the wrapper so formatting stays intact */
.home-hero,
.homepage-hero {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  aspect-ratio: 4 / 3; /* taller than 16:9 */
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Center the entire magazine layout block */
.magazine-layout {
  display: flex;
  justify-content: center;      /* centers horizontally */
  align-items: center;          /* centers vertically */
  gap: 3rem;
  margin: 2rem auto;
  max-width: 1100px;            /* keeps it nicely centered on wide screens */
}

/* Left column (cover) */
.magazine-cover-column {
  text-align: center;
}

/* Cover image with hover lift */
.magazine-cover {
  width: 280px;
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.magazine-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

/* Archive button */
.archive-button a {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
  background: #333;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
}

.archive-button a:hover {
  background: #000;
}

/* Right column (metadata) */
.magazine-meta-column {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 450px;
}

/* Center the title */
.magazine-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Wrapper that centers the whole block and adds a shadow */
.magazine-wrapper {
  max-width: 1100px;
  margin: 0 auto 2rem auto;   /* centers horizontally, reduces bottom space */
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Dark mode support */
.dark .magazine-wrapper {
  background: #1a1a1a;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* Two-column layout */
.magazine-layout {
  display: flex;
  justify-content: center;
  align-items: center;   /* vertical centering */
  gap: 3rem;
}

/* Cover column */
.magazine-cover-column {
  text-align: center;
}

/* Cover hover effect */
.magazine-cover {
  width: 280px;
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.magazine-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

/* Archive button */
.archive-button a {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
  background: #333;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
}

.archive-button a:hover {
  background: #000;
}

/* Metadata column */
.magazine-meta-column {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 450px;
}
