/* =========================================================================
   Life n Learn — theme derived from the "Mind & Mindfulness" infographic:
   deep violet -> royal purple -> electric blue, with fuchsia accents on white.
   ========================================================================= */

:root {
    --c-bg:           #ffffff;
    --c-bg-soft:      #f7f4fe;
    --c-bg-lavender:  #efe9fb;
    --c-ink:          #1b1438;
    --c-ink-soft:     #534c6e;
    --c-line:         #e7e1f5;

    --c-primary:      #6d28d9;  /* violet */
    --c-primary-dark: #4c1d95;
    --c-primary-soft: #8b5cf6;
    --c-blue:         #2563eb;  /* electric blue */
    --c-blue-soft:    #3b82f6;
    --c-fuchsia:      #c026d3;  /* magenta accent */

    --grad-hero:   linear-gradient(135deg, #3b1382 0%, #6d28d9 45%, #2563eb 100%);
    --grad-accent: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    --grad-pill:   linear-gradient(135deg, #c026d3 0%, #7c3aed 55%, #2563eb 100%);

    --shadow-sm: 0 1px 3px rgba(27, 20, 56, .08);
    --shadow-md: 0 10px 30px rgba(76, 29, 149, .12);
    --shadow-lg: 0 24px 60px rgba(76, 29, 149, .22);

    --radius:    18px;
    --radius-sm: 12px;
    --maxw:      1120px;

    --font-body: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-head: 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-fuchsia); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--c-ink); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: inline-grid; place-items: center; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; display: block; }
