/* ============================================================
   Cinnaboner Blog — Shared Styles
   Used by: blog/index.html and all article pages
   Inherits variables from ../style.css
   ============================================================ */

/* ---- Blog Index: Page Layout ---- */

.blog-page {
    max-width: 1312px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Blog Header ---- */

.blog-header {
    padding: 56px 0 40px;
    margin-bottom: 0;
}

.blog-header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.blog-header-left .badge {
    margin-bottom: 16px;
}

.blog-title {
    font-family: var(--font-sans);
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: normal;
    color: var(--text-primary);
}

.blog-subtitle {
    margin-top: 14px;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 480px;
    line-height: 1.6;
}



/* ---- Featured Article Card ---- */

.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--grid-color);
    margin-bottom: 24px;
    text-decoration: none;
    color: inherit;
    background: var(--bg-color);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-featured:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 13, 3, 0.05);
}

.blog-featured-image {
    overflow: hidden;
    min-height: 360px;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-featured:hover .blog-featured-image img {
    transform: scale(1.04);
}

.blog-featured-content {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--grid-color);
}

.blog-featured-title {
    font-family: var(--font-sans);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 16px 0 16px;
}

.blog-featured-excerpt {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-muted);
    flex: 1;
}

/* ---- 2-Column Article Grid ---- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg-color);
    border: 1px solid var(--grid-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 13, 3, 0.05);
}

.blog-card-image {
    overflow: hidden;
    aspect-ratio: 4/3;
}

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

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-card-content {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid var(--grid-color);
}

.blog-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-family: var(--font-sans);
    font-size: clamp(15px, 1.4vw, 19px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.blog-card-excerpt {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-top: 8px;
    flex: 1;
}

.blog-read-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-orange);
    text-decoration: none;
    margin-top: 16px;
    transition: gap 0.2s ease;
}

.blog-read-link:hover {
    gap: 10px;
}

/* ---- Shared: Category Tags & Meta ---- */

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--grid-color);
    color: var(--tag-color);
}

.blog-tag--design {
    background: #FFF0E3;
    color: #C96D1A;
}

.blog-tag--strategy {
    background: #E8F4FF;
    color: #1A6BAD;
}

.blog-tag--brand {
    background: #F0E8FF;
    color: #6B1AAD;
}

.blog-tag--mfr {
    background: #E8FFF0;
    color: #1AAD5A;
}

.blog-read-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---- Article Page Layout ---- */

