/* =====================================================================
   Pune Nest — Blog (listing + article)
   Uses the tokens from theme.css; no hard-coded brand colours.
   ===================================================================== */

/* ---------- Shared bits ---------- */
.blog-eyebrow {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brass-700);
}

.blog-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy-900);
    background: var(--brass-300);
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    line-height: 1.2;
}

.blog-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
}
.blog-meta-line .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy-800);
    text-decoration: none;
}
.read-more i { font-size: 0.75rem; transition: transform 0.2s ease; }

/* ---------- Listing header ---------- */
.blog-hero {
    background: var(--navy-900);
    color: #fff;
    padding: 7rem 0 2.75rem;
    border-bottom: 3px solid var(--brass-500);
}
.blog-hero .container { max-width: 1200px; }
.blog-hero .blog-eyebrow { color: var(--brass-400); }
.blog-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 0.6rem 0 0.5rem;
}
.blog-hero p { color: rgba(255, 255, 255, 0.75); max-width: 560px; margin: 0; font-size: 1.02rem; }

.blog-hero-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.blog-search {
    display: flex;
    align-items: center;
    width: min(360px, 100%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-btn);
    padding: 0 0.4rem 0 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.blog-search:focus-within { border-color: var(--brass-400); background: rgba(255, 255, 255, 0.12); }
.blog-search i { color: rgba(255, 255, 255, 0.55); font-size: 0.9rem; }
.blog-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 0.6rem;
}
.blog-search input::placeholder { color: rgba(255, 255, 255, 0.5); }

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}
.blog-filter {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}
.blog-filter:hover { border-color: var(--brass-400); color: #fff; }
.blog-filter.active { background: var(--brass-500); border-color: var(--brass-500); color: var(--navy-950); }

/* ---------- Listing body ---------- */
.blog-listing { padding: 3.5rem 0 4.5rem; background: var(--surface-warm); }
.blog-listing .container { max-width: 1200px; }

.blog-results-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: var(--ink-soft);
}
.blog-results-note a { color: var(--brass-700); font-weight: 600; text-decoration: none; }
.blog-results-note a:hover { text-decoration: underline; }

.blog-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.blog-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Featured (newest) post */
.blog-featured {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 3rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.blog-featured:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.blog-featured-media { position: relative; overflow: hidden; min-height: 320px; background: var(--navy-800); }
.blog-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.blog-featured:hover .blog-featured-media img { transform: scale(1.03); }
.blog-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: clamp(1.75rem, 3.5vw, 3rem);
}
.blog-featured-body h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 1.2;
    margin: 0;
    color: var(--ink);
}
.blog-featured-body p { color: var(--ink-soft); line-height: 1.7; margin: 0; }

/* Card grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }

.post-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--navy-800);
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-media .blog-label { position: absolute; left: 1rem; top: 1rem; }

.media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--brass-400);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    background:
        radial-gradient(circle at 80% 20%, rgba(184, 137, 59, 0.18), transparent 55%),
        var(--navy-800);
}

.post-card-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.4rem 1.5rem 1.5rem; flex: 1; }
.post-card-body h3 {
    font-size: 1.22rem;
    line-height: 1.35;
    margin: 0;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-body p {
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-body .blog-meta-line { margin-top: auto; padding-top: 0.4rem; }

/* Whole card clickable: the title link stretches over the card */
.stretched-link { color: inherit; text-decoration: none; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card:hover h3,
.blog-featured:hover h2 {
    text-decoration: underline;
    text-decoration-color: var(--brass-500);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.post-card:hover .read-more i,
.blog-featured:hover .read-more i { transform: translateX(3px); }
.stretched-link:focus-visible { outline: none; }
.stretched-link:focus-visible::after { outline: 2px solid var(--brass-500); outline-offset: -2px; border-radius: var(--radius-lg); }

/* Pagination */
.blog-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin-top: 3rem; }
.blog-pagination a,
.blog-pagination span {
    min-width: 42px;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-btn);
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.blog-pagination a { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.blog-pagination a:hover { border-color: var(--navy-800); }
.blog-pagination .current { background: var(--navy-800); color: #fff; }
.blog-pagination .gap { color: var(--ink-muted); }

.blog-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.blog-empty h2 { color: var(--ink); font-size: 1.6rem; margin-bottom: 0.5rem; }
.blog-empty a { color: var(--brass-700); font-weight: 600; }

/* Call-to-action band (listing + article) */
.blog-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(184, 137, 59, 0.22), transparent 45%),
        var(--navy-900);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 4vw, 2.75rem);
}
.blog-cta .blog-eyebrow { color: var(--brass-400); }
.blog-cta h2 { color: #fff; font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0.4rem 0 0.4rem; }
.blog-cta p { color: rgba(255, 255, 255, 0.75); margin: 0; max-width: 520px; line-height: 1.6; }
.blog-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.blog-listing .blog-cta { margin-top: 3.5rem; }

.btn-brass,
.btn-ghost-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.35rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-brass { background: var(--brass-500); color: var(--navy-950); border: 1px solid var(--brass-500); }
.btn-brass:hover { background: var(--brass-400); border-color: var(--brass-400); color: var(--navy-950); }
.btn-ghost-light { color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }

/* ---------- Article ---------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--brass-500);
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 2000;
    pointer-events: none;
}

.article-header { background: var(--surface-warm); padding: 7rem 0 0; }
.article-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.article-header-inner { max-width: 780px; }

.article-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-bottom: 1.5rem;
}
.article-crumbs a { color: var(--ink-soft); text-decoration: none; }
.article-crumbs a:hover { color: var(--brass-700); }
.article-crumbs i { font-size: 0.6rem; opacity: 0.6; }

.blog-post-header h1 {
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.15;
    color: var(--ink);
    margin: 0.85rem 0 1rem;
}
.article-dek { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 1.75rem; }

.article-byline { display: flex; align-items: center; gap: 0.85rem; padding-bottom: 2.5rem; }
.author-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy-800);
    color: var(--brass-400);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}
.article-byline strong { display: block; color: var(--ink); font-size: 0.95rem; }

.article-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}
.article-hero::before {
    /* warm header colour continues behind the top half of the image */
    content: "";
    position: absolute;
    inset: 0 0 50% 0;
    background: var(--surface-warm);
    z-index: -1;
    box-shadow: 0 0 0 100vmax var(--surface-warm);
    clip-path: inset(0 -100vmax);
}
.article-hero img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 280px;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 1rem 4rem;
}

