/* Page Layout */
.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 40px 10px 40px; 
}

.first-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); /* 2:1 ratio for articles:extras */
  gap: 30px;
  margin-bottom: 10px;
  position: relative;
  overflow: visible;
  width: 100%;
  margin-top: 30px;
}

.current-issue {
    padding: 25px 30px 20px 30px;
    border: 3px solid var(--sony-cyan);
    position: relative;
    transition: all 0.3s;
    background: linear-gradient(45deg, #222222, #444444);
    z-index: 5;
    /* Set exact height to match side-image-container */
    height: 160px; /* Reduced from 200px */
    width: 100%;
    margin: 15px 0 0 auto;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 10px;
    box-sizing: border-box; /* Include padding and border in height calculation */
}

.current-issue a {
  flex: 0 0 auto; /* Don't grow or shrink */
}

.current-issue::before {
  content: "CURRENT ZINE ISSUE";
  position: absolute;
  top: -15px;
  left: 20px;
  background: var(--sony-magenta);
  color: var(--sony-black);
  padding: 5px 10px;
  font-family: 'Orbitron', sans-serif;
  z-index: 6;
}

.current-issue:hover {
  transform: perspective(500px) rotateX(1deg) scale(1.02);
  box-shadow: 0 0 20px var(--sony-cyan);
  border-color: var(--sony-yellow);
}

.current-issue .cover-art {
  width: 180px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0;
  border: 3px solid var(--sony-black);
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.current-issue-buffet {
  flex: 1;

  margin-right: auto;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center; 
  height: 100%; 
}

.buffet-line-1 {
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-cyan);
  font-size: 2.4rem;
  font-weight: bold;
  margin: 0 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.buffet-line-2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-yellow);
  font-size: 1.6rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.buffet-line-3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-magenta);
  font-size: .9rem;
  margin: 12px 0 0 0; 
  text-align: center;
  max-width: 100%; 
}

.buffet-line-3 span {
  color: var(--sony-cyan);
  font-weight: bold;
  text-transform: uppercase;
}

