/* ==========================================================================
   e{Profitify} — Blog Stylesheet
   --------------------------------------------------------------------------
   Blog listing, blog cards, single-article layout and the site footer,
   themed to the logo teal. Builds on the tokens in eprofitify-ui.css.

   HOW TO USE
     1. Load, in this order, AFTER bootstrap.min.css / FontAwesome:
          <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap" rel="stylesheet">
          <link rel="stylesheet" href="../css/eprofitify-ui.css">
          <link rel="stylesheet" href="../css/eprofitify-blog.css">
     2. Wrap blog content in an element with  class="eblog".
        Nothing outside .eblog is touched, so the shared navbar and the chat
        widget keep their own styles. (Don't add "eui" to the same wrapper:
        its  .eui a  colour rule would recolour anchor-based components.)
     3. Build with the  eblog-*  components below (and eui-* from the UI file).

   CONTENTS
     01. SCOPE RESET
     02. HERO + SEARCH
     03. LISTING HEADER
     04. POST GRID + CARD
     05. SKELETON / EMPTY / ERROR
     06. PAGINATION
     07. SINGLE ARTICLE (header, prose, sidebar)
     08. FOOTER
     09. FLOATING SOCIAL BUTTONS
     10. REDUCED MOTION
   ========================================================================== */


/* ==========================================================================
   01. SCOPE RESET
   --------------------------------------------------------------------------
   Legacy page/navbar CSS sets  * { font-family; transition: all }  and can
   load AFTER this file. ".eblog :where(...)" has class-level specificity, so
   it beats a bare "*" regardless of order, while component classes declared
   below (same specificity, later in source) still win. Icon fonts are left
   alone.
   ========================================================================== */

.eblog {
    font-family: var(--eui-font);
    color: var(--eui-text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.eblog :where(:not(i, .fa, [class*="material-symbols"])),
.eblog :where(:not(i, .fa, [class*="material-symbols"]))::before,
.eblog :where(:not(i, .fa, [class*="material-symbols"]))::after {
    box-sizing: border-box;
    font-family: inherit;
    transition: none;
}

.eblog :where(h1, h2, h3, h4, h5, h6) { font-family: var(--eui-font-display); }

.eblog :where(img) { max-width: 100%; }

.eblog :where(:focus-visible) {
    outline: 2px solid var(--eui-primary);
    outline-offset: 2px;
}

.eblog ::selection { background: rgba(var(--eui-primary-rgb), 0.18); }

.eblog-main {
    background: var(--eui-bg);
    padding-bottom: 56px;
}

.eblog-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--eui-gutter);
}


/* ==========================================================================
   02. HERO + SEARCH
   --------------------------------------------------------------------------
   Compact banner: copy on the left, search + topics on the right, so the
   first row of posts is visible without scrolling. Stacks below 900px.
   ========================================================================== */

.eblog-hero {
    position: relative;
    overflow: hidden;
    padding: 30px 0 32px;
    background: linear-gradient(120deg, var(--eui-primary-deep) 0%, var(--eui-primary-darker) 55%, #1f7a84 100%);
    color: #fff;
    isolation: isolate;
}

/* Soft glow + dotted texture */
.eblog-hero::before,
.eblog-hero::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.eblog-hero::before {
    top: -220px;
    right: -120px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 163, 174, 0.5) 0%, transparent 65%);
}

.eblog-hero::after {
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 70%);
            mask-image: linear-gradient(to right, #000 0%, transparent 70%);
}

/* Use when the hero holds a dropdown (e.g. search suggestions) that must
   hang below it: no clipping, glow kept inside the box, stacks above content. */
.eblog-hero--open {
    z-index: 5;
    overflow: visible;
}

.eblog-hero--open::before {
    top: 0;
    right: 0;
    width: min(620px, 70%);
    height: 100%;
    border-radius: 0;
    background: radial-gradient(circle at 100% 0%, rgba(47, 163, 174, 0.5) 0%, transparent 70%);
}

.eblog-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
    align-items: center;
    gap: 24px 56px;
}

.eblog-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--eui-radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #d6f1f3;
    font-family: var(--eui-font);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eblog-hero__eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7fe0e8;
    box-shadow: 0 0 0 3px rgba(127, 224, 232, 0.22);
}

