/**
 * @file         blog.css
 * @version      4.0.0
 * @purpose      Public blog styles — approved mockup layout for article page,
 *               plus index/category grid styles. All scoped to blog selectors.
 * @location     /public/assets/css/blog.css
 * @last-updated 2026-05-12
 */


/* ===================================================================
   BLOG STAGE — outer wrapper for single article pages
   =================================================================== */
.blog-stage {
    max-width: 1180px;
    width: calc(100% - 36px);
    margin: 0 auto;
    padding: 24px 0 56px;
}

/* ===================================================================
   BREADCRUMB
   =================================================================== */
.blog-breadcrumb {
    width: min(960px, 100%);
    margin: 0 auto 16px;
}
.blog-breadcrumb a {
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.15s ease;
}
.blog-breadcrumb a:hover {
    color: var(--color-gold, #c9922a);
}
.blog-admin-edit-link {
    float: right;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(201, 146, 42, 0.12);
    border: 1px solid rgba(201, 146, 42, 0.3);
    color: var(--color-gold, #c9922a);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.blog-admin-edit-link:hover {
    background: rgba(201, 146, 42, 0.22);
    border-color: rgba(201, 146, 42, 0.5);
}

/* ===================================================================
   ARTICLE CARD
   =================================================================== */
.article-card {
    width: 100%;
    margin: 0 auto;
    background: rgba(16, 16, 16, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* -------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.article-hero {
    width: 100%;
    height: clamp(260px, 36vw, 430px);
    overflow: hidden;
    background: var(--bg-elevated, #202020);
    position: relative;
}
.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.article-hero--empty {
    height: 48px;
    background: linear-gradient(90deg, rgba(201,146,42,0.06) 0%, rgba(255,255,255,0.02) 50%, rgba(201,146,42,0.06) 100%);
}

/* -------------------------------------------------------------------
   Article Inner
   ------------------------------------------------------------------- */
.article-inner {
    padding: clamp(24px, 4vw, 46px);
}

/* -------------------------------------------------------------------
   Topline — title area + share
   ------------------------------------------------------------------- */
.article-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}
.article-topline__left {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .article-topline {
        flex-direction: column;
        gap: 16px;
    }
}

/* Category Pill */
.category-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(201, 146, 42, 0.14);
    border: 1px solid rgba(201, 146, 42, 0.32);
    color: var(--color-gold, #c9922a);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    text-decoration: none;
    margin-bottom: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.category-pill:hover {
    background: rgba(201, 146, 42, 0.24);
    border-color: rgba(201, 146, 42, 0.55);
}

/* H1 */
.article-card h1 {
    font-size: clamp(34px, 4.2vw, 58px);
    font-weight: 800;
    line-height: 1.12;
    color: var(--text-primary, #fff);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

/* Meta row */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: var(--text-muted, #8b8b8b);
    font-size: 0.82rem;
}
.meta span {
    display: inline-flex;
    align-items: center;
}

/* -------------------------------------------------------------------
   Share Box (desktop — right of title)
   ------------------------------------------------------------------- */
.share-box {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

@media (max-width: 768px) {
    .share-box {
        display: none;
    }
}

/* -------------------------------------------------------------------
   Lead / Excerpt
   ------------------------------------------------------------------- */
.lead {
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--text-secondary, #b3b3b3);
    margin: 0 0 28px;
    padding: 16px 20px;
    border-left: 3px solid var(--color-gold, #c9922a);
    background: rgba(255, 255, 255, 0.025);
    border-radius: 0 8px 8px 0;
}

/* ===================================================================
   BLOG PROSE — article content body
   =================================================================== */
.blog-prose {
    color: var(--text-primary, #e0e0e0);
    font-size: 1.04rem;
    line-height: 1.78;
}

.blog-prose h2 {
    font-size: 1.48rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 40px 0 16px;
    line-height: 1.28;
}
.blog-prose h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 32px 0 12px;
    line-height: 1.32;
}
.blog-prose h4 {
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--text-secondary, #ccc);
    margin: 24px 0 8px;
}

.blog-prose p {
    margin: 0 0 20px;
}

.blog-prose a {
    color: var(--color-gold, #c9922a);
    text-decoration: underline;
    text-decoration-color: rgba(201, 146, 42, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}
.blog-prose a:hover {
    text-decoration-color: var(--color-gold, #c9922a);
}

.blog-prose strong,
.blog-prose b {
    color: var(--text-primary, #fff);
    font-weight: 700;
}

.blog-prose .blog-text-accent {
    color: #C9922A;
}

.blog-prose .blog-text-muted {
    color: rgba(255,255,255,0.65);
}

.blog-prose .blog-highlight {
    background: rgba(201,146,42,0.28);
    color: #fff;
    padding: 0.1em 0.25em;
    border-radius: 0.25rem;
}

.blog-prose .blog-text-lg {
    font-size: 1.15rem;
    line-height: 1.7;
}

.blog-prose .blog-text-center {
    text-align: center;
}

.blog-prose .blog-callout {
    border-left: 4px solid #C9922A;
    background: rgba(255,255,255,0.06);
    padding: 1rem;
    border-radius: 0.75rem;
}

.blog-prose a.blog-btn {
    display: inline-block;
    background: #C9922A;
    color: #111;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.blog-prose .blog-color-gold {
    color: #C9922A;
}

.blog-prose .blog-color-white {
    color: #ffffff;
}

.blog-prose .blog-color-muted {
    color: #b3b3b3;
}

.blog-prose .blog-color-red {
    color: #ef4444;
}

.blog-prose .blog-color-green {
    color: #22c55e;
}

.blog-prose .blog-color-blue {
    color: #3b82f6;
}

.blog-prose blockquote {
    margin: 28px 0;
    padding: 16px 22px;
    border-left: 3px solid var(--color-gold, #c9922a);
    background: rgba(255, 255, 255, 0.025);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary, #b3b3b3);
}
.blog-prose blockquote p:last-child {
    margin-bottom: 0;
}

.blog-prose ul,
.blog-prose ol {
    margin: 0 0 20px;
    padding-left: 28px;
}
.blog-prose ul { list-style: disc; }
.blog-prose ol { list-style: decimal; }
.blog-prose li { margin-bottom: 6px; }

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
}

.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgba(255, 255, 255, 0.16);
    margin: 24px 0;
    display: block;
    overflow-x: auto;
}

.blog-prose th,
.blog-prose td {
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px 12px;
    text-align: left;
}

.blog-prose th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #fff);
    font-weight: 600;
}

.blog-prose hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 32px 0;
}

/* Gallery CTA — any link containing "gallery" or "photos" */
.blog-prose a[href*="/gallery"],
.blog-prose a[href*="/g/"],
.blog-prose .gallery-cta {
    display: inline-block;
    margin: 16px 0 20px;
    padding: 11px 26px;
    background: var(--color-gold, #c9922a);
    color: #111 !important;
    font-weight: 700;
    font-size: 0.94rem;
    border-radius: 999px;
    text-decoration: none !important;
    transition: opacity 0.15s ease, transform 0.12s ease;
    box-shadow: 0 4px 16px rgba(201, 146, 42, 0.3);
}
.blog-prose a[href*="/gallery"]:hover,
.blog-prose a[href*="/g/"]:hover,
.blog-prose .gallery-cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ===================================================================
   SHARE ICON BUTTONS (inline SVG only)
   =================================================================== */
.share-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.share-links__label {
    color: var(--text-muted, #8b8b8b);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 2px;
}
.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #b3b3b3);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
    padding: 0;
    outline: none;
}
.share-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    pointer-events: none;
}
.share-icon:hover,
.share-icon:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary, #fff);
    transform: translateY(-1px);
}
.share-icon:focus-visible {
    box-shadow: 0 0 0 2px rgba(201, 146, 42, 0.5);
}
.share-icon--copied {
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.35);
    background: rgba(76, 175, 80, 0.08);
}

@media (max-width: 480px) {
    .share-icon {
        width: 40px;
        height: 40px;
    }
    .share-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Legacy blog-share kept for any remaining references */
.blog-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* -------------------------------------------------------------------
   Footer Share (below article, visible on all screens)
   ------------------------------------------------------------------- */
.article-footer-share {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
}

/* ===================================================================
   RELATED POSTS
   =================================================================== */
.related-wrap {
    width: 100%;
    margin: 48px auto 0;
}
.related-heading {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.related-card {
    display: flex;
    flex-direction: column;
    background: rgba(16, 16, 16, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.related-card:hover {
    border-color: rgba(201, 146, 42, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
    transform: translateY(-2px);
}

.related-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-elevated, #202020);
}
.related-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.related-card__img--empty {
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.related-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.related-card__cat {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gold, #c9922a);
    margin-bottom: 6px;
}
.related-card__title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card__excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary, #b3b3b3);
    line-height: 1.45;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.related-card__date {
    font-size: 0.74rem;
    color: var(--text-muted, #8b8b8b);
}

/* ===================================================================
   BLOG INDEX / CATEGORY PAGE (preserved — not redesigned)
   =================================================================== */
.blog-page__header {
    margin-bottom: 28px;
}

/* ===================================================================
   BLOG AD SLOTS (manual placements)
   =================================================================== */
.site-ad--blog-header,
.site-ad--blog-footer,
.site-ad--blog-inline {
    margin: 18px auto;
    text-align: center;
}

.site-ad--blog-inline-1 {
    margin: 20px auto 24px;
}

.site-ad--blog-inline-2 {
    margin: 24px auto 20px;
}

.blog-stage + .site-ad--blog-footer {
    margin-top: 22px;
}

.blog-inline-ad {
    max-width: 300px;
    margin: 0 0 1rem 1.25rem;
}

.blog-inline-ad--right {
    float: right;
}

.blog-inline-ad--left {
    float: left;
    margin: 0 1.25rem 1rem 0;
}

.blog-inline-ad .site-ad {
    width: 100%;
}

.blog-inline-ad .site-ad__image,
.blog-inline-ad .site-ad__video {
    max-width: 100%;
    height: auto;
}

.blog-article__body::after {
    content: "";
    display: block;
    clear: both;
}

@media (max-width: 768px) {
    .site-ad--blog-header,
    .site-ad--blog-footer,
    .site-ad--blog-inline,
    .site-ad--blog-inline-1,
    .site-ad--blog-inline-2 {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 700px) {
    .blog-inline-ad,
    .blog-inline-ad--right,
    .blog-inline-ad--left {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
    }
}

.blog-page__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin: 0;
}
.blog-page__subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary, #b3b3b3);
    font-size: 1rem;
}

.blog-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 768px) {
    .blog-page__layout {
        grid-template-columns: 1fr;
    }
}

.blog-page__main { min-width: 0; }

.blog-page__sidebar {
    position: sticky;
    top: 80px;
}
.blog-page__sidebar-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, #8b8b8b);
    margin: 0 0 14px;
}
.blog-page__sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-page__sidebar-list li { margin-bottom: 2px; }
.blog-page__sidebar-list a {
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.blog-page__sidebar-list a:hover,
.blog-page__sidebar-list a.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-gold, #c9922a);
}
.blog-page__sidebar-list a.is-active { font-weight: 600; }

.blog-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.blog-card {
    background: var(--card-bg, #141414);
    border: 1px solid var(--card-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.blog-card:hover {
    border-color: rgba(201, 146, 42, 0.28);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
    transform: translateY(-2px);
}
.blog-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.blog-card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-elevated, #202020);
}
.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.blog-card__img--placeholder {
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}
.blog-card__body { padding: 16px; }
.blog-card__category {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gold, #c9922a);
    margin-bottom: 6px;
}
.blog-card__title {
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card__excerpt {
    font-size: 0.84rem;
    color: var(--text-secondary, #b3b3b3);
    line-height: 1.45;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card__date {
    font-size: 0.76rem;
    color: var(--text-muted, #8b8b8b);
}

.blog-page__empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary, #b3b3b3);
}
.blog-page__empty p { font-size: 1.1rem; margin: 0; }

.blog-page__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.blog-page__pagination-link {
    padding: 8px 18px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.blog-page__pagination-link:hover {
    background: rgba(201, 146, 42, 0.15);
    color: var(--color-gold, #c9922a);
}
.blog-page__pagination-info {
    font-size: 0.84rem;
    color: var(--text-muted, #8b8b8b);
}

/* ===================================================================
   BLOG GALLERY CTA — matches gallery-share CTA styling
   =================================================================== */
.blog-gallery-cta {
    text-align: center;
    margin: 2rem 0 1rem;
}

.blog-gallery-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(180deg, #e0b158 0%, #c9922a 100%);
    color: #1a1208;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(201, 146, 42, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.blog-gallery-cta__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(201, 146, 42, 0.42);
    filter: brightness(1.05);
}

.blog-gallery-cta__button:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* ===================================================================
   DISABLED / COMING SOON
   =================================================================== */
.blog-disabled {
    text-align: center;
    padding: 64px 20px;
}
.blog-disabled h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-bottom: 12px;
}
.blog-disabled p {
    color: var(--text-secondary, #b3b3b3);
    font-size: 1rem;
}