.current-issue .spec-list {
  flex: 0 0 auto; /* Don't grow or shrink */
  margin-left: auto; /* Push all the way to the right */
  padding-left: 30px; /* Add space between buffet text and specs */
  width: auto; /* Let content determine width */
  min-width: 200px; /* Ensure minimum width */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.current-issue .spec-list li {
  margin: 0;
  display: flex; /* Change from contents to flex */
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.current-issue .spec-list li span:first-child {
  color: var(--sony-cyan);
  font-weight: bold;
  font-size: 0.9rem;
  text-align: right;
  padding-right: 10px;
  border-right: 1px solid rgba(0, 255, 255, 0.3);
}

.current-issue .spec-list li span:last-child {
  color: var(--sony-yellow);
  font-size: 1rem;
  padding-left: 10px;
}

/* Special treatment for IN THIS ISSUE */
.current-issue .spec-list li:first-child {
  margin-bottom: 5px;
}

.current-issue .spec-list li:first-child span:first-child {
  font-size: 1.1rem;
  grid-column: 1;
}

.current-issue .spec-list li:first-child span:last-child {
  font-size: 1.1rem;
  font-weight: bold;
  grid-column: 2;
}

.side-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
    /* Set exact same height as current-issue */
    height: 160px; /* Reduced from 200px */
    width: auto; 
    max-width: 95%; 
    border: 3px solid var(--sony-cyan);
    background: linear-gradient(45deg, #222222, #444444);
    padding: 0px;
    transition: all 0.3s;
    align-self: center;
    justify-self: center; 
    overflow: visible;
    margin: 15px 0 0 0;
    box-sizing: border-box; /* Include padding and border in height calculation */
}

/* Ensure consistent vertical spacing for both elements */
.current-issue::before,
.side-image-container::before {
    top: -15px;
    left: 20px;
}

/* Add the RAD tag using ::before pseudo-element */
.side-image-container::before {
    content: "CASSETE";
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--sony-magenta);
    color: var(--sony-black);
    padding: 5px 10px;
    font-family: 'Orbitron', sans-serif;
    z-index: 6;
    font-size: 0.9rem; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Constrain the image size */
.side-image {
    max-width: 100%;
    max-height: 150px; /* Constrain height */
    object-fit: contain; /* Maintain aspect ratio */
}

/* Hover effect to match current issue */
.side-image-container:hover {
    transform: perspective(200px) rotateX(1deg) scale(1.02);
    box-shadow: 0 0 20px var(--sony-cyan);
    border-color: var(--sony-yellow);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .second-row {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
    
    .current-issue,
    .side-image-container {
        height: 180px; /* Slightly smaller height on medium screens */
    }
}

@media (max-width: 768px) {
    .second-row {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 20px;
    }
    
    .current-issue,
    .side-image-container {
        height: 200px; /* Set explicit height when stacked */
        width: 100%; /* Full width on mobile */
        margin: 15px auto 0 auto; /* Center both elements */
    }
}

@media (max-width: 768px) {
  .buffet-line-3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 580px) {
  .buffet-line-3 {
    margin-top: 8px;
    font-size: 0.8rem;
  }
}

@media (max-width: 580px) {
  .current-issue {
    flex-direction: column;
    width: 100%;
    padding: 20px 15px 15px 15px;
    gap: 20px;
  }
  
  .current-issue .cover-art {
    width: 180px;
    height: 120px;
    margin-bottom: 10px;
  }
  
  .current-issue .spec-list {
    width: 100%;
  }
}

.second-row {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
    position: relative;
    overflow: visible;
    /* Add these properties for better alignment */
    align-items: center;
    min-height: 200px;
}

/* Recent Articles */
.recent-articles {
  border: 3px solid var(--sony-yellow);
  padding: 25px 25px 20px 25px;
  position: relative;
  background: linear-gradient(45deg, #222222, #444444);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-articles::before {
  content: "RECENT THINGS";
  position: absolute;
  top: -15px;
  left: 20px;
  background: var(--sony-magenta);
  color: var(--sony-black);
  padding: 5px 10px;
  font-family: 'Orbitron', sans-serif;
}

/* Featured Article (First Article) */
.article-card:first-child {
  padding: 16px;
  border-width: 2px;
  background: linear-gradient(45deg, #333333, #555555);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.1);
  position: relative;
  gap: 18px;
}

.article-card:first-child::before {
  content: "NEW!";
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--sony-cyan);
  color: var(--sony-black);
  padding: 3px 8px;
  font-size: 0.8rem;
  font-family: 'Orbitron', sans-serif;
  z-index: 1;
}

.article-card:first-child .article-title {
  font-size: 1.6rem;
  margin-bottom: 0px;
}

.article-card:first-child .article-meta {
  font-size: 1em;
}

.article-card:first-child .article-summary {
  font-size: 0.4em; /* Reduced from 1.3em to 1.1em */
  line-height: 1.1; /* Slightly tightened line height for better fit */
  max-height: 2.2em; /* Adjusted for new line-height */
  margin-top: 0px;
}

.article-card:first-child .article-card-image-wrapper {
  width: 140px;
  height: 140px;
  border-width: 3px;
}

.article-card:first-child:hover {
  transform: translateX(10px);
  background: rgba(0, 255, 255, 0.15);
}

/* Regular Article Cards */
.article-card {
  padding: 12px;
  border: 1px solid var(--sony-cyan);
  transition: all 0.3s;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background: linear-gradient(45deg, #222222, #444444);
}

.article-card:not(:first-child) {
  padding: 10px;
  gap: 12px;
}

.article-card:hover {
  transform: translateX(10px);
  background: rgba(0, 255, 255, 0.1);
  border-color: var(--sony-yellow);
}

.article-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-bottom: 2px;
}

.article-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.article-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-bottom: 5px;
  gap: 8px;
}

.article-title {
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-yellow);
  text-decoration: none;
  font-size: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: inline; /* Keep title inline with the tag */
  vertical-align: middle;
  margin-right: auto; /* This ensures the title takes available space, pushing tag right */
}

.article-meta {
  font-style: italic;
  color: var(--sony-magenta, #ff00ff);
  font-size: 0.85em;
  line-height: 1.3;
  margin: 0;
  flex: 1;
}

.article-card .article-summary {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  max-height: 1.4em; /* 1 line × 1.4 line-height */
  overflow: hidden;
  order: 3;
  padding-bottom: 0;
}

.article-summary {
  margin-top: 2px; /* Minimal space after byline */
  margin-bottom: 8px;
  font-size: 0.9em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:first-child .article-summary {
  font-size: 1.3em;
  -webkit-line-clamp: 2;
  max-height: 2.8em; 
  height: auto; 
  margin-top: 0px; 
}

.article-card:first-child .article-info-row {
  margin-bottom: 0; /* Reduce default spacing */
}

.article-card:not(:first-child) .article-summary {
  -webkit-line-clamp: 1;
  max-height: 1.4em; /* 1 line × 1.4 line-height */
  height: 1.4em;
  font-size: 1.1em;
}

.article-card:first-child .article-card-image-wrapper {
  width: 110px;
  height: 110px;
  border-width: 3px;
}

.article-card:not(:first-child) .article-card-image-wrapper {
  width: 85px;
  height: 85px;
}

.article-card-image-wrapper {
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--sony-black);
  background: var(--sony-metal);
}

.article-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .article-card:first-child .article-card-image-wrapper {
    width: 95px;
    height: 95px;
  }
  
  .article-title {
    font-size: 1.3rem;
  }

  .article-card:first-child .article-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-card:first-child {
    padding: 12px;
    gap: 12px;
  }
  
  .article-card:first-child .article-card-image-wrapper {
    width: 85px;
    height: 85px;
  }
  
  .article-card:not(:first-child) .article-card-image-wrapper {
    width: 55px;
    height: 55px;
  }
  
  .article-title {
    font-size: 1.1rem;
  }

  .article-card:first-child .article-title {
    font-size: 1.2rem;
  }
  
  .article-card:not(:first-child) .article-title {
    font-size: 0.95rem;
  }
  
  .article-byline {
    font-size: 0.75em;
  }
}

.article-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--sony-cyan);
  color: var(--sony-black);
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Category-specific colors */
.article-tag[data-category="Movies and TV"] {
  background: var(--sony-green, #00ff7f);
}

.article-tag[data-category="Art"] {
  background: var(--sony-magenta);
}

.article-tag[data-category="Games"] {
  background: var(--sony-yellow);
  color: var(--sony-black);
}

.article-tag[data-category="Music"] {
  background: #4D4DFF;
  color: var(--sony-black);
}

.article-tag[data-category="The Internet"] {
  background: #56ffca;
  color: var(--sony-black);
}

.article-tag[data-category="Technology"] {
  background: ee0087;
  color: var(--sony-black);
}

.article-tag[data-category="Books and Comics"] {
  background: #ff004D;
  color: var(--sony-black);
}

/* Make sure title row accommodates tag */
.article-title-row {
  width: 100%;
  justify-content: space-between;
}

/* Ensure title doesn't push tag off screen */
.article-card .article-title {
  max-width: 80%;
}

.article-byline {
  font-style: normal; /* Remove italics from byline */
  color: magenta;
  font-size: 0.95em;
  line-height: 1.3;
  margin: 0;
  text-align: right;
  flex-shrink: 0;
  max-width: 50%; /* Limit width of byline if it's very long */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-byline-row {
  margin-top: 5px;
  margin-bottom: 0;
}


/* Responsive adjustments */
@media (max-width: 480px) {
  .article-tag {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
}

.section-separator {
  display: flex;
  align-items: center;
  position: relative;
  margin: .5rem 0;
}

.separator-label {
  background: var(--sony-magenta);
  color: black;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  left: 20px;
}

.section-separator::after {
  content: "";
  flex-grow: 1;
  height: 2px;
  background-color: cyan;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 1; 
}

/* Zine Issues Grid */
.zine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 15px;
  position: relative;
  z-index: 5; 
}

.zine-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.zine-issue {
  position: relative;
  background: radial-gradient(circle, rgba(25, 25, 25, 0.9) 30%, rgba(15, 15, 15, 0.95) 100%);
  border: 1px solid var(--sony-magenta);
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 5;
  overflow: hidden;
  transform-style: preserve-3d; /* Important for child elements in 3D space */
  will-change: transform; /* Helps with performance */
  -webkit-backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
}

/* Grid container - move this to an actual child element */
.zine-issue .grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: translateZ(0.001px); /* Tiny offset to prevent z-fighting */
  backface-visibility: hidden;
}

/* Horizontal cyan lines */
.zine-issue .grid-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 19px,
    rgba(0, 255, 255, 0.1) 19px,
    rgba(0, 255, 255, 0.1) 20px
  );
  z-index: 1;
}