.eblog-hero__title {
    margin: 10px 0 6px;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
}

.eblog-hero__title span {
    background: linear-gradient(90deg, #8be6ed, #d9f7f9);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.eblog-hero__subtitle {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15.5px;
    line-height: 1.6;
}

/* Search field — works inside or outside the hero */
.eblog-search {
    position: relative;
    width: 100%;
}

.eblog-search__icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: var(--eui-primary);
    font-size: 16px;
    pointer-events: none;
}

.eblog-search__input {
    width: 100%;
    height: 54px;
    padding: 0 52px 0 48px;
    border: 2px solid transparent;
    border-radius: var(--eui-radius-pill);
    background: #fff;
    color: var(--eui-text);
    font-size: 15.5px;
    box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.5);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.eblog-search__input::placeholder { color: var(--eui-text-faint); }
.eblog-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.eblog-search__input:focus {
    border-color: var(--eui-primary-accent);
    box-shadow: 0 0 0 4px rgba(47, 163, 174, 0.3), 0 16px 36px -18px rgba(0, 0, 0, 0.5);
}

.eblog-search__clear {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--eui-primary-light);
    color: var(--eui-primary-darker);
    font-size: 14px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.15s, color 0.15s;
}

.eblog-search__clear:hover { background: var(--eui-primary); color: #fff; }
.eblog-search__clear[hidden] { display: none; }

/* Quick topic filters under the search */
.eblog-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.eblog-topics__label {
    margin-right: 2px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
}

.eblog-topic {
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--eui-radius-pill);
    background: rgba(255, 255, 255, 0.07);
    color: #e6f7f8;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.eblog-topic:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.15); }

.eblog-topic.is-active {
    border-color: #fff;
    background: #fff;
    color: var(--eui-primary-darker);
}

@media (max-width: 900px) {
    .eblog-hero { padding: 28px 0 30px; }
    .eblog-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 576px) {
    .eblog-hero__subtitle { font-size: 14.5px; }
    .eblog-search__input { height: 50px; font-size: 15px; }
    .eblog-topics { flex-wrap: nowrap; margin-right: calc(var(--eui-gutter) * -1); padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
    .eblog-topics::-webkit-scrollbar { display: none; }
    .eblog-topic { flex: 0 0 auto; }
}


/* ==========================================================================
   03. LISTING HEADER
   ========================================================================== */

.eblog-listing {
    padding-top: 22px;
    scroll-margin-top: 12px;
}

.eblog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.eblog-toolbar__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--eui-text);
}

.eblog-toolbar__title::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: var(--eui-gradient);
}

.eblog-toolbar__status {
    margin: 0;
    padding: 4px 12px;
    border-radius: var(--eui-radius-pill);
    background: var(--eui-primary-light);
    color: var(--eui-primary-darker);
    font-size: 13px;
    font-weight: 600;
}

.eblog-toolbar__status strong { font-weight: 700; }


/* ==========================================================================
   04. POST GRID + CARD
   ========================================================================== */

.eblog-grid {
    --eblog-grid-min: 290px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--eblog-grid-min), 100%), 1fr));
    gap: 24px;
}

.eblog-grid > .eblog-grid__full { grid-column: 1 / -1; }

.eblog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--eui-border);
    border-radius: var(--eui-radius-lg);
    background: var(--eui-surface);
    box-shadow: var(--eui-shadow-sm);
    color: var(--eui-text);
    text-decoration: none !important;
    transition: transform 0.3s var(--eui-ease), box-shadow 0.3s var(--eui-ease), border-color 0.3s;
}

.eblog-card:hover,
.eblog-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--eui-primary-200);
    box-shadow: var(--eui-shadow-lg);
    color: var(--eui-text);
}

.eblog-card:focus-visible { outline: none; box-shadow: var(--eui-focus-ring), var(--eui-shadow-lg); }

.eblog-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--eui-border);
    background: linear-gradient(135deg, var(--eui-primary-light), var(--eui-primary-50));
}

.eblog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--eui-ease);
}

.eblog-card:hover .eblog-card__media img { transform: scale(1.05); }

/* Shown when an image is missing or fails to load */
.eblog-card__media--fallback {
    display: grid;
    place-items: center;
    background: var(--eui-gradient);
}

