/**
 * UMBC Magazine — styles for all magazine CPT templates.
 * Covers: archive-magazine-issue, single-magazine-issue,
 *         archive-magazine-article, single-magazine-article,
 */

/* ============================================================
   ARCHIVE: MAGAZINE ISSUES
   ============================================================ */

.magazine-issues-archive-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    text-align: center;
}

.magazine-issues-archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.magazine-issues-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.magazine-issue-archive-card {
    border: 2px solid #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.magazine-issue-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.magazine-issue-cover-wrapper {
    position: relative;
    overflow: hidden;
}

.magazine-issue-cover-wrapper img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s;
}

.magazine-issue-archive-card:hover .magazine-issue-cover-wrapper img {
    transform: scale(1.05);
}

.magazine-issue-archive-content {
    padding: 1.5rem;
}

.magazine-issue-archive-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.magazine-issue-archive-content h2 a {
    color: #333;
    text-decoration: none;
}

.magazine-issue-archive-content h2 a:hover {
    color: #007176;
}

.magazine-issue-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.magazine-issue-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}

.magazine-issue-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.magazine-issue-button {
    flex: 1;
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.magazine-issue-button-primary {
    background: #007176;
    color: #fff;
}

.magazine-issue-button-primary:hover {
    background: #005155;
    color: #fff;
}

.magazine-issue-button-secondary {
    background: #f3f3f3;
    color: #333;
}

.magazine-issue-button-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* Back-link row used on both the magazine home (→ UMBC Stories) and
   each single issue (→ All Magazine Issues). Matches breadcrumb pattern. */
.magazine-back-link-row {
    max-width: 1300px;
    margin: 1rem auto 0.5rem;
    padding: 0;
}

.magazine-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #007176;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.magazine-back-link:hover,
.magazine-back-link:focus {
    color: #00595d;
    text-decoration: underline;
}

[data-theme="dark"] .magazine-back-link {
    color: #4dd0d6;
}

[data-theme="dark"] .magazine-back-link:hover,
[data-theme="dark"] .magazine-back-link:focus {
    color: #fff;
}

/* Latest issue hero */
.magazine-latest-issue {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #007176 0%, #005155 100%);
    border-radius: 12px;
    color: #fff;
}

.magazine-latest-issue-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: center;
}