/* Vertical cyan lines */
.zine-issue .grid-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent 19px,
    rgba(0, 255, 255, 0.1) 19px,
    rgba(0, 255, 255, 0.1) 20px
  );
  z-index: 1;
}

/* Radial darkness overlay */
.zine-issue .radial-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    transparent 20%,
    rgba(0, 0, 0, 0.3) 60%, 
    rgba(0, 0, 0, 0.7) 100%
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  transform: translateZ(0.002px); /* Slightly in front of grid */
  backface-visibility: hidden;
}

.zine-issue:hover {
  transform: perspective(500px) rotateX(5deg);
  box-shadow: 0 0 20px var(--sony-cyan);
}


/* Make content sit above the overlays */
.zine-issue > *:not(.grid-overlay):not(.radial-overlay) {
  position: relative;
  z-index: 2;
}

.issue-number {
  background: linear-gradient(45deg, #222222, #444444);
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-yellow);
  margin: -20px -20px 15px -20px;
  padding: 15px 20px 10px 20px;
  border-bottom: 1px solid var(--sony-magenta);
  position: relative;
  z-index: 1; 
}

.spec-list {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
}

.spec-list li {
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
}

.spec-list li span:first-child {
  color: var(--sony-cyan);
}

.spec-list li span:last-child {
  color: var(--sony-yellow);
}