.eblog-card__media--fallback::after {
    content: 'e';
    font-family: var(--eui-font-display);
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
}

.eblog-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--eui-radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--eui-primary-darker);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.eblog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.eblog-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: var(--eui-text-faint);
    font-size: 12.5px;
    font-weight: 500;
}

.eblog-card__meta i { margin-right: 4px; color: var(--eui-primary); }

.eblog-card__title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    min-height: 2.8em;              /* two lines, keeps a row of cards even */
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--eui-text);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.eblog-card:hover .eblog-card__title { color: var(--eui-primary-dark); }

.eblog-card__excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--eui-text-muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.eblog-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--eui-primary);
    font-size: 14px;
    font-weight: 600;
}

.eblog-card__more i { transition: transform 0.25s var(--eui-ease); }
.eblog-card:hover .eblog-card__more i { transform: translateX(4px); }

/* Staggered entrance; set --i on each card for the delay */
.eblog-card--enter {
    opacity: 0;
    animation: eblog-rise 0.5s var(--eui-ease) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes eblog-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 576px) {
    .eblog-grid { gap: 16px; }
    .eblog-card__body { padding: 16px; }
    .eblog-card__title { font-size: 16px; }
}


/* ==========================================================================
   05. SKELETON / EMPTY / ERROR
   ========================================================================== */

.eblog-card--skeleton { pointer-events: none; }
.eblog-card--skeleton .eblog-card__media { background: none; }
.eblog-card--skeleton .eui-skeleton { border-radius: 6px; }
.eblog-card--skeleton .eblog-card__media .eui-skeleton { width: 100%; height: 100%; border-radius: 0; }

.eblog-state {
    padding: 56px 20px;
    border: 1px dashed var(--eui-border-strong);
    border-radius: var(--eui-radius-lg);
    background: var(--eui-surface);
    text-align: center;
    color: var(--eui-text-muted);
}

.eblog-state__icon {
    display: inline-grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--eui-primary-light);
    color: var(--eui-primary);
    font-size: 26px;
}

.eblog-state--error .eblog-state__icon { background: var(--eui-danger-light); color: var(--eui-danger); }

.eblog-state__title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    color: var(--eui-text);
}

.eblog-state p { max-width: 420px; margin: 0 auto 18px; }


/* ==========================================================================
   06. PAGINATION
   --------------------------------------------------------------------------
   <nav class="eblog-pagination"> with <button class="eblog-page"> children.
   ========================================================================== */

.eblog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.eblog-pagination:empty { display: none; }

.eblog-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--eui-border);
    border-radius: var(--eui-radius);
    background: var(--eui-surface);
    color: var(--eui-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.eblog-page:hover:not(:disabled):not(.is-active) {
    border-color: var(--eui-primary-200);
    background: var(--eui-primary-light);
    color: var(--eui-primary-darker);
}

.eblog-page:focus-visible { outline: none; box-shadow: var(--eui-focus-ring); }

.eblog-page.is-active {
    border-color: var(--eui-primary);
    background: var(--eui-gradient);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(var(--eui-primary-rgb), 0.8);
    cursor: default;
}

.eblog-page:disabled { opacity: 0.45; cursor: not-allowed; }

.eblog-page--gap {
    min-width: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: default;
}

@media (max-width: 576px) {
    .eblog-pagination { gap: 6px; }
    .eblog-page { min-width: 38px; height: 38px; padding: 0 10px; }
    .eblog-page__label { display: none; }
}


/* ==========================================================================
   07. SINGLE ARTICLE
   --------------------------------------------------------------------------
   For individual blog posts:
     <main class="eui eblog eblog-main">
       <header class="eblog-article-hero"> … </header>
       <div class="eblog-container eblog-layout">
         <article class="eblog-article eblog-prose"> … </article>
         <aside class="eblog-sidebar"> … </aside>
       </div>
     </main>
   ========================================================================== */

.eblog-article-hero {
    padding: 40px 0 32px;
    background:
        radial-gradient(900px 320px at 0% 0%, var(--eui-primary-light) 0%, transparent 65%),
        radial-gradient(700px 260px at 100% 0%, rgba(var(--eui-primary-rgb), 0.08) 0%, transparent 60%);
}

.eblog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    color: var(--eui-text-faint);
    font-size: 13px;
}

