/*
Theme Name: The Magazine
Author: Bibechana Bhandari
Description: A custom WordPress magazine-style theme developed for a course project. This theme features dynamic content using WP_Query, a custom post type for Issues, responsive design, card-based layouts, and enhanced navigation including next/previous functionality. Additional features include a custom 404 page, archive templates, and a clean user interface inspired by modern editorial websites.
Version: 1.0
*/

/* =========================
   GLOBAL
========================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f7fa;
    color: #1f2933;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* =========================
   HEADER
========================= */
.site-header {
    background: #1f2937; /* nicer dark */
    
}

.site-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

/* NAVIGATION */
.main-nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.2s ease;
    font-weight: 400;
}

.main-nav a:hover {
    color: #2f8f83;
}

/* =========================
   SECTIONS
========================= */
section {
    margin: 60px 0;
}

h1, h2, h3, p {
    font-family: Georgia, serif;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

/* =========================
   LATEST ISSUE
========================= */
.issue-card {
    display: flex;
    gap: 25px;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.issue-card img {
    width: 220px;
    height: auto;
}

.issue-card a {
    text-decoration: none;
    font-weight: 600;
}

.issue-card a:hover {
    background: #1c6159;

}

/* =========================
   ARTICLES + POPULAR GRID
========================= */
.articles,
.popular {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* CARD STYLE */
.articles article,
.popular article {
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.articles article:hover,
.popular article:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* IMAGES */
.articles img,
.popular img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* LINKS */
article h3 a {
    color: #1f2933;
    text-decoration: none;
    font-size: 16px;
}

article h3 a:hover {
    color: #2f8f83;
}

/* DATE TEXT */
article p {
    font-size: 14px;
    color: #6b7280;
}

/* =========================
   ALL ISSUES GRID
========================= */
.issues-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.issue-card-small {
    background: #ffffff;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.issue-card-small:hover {
    transform: translateY(-5px);
}

.issue-card-small img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.issue-card-small h4 {
    margin: 10px 0 5px;
    font-size: 15px;
}

.issue-card-small a {
    text-decoration: none;
    color: #1f2933;
}

.issue-card-small a:hover {
    color: #2f8f83;
}

.issue-card-small p {
    font-size: 13px;
    color: #6b7280;
}

/* =========================
   BUTTON
========================= */
.btn {
    display: inline-block;
    background: #2f8f83;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #256e66;
}

/* =========================
   SINGLE POST
========================= */


.single-post img {
    width: 100%;
    margin: 20px 0;
    border-radius: 6px;
}

/* =========================
   ISSUE PAGE
========================= */
.issue-layout {
    max-width: 900px;
    margin: auto;
}

.issue-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.issue-flex img {
    width: 300px;
    border-radius: 6px;
}

/* =========================
   FOOTER
========================= */
.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-footer h3 {
    color: white;
    margin-bottom: 10px;
}

.site-footer p {
    font-size: 14px;
}

/* =========================
   RESPONSIVE
========================= */

/* Tablet */
@media (max-width: 900px) {
    .articles,
    .popular,
    .issues-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .issue-card {
        flex-direction: column;
    }

    .issue-flex {
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .articles,
    .popular,
    .issues-grid {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}
/* FOOTER */
.site-footer {
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left h3 {
    margin-bottom: 10px;
}

.footer-left p {
    color: #9ca3af;
}

.footer-right {
    text-align: right;
}

.footer-right .copyright {
    font-size: 14px;
    color: #9ca3af;
}
/* CARD STRUCTURE FIX */
.card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* IMAGE */
.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* CONTENT */
.card-content {
    padding: 15px;
}

.card-content a {
    display: block;
    text-decoration: none;
    margin-bottom: 6px;
}

.card-content a:hover {
    color: #2f8f83;
    color: #fff;
}

/* DATE */
.card-content p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* BUTTON */
.btn {
    display: inline-block;
    background: #2f8f83;
    
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
    text-align: center;
}

.btn:hover {
    color: #fff;
}
/* FIX: GRID FOR ARTICLES PAGE */
.articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.btn {
    display: inline-block;
    width: auto;
}

.card-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}
/* SINGLE PAGE LAYOUT */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin: 40px 0;
}

/* IMAGE */
.single-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* CONTENT */
.single-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.single-content .date {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.entry-content p {
    line-height: 1.7;
    margin-bottom: 15px;
}

/* MOBILE */
@media (max-width: 768px) {
    .single-layout {
        grid-template-columns: 1fr;
    }
}
/* SINGLE PAGE LAYOUT */
.single-layout {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 50px;
    align-items: center;   /* centers vertically */
    margin: 60px auto;
    max-width: 1100px;
}

/* IMAGE */
.single-image {
    width: 100%;
}

.single-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

/* CONTENT */
.single-content h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

.single-content .date {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.entry-content p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #374151;
}

/* MOBILE */
@media (max-width: 768px) {
    .single-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .single-image img {
        height: 220px;
    }
}
/* NAV LINKS */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    position: relative;
}
/* 404 PAGE */
.error-404 {
    text-align: center;
    padding: 0px 20px;
}

.error-404 h1 {
    font-size: 80px;
    margin-bottom: 10px;
    color: #38bdf8;
}

.error-404 h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.error-404 p {
    margin-bottom: 20px;
    color: #6b7280;
}
/* POST NAVIGATION */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding: 20px 20px;
    border-top: 1px solid #e5e7eb;
}

.post-navigation a {
    text-decoration: none;
    color: #1f2933;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}

.post-navigation a:hover {
    color: #2f8f83;
}
