/* --- Base Styles --- */
:root {
  /* Light Mode Colors - Default */
  --bg-color: #fefefe;
  --header-bg: #fbe7d9;
  --text-color: #000;
  --subheading-color: gray;
  --button-bg: #fdb884;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --header-shadow-color: rgba(0, 0, 0, 0.05);
  --mobile-nav-bg: #fbe7d9; /* Lighter background for mobile menu */
  --accent-green-color: #a8d242; /* Light mode accent green */
}

/* Dark Mode Colors - Applied when body has 'dark-mode' class */
body.dark-mode {
  --bg-color: #1a1a1a;
  --header-bg: #5a3d22; /* Less saturated brown */
  --text-color: #fefefe;
  --subheading-color: #e0b48a; /* Less saturated orange */
  --button-bg: #784926;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --header-shadow-color: rgba(0, 0, 0, 0.2);
  --mobile-nav-bg: #2a2a2a; /* Darker background for mobile menu */
  --accent-green-color: #7a9c31; /* Darker green for dark mode */
}

* {
  box-sizing: border-box;
}

/* HTML/BODY FOR SCROLLBAR CONTROL AND FLEX LAYOUT */
html, body {
  height: 100%;
  overflow-x: hidden !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Red Hat Text", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for theme change */
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* enable correct vertical scrolling */
}

/* Custom orange scrollbar for all pages */
body::-webkit-scrollbar {
  width: 14px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-color);
}

body::-webkit-scrollbar-thumb {
  background: var(--button-bg);
  border-radius: 10px;
  border: 3px solid var(--bg-color);
}

body::-webkit-scrollbar-thumb:hover {
  background: #e09960; /* Slightly darker orange on hover */
}

/* Dark mode scrollbar */
body.dark-mode::-webkit-scrollbar-thumb {
  background: var(--button-bg);
  border: 3px solid var(--bg-color);
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
  background: #8b5530; /* Slightly lighter orange for dark mode hover */
}

/* Firefox scrollbar styling */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--button-bg) var(--bg-color);
}

body.dark-mode {
  scrollbar-color: var(--button-bg) var(--bg-color);
}

/* --- Header Section --- */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--header-bg); /* Default header background */
  padding: 15px 30px;
  border-radius: 0 0 24px 24px;
  width: 100%;
  max-width: 100vw;
  flex-wrap: nowrap; /* Changed from wrap to nowrap for better control */
  box-shadow: 0 4px 8px var(--header-shadow-color);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for theme change */
  flex-shrink: 0;
  min-height: 60px; /* Ensure minimum height for centering */
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  z-index: 999;
}

.header-wrapper.header-hidden {
    transform: translateY(-100%);
}

/* Transparent header for specific pages (Join, About, FAQ) */
.transparent-header-bg {
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 20px 36px; /* Restore original top padding for these pages */
    justify-content: flex-start; /* Align logo/text to left */
}

/* Hide desktop nav and subheading on transparent header pages */
.transparent-header-bg .desktop-nav-menu,
.transparent-header-bg .desktop-subheading {
    display: none;
}

/* Show hamburger on transparent header pages only on mobile */
.transparent-header-bg .hamburger-menu-button {
    display: none; /* Hidden by default on desktop transparent headers */
}

/* NEW: Smaller logo and heading for transparent header pages */
.transparent-header-bg .logo {
    height: 45px; /* Smaller logo */
    margin-right: 10px;
}

.transparent-header-bg .heading {
    font-size: 36px; /* Smaller heading text */
}

/* Make sure header items are vertically centered together */
.left-section,
.right-section {
  display: flex;
  align-items: center;
  height: 100%;
}

.left-section {
  flex-direction: row;
  /* Center logo + text vertically in header */
  align-items: center;
  gap: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none !important; /* Remove underline */
}

.logo {
  display: block;
  height: clamp(35px, 8vw, 60px); /* Responsive logo size */
  width: auto; /* Preserve aspect ratio; override width attribute */
  margin-right: 14px;
  transition: height 0.3s ease, margin 0.3s ease; /* Smooth transition for logo size */
}

.heading {
  font-size: clamp(24px, 7vw, 48px); /* Responsive heading size */
  font-weight: 650;
  margin: 0;
  color: var(--text-color);
}

/* Change color on hover for the heading within the logo-link */
.logo-link:hover .heading {
    color: var(--text-color); /* Changed from var(--button-bg) to prevent orange color */
    text-decoration: none !important;
}

.right-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

/* Desktop Navigation Menu */
.nav-menu {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.2s ease, color 0.3s ease;
}

.nav-menu a:hover {
  transform: scale(1.1);
  color: var(--text-color);
}

/* Theme toggle button styling */
.theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    color: var(--text-color);
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease, color 0.3s ease;
}

.theme-toggle-button:hover {
    transform: scale(1.1);
}

.theme-toggle-button svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

/* Material Symbols have built-in styling, ensure icons display correctly */
.material-symbols-rounded {
    font-size: 24px; /* Default size */
    vertical-align: middle;
}

.moon-icon {
    fill: currentColor;
    stroke: none;
}

/* NEW: Hamburger menu button */
.hamburger-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-color);
    font-size: 32px; /* Material icon size */
    display: none; /* Hidden by default, shown via media query */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 0;
    transition: transform 0.2s ease;
    /* Ensure vertical alignment */
}

.hamburger-menu-button .material-symbols-rounded {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 32px;
}

.hamburger-menu-button:hover {
    transform: scale(1.1);
}

/* NEW: Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background-color: var(--mobile-nav-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Above popup */
    transition: right 0.3s ease-out;
    padding: 40px 20px;
    box-shadow: -4px 0 15px rgba(0,0,0,0.2);
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav-overlay .nav-menu {
    flex-direction: column;
    gap: 25px;
    margin-top: 40px;
}

.mobile-nav-overlay .nav-menu a {
    font-size: 28px;
    font-weight: 600;
}

.mobile-nav-overlay .theme-toggle-button {
    font-size: 40px; /* Larger icon in mobile menu */
    margin-top: 30px;
    width: 40px;
    height: 40px;
}

.close-mobile-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.close-mobile-nav:hover {
    background-color: var(--shadow-color);
}

/* NEW: View past issues button styling */
.view-past-issues-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    color: var(--accent-green-color); /* Changed to use accent green */
    border: 2px solid var(--accent-green-color); /* Changed to use accent green */
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    font-family: "Red Hat Text",sans-serif; /* Added font family */
}

.view-past-issues-button:hover {
    transform: scale(1.05);
    background-color: var(--accent-green-color); /* Changed to use accent green */
    color: var(--bg-color);
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    transition: backdrop-filter 0.3s;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay.active {
    display: flex;
    backdrop-filter: blur(4px);
}

.popup-content {
    background-color: var(--bg-color);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--shadow-color);
}

.popup-header h3 {
    margin: 0;
    font-size: 28px;
    color: var(--text-color);
    font-weight: 600;
}

.close-popup {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.close-popup:hover {
    background-color: var(--shadow-color);
}

.popup-body {
    padding: 24px 32px;
}

/* --- PAST ISSUES: Make cover picture bigger --- */
.past-issue-item {
    display: flex;
    align-items: center;
    gap: 28px; /* increased for visual space */
    padding: 24px 0;
    border-bottom: 1px solid var(--shadow-color);
}

.past-issue-item:last-child {
    border-bottom: none;
}

/* Changed Sizes */
.past-issue-image {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: transform 0.18s;
    cursor: pointer;
}

.past-issue-image:hover {
    transform: scale(1.04) rotate(-0.5deg);
    box-shadow: 0 8px 24px var(--shadow-color);
    opacity: 0.92;
}

.past-issue-info {
    flex-grow: 1;
}

.past-issue-info h4 {
    margin: 0 0 6px 0; /* Adjusted from 8px for description */
    font-size: 20px;
    color: var(--text-color);
    font-weight: 600;
}

.past-issue-info .past-issue-description {
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 4px 0;
    color: var(--subheading-color);
    max-width: 100%;
}

.past-issue-info .past-issue-date {
    font-size: 13px;
    color: var(--subheading-color);
    margin: 0 0 10px 0; /* Spacing before link */
}

/* PAST-ISSUE-LINK: Add icon left of text and spacing */
.past-issue-link {
    color: var(--button-bg);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    vertical-align: middle;
    margin-top: 2px;
}

.past-issue-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.subheading {
  text-align: right;
  font-size: 14px;
  color: var(--subheading-color);
  margin-top: 6px;
  line-height: 1.4;
}

/* Main section to take remaining vertical space and manage its own scrollbar */
main {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 50px;
}

/* --- Styles for general content containers like Join, About, FAQ pages --- */
.page-content-container {
    padding: 80px 36px;
    margin: 0 auto;
    max-width: 900px;
    color: var(--text-color);
    text-align: left;
}

/* Back button for article-detail.html */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    text-decoration: none;
    color: var(--subheading-color);
    font-size: 18px;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-button:hover {
    color: var(--text-color);
    transform: translateX(-5px);
}

/* Specific styles for elements within .page-content-container */
.page-content-container h2 {
    font-family: "Red Hat Text", sans-serif;
    font-size: 56px;
    font-weight: 650;
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: left;
}

.page-content-container .paragraph-text {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-color);
    max-width: 700px;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.page-content-container .join-list-heading {
    font-weight: 500;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: left;
}

.page-content-container ul {
    list-style: disc;
    margin-left: 20px;
    padding: 0;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: left;
}

.page-content-container ul li {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: left;
}

.page-content-container ul li a {
    color: var(--button-bg);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.page-content-container ul li a:hover {
    color: var(--text-color);
}

.page-content-container .farewell-text {
    font-style: normal;
    text-align: left;
    font-size: 18px;
    margin-top: 30px;
    color: var(--text-color);
}

/* --- FAQ Specific Styles --- */
.page-content-container .faq-question {
    font-size: 20px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.page-content-container .faq-answer {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-color);
}

.page-content-container .faq-contact-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
}

/* --- Latest Issue Section (Adjusted Sizes) --- */
.latest-issue {
  padding: 24px 0 40px 0; /* Reduced top/bottom padding, removed side padding */
  margin-top: 0; /* Remove extra top margin */
}

/* NEW: Made 'Our Latest Issue' heading bigger */
.latest-issue h2 {
  font-size: 44px; /* Increased from 36px */
  margin-bottom: 32px; /* Adjusted spacing */
  margin-left: 8px;
  color: var(--text-color);
  font-family: "Red Hat Text", sans-serif;
  font-weight: 650; /* Match Our Latest Issue heading */
  line-height: 1.06; /* Used for exact height calculation in JS */
}

.issue-feature {
  display: flex;
  flex-wrap: nowrap; /* NO wrap at desktop, keep image+text single row */
  align-items: stretch;
  gap: 36px;
  justify-content: flex-start; /* Default for desktop */
  /* Add max-width to the issue-feature container itself to control overall layout */
  max-width: 1200px; /* Example max width, adjust as needed */
  margin: 0 auto; /* Center the container */
  width: 100%;
  box-sizing: border-box;
}

/* Common styling for featured issue image link and latest article image link */
.feature-image-link,
.latest-article-image-link {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 12px var(--shadow-color);
    transition: transform 0.1s linear, box-shadow 0.2s ease;
    /* Set up for 3D transforms */
    transform-style: preserve-3d;
    will-change: transform;
}

/* Hover effect for feature images */
.feature-image-link:hover,
.latest-article-image-link:hover {
    box-shadow: 0 12px 24px var(--shadow-color);
}

.feature-image-link img,
.latest-article-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* DESKTOP-SPECIFIC STYLES for image containers */
@media (min-width: 1175px) { /* Increase threshold for 'side-by-side' layout */
    .issue-feature,
    .latest-article-block {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start; /* Anchor left, not centered */
        text-align: left;
        max-width: none; /* Remove max-width for left-alignment */
        margin: 0; /* Remove auto-centering */
        width: 100%;
        box-sizing: border-box;
        padding-left: 36px; /* Add left padding to match main section padding */
        padding-right: 0;
        perspective: 1500px; /* Add perspective for 3D effect */
    }
    .feature-image-link,
    .latest-article-image-link {
        flex-basis: 50vw;
        flex-shrink: 0;
        flex-grow: 0;
        max-width: 950px;
        width: 50vw;
        height: var(--hero-img-height, 480px); /* Dynamically set by JS for exact vertical alignment */
        max-height: var(--hero-img-maxheight, 680px); /* fallback max */
        aspect-ratio: unset !important; /* Remove any forced ratio so the image crops into the more fluid container */
        display: flex;
        align-items: stretch;
        justify-content: flex-end;
        object-position: left center;
    }
    .feature-image-link img,
    .latest-article-image-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 12px;
        object-position: left center;
    }
    .feature-info,
    .latest-article-info {
        flex-basis: 420px;
        flex-shrink: 0;
        flex-grow: 0;
        min-width: 380px;
        max-width: 560px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        align-self: stretch;
        padding-left: 0;
    }
    /* LEFT-ALIGN the main blocks instead of centering the container */
    .latest-issue,
    .articles-section {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-right: 0;
    }
    /* Anchor the image and text to the left edges of the parent layout */
    .issue-feature,
    .latest-article-block {
        align-items: stretch;
        justify-content: flex-start;
    }

    .feature-image-link,
    .latest-article-image-link {
        justify-content: flex-end;
        align-items: stretch;
    }

    .feature-info,
    .latest-article-info {
        align-items: flex-start;
        text-align: left;
        margin-left: 0;
    }

    /* Anchor the image at exact left edge on extra-wide screens as well */
    .latest-issue,
    .articles-section {
        min-width: 0 !important;
    }
    /* Ensure no centering margin on "Articles" section */
    .articles-section .latest-article-block {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    /* Always reset padding on articles container so layout is flush left */
    #latest-article-container {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Always anchor content left for wide screens */
@media (min-width: 1175px) {
    .latest-issue,
    .articles-section {
      padding-left: 36px !important;
      padding-right: 0 !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
}

/* If screen is narrower use default stacked layout and center */
@media (max-width: 1174px) {
    .issue-feature,
    .latest-article-block {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        max-width: 100vw;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto;
    }
    .feature-image-link,
    .latest-article-image-link {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 16/9;
        display: flex;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto;
        border-radius: 12px;
    }
    .feature-image-link img,
    .latest-article-image-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    .feature-info,
    .latest-article-info {
        width: 100% !important;
        max-width: 900px;
        align-items: center !important;
        text-align: center !important;
        margin-left: 0 !important;
        padding: 0;
    }
}

/* Maintain full width for image on stacked/mobile views, with proper padding */
@media (max-width: 1024px) {
    .issue-feature,
    .latest-article-block {
        padding: 0;
        max-width: 100vw;
        width: 100%;
    }
    .feature-image-link,
    .latest-article-image-link {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        margin: 0 auto !important;
        border-radius: 12px;
    }
    .feature-image-link img,
    .latest-article-image-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    .feature-info,
    .latest-article-info {
        width: 100% !important;
        max-width: 900px !important;
        align-items: center !important;
        text-align: center !important;
        margin-left: 0 !important;
    }
}

/* Remove min-width for feature and article hero images, improving mobile fit */
@media (min-width: 1175px) {
    .feature-image-link,
    .latest-article-image-link {
        flex-basis: 50vw;
        flex-shrink: 0;
        flex-grow: 0;
        max-width: 950px;
        width: 50vw;
        height: var(--hero-img-height, 480px);
        max-height: var(--hero-img-maxheight, 680px);
        aspect-ratio: unset !important;
        display: flex;
        align-items: stretch;
        justify-content: flex-end;
        object-position: left center;
    }
}

@media (max-width: 1174px) {
    .feature-image-link,
    .latest-article-image-link {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 16/9;
        display: flex;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto;
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .feature-image-link,
    .latest-article-image-link {
        width: 100vw !important;
        border-radius: 0;
    }
}

@media (max-width: 430px) {
    .feature-image-link,
    .latest-article-image-link {
        border-radius: 0 !important;
    }
}

/* Fix: don't show hamburger if desktop menu is visible */
@media (min-width: 851px) {
    .header-wrapper .hamburger-menu-button {
        display: none !important;
    }
}

/* Remove default underline on logo link especially for browsers with accessibility underline always */
.logo-link {
    text-decoration: none !important;
}

.logo-link:hover .heading {
    color: var(--text-color);
    text-decoration: none !important;
}

/* NEW: Made feature info heading bigger and adjusted margin for new text */
.feature-info h3 {
  font-size: 38px; /* Increased from 32px */
  margin: 0 0 10px; /* Adjusted spacing for new description/date */
  color: var(--text-color);
}

.feature-info .issue-description {
    font-size: 17px;
    line-height: 1.5;
    margin: 0 0 8px 0;
    color: var(--subheading-color);
    max-width: 100%;
}

.feature-info .issue-date {
    font-size: 15px;
    color: var(--subheading-color);
    margin: 0 0 24px 0; /* Spacing before buttons */
}

/* NEW: Read Now Button */
.read-button {
  display: inline-flex;
  align-items: center;
  gap: 14px; /* Slightly increased gap */
  background-color: var(--button-bg);
  color: var(--text-color);
  padding: 16px 32px; /* Increased padding */
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 22px; /* Increased font size */
  transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.read-button:hover {
  transform: scale(1.05);
}

/* NEW: Read Now Outlined Button (for card lists) */
.read-button.outlined {
    background: transparent;
    color: var(--button-bg);
    border: 2px solid var(--button-bg);
    box-sizing: border-box;
    font-family: "Red Hat Text", sans-serif;
    font-weight: 500;
    font-size: 18px;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    transition: background-color 0.2s ease, color 0.2s, border-color 0.2s;
    margin-top: 18px;
    text-decoration: none;
}

.read-button.outlined:hover,
.read-button.outlined:focus {
    background-color: var(--button-bg);
    color: var(--text-color);
    border-color: var(--button-bg);
    text-decoration: none;
}

/* Set correct dark mode color for outlined and filled Read Now button */
body.dark-mode .read-button,
body.dark-mode .read-button.outlined {
    /* Use specific requested color for dark mode buttons */
    background-color: #784926;
    color: var(--text-color);
    border-color: #784926;
}
body.dark-mode .read-button.outlined {
    background: transparent;
    color: #784926;
    border: 2px solid #784926;
}
body.dark-mode .read-button.outlined:hover,
body.dark-mode .read-button.outlined:focus {
    background-color: #784926;
    color: var(--text-color);
    border-color: #784926;
}

/* NEW: Mobile subheading in navigation overlay */
.mobile-subheading {
    color: var(--subheading-color);
    font-size: 16px;
    text-align: center;
    max-width: 380px;
    line-height: 1.4;
    margin: 20px 0 10px 0;
    padding: 0 20px;
}

/* Button container for side-by-side buttons */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    margin-top: 24px;
}

@media (max-width: 1024px) { /* Changed from 950px to 1024px */
    .button-container {
        align-items: center;
        width: 100%;
    }
}

/* Override button styles for icons + centering in mobile/stacked circumstances */
.feature-info .button-container,
.latest-article-info .button-container {
    display: flex;
    gap: 16px;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 24px;
}

@media (max-width: 1024px) { /* Changed from 950px to 1024px */
    .feature-info .button-container,
    .latest-article-info .button-container {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* When stacked, center info & image and stretch image full width */
    .issue-feature,
    .latest-article-block {
        flex-direction: column; /* !important removed as handled by cascade now */
        align-items: center; /* !important removed */
        justify-content: center; /* !important removed */
        text-align: center; /* !important removed */
    }
    .feature-info,
    .latest-article-info {
        align-items: center; /* !important removed */
        text-align: center; /* !important removed */
        width: 100%; /* !important removed */
        max-width: 95vw; /* Ensure text container doesn't overflow */
    }
    
    /* MOBILE-SPECIFIC STYLES for image containers when stacked */
    .feature-image-link,
    .latest-article-image-link {
        width: 95%; /* !important removed */
        max-width: none; /* !important removed */
        min-height: auto; /* !important removed */
        max-height: none; /* !important removed */
        height: auto; /* Allow height to adjust with aspect ratio */
        aspect-ratio: 16 / 9; /* Maintain aspect ratio on mobile too */
    }

    /* Center image within its container */
    .feature-image-link img,
    .latest-article-image-link img {
      max-width: 100%;
    }
}

/* Make .articles-heading & .latest-issue h2 same visuals and font */
.articles-heading, .latest-issue h2 {
    font-size: 44px;
    margin-bottom: 32px;
    margin-left: 8px;
    color: var(--text-color);
    font-family: "Red Hat Text", sans-serif;
    font-weight: 650;
    text-align: left;
}

/* But center on mobile/stacked */
@media (max-width:1024px) { /* Changed from 950px to 1024px */
    .articles-heading, .latest-issue h2 {
        margin-left: 0;
        text-align: center;
        font-size: 38px;
        white-space: normal;
        text-overflow: unset;
    }
}

/* Fix "Our Latest Issue"/Articles headings for both layouts */
.latest-issue h2,
.articles-heading {
  font-size: 44px;
  margin-bottom: 32px;
  color: var(--text-color);
  font-family: "Red Hat Text", sans-serif;
  font-weight: 650;
}
@media (max-width:1050px) {
  .latest-issue h2,
  .articles-heading {
    text-align: center;
    margin-left: 0;
    white-space: normal;
    text-overflow: unset;
  }
}
@media (max-width: 750px) {
  .latest-issue h2,
  .articles-heading {
    font-size: 32px;
    margin-bottom: 20px;
  }
}

.latest-issue,
.articles-section {
  padding: 24px 0 40px 0; /* Reduced top/bottom padding, removed side padding */
  margin-top: 0; /* Remove extra top margin */
}

@media (max-width: 1050px) {
  .latest-issue,
  .articles-section {
    padding: 40px 14px 45px 14px;
  }
}

/* Keep minimum padding at page bottom for spacing */
body > main {
  padding-bottom: 50px !important;
}

/* More Articles button - styled like view past issues button */
.more-articles-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    color: var(--accent-green-color); /* Changed to use accent green */
    border: 2px solid var(--accent-green-color); /* Changed to use accent green */
    border-radius: 12px;
    font-size: 18px;
    font-family: "Red Hat Text",sans-serif;
    font-weight: 500;
    padding: 12px 24px;
    margin: 0;
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}
.more-articles-btn:hover {
    transform: scale(1.05);
    background-color: var(--accent-green-color); /* Changed to use accent green */
    color: var(--bg-color);
}

/* Show hamburger when content would overlap */
@media (max-width: 850px) {
  .desktop-nav-menu,
  .desktop-subheading,
  .desktop-theme-toggle {
    display: none;
  }
  
  .hamburger-menu-button {
    display: flex;
  }

  /* Show hamburger on transparent header pages */
  .transparent-header-bg .hamburger-menu-button {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: row; /* Keep header items in a row on smaller mobile if possible */
    padding: 12px 20px;
    border-radius: 0 0 16px 16px;
    align-items: center;
    justify-content: space-between; /* Space between logo and hamburger */
  }

  .left-section {
    width: auto; /* Allow logo to take natural width */
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .right-section {
    width: auto;
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
    margin-right: 0;
  }
  .logo {
    height: 45px;
  }
  /* Ensure smaller header elements still apply on mobile */
  .transparent-header-bg .logo {
      height: 35px;
  }
  .transparent-header-bg .heading {
      font-size: 28px;
  }

  .heading {
    font-size: 36px;
    text-align: left; /* Align heading left next to logo */
  }

  /* Hide desktop nav and subheading */
  .desktop-nav-menu,
  .desktop-subheading,
  .desktop-theme-toggle {
    display: none;
  }

  /* Show hamburger button */
  .hamburger-menu-button {
    display: flex;
  }

  .right-section {
    width: auto; /* Take only necessary width for hamburger */
    align-items: center; /* Center hamburger if it's the only item */
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    flex-direction: row; /* Hamburger and theme toggle in a row if both were here */
    gap: 0; /* Remove gap if only one item */
  }

  .latest-issue {
    padding: 30px 20px 40px;
  }

  .latest-issue h2 {
    font-size: 32px; /* Adjusted for mobile */
    margin-bottom: 20px;
    margin-left: 0;
    text-align: center; /* Centered on mobile */
  }

  .articles-section {
    padding: 30px 20px 40px;
  }

  .articles-heading {
    font-size: 32px;
    margin-bottom: 20px;
    margin-left: 0;
    text-align: center;
  }

  .latest-article-block {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
  }

  .latest-article-info {
    max-width: 90%;
    align-items: center;
    text-align: center;
    margin-top: 0;
  }

  .latest-article-title-link {
    font-size: 28px;
    margin-bottom: 6px;
    word-break: break-word;
    white-space: normal;
  }
  .latest-article-author-date {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .latest-article-excerpt {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .read-button {
    padding: 12px 24px; /* Adjusted for mobile */
    font-size: 18px; /* Adjusted for mobile */
  }

  .view-past-issues-button {
    padding: 8px 16px;
    font-size: 14px;
  }

  .popup-content {
    width: 95%;
    margin: 20px;
  }

  .popup-header {
    padding: 20px 24px;
  }

  .popup-header h3 {
    font-size: 20px;
  }

  .popup-body {
    padding: 20px 24px;
  }

  /* Article list on smaller screens */
  #all-articles-list {
      grid-template-columns: 1fr; /* Stack articles vertically on smallest screens */
      gap: 30px;
      max-width: 400px; /* Constrain width of stacked cards */
      margin: 0 auto; /* Center the stack */
  }
  .article-card {
      max-width: 100%; /* Ensure cards don't exceed container */
  }
  .article-card-info {
      padding: 20px;
  }
  .article-card-title-link {
      font-size: 22px;
  }
  .article-card-author-date {
      font-size: 13px;
  }
  .article-card-excerpt {
      font-size: 15px;
  }
}

/* Always center everything if forced stacked (mobile) */
@media (max-width: 750px) {
  .feature-info,
  .latest-article-info {
    text-align: center; /* !important removed */
    align-items: center; /* !important removed */
    margin: 0 auto;
    max-width: 95vw; /* !important removed */
    width: 100%; /* !important removed */
    padding: 0;
  }
}

/* Anchor the feature image (and article image) to the left edge when side-by-side at wide widths */
@media (min-width: 1175px) {
    .issue-feature,
    .latest-article-block {
        justify-content: flex-start;
        align-items: stretch;
    }
    .feature-image-link,
    .latest-article-image-link {
        margin-right: 0;
        margin-left: 0;
        justify-content: flex-start;
        align-items: stretch;
        /* ANCHOR TO LEFT EDGE */
        /* The container is centered, but image is always left-aligned within the container. */
    }
    /* Prevent shifting to the right by centering the parent and not the image itself */
    .issue-feature,
    .latest-article-block {
        margin-left: auto;
        margin-right: auto;
    }
}


/* Remove unwanted border or outline around images (if any browsers add it) */
.feature-image-link img,
.latest-article-image-link img,
.article-card-image-link img {
    border: none;
    outline: none;
    box-shadow: none;
}

/* ----- ARTICLES SECTION ON HOME PAGE ----- */
.articles-section {
    padding: 48px 36px 60px;
    margin-top: 60px;
    max-width: none;
}

.articles-heading {
    font-size: 44px;
    margin-bottom: 32px;
    margin-left: 8px;
    color: var(--text-color);
    font-family: "Red Hat Text", sans-serif;
    font-weight: 650;
    text-align: left;
}

.latest-article-block {
    display: flex;
    flex-wrap: nowrap; /* NO wrap at desktop, keep image+text single row */
    align-items: stretch;
    gap: 36px;
    justify-content: flex-start; /* Default for desktop */
    /* Add max-width to the container to control overall layout */
    max-width: 1200px; /* Example max width, adjust as needed */
    margin: 0 auto; /* Center the container */
    width: 100%;
    box-sizing: border-box;
}

.latest-article-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Removed max-width: 380px here, handled in media query */
    flex-grow: 1;
    margin-top: -10px;
}

.latest-article-title-link {
    font-size: 38px;
    margin: 0 0 10px;
    color: var(--text-color);
    text-decoration: none;
    font-family: "Red Hat Text", sans-serif;
    font-weight: 650;
    transition: color 0.2s ease;
}

.latest-article-title-link:hover {
    color: var(--button-bg);
    text-decoration: underline;
}

.latest-article-author-date {
    font-size: 15px;
    color: var(--subheading-color);
    margin: 0 0 8px 0;
}

.latest-article-excerpt {
    font-size: 17px;
    line-height: 1.5;
    margin: 0 0 24px 0;
    color: var(--subheading-color);
    max-width: 100%;
}

/* When content wraps, center everything */
@media (max-width: 1024px) { /* Changed from 950px to 1024px */
  .latest-article-block {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .latest-article-info {
    align-items: center;
    text-align: center;
  }
  
  .articles-section {
    text-align: center;
    margin-top: 30px; /* Further reduced spacing on mobile */
  }

  .articles-heading {
    margin-left: 0;
    text-align: center;
  }
}

/* ----- ALL ARTICLES LIST PAGE ----- */
.article-list-section {
    padding: 48px 36px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

#all-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    justify-content: center;
    align-items: stretch;
}

.article-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px var(--shadow-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* Ensure cards stretch to fill grid area */
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px var(--shadow-color);
}

.article-card-image-link {
    display: block;
    width: 100%;
    /* aspect-ratio set by JS based on image_crop */
    overflow: hidden;
    position: relative; /* For potential image scaling effects */
}

.article-card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image-link img {
    transform: scale(1.05);
}

.article-card-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows info section to grow and push elements down */
}

.article-card-title-link {
    font-size: 24px;
    font-weight: 650;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.article-card-title-link:hover {
    color: var(--button-bg);
    text-decoration: underline;
}

.article-card-author-date {
    font-size: 14px;
    color: var(--subheading-color);
    margin-bottom: 12px;
}

.article-card-excerpt {
    font-size: 16px;
    line-height: 1.5;
    color: var(--subheading-color);
    margin-bottom: 16px;
    flex-grow: 1; /* Allows excerpt to take available space */
}

/* Responsive adjustments for article card on mobile */
@media (max-width: 1024px) {
  .header-wrapper {
    padding: 12px 25px;
    flex-direction: row;
    align-items: flex-start;
  }
  .left-section {
    width: auto;
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .right-section {
    width: auto;
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
    margin-right: 0;
  }
  .logo {
    height: 55px;
  }
  /* Smaller header elements on non-home pages */
  .transparent-header-bg .logo {
      height: 40px;
  }
  .transparent-header-bg .heading {
      font-size: 32px;
  }

  /* Desktop nav still visible for 1024px */
  .desktop-nav-menu a {
    font-size: 16px;
  }
  .desktop-subheading {
    font-size: 13px;
  }
  .latest-issue {
    padding: 40px 30px 50px;
  }
  .latest-issue h2 {
    font-size: 38px; /* Adjusted for medium screens */
  }

  .feature-info h3 {
    font-size: 32px; /* Adjusted for medium screens */
    margin-bottom: 8px; /* Adjusted margin for mobile */
    word-break: break-word; /* Allow long titles to wrap */
    white-space: normal; /* Allow word wrapping */
  }
  .feature-info .issue-description {
    font-size: 16px;
    margin-bottom: 6px;
  }
  .feature-info .issue-date {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .articles-section {
    padding: 40px 30px 50px;
    margin-top: 90px; /* Increased spacing for medium screens */
  }
  .articles-heading {
    font-size: 38px;
    margin-left: 0;
    text-align: center;
  }

  .latest-article-title-link {
    font-size: 32px;
    margin-bottom: 8px;
    word-break: break-word;
    white-space: normal;
  }
  .latest-article-author-date {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .latest-article-excerpt {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .read-button {
    padding: 14px 28px; /* Adjusted for medium screens */
    font-size: 20px; /* Adjusted for medium screens */
  }

  .view-past-issues-button {
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 12px;
  }

  .popup-content {
    width: 95%;
    margin: 20px;
  }

  .popup-header {
    padding: 20px 24px;
  }

  .popup-header h3 {
    font-size: 24px;
  }

  .popup-body {
    padding: 20px 24px;
  }

  /* Adjust popup mobile style for new large cover */
  @media (max-width: 768px) {
      .past-issue-item {
          flex-direction: column;
          align-items: center;
          gap: 16px;
      }
      .past-issue-image {
          width: 90vw;
          max-width: 240px;
          height: 145px;
          margin-bottom: 6px;
      }
  }

  /* These rules are for smaller mobile portrait, might overlap with above 768px */
  /* Re-adjusting for finer control */
  .past-issue-item {
    flex-direction: column;
    align-items: center; /* Center past issues for smaller screens */
    gap: 12px;
  }

  .past-issue-image {
    width: 100%; /* Takes full width of its container */
    height: auto; /* Adjust height automatically */
    max-width: 160px; /* Keep max width */
  }
  .past-issue-info {
    text-align: center; /* Center info text for past issues */
  }
  .past-issue-info h4 {
    text-align: center;
  }
  .past-issue-info .past-issue-description {
    font-size: 14px;
    text-align: center;
  }
  .past-issue-info .past-issue-date {
    font-size: 12px;
    text-align: center;
  }
  .past-issue-link {
    justify-content: center; /* Center the "Read now" link */
  }

  main {
    padding-bottom: 0;
  }
  .page-content-container {
      padding: 40px 20px;
  }
  .page-content-container h2 {
      font-size: 36px;
  }
  .page-content-container .paragraph-text,
  .page-content-container .join-list-heading,
  .page-content-container ul li,
  .page-content-container .farewell-text,
  .page-content-container .faq-question,
  .page-content-container .faq-answer,
  .page-content-container .faq-contact-text {
      font-size: 16px;
      text-align: center; /* Center text on specific content pages too */
  }
  .page-content-container ul {
      margin-left: 0; /* Remove left margin for better centering */
      list-style-position: inside; /* Keep bullets visible when centered */
      text-align: center;
  }
  .page-content-container ul li {
    text-align: center; /* Ensure list items are centered */
  }

  .theme-toggle-button {
      margin-left: 0;
      margin-top: 0; /* No margin top for desktop theme toggle, as it's hidden */
  }
}

/* --- Horizontal Scroll for Articles Row --- */
.horizontal-scroll-articles {
  display: flex;
  flex-direction: row;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px 36px;
  margin: 0;
  scrollbar-width: none;
  scroll-behavior: smooth;
  width: 100%;
}

.horizontal-scroll-articles::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll-articles::-webkit-scrollbar-thumb {
  display: none;
}

.horizontal-scroll-articles::-webkit-scrollbar-track {
  display: none;
}

.horizontal-article-card {
  flex: 0 0 420px;
  background: var(--bg-color);
  border-radius: 18px;
  box-shadow: 0 6px 18px var(--shadow-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  transition: box-shadow 0.2s, transform 0.2s;
  min-width: 320px;
  max-width: 440px;
  cursor: pointer;
}

.horizontal-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px var(--shadow-color);
}

.horizontal-article-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.horizontal-article-card .card-info {
  padding: 22px 20px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.horizontal-article-card .card-title {
  font-size: 22px;
  font-weight: 650;
  margin: 0 0 6px 0;
  color: var(--text-color);
  font-family: "Red Hat Text", sans-serif;
  line-height: 1.3;
}

.horizontal-article-card .card-date {
  font-size: 14px;
  color: var(--subheading-color);
  margin-bottom: 8px;
}

.horizontal-article-card .card-desc {
  font-size: 15px;
  color: var(--subheading-color);
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

/* Carousel container styles */
.carousel-container {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 0 20px 0;
  margin: 0;
}

/* Carousel arrow styles */
.carousel-arrow {
  z-index: 10;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-color);
  border: 2px solid #666;
  color: #666;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.carousel-arrow.left {
  left: 20px;
  right: auto;
}

.carousel-arrow.right {
  right: 20px;
  left: auto;
}

.carousel-arrow:hover {
  background: #666 !important;
  color: var(--bg-color) !important;
  transform: translateY(-50%) scale(1.05) !important;
  box-shadow: 0 4px 12px var(--shadow-color) !important;
}

/* Style for the 'View More' card in the horizontal scroll carousel */
.view-more-card {
  background: var(--bg-color);
  color: var(--accent-green-color);
  min-width: 220px;
  max-width: 260px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--shadow-color);
  transition: box-shadow 0.2s, transform 0.2s, background-color 0.2s, color 0.2s;
  border: 2px solid var(--accent-green-color);
}

.view-more-card:hover {
  background: var(--accent-green-color);
  color: white !important;
  transform: scale(1.04);
  box-shadow: 0 12px 32px var(--shadow-color);
}

.view-more-card:hover * {
  color: white !important;
}

/* Mobile responsive for carousel */
@media (max-width: 1400px) {
  .carousel-container {
    width: 100%; /* Full width on all screen sizes */
  }
}

@media (max-width: 1000px) {
  .carousel-container {
    width: 100%; /* Full width on smaller screens */
  }
}

@media (max-width: 700px) {
  .horizontal-article-card {
    min-width: 80vw;
    max-width: 90vw;
  }
  
  .horizontal-article-card img {
    height: 140px;
  }
  
  /* Hide carousel arrows on mobile and remove padding */
  .carousel-container {
    padding: 0;
    margin: 0;
    width: 100%; /* Full width on mobile */
  }
  
  .carousel-arrow {
    display: none !important;
  }
  
  .articles-section {
    margin-top: 25px; /* Further reduced spacing on mobile */
  }
}

/* Dark mode adjustments for view more card */
body.dark-mode .view-more-card {
  background: var(--bg-color);
  border-color: #5a7a1f;
  color: #5a7a1f;
}

body.dark-mode .view-more-card:hover {
  background: #5a7a1f;
  color: white !important;
}

body.dark-mode .view-more-card:hover * {
  color: white !important;
}

/* Dark mode overrides for small text - make white except for subheadings */
body.dark-mode .latest-article-author-date,
body.dark-mode .latest-article-excerpt,
body.dark-mode .article-card-author-date,
body.dark-mode .article-card-excerpt,
body.dark-mode .feature-info .issue-description,
body.dark-mode .feature-info .issue-date,
body.dark-mode .past-issue-info .past-issue-description,
body.dark-mode .past-issue-info .past-issue-date,
body.dark-mode .horizontal-article-card .card-date,
body.dark-mode .horizontal-article-card .card-desc {
  color: #fefefe !important;
}

/* Ensure horizontal articles row takes full width */
#horizontal-articles-row {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 0;
  margin: 0 auto;
}

@media (max-width: 1050px) {
  #horizontal-articles-row {
    padding: 0 14px;
  }
}

@media (max-width: 768px) {
  #horizontal-articles-row {
    padding: 0 20px;
  }
}

.read-button,
.past-issue-link {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}

figcaption {
  font-style: italic;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 18px;
}

/* Ensure media in article content is responsive */
.article-content .article-body img {
  display: block;
  max-width: 100%;
  height: auto;
}