.eblog-breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--eui-border-strong); }
.eblog-breadcrumb a { color: var(--eui-primary-dark); font-weight: 500; text-decoration: none; }
.eblog-breadcrumb a:hover { color: var(--eui-primary-darker); text-decoration: underline; }

.eblog-article-title {
    max-width: 880px;
    margin: 0 0 14px;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--eui-text);
}

.eblog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    color: var(--eui-text-muted);
    font-size: 14px;
}

.eblog-meta i { margin-right: 6px; color: var(--eui-primary); }

.eblog-cover {
    margin: 0 0 28px;
    overflow: hidden;
    border-radius: var(--eui-radius-lg);
    box-shadow: var(--eui-shadow);
}

.eblog-cover img { display: block; width: 100%; height: auto; }

.eblog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.eblog-article {
    min-width: 0;
    padding: clamp(20px, 4vw, 40px);
    border: 1px solid var(--eui-border);
    border-radius: var(--eui-radius-lg);
    background: var(--eui-surface);
    box-shadow: var(--eui-shadow-sm);
}

.eblog-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eblog-widget {
    padding: 20px;
    border: 1px solid var(--eui-border);
    border-radius: var(--eui-radius-lg);
    background: var(--eui-surface);
    box-shadow: var(--eui-shadow-sm);
}

.eblog-widget__title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--eui-primary-light);
    font-size: 15px;
    font-weight: 700;
    color: var(--eui-text);
}

.eblog-widget--cta {
    border: 0;
    background: var(--eui-gradient);
    color: #fff;
}

.eblog-widget--cta .eblog-widget__title { border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.eblog-widget--cta p { color: rgba(255, 255, 255, 0.85); font-size: 14px; }

/* Compact list of linked posts (sidebar, related posts) */
.eblog-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }

.eblog-list a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--eui-radius-sm);
    color: var(--eui-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.eblog-list a:hover { background: var(--eui-primary-50); color: var(--eui-primary-dark); }

@media (max-width: 992px) {
    .eblog-layout { grid-template-columns: 1fr; }
    .eblog-sidebar { position: static; }
}

/* Long-form typography for article bodies (also works on CMS HTML) */
.eblog-prose {
    color: #24393c;
    font-size: 16.5px;
    line-height: 1.8;
    overflow-wrap: break-word;
}

.eblog-prose > :first-child { margin-top: 0; }
.eblog-prose > :last-child  { margin-bottom: 0; }

.eblog-prose :is(h2, h3, h4) {
    margin: 1.8em 0 0.6em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--eui-text);
    scroll-margin-top: 90px;
}

.eblog-prose h2 { font-size: clamp(22px, 2.6vw, 28px); }
.eblog-prose h3 { font-size: clamp(19px, 2.2vw, 22px); }
.eblog-prose h4 { font-size: 18px; }

.eblog-prose :is(p, ul, ol, blockquote, pre, table, figure) { margin: 0 0 1.25em; }

.eblog-prose a {
    color: var(--eui-primary-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--eui-primary-200);
    text-underline-offset: 3px;
}

.eblog-prose a:hover { color: var(--eui-primary-darker); text-decoration-color: currentColor; }

.eblog-prose :is(ul, ol) { padding-left: 1.4em; }
.eblog-prose li { margin-bottom: 0.4em; }
.eblog-prose li::marker { color: var(--eui-primary); }

.eblog-prose img {
    display: block;
    height: auto;
    margin: 1.5em auto;
    border-radius: var(--eui-radius);
}

.eblog-prose figcaption { margin-top: -0.8em; text-align: center; color: var(--eui-text-faint); font-size: 14px; }

.eblog-prose blockquote {
    padding: 16px 20px;
    border-left: 4px solid var(--eui-primary);
    border-radius: 0 var(--eui-radius) var(--eui-radius) 0;
    background: var(--eui-primary-50);
    color: var(--eui-primary-darker);
    font-size: 17px;
    font-style: italic;
}

.eblog-prose blockquote > :last-child { margin-bottom: 0; }

.eblog-prose code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--eui-primary-light);
    color: var(--eui-primary-darker);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
}