.brand-text {
    font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em;
    background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-nav { display: flex; gap: 8px; }
.site-nav a {
    font-weight: 600; font-size: .95rem; color: var(--c-ink-soft);
    padding: 8px 14px; border-radius: 999px; transition: .2s;
}
.site-nav a:hover { color: var(--c-primary); background: var(--c-bg-lavender); }
.site-nav a[aria-current="page"] { color: var(--c-primary); background: var(--c-bg-lavender); }

/* Category chips (home "Latest" header) */
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-head); font-weight: 600; font-size: .86rem;
    color: var(--c-primary-dark); background: var(--c-bg-lavender);
    padding: 7px 14px; border-radius: 999px; transition: .2s;
}
.cat-chip:hover { color: #fff; background: var(--grad-pill); }
.cat-chip span {
    font-size: .76rem; min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-grid; place-items: center; border-radius: 999px;
    background: rgba(124, 58, 237, .14); color: var(--c-primary);
}
.cat-chip:hover span { background: rgba(255, 255, 255, .25); color: #fff; }

/* Post-hero category tag is a link */
a.card-tag.solid { color: #fff; text-decoration: none; transition: transform .15s; }
a.card-tag.solid:hover { transform: translateY(-1px); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-head); font-weight: 600; font-size: .98rem;
    padding: 13px 26px; border-radius: 999px; transition: transform .15s, box-shadow .2s; cursor: pointer;
}
.btn-primary { background: var(--grad-pill); color: #fff; box-shadow: 0 10px 24px rgba(124, 58, 237, .35); }
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 16px 30px rgba(124, 58, 237, .45); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--grad-hero); color: #fff; }
.hero-inner { position: relative; z-index: 2; padding: 92px 24px 104px; text-align: center; }
.hero-eyebrow {
    text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 600;
    color: #d6c8ff; margin: 0 0 18px;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; color: #fff; margin: 0 0 18px; letter-spacing: -.02em; }
.hero-sub { max-width: 640px; margin: 0 auto 30px; color: #e4dbff; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-glow {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(420px 260px at 18% 12%, rgba(192, 38, 211, .45), transparent 60%),
        radial-gradient(460px 300px at 85% 85%, rgba(37, 99, 235, .5), transparent 60%);
}

/* ---------- Featured ---------- */
.featured { margin-top: -56px; position: relative; z-index: 5; margin-bottom: 16px; }
.featured-card {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; overflow: hidden;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--c-line); transition: transform .2s;
}
.featured-card:hover { transform: translateY(-4px); }
.featured-media { position: relative; min-height: 320px; background: var(--grad-accent); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.featured-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured-body h2 { font-size: 1.7rem; margin: 0; color: var(--c-ink); }
.featured-body p { color: var(--c-ink-soft); margin: 0; }

/* ---------- Section scaffolding ---------- */
.section { padding: 56px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.link-more { font-weight: 600; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--grad-accent); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media-fallback {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; color: rgba(255, 255, 255, .9);
}
.card-media-fallback.big { font-size: 6rem; }
.card-tag {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; padding: 6px 12px; border-radius: 999px;
    background: rgba(27, 20, 56, .42); backdrop-filter: blur(4px);
}
.card-tag.solid { position: static; display: inline-block; background: var(--grad-pill); box-shadow: var(--shadow-sm); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 1.18rem; margin: 0; line-height: 1.35; }
.card-title a { color: var(--c-ink); }
.card-title a:hover { color: var(--c-primary); }
.card-excerpt { color: var(--c-ink-soft); font-size: .95rem; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; color: var(--c-ink-soft); font-size: .85rem; font-weight: 500; }
.card-meta .dot { opacity: .5; }

/* ---------- Page head (category) ---------- */
.page-head { background: var(--grad-hero); color: #fff; padding: 70px 0 60px; position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 8px 0 10px; color: #fff; }
.page-head-sub { color: #e4dbff; margin: 0; }
.breadcrumb { font-size: .88rem; color: var(--c-ink-soft); display: flex; gap: 8px; align-items: center; }
.breadcrumb span { opacity: .7; }
.breadcrumb.light, .breadcrumb.light a { color: #d8ccff; }
.breadcrumb.light a:hover { color: #fff; }

/* ---------- Single post ---------- */
.post-hero { position: relative; overflow: hidden; background: var(--grad-hero); color: #fff; padding: 56px 0 64px; }
.post-hero-inner { position: relative; z-index: 2; max-width: 820px; }
.post-title { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 16px 0 18px; color: #fff; }
.post-meta { display: flex; align-items: center; gap: 10px; color: #e4dbff; font-size: .95rem; font-weight: 500; flex-wrap: wrap; }
.post-meta .dot { opacity: .5; }

.post-figure { margin: -44px auto 0; position: relative; z-index: 5; max-width: 900px; }
.post-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 5px solid #fff; }

.post-layout { display: flex; justify-content: center; padding: 48px 24px 24px; }
.post-content { max-width: 740px; width: 100%; font-size: 1.08rem; color: #2a2545; }
.post-content > * + * { margin-top: 1.25em; }
.post-content h2 { font-size: 1.7rem; margin-top: 2em; padding-top: .2em; }
.post-content h3 { font-size: 1.32rem; margin-top: 1.6em; }
.post-content h2, .post-content h3 { color: var(--c-primary-dark); }
.post-content a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--c-fuchsia); }
.post-content img, .post-content figure img { border-radius: var(--radius-sm); box-shadow: var(--shadow-md); margin: 1.5em auto; }
.post-content figure { margin: 1.8em 0; }
.post-content figcaption { text-align: center; font-size: .9rem; color: var(--c-ink-soft); margin-top: .6em; }
.post-content ul, .post-content ol { padding-left: 1.3em; }
.post-content li { margin: .5em 0; }
.post-content li::marker { color: var(--c-primary); }
.post-content blockquote {
    margin: 1.6em 0; padding: 18px 26px; border-left: 4px solid var(--c-fuchsia);
    background: var(--c-bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic; color: var(--c-ink);
}
.post-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .96rem; }
.post-content th, .post-content td { border: 1px solid var(--c-line); padding: 12px 14px; text-align: left; }
.post-content thead th { background: var(--c-bg-lavender); color: var(--c-primary-dark); font-family: var(--font-head); }
.post-content tbody tr:nth-child(even) { background: var(--c-bg-soft); }
.post-content code {
    background: var(--c-bg-lavender); padding: 2px 7px; border-radius: 6px; font-size: .9em; color: var(--c-primary-dark);
}
.post-content pre { background: #1b1438; color: #ede9fe; padding: 18px; border-radius: var(--radius-sm); overflow-x: auto; }
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--c-line); margin: 2.4em 0; }

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2.4em; padding-top: 1.6em; border-top: 1px solid var(--c-line); }
.tag { font-size: .82rem; font-weight: 600; color: var(--c-primary-dark); background: var(--c-bg-lavender); padding: 6px 14px; border-radius: 999px; }

.related { border-top: 1px solid var(--c-line); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 110px 24px; background: var(--c-bg-soft); }
.error-code { font-family: var(--font-head); font-weight: 800; font-size: 5.5rem; margin: 0; background: var(--grad-pill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { margin: 0 0 10px; }
.error-sub { color: var(--c-ink-soft); margin: 0 0 26px; }
.error-page .hero-actions .btn-ghost { color: var(--c-primary); border-color: var(--c-primary); }
.error-page .hero-actions .btn-ghost:hover { background: var(--c-bg-lavender); }

/* ---------- Footer ---------- */
.site-footer { background: #160f30; color: #cfc6ec; margin-top: 40px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 52px 24px 30px; flex-wrap: wrap; }
.footer-brand .brand-text { font-size: 1.3rem; }
.footer-brand p { margin: 8px 0 0; color: #9d93c2; max-width: 320px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: #cfc6ec; font-weight: 500; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 24px; font-size: .86rem; color: #8b81b0; }

/* ---------- Footer link-button (Cookie Settings) ---------- */
.footer-link-btn {
    font: inherit; color: #cfc6ec; font-weight: 500; background: none; border: 0;
    padding: 0; cursor: pointer;
}
.footer-link-btn:hover { color: #fff; text-decoration: underline; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
    max-width: 760px; margin: 0 auto;
    background: #fff; color: var(--c-ink);
    border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease;
}
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
.cookie-banner::before {
    content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 5px;
    border-radius: var(--radius) 0 0 var(--radius); background: var(--grad-pill);
}
.cookie-inner { display: flex; align-items: center; gap: 18px; padding: 20px 24px; flex-wrap: wrap; }
.cookie-icon { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px;
    border-radius: 50%; background: var(--c-bg-lavender); }
.cookie-text { flex: 1 1 280px; min-width: 220px; }
.cookie-text strong { font-family: var(--font-head); font-size: 1.05rem; display: block; margin-bottom: 3px; }
.cookie-text p { margin: 0; font-size: .92rem; color: var(--c-ink-soft); line-height: 1.55; }
.cookie-text a { color: var(--c-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cookie-text a:hover { color: var(--c-fuchsia); }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-btn {
    font-family: var(--font-head); font-weight: 600; font-size: .92rem;
    padding: 11px 22px; border-radius: 999px; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.cookie-btn-accept { border: 0; color: #fff; background: var(--grad-pill); box-shadow: 0 8px 20px rgba(124,58,237,.32); }
.cookie-btn-accept:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(124,58,237,.42); }
.cookie-btn-reject { background: #fff; color: var(--c-primary-dark); border: 1.5px solid var(--c-line); }
.cookie-btn-reject:hover { border-color: var(--c-primary-soft); background: var(--c-bg-soft); }

@media (max-width: 560px) {
    .cookie-inner { padding: 18px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-banner { transition: opacity .2s ease; transform: none; }
    .cookie-banner.is-visible { transform: none; }
    .cookie-btn-accept:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-media { min-height: 220px; position: relative; }
    .featured-body { padding: 28px; }
}
@media (max-width: 560px) {
    .hero-inner { padding: 64px 24px 76px; }
    .section { padding: 40px 24px; }
    .post-layout { padding: 32px 20px 16px; }
    .site-nav a { padding: 8px 10px; }
}