/* Body typography */
.post-body { font-size: 1.125rem; line-height: 1.8; color: var(--ink); }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.4rem; color: #2a3444; }
.post-body > p:first-child { font-size: 1.22rem; line-height: 1.75; color: var(--ink); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--navy-700); text-decoration: underline; text-decoration-color: var(--brass-500); text-underline-offset: 3px; }

.post-body h2 {
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    line-height: 1.25;
    color: var(--ink);
    margin: 3.25rem 0 1.1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    position: relative;
    scroll-margin-top: 100px;
}
.post-body h2::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--brass-500);
}
.post-body h3 {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1.3rem;
    line-height: 1.35;
    color: var(--ink);
    margin: 2.25rem 0 0.85rem;
    scroll-margin-top: 100px;
}
.heading-num {
    flex: none;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brass-700);
    border: 1px solid var(--brass-300);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    position: relative;
    top: -0.15em;
}
.post-body h2 .heading-num { margin-right: 0.6rem; }

.post-body ul,
.post-body ol { margin: 0 0 1.6rem; padding-left: 0; list-style: none; }
.post-body li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.6rem;
    color: #2a3444;
}
.post-body ul li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.72em;
    width: 7px;
    height: 7px;
    border-radius: 1px;
    background: var(--brass-500);
    transform: rotate(45deg);
}
.post-body blockquote {
    margin: 2rem 0;
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-left: 3px solid var(--brass-500);
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.55;
    font-style: italic;
    color: var(--navy-800);
}
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* End of article */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.article-tags span { color: var(--ink-muted); font-weight: 600; margin-right: 0.25rem; }
.article-tags a { color: var(--ink-soft); text-decoration: none; }
.article-tags a::before { content: "#"; color: var(--brass-600); margin-right: 1px; }
.article-tags a:hover { color: var(--navy-800); text-decoration: underline; }

.author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: var(--surface-warm);
    border-radius: var(--radius-lg);
}
.author-box .author-avatar { width: 56px; height: 56px; font-size: 1.2rem; }
.author-box strong { display: block; color: var(--ink); margin-bottom: 0.3rem; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.6; }

/* Sidebar */
.article-aside { position: relative; }
.aside-sticky { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 1.75rem; }
.aside-title {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 0.85rem;
}

.article-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.article-toc a {
    display: block;
    padding: 0.4rem 0 0.4rem 1rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.article-toc a:hover { color: var(--ink); }
.article-toc a.active { color: var(--navy-800); font-weight: 600; border-left-color: var(--brass-500); }

.aside-card {
    background: var(--navy-900);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.aside-card h3 { color: #fff; font-size: 1.2rem; margin: 0.4rem 0 0.5rem; line-height: 1.3; }
.aside-card p { color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; line-height: 1.55; margin: 0 0 1.1rem; }
.aside-card .blog-eyebrow { color: var(--brass-400); }
.aside-card .btn-brass { width: 100%; justify-content: center; }
.aside-card .aside-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.aside-card .aside-wa:hover { color: #fff; text-decoration: underline; }

/* Share */
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.share-btn svg { width: 15px; height: 15px; fill: currentColor; }
.share-btn:hover { color: var(--navy-900); border-color: var(--navy-800); }
.share-btn.copied { color: #fff; background: var(--navy-800); border-color: var(--navy-800); }
.share-inline { display: none; align-items: center; gap: 1rem; margin-top: 2rem; }
.share-inline .aside-title { margin: 0; }

.article-cta { margin-top: 1rem; }

/* Related */
.related-section { background: var(--surface-warm); padding: 4rem 0 4.5rem; }
.related-section .container { max-width: 1200px; }
.related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.related-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0.4rem 0 0; color: var(--ink); }
.related-head .read-more { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 760px; }
    .article-aside { display: none; }
    .share-inline { display: flex; }
}

@media (max-width: 768px) {
    .blog-hero { padding: 6rem 0 2rem; }
    .blog-search { width: 100%; }
    .blog-filters { flex-wrap: nowrap; overflow-x: auto; margin-top: 1.5rem; padding-bottom: 0.25rem; scrollbar-width: none; }
    .blog-filters::-webkit-scrollbar { display: none; }
    .blog-filter { white-space: nowrap; }
    .blog-listing { padding: 2.25rem 0 3rem; }
    .blog-featured { grid-template-columns: 1fr; margin-bottom: 2.25rem; }
    .blog-featured-media { min-height: 0; aspect-ratio: 16 / 9; }
    .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .article-header { padding-top: 6rem; }
    .article-dek { font-size: 1.05rem; }
    .article-byline { padding-bottom: 1.75rem; }
    .article-hero img { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }
    .article-layout { padding-top: 2.25rem; }
    .post-body { font-size: 1.05rem; }
    .post-body > p:first-child { font-size: 1.12rem; }
    .related-head .read-more { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card-media img, .blog-featured-media img, .read-more i { transition: none; }
    .post-card:hover .post-card-media img, .blog-featured:hover .blog-featured-media img { transform: none; }
}