.eblog-prose pre {
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: var(--eui-radius);
    background: var(--eui-primary-deep);
    color: #e3f4f5;
    font-size: 14px;
    line-height: 1.6;
}

.eblog-prose pre code { padding: 0; background: none; color: inherit; }

.eblog-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.eblog-prose :is(th, td) { padding: 10px 14px; border: 1px solid var(--eui-border); text-align: left; }
.eblog-prose th { background: var(--eui-primary-50); color: var(--eui-text); font-weight: 600; }

.eblog-prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--eui-border); opacity: 1; }

/* Share row */
.eblog-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eblog-share__label { margin-right: 4px; color: var(--eui-text-muted); font-size: 14px; font-weight: 600; }


/* ==========================================================================
   08. FOOTER
   ========================================================================== */

.eblog-footer {
    position: relative;
    overflow: hidden;
    padding: 56px 0 0;
    background: var(--eui-primary-deep);
    color: rgba(255, 255, 255, 0.72);
    font-size: 14.5px;
}

.eblog-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--eui-primary), var(--eui-primary-accent), var(--eui-primary));
}

.eblog-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 36px;
}

.eblog-footer__brand {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.eblog-footer__brand span { color: var(--eui-primary-accent); }

.eblog-footer__about { max-width: 300px; margin: 0 0 20px; line-height: 1.7; }

.eblog-footer__heading {
    margin: 0 0 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eblog-footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Also styles bare <a> tags injected by AJAX (e.g. recent posts) */
.eblog-footer__links a,
.eblog-footer__links > a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s, transform 0.15s;
}

.eblog-footer__links a:hover { color: #8be6ed; }

/* Recent posts from recent.php: div.item > (a > img) + (a > p), with inline styles */
.eblog-footer__links--recent { gap: 14px; }
.eblog-footer__links--recent hr { display: none; }

.eblog-footer__links--recent .item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px;
    margin: 0 !important;
}

.eblog-footer__links--recent .item > a:first-child { flex: 0 0 76px; }

.eblog-footer__links--recent .item img {
    display: block;
    width: 76px !important;
    height: 50px !important;
    border-radius: var(--eui-radius-sm);
    object-fit: cover !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.eblog-footer__links--recent .item p {
    display: -webkit-box;
    margin: 0 !important;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.15s;
}

.eblog-footer__links--recent .item a:hover p { color: #8be6ed !important; }

.eblog-social { display: flex; flex-wrap: wrap; gap: 10px; }

.eblog-social__item {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s var(--eui-ease);
}

.eblog-social__item svg { width: 15px; height: 15px; }

a.eblog-social__item:hover {
    border-color: var(--eui-primary);
    background: var(--eui-primary);
    color: #fff;
    transform: translateY(-2px);
}

.eblog-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 48px;
    padding: 20px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13.5px;
}

.eblog-footer__bottom p { margin: 0; }
.eblog-footer__bottom a { color: #fff; text-decoration: none; }
.eblog-footer__bottom a:hover { color: #8be6ed; }

@media (max-width: 992px) {
    .eblog-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}

@media (max-width: 576px) {
    .eblog-footer { padding-top: 40px; }
    .eblog-footer__grid { grid-template-columns: 1fr 1fr; }
    .eblog-footer__col--wide { grid-column: 1 / -1; }
    .eblog-footer__bottom { justify-content: center; text-align: center; }
}


/* ==========================================================================
   09. FLOATING SOCIAL BUTTONS
   ========================================================================== */

.eblog-float {
    position: fixed;
    right: 24px;
    z-index: 100;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s var(--eui-ease), box-shadow 0.2s;
}

.eblog-float:hover,
.eblog-float:focus-visible {
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.55);
}

.eblog-float--facebook { bottom: 160px; background: #1877f2; }
.eblog-float--youtube  { bottom: 224px; background: #ff0000; }

@media (max-width: 576px) {
    .eblog-float { right: 14px; width: 44px; height: 44px; font-size: 20px; }
    .eblog-float--facebook { bottom: 140px; }
    .eblog-float--youtube  { bottom: 194px; }
}


/* ==========================================================================
   10. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .eblog *,
    .eblog *::before,
    .eblog *::after,
    .eblog-float {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }
}
