/* ===============================
   ARTICLE PAGE
   HeraPrint Journal
   =============================== */

.article-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 0px 20px 20px 20px;
}

/* Back link already inline styled, but keep spacing consistent */
.article-page a {
    font-size: 14px;
}

/* ===============================
   HERO IMAGE
   =============================== */

#articleImage {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ===============================
   CATEGORY
   =============================== */

#articleCategory {
    display: inline-block;
    margin-top: 15px;
}

/* ===============================
   TITLE
   =============================== */

#articleTitle {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 10px;
    color: #111;
}

/* ===============================
   META INFO
   =============================== */

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

/* ===============================
   ARTICLE BODY
   =============================== */

#articleBody {
    margin-top: 25px;
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}

#articleBody h2 {
    margin-top: 35px;
    font-size: 24px;
    font-weight: 600;
    color: #111;
}

#articleBody h3 {
    margin-top: 25px;
    font-size: 20px;
    font-weight: 600;
}

#articleBody p {
    margin-bottom: 15px;
}

#articleBody img {
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

/* ===============================
   TAGS
   =============================== */

#articleTags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* reuse chip style from blog.css if exists */
.chip {
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    border: 1px solid #e5e7eb;
}

/* ===============================
   COPY BUTTON
   =============================== */

#copyLink {
    background: black;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

#copyLink:hover {
    opacity: 0.85;
}

/* ===============================
   LOADING STATE
   =============================== */

#loadingState {
    text-align: center;
    padding: 60px 0;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top: 4px solid black;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================
   ERROR STATE
   =============================== */

#errorState {
    text-align: center;
    padding: 80px 20px;
}

#errorState h1 {
    font-size: 26px;
    margin-bottom: 10px;
}

#errorState p {
    color: #666;
    margin-bottom: 20px;
}

/* ===============================
   RELATED ARTICLES
   =============================== */

.related-section {
    margin-top: 60px;
    padding: 40px 20px;
    background: #fafafa;
}

.related-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-card h4 {
    font-size: 16px;
    margin: 10px;
    color: #111;
}

.related-card p {
    font-size: 13px;
    color: #666;
    margin: 0 10px 15px;
}

/* ===============================
   BREADCRUMBS
   =============================== */
.breadcrumb-container {
    max-width: 800px;
    margin: 40px auto 8px auto; /* 40px left margin, 20px top/bottom */
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    /* This ensures it aligns within the container */
    justify-content: flex-start; 
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #ccc;
}

main h1 {
    font-size: 28px;
    margin: 35px 0px 10px 0px;
    color: #111;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 768px) {

    #articleTitle {
        font-size: 26px;
    }

    .article-page {
        padding: 15px;
    }

    .related-section {
        padding: 30px 15px;
    }
}