.article-page {
    max-width: 1312px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.article-header-section {
    padding: 48px 0 0;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.article-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: var(--accent-orange);
}

.article-breadcrumb-sep {
    color: var(--grid-color);
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-title {
    font-family: var(--font-sans);
    font-size: clamp(28px, 4vw, 56px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.article-intro-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin: 40px 0 0;
    /* Height will adjust automatically to content */
}

.article-intro-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Article Body Typography ---- */

.article-body-wrap {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 48px 0 0px;
}

.article-body-wrap p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 22px;
}

.article-body-wrap h2 {
    font-family: var(--font-sans);
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 64px 0 24px;
    padding-top: 8px;
}

.article-body-wrap h3 {
    font-family: var(--font-sans);
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 40px 0 16px;
}

.article-body-wrap strong {
    font-weight: 700;
    color: var(--text-primary);
}

.article-body-wrap em {
    font-style: italic;
}

/* Inline text links only — excludes buttons and nav */
.article-body-wrap p a,
.article-body-wrap li a,
.article-body-wrap h2 a,
.article-body-wrap h3 a {
    color: var(--accent-orange);
    text-decoration: underline;
    text-decoration-color: rgba(255, 148, 93, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

.article-body-wrap p a:hover,
.article-body-wrap li a:hover {
    text-decoration-color: var(--accent-orange);
}

/* Restore CTA button colors inside article body */
.article-body-wrap .cta-btn,
.cta-section .cta-btn {
    text-decoration: none;
}

.article-body-wrap .cta-btn--primary,
.cta-section .cta-btn--primary {
    color: #fff;
}

.article-body-wrap .cta-btn--outline,
.cta-section .cta-btn--outline {
    color: var(--text-primary);
}

/* ---- Post Figures ---- */

.post-figure {
    margin: 36px 0 36px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--grid-color);
}

.post-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.post-figure figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    background: var(--bg-color);
    border-top: 1px solid var(--grid-color);
}

/* ---- CTA sections inside article ---- */

.article-body-wrap .cta-section,
.article-body-wrap .cta-section--inline {
    border-radius: 16px;
    margin: 120px 0;
    overflow: hidden;
    padding: 100px 40px 80px;
}

/* Remove redundant top margin when a heading follows onto a CTA */
.article-body-wrap .cta-section+h2,
.article-body-wrap .cta-section--inline+h2,
.article-body-wrap .cta-section+h3,
.article-body-wrap .cta-section--inline+h3 {
    margin-top: 0;
}

/* Fix .cta-title inside blog — .article-body-wrap h2 overrides it via specificity */
.cta-section .cta-title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 500;
    line-height: 1.125;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

/* ---- Article Tables (comparison sheets, etc.) ---- */
.article-body-wrap .table-wrap {
    margin: 32px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--grid-color, #EAE0D5);
    background: #FFFFFF;
}

.article-body-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
}

/* If a table is dropped without a wrapper, still behave on mobile */
.article-body-wrap > table,
.article-body-wrap p + table {
    margin: 32px 0;
    display: block;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--grid-color, #EAE0D5);
    background: #FFFFFF;
}

.article-body-wrap thead {
    background: #FFFAF6;
}

.article-body-wrap th {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--accent-orange, #FF945D);
    vertical-align: middle;
    white-space: nowrap;
}

.article-body-wrap td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--grid-color, #EAE0D5);
    vertical-align: top;
    color: var(--text-primary);
}

.article-body-wrap tbody tr:last-child td {
    border-bottom: none;
}

/* First column gets a touch of emphasis — usually the "Tool" / label */
.article-body-wrap tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Subtle zebra for readability on wide comparison tables */
.article-body-wrap tbody tr:nth-child(even) td {
    background: rgba(255, 250, 246, 0.5);
}

.article-body-wrap tbody tr:hover td {
    background: rgba(255, 148, 93, 0.06);
}

@media (max-width: 640px) {
    .article-body-wrap th,
    .article-body-wrap td {
        padding: 12px 14px;
        font-size: 14px;
    }

    .article-body-wrap tbody td:first-child {
        white-space: normal;
    }
}

/* ---- Article Footer (related / back link) ---- */

/* ---- Article Footer Navigation ---- */

.article-navigation {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0px 16px 0px;
}

.article-navigation-label {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--tag-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* ---- Footer (same style as main site) ---- */

.blog-footer {
    border-top: 1px solid var(--grid-color);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 16px;
    flex-wrap: wrap;
}

.blog-footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}



/* ---- Back to Top (matches home page) ---- */

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 50px;
    height: 50px;
    background-color: #D1D1D1;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #BDBDBD;
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
    /* Main responsive overrides for blog layouts only */
    .blog-header {
        padding: 40px 0 32px;
    }
}

@media (max-width: 900px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured-image {
        min-height: 240px;
        order: -1;
    }

    .blog-featured-content {
        padding: 28px;
        border-left: none;
        border-top: 1px solid var(--grid-color);
    }

    .blog-grid {
        grid-template-columns: 1fr;
        border-radius: 0 0 16px 16px;
    }
}

@media (max-width: 600px) {
    .blog-header {
        padding: 40px 0 32px;
        margin-bottom: 40px;
    }

    .blog-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-title {
        font-size: 28px;
        font-weight: 500;
        letter-spacing: normal;
    }

    .article-body-wrap p {
        font-size: 16px;
    }
}