.spec-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.centered-image {
  max-width: 100%;
  height: auto;
}

.cover-art {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 5px solid var(--sony-black);
  margin: 15px 0;
  background: var(--sony-metal);
}

.extra-things {
  text-align: left;
  padding: 20px;
  border: 3px solid var(--sony-yellow); /* Changed from cyan to yellow */
  position: relative;
  background: linear-gradient(45deg, #222222, #444444);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 5px; /* Space between cards */
}

.extra-things::before {
  content: "EXTRA THINGS";
  position: absolute;
  top: -15px;
  left: 20px;
  background: var(--sony-magenta);
  color: var(--sony-black);
  padding: 5px 10px;
  font-family: 'Orbitron', sans-serif;
  z-index: 10;
  gap: 5px;
}

.extra-things:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--sony-yellow); /* Keep the border yellow even on hover */
}

.extra-things .issue-number {
  margin-top: 10px;
  margin-bottom: 25px;
  text-align: center; /* Keep the title centered */
}

.extra-things > a.extra-card:first-of-type,
.extra-things > div.extra-card:first-of-type {
  margin-top: 5px; /* Add space above only the first card */
}

/* Card styling */
.extra-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--sony-cyan);
  background: linear-gradient(45deg, #1a1a1a, #333333);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.extra-card:hover {
  transform: translateX(8px);
  background: rgba(0, 255, 255, 0.1);
  border-color: var(--sony-yellow);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.extra-card-image-wrapper {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--sony-black);
  background: var(--sony-metal);
}

.extra-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extra-card-content {
  flex: 1;
  min-width: 0;
}

.extra-card-title {
  font-family: 'Orbitron', sans-serif;
  color: var(--sony-yellow);
  font-size: 1.2rem;
  margin: 0 0 1px 0;
  line-height: 1.2;
}

.extra-card-description {
  font-size:1rem;
  line-height: 1.2;
  margin: 0;
  color: cyan;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.8em; /* 2 lines × 1.4 line-height */
}

.article-card {
  /* Add bottom margin to create space between cards */
  margin-bottom: 15px;
  
  /* Remove bottom margin from the last card to avoid extra space at bottom */
  &:last-child {
        margin-bottom: 0;
      }
  
  /* Optional: slightly reduce each card height to compensate for added margins */
  /* Adjust these values as needed to match your design */
  max-height: calc(100% - 15px);
}

.article-card:last-child {
  margin-bottom: 0;
}

/* If you need more compact content within each card */
.article-card-content {
  padding-bottom: 5px;
}

/* Remove any flex settings from the title-tag-group */
.title-tag-group {
  /* Remove any flex display properties */
  display: block; /* Reset to block */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .top-row {
      grid-template-columns: 1fr 1.5fr 1fr;
      gap: 20px;
    }
}

@media (max-width: 768px) {
.top-row {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

    .extra-things {
      grid-column: span 2;
    }
}

    @media (max-width: 480px) {
    .top-row {
      grid-template-columns: 1fr;
      gap: 30px;
    }

    .extra-things {
      grid-column: 1;
    }
}