.magazine-latest-issue-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.magazine-latest-issue-info h2 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.magazine-latest-issue-info .meta {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.magazine-latest-issue-info .description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.magazine-latest-issue-actions {
    display: flex;
    gap: 1rem;
}

.magazine-latest-issue-actions a {
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.magazine-latest-issue-actions .view-issue {
    background: #fff;
    color: #007176;
}

.magazine-latest-issue-actions .view-issue:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.magazine-latest-issue-actions .download-pdf,
.magazine-latest-issue-actions .request-copy {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid #fff;
}

.magazine-latest-issue-actions .download-pdf:hover,
.magazine-latest-issue-actions .request-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* On-the-cover block inside the latest-issue teal hero: drop the gray
   panel and pair white text with the teal background instead. */
.magazine-latest-issue .on-the-cover {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.magazine-latest-issue .on-the-cover h3,
.magazine-latest-issue .on-the-cover h4 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
    opacity: 0.9;
}

.magazine-archive-pagination {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    text-align: center;
}

/* ============================================================
   SINGLE: MAGAZINE ISSUE (Table of Contents)
   ============================================================ */

.magazine-issue-container {
    max-width: 1200px;
    margin: 2rem auto;
}

.magazine-issue-header {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.title-issue {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    border-bottom: 2px solid #fdb515;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.magazine-issue-intro {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    align-items: start;
    border-bottom: 2px solid #fdb515;
}

.magazine-issue-cover-section {
    position: relative;
}

.magazine-issue-cover img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.on-the-cover {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.on-the-cover h4 {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magazine-issue-info h1 {
    font-size: 2rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.date {
    text-align: center;
    color: #999;
    margin-bottom: 0.5rem;
}

.magazine-issue-info h2 {
    font-size: 2rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: normal;
}

.magazine-toc {
    margin-bottom: 2rem;
}

.magazine-toc h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.magazine-toc-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.magazine-toc-section h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #007176;
    font-weight: bold;
}

.magazine-toc-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.magazine-toc-section li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.magazine-toc-section li:last-child {
    border-bottom: none;
}

.magazine-toc-section a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
}

.magazine-toc-section a:hover {
    color: #007176;
}

.magazine-web-extras-note {
    align-content: center;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.6;
}

.magazine-web-extras-note a {
    color: #007176;
    text-decoration: none;
}

.magazine-web-extras-note a:hover {
    text-decoration: underline;
}

.magazine-pdf-button {
    display: inline-block;
    background: #007176;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.magazine-pdf-button:hover {
    background: #005155;
    color: #fff;
}

.magazine-pdf-button-outline {
    background: transparent;
    color: #007176;
    border: 2px solid #007176;
}

.magazine-pdf-button-outline:hover {
    background: #007176;
    color: #fff;
}

[data-theme="dark"] .magazine-pdf-button-outline {
    color: #4db8bc;
    border-color: #4db8bc;
}

[data-theme="dark"] .magazine-pdf-button-outline:hover {
    background: #007176;
    color: #fff;
    border-color: #007176;
}

.magazine-office-hours {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.magazine-office-hours-content {
    background: #f9f9f9;
    padding: 2.5rem;
    border-radius: 8px;
    border-top: 4px solid #007176;
}

.magazine-office-hours h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #007176;
}

.magazine-office-hours h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.magazine-office-hours .article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.magazine-office-hours .article-content p {
    margin-bottom: 1rem;
}

.magazine-editor-staff-section {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid #fdb515;
}

.magazine-editors-note h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.magazine-editors-note p {
    font-size: 18px;
    letter-spacing: -0.014em;
    line-height: 25px;
}

.magazine-staff-section {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #666;
}

.magazine-staff-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.magazine-staff-section h4 {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.magazine-staff-section p {
    margin: 0.25rem 0;
    font-size: 14px;
    letter-spacing: -0.006em;
    line-height: 20px;
}

.magazine-staff-section .staff-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    line-height: 1.6;
}

.magazine-featured-articles {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.magazine-featured-articles h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.featured-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.featured-article-card {
    border: 2px solid #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.featured-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.featured-article-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.featured-article-content {
    padding: 1.5rem;
}

.featured-article-content h3 {
    font-size: 1.5rem;
    line-height: 1.75rem;
    margin-bottom: 0.5rem;
}

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

.featured-article-content h3 a:hover {
    color: #007176;
}

.featured-article-byline {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.featured-article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.magazine-web-features {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.magazine-web-features h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.web-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.web-feature-card {
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #007176;
    overflow: hidden;
    transition: transform 0.3s;
}

.web-feature-card:hover {
    transform: translateY(-3px);
}

.web-feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.web-feature-card-content {
    padding: 1.5rem;
}

.web-feature-card-content a {
    font-size: 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.1;
    display: block;
}

.web-feature-card-content a:hover {
    color: #007176;
}

.magazine-article-sections {
    max-width: 1200px;
    margin: 0 auto;
}

.magazine-section {
    margin-bottom: 4rem;
}

.magazine-section h2 {
    font-size: 1.5rem;
    line-height: 1.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007176;
}

.section-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.section-articles-grid.single-article {
    grid-template-columns: 1fr;
}

.section-article-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.section-article-card:hover {
    border-color: #007176;
}

.section-article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.section-articles-grid.single-article .section-article-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
}

.section-articles-grid.single-article .section-article-card img {
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.section-articles-grid.single-article .section-article-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-article-card-content {
    padding: 1.25rem;
}

.section-articles-grid.single-article .section-article-card-content {
    padding: 2rem;
}

.section-article-card-content h3 {
    font-size: 1.25rem;
    line-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-articles-grid.single-article .section-article-card-content h3 {
    font-size: 1.5rem;
    line-height: 1.75rem;
    margin-bottom: 0.75rem;
}

.section-article-card-content h3 a {
    color: #333;
    text-decoration: none;
}

.section-article-card-content h3 a:hover {
    color: #007176;
}

.section-article-byline {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.section-articles-grid.single-article .section-article-byline {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.section-article-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

.section-articles-grid.single-article .section-article-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
}

.magazine-all-articles {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.magazine-all-articles h2 {
    font-size: 1.75rem;
    line-height: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.all-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.all-articles-list li {
    list-style: none;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
}

.all-articles-list li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.all-articles-list li a:hover {
    color: #007176;
}

.all-articles-list .article-author {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.magazine-issue-navigation {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.magazine-issue-navigation a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f3f3f3;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.magazine-issue-navigation a:hover {
    background: #007176;
    color: #fff;
}

/* Mobile TOC panel */
.mobile-nav-control {
    display: none;
}

/* ============================================================
   SINGLE: MAGAZINE ARTICLE
   ============================================================ */

.figure,
.wp-block-image {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.wp-block-image figcaption,
.entry-header figcaption,
.wp-block-image figcaption.wp-element-caption,
.wp-block-embed figcaption {
    font-size: 14px;
    line-height: 1rem;
    border-top: 0;
    color: #535455;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 0;
    margin-top: 0;
    text-align: center;
}

.avatar-circle img {
    border-radius: 50%;
    min-width: 100px;
}

.magazine-hero-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.magazine-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.magazine-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.magazine-hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.magazine-hero-content .meta {
    font-size: 1rem;
    opacity: 0.95;
}

.magazine-standard-header {
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.magazine-minimal-header {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.magazine-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.magazine-content-wrapper.full-width {
    max-width: 900px;
}

.magazine-content-wrapper .entry-content {
    max-width: 1000px;
    text-align: justify;
}

.magazine-author-box {
    border: 2px solid #f3f3f3;
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
    float: right;
    width: 300px;
    margin: 0 0 1.5rem 2rem;
}

.magazine-author-box .avatar-circle {
    text-align: center;
    margin-bottom: 1rem;
}

.magazine-author-box h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0 0.25rem;
    text-align: center;
}

.magazine-author-box .author-title {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1rem;
}

.magazine-author-box .author-bio {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

.magazine-issue-badge {
    display: inline-block;
    background: #f3f3f3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.magazine-issue-badge a {
    color: #333;
    text-decoration: none;
}

.magazine-issue-badge a:hover {
    text-decoration: underline;
}

/* ============================================================
   ARCHIVE: MAGAZINE ARTICLES
   ============================================================ */

.magazine-archive-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    text-align: center;
}

.magazine-archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.magazine-archive-filters {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.magazine-archive-filters select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    font-size: 1rem;
    min-width: 200px;
}

.magazine-articles-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.magazine-article-archive-card {
    border: 2px solid #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.magazine-article-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.magazine-article-archive-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.magazine-article-archive-card-content {
    padding: 1.5rem;
}

.magazine-article-issue-badge {
    display: inline-block;
    background: #e8f4f8;
    color: #0066cc;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.magazine-article-archive-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.magazine-article-archive-card h2 a {
    color: #333;
    text-decoration: none;
}

.magazine-article-archive-card h2 a:hover {
    color: #0066cc;
}

.magazine-article-archive-byline {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.magazine-article-archive-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.magazine-article-archive-meta {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    gap: 1rem;
}

/* ============================================================
   TAXONOMY: MAGAZINE SECTION
   ============================================================ */

.magazine-section-archive-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.magazine-section-archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.magazine-section-archive-header .description {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.magazine-section-articles-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.magazine-section-article-card {
    border: 2px solid #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.magazine-section-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.magazine-section-article-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.magazine-section-article-content {
    padding: 1.5rem;
}

.magazine-section-article-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.magazine-section-article-content h2 a {
    color: #333;
    text-decoration: none;
}

.magazine-section-article-content h2 a:hover {
    color: #0066cc;
}

.magazine-section-article-byline {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.magazine-section-article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    /* Archive: issues grid */
    .magazine-issues-grid {
        grid-template-columns: 1fr;
    }

    /* Archive: latest issue hero */
    .magazine-latest-issue-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .magazine-latest-issue-cover {
        max-width: 350px;
        margin: 0 auto;
    }

    .magazine-latest-issue-actions {
        flex-direction: column;
    }

    /* Archive: article grid */
    .magazine-articles-grid,
    .magazine-section-articles-grid {
        grid-template-columns: 1fr;
    }

    .magazine-archive-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .magazine-archive-filters select {
        width: 100%;
    }

    /* Single issue */
    .mobile-nav-control {
        display: block;
        position: fixed;
        top: 20%;
        right: 0;
        z-index: 1000;
    }

    .mobile-nav-toggle {
        background: #007176;
        color: white;
        border: none;
        padding: 0.75rem 0.5rem;
        cursor: pointer;
        font-size: 0.7rem;
        font-weight: bold;
        letter-spacing: 0.5px;
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-right: #000 solid 4px;
        box-shadow: -4px 4px 8px 2px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        text-transform: uppercase;
        line-height: 1.3;
        max-width: 65px;
        word-wrap: break-word;
        text-align: center;
    }

    .mobile-nav-toggle:hover {
        background: #005155;
    }

    .mobile-nav-toggle.active {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background: white;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
        will-change: transform;
    }

    .mobile-nav-panel.active {
        transform: translateX(0);
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-header {
        position: sticky;
        top: 0;
        background: #007176;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1rem;
    }

    .mobile-nav-header h3 {
        margin: 0;
        font-size: 1.5rem;
        color: white;
        font-weight: bold;
    }

    .mobile-nav-close {
        background: none;
        border: none;
        font-size: 2rem;
        color: white;
        cursor: pointer;
        padding: 0;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s;
        line-height: 1;
    }

    .mobile-nav-close:hover {
        opacity: 0.8;
    }

    .mobile-nav-controls {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .mobile-nav-btn {
        flex: 1;
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        color: white;
        cursor: pointer;
        transition: background 0.2s;
        font-weight: 500;
    }

    .mobile-nav-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .mobile-nav-content {
        padding: 1.5rem;
    }

    .mobile-nav-section {
        margin-bottom: 0.5rem;
    }

    .mobile-nav-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        background: #f9f9f9;
        border-left: 4px solid #007176;
        cursor: pointer;
        margin-bottom: 0.5rem;
    }

    .mobile-nav-section-header h4 {
        margin: 0;
        font-size: 1rem;
        color: #007176;
        font-weight: bold;
    }

    .mobile-nav-section-toggle {
        font-size: 1.25rem;
        color: #007176;
        transition: transform 0.3s;
    }

    .mobile-nav-section-header.collapsed .mobile-nav-section-toggle {
        transform: rotate(-90deg);
    }

    .mobile-nav-section-articles {
        list-style: none;
        padding: 0;
        margin: 0;
        max-height: 500px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .mobile-nav-section-articles.collapsed {
        max-height: 0;
    }

    .mobile-nav-section-articles li {
        padding: 0.75rem 0.75rem 0.75rem 1.25rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-nav-section-articles li:last-child {
        border-bottom: none;
    }

    .mobile-nav-section-articles a {
        color: #333;
        text-decoration: none;
        font-size: 0.9rem;
        display: block;
    }

    .mobile-nav-section-articles a:hover {
        color: #007176;
    }

    .magazine-issue-container {
        margin: 0 auto;
    }

    .magazine-issue-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .magazine-issue-header {
        margin: 0 auto;
    }

    .magazine-issue-header,
    .magazine-featured-articles,
    .magazine-web-features,
    .magazine-article-sections,
    .magazine-issue-navigation {
        padding: 1em;
    }

    .date {
        text-align: left;
    }

    .magazine-issue-cover-section {
        max-width: 400px;
        margin: 0 auto;
    }

    .magazine-editor-staff-section {
        grid-template-columns: 1fr;
    }

    .featured-articles-grid,
    .section-articles-grid,
    .all-articles-list,
    .web-features-list {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .section-articles-grid.single-article .section-article-card {
        grid-template-columns: 1fr;
    }

    .section-articles-grid.single-article .section-article-card img {
        height: 250px;
        min-height: auto;
    }

    .section-articles-grid.single-article .section-article-card-content {
        padding: 1.5rem;
    }

    .section-articles-grid.single-article .section-article-card-content h3 {
        font-size: 1.5rem;
    }

    .magazine-issue-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .magazine-office-hours-content {
        padding: 1.5rem;
    }

    .magazine-toc {
        display: none;
    }

    /* Single article */
    .magazine-hero-full {
        height: 60vh;
        min-height: 400px;
    }

    .magazine-hero-content h1 {
        font-size: 2rem;
    }

    .magazine-author-box {
        float: none;
        width: 100%;
        margin: 0 0 2rem 0;
    }
}

/* ============================================================
   DARK MODE
   ============================================================ */

[data-theme="dark"] .magazine-issue-archive-card,
[data-theme="dark"] .featured-article-card,
[data-theme="dark"] .section-article-card,
[data-theme="dark"] .magazine-article-archive-card,
[data-theme="dark"] .magazine-section-article-card {
    border-color: #2a2a2a;
    background: #1a1a1a;
}

/* Card/section headings — light but not link-styled */
[data-theme="dark"] .magazine-issue-archive-content h2,
[data-theme="dark"] .featured-article-content h3,
[data-theme="dark"] .section-article-card-content h3,
[data-theme="dark"] .magazine-article-archive-card h2,
[data-theme="dark"] .magazine-section-article-content h2 {
    color: #e0e0e0;
}

/* Links inside cards and TOC — near-white, not teal */
[data-theme="dark"] .magazine-issue-archive-content h2 a,
[data-theme="dark"] .featured-article-content h3 a,
[data-theme="dark"] .section-article-card-content h3 a,
[data-theme="dark"] .magazine-article-archive-card h2 a,
[data-theme="dark"] .magazine-section-article-content h2 a,
[data-theme="dark"] .all-articles-list li a,
[data-theme="dark"] .magazine-toc-section a,
[data-theme="dark"] .magazine-issue-navigation a,
[data-theme="dark"] .magazine-web-extras-note a {
    color: #b0c4c4;
}

[data-theme="dark"] .magazine-issue-archive-content h2 a:hover,
[data-theme="dark"] .featured-article-content h3 a:hover,
[data-theme="dark"] .section-article-card-content h3 a:hover,
[data-theme="dark"] .magazine-article-archive-card h2 a:hover,
[data-theme="dark"] .magazine-section-article-content h2 a:hover,
[data-theme="dark"] .all-articles-list li a:hover,
[data-theme="dark"] .magazine-toc-section a:hover,
[data-theme="dark"] .magazine-issue-navigation a:hover,
[data-theme="dark"] .magazine-web-extras-note a:hover {
    color: #fff;
    text-decoration: underline;
}

[data-theme="dark"] .magazine-issue-meta,
[data-theme="dark"] .magazine-issue-stats,
[data-theme="dark"] .featured-article-byline,
[data-theme="dark"] .section-article-byline,
[data-theme="dark"] .magazine-article-archive-byline,
[data-theme="dark"] .magazine-section-article-byline,
[data-theme="dark"] .all-articles-list .article-author {
    color: #aaa;
}

[data-theme="dark"] .magazine-issue-button-secondary {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .magazine-issue-button-secondary:hover {
    background: #333;
    color: #fff;
}

[data-theme="dark"] .magazine-issue-navigation a {
    background: #2a2a2a;
}

[data-theme="dark"] .magazine-issue-navigation a:hover {
    background: #007176;
    color: #fff;
}

/* Inside the latest-issue teal card, on-the-cover stays transparent in dark
   mode too — same teal pairing as light mode. Must come before the generic
   dark .on-the-cover rule below, OR exceed its specificity. We do both. */
[data-theme="dark"] .magazine-latest-issue .on-the-cover {
    background: transparent !important;
    color: #fff;
}

[data-theme="dark"] .on-the-cover,
[data-theme="dark"] .magazine-office-hours-content,
[data-theme="dark"] .magazine-staff-section,
[data-theme="dark"] .web-feature-card,
[data-theme="dark"] .magazine-all-articles,
[data-theme="dark"] .magazine-section-archive-header {
    background: #242424;
    color: #e0e0e0;
}

[data-theme="dark"] .magazine-all-articles li {
    background: #2e2e2e;
}

[data-theme="dark"] .magazine-office-hours .article-content,
[data-theme="dark"] .featured-article-excerpt,
[data-theme="dark"] .section-article-excerpt,
[data-theme="dark"] .magazine-article-archive-excerpt,
[data-theme="dark"] .magazine-section-article-excerpt {
    color: #ccc;
}

[data-theme="dark"] .magazine-issue-info h2 {
    color: #aaa;
}

[data-theme="dark"] .magazine-toc-section li {
    border-bottom-color: #2a2a2a;
}

[data-theme="dark"] .magazine-staff-section {
    border-left-color: #555;
}

[data-theme="dark"] .magazine-staff-section .staff-footer {
    border-top-color: #333;
}

[data-theme="dark"] .magazine-section-archive-header .description {
    color: #aaa;
}

/* Article archive filters */
[data-theme="dark"] .magazine-archive-filters select {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}

/* Article issue badge */
[data-theme="dark"] .magazine-article-issue-badge {
    background: #1a3045;
    color: #7ab8d9;
}

/* Author box (single article) */
[data-theme="dark"] .magazine-author-box {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .magazine-author-box .author-title {
    color: #aaa;
}

[data-theme="dark"] .magazine-author-box .author-bio {
    color: #ccc;
}

[data-theme="dark"] .magazine-issue-badge {
    background: #2a2a2a;
}

[data-theme="dark"] .magazine-issue-badge a {
    color: #e0e0e0;
}

/* Mobile nav panel */
[data-theme="dark"] .mobile-nav-panel {
    background: #121212;
}

[data-theme="dark"] .mobile-nav-section-header {
    background: #1a1a1a;
}

[data-theme="dark"] .mobile-nav-section-header h4 {
    color: #fdb515;
}

[data-theme="dark"] .mobile-nav-section-toggle {
    color: #fdb515;
}

[data-theme="dark"] .mobile-nav-section-articles li {
    border-bottom-color: #2a2a2a;
}

[data-theme="dark"] .mobile-nav-section-articles a {
    color: #e0e0e0;
}

[data-theme="dark"] .mobile-nav-section-articles a:hover {
    color: #fdb515;
}

/* Web feature cards */
[data-theme="dark"] .web-feature-card-content a {
    color: #b0c4c4;
}

[data-theme="dark"] .web-feature-card-content a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Page-level headings and plain text */
[data-theme="dark"] .magazine-issues-archive-header h1,
[data-theme="dark"] .magazine-issues-archive-header p,
[data-theme="dark"] .magazine-archive-header h1,
[data-theme="dark"] .magazine-archive-header p,
[data-theme="dark"] .magazine-section-archive-header h1,
[data-theme="dark"] .title-issue h1,
[data-theme="dark"] .title-issue h2,
[data-theme="dark"] .magazine-issue-info h1,
[data-theme="dark"] .magazine-featured-articles h2,
[data-theme="dark"] .magazine-web-features h2,
[data-theme="dark"] .magazine-all-articles h2,
[data-theme="dark"] .magazine-office-hours h3,
[data-theme="dark"] .magazine-editors-note h3,
[data-theme="dark"] .magazine-staff-section h3,
[data-theme="dark"] .magazine-staff-section h4,
[data-theme="dark"] .magazine-staff-section p,
[data-theme="dark"] .magazine-toc h3,
[data-theme="dark"] .on-the-cover h4,
[data-theme="dark"] .magazine-author-box h3,
[data-theme="dark"] .magazine-section h2,
[data-theme="dark"] .magazine-article-archive-meta {
    color: #e0e0e0;
}

[data-theme="dark"] .date {
    color: #888;
}

/* Teal headings go gold in dark mode for contrast */
[data-theme="dark"] .magazine-toc-section h4,
[data-theme="dark"] .magazine-office-hours h2 {
    color: #fdb515;
}

/* Navigation link text not inside an <a> */
[data-theme="dark"] .magazine-issue-navigation {
    color: #e0e0e0;
}

/* Editors note body text */
[data-theme="dark"] .magazine-editors-note p {
    color: #ccc;
}

/* Office hours body text */
[data-theme="dark"] .magazine-office-hours-content h2,
[data-theme="dark"] .magazine-office-hours-content h3 {
    color: #e0e0e0;
}

/* Archive issue card background */
[data-theme="dark"] .magazine-issues-archive-header,
[data-theme="dark"] .magazine-archive-header {
    background: transparent;
}

/* entry-content — article body text, headings, and links (single magazine article) */
[data-theme="dark"] .magazine-content-wrapper .entry-content,
[data-theme="dark"] .magazine-content-wrapper .entry-content p,
[data-theme="dark"] .magazine-content-wrapper .entry-content li,
[data-theme="dark"] .magazine-content-wrapper .entry-content blockquote {
    color: #d0d0d0;
}

[data-theme="dark"] .magazine-content-wrapper .entry-content h2,
[data-theme="dark"] .magazine-content-wrapper .entry-content h3,
[data-theme="dark"] .magazine-content-wrapper .entry-content h4,
[data-theme="dark"] .magazine-content-wrapper .entry-content h2 em,
[data-theme="dark"] .magazine-content-wrapper .entry-content h3 em,
[data-theme="dark"] .magazine-content-wrapper .entry-content h4 em,
[data-theme="dark"] .magazine-content-wrapper .entry-content h2 strong,
[data-theme="dark"] .magazine-content-wrapper .entry-content h3 strong,
[data-theme="dark"] .magazine-content-wrapper .entry-content h4 strong {
    color: #e8e8e8 !important;
}

[data-theme="dark"] .magazine-content-wrapper .entry-content a {
    color: #b0c4c4;
}

[data-theme="dark"] .magazine-content-wrapper .entry-content a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Figcaptions */
[data-theme="dark"] .wp-block-image figcaption,
[data-theme="dark"] .entry-header figcaption,
[data-theme="dark"] .wp-block-image figcaption.wp-element-caption,
[data-theme="dark"] .wp-block-embed figcaption {
    color: #aaa;
}
