/* ══════════════════════════════════════════════════════════════
   Espresso Theme — Single Post Styles
   ══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   SINGLE POST TEMPLATE
   ══════════════════════════════════════════════════════════════ */

/* Top: title + image area — centered */
.espresso-single__top {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px 24px;
    text-align: center;
}

/* Bottom: content + sidebar */
.espresso-single__layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 70px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 30px;
}

.espresso-single__breadcrumbs {
    font-size: 12px;
    color: var(--mde-gray-400);
    margin-bottom: 16px;
}

.espresso-single__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--mde-primary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.espresso-single__title {
    font-family: var(--mde-serif);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--mde-black);
    margin: 0 auto 12px;
    max-width: 750px;
    text-align: center;
}

.espresso-single__meta {
    font-size: 13px;
    color: var(--mde-gray-400);
    margin-bottom: 20px;
    text-align: center;
}

.espresso-single__featured-img {
    margin: 20px 0 0;
}

.espresso-single__featured-img img {
    width: 100%;
    height: auto;
}

.espresso-single__content {
    font-size: 17px;
    line-height: 1.75;
    color: #333;
}

.espresso-single__content p {
    margin-bottom: 1.3em;
}

/* Content images: slightly wider than text but capped to article */
.espresso-single__content img {
    max-width: calc(100% + 60px);
    margin-left: -30px;
    height: auto;
    display: block;
}

.espresso-single__content .wp-caption,
.espresso-single__content figure {
    max-width: 100% !important;
    width: auto !important;
    margin-left: 0;
    position: relative;
}

.espresso-single__content .wp-caption img {
    max-width: 100%;
    height: auto;
    margin-left: 0;
}

.espresso-single__content .wp-caption-text,
.espresso-single__content figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    margin: 0;
}

/* Prevent grid blowout */
.espresso-single__article {
    min-width: 0;
}

.espresso-single__content {
}

.espresso-single__tags {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.espresso-single__tags::before {
    content: 'Tags';
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-right: 8px;
}

.espresso-single__tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    background: none;
    color: var(--mde-primary);
    border: none;
    text-decoration: none;
    display: inline-block;
}

.espresso-single__tag:hover {
    text-decoration: underline;
}

.espresso-single__related {
    margin-top: 40px;
}

.espresso-single__related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Sidebar */
.espresso-single__sidebar {
    position: sticky;
    top: 80px;
    min-width: 350px;
    align-self: start;
}

.espresso-single__sidebar-ad {
    margin-bottom: 24px;
    min-height: 50px;
    text-align: center;
}

.espresso-category__sidebar-ad {
    margin-bottom: 20px;
    text-align: center;
}

.espresso-single__sidebar-section {
    margin-bottom: 30px;
}

.espresso-single__sidebar-heading {
    font-family: var(--mde-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--mde-black);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mde-primary);
}

.espresso-single__sidebar-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.espresso-single__sidebar-rank {
    font-family: var(--mde-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--mde-primary);
    min-width: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.espresso-single__sidebar-body {
    flex: 1;
}

.espresso-single__sidebar-title {
    font-family: var(--mde-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--mde-black);
    margin: 0;
}

.espresso-single__sidebar-item:hover .espresso-single__sidebar-title {
    color: var(--mde-primary);
}

.espresso-single__sidebar-thumb {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    overflow: hidden;
}

.espresso-single__sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Don't miss section */
.espresso-single__sidebar-miss {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.espresso-single__sidebar-miss-img {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    overflow: hidden;
}

.espresso-single__sidebar-miss-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.espresso-single__sidebar-miss-title {
    font-family: var(--mde-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--mde-black);
    margin: 0;
    flex: 1;
}

.espresso-single__sidebar-miss:hover .espresso-single__sidebar-miss-title {
    color: var(--mde-primary);
}

/* ══════════════════════════════════════════════════════════════

   SHARE BUTTONS
   ══════════════════════════════════════════════════════════════ */

.espresso-share {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 24px;
}

.espresso-single__tags + .espresso-share {
    margin-top: 60px;
    flex-wrap: wrap;
}

.espresso-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: -apple-system, sans-serif;
    transition: opacity 0.2s;
}

.espresso-share__btn:hover {
    opacity: 0.85;
}

.espresso-share__btn--fb { background: #1877f2; }
.espresso-share__btn--x { background: #000; }
.espresso-share__btn--wa { background: #25d366; }
.espresso-share__btn--msg { background: #0084ff; }
.espresso-share__btn--copy {
    background: #666;
    color: #fff;
}

@media (max-width: 767px) {
    .espresso-share__btn span {
        display: none;
    }

    .espresso-share__btn {
        padding: 10px;
    }

    .espresso-share {
        justify-content: center;
    }
}

/* ══════════════════════════════════════════════════════════════
   STICKY READING BAR — Single Post
   ══════════════════════════════════════════════════════════════ */

/* Reading bar */
.espresso-single__stickybar {
    position: fixed;
    left: 0;
    right: 0;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    z-index: 99999;
    display: none;
    height: 36px;
    box-sizing: border-box;
}

/* Progress bar — disabled */
.espresso-single__stickybar-progress {
    display: none;
}

.espresso-single__stickybar-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
}

.espresso-single__stickybar-title {
    font-family: var(--mde-sans);
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 24px;
    line-height: 32px;
}

.espresso-single__stickybar-share {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

.espresso-single__stickybar-share a,
.espresso-single__stickybar-share button {
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
    text-decoration: none;
}

.espresso-single__stickybar-share a:hover,
.espresso-single__stickybar-share button:hover {
    color: var(--mde-primary);
}

.espresso-single__stickybar-share svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 767px) {
    .espresso-single__stickybar-title {
        font-size: 12px;
    }

    .espresso-single__stickybar-share svg {
        width: 15px;
        height: 15px;
    }

    .espresso-single__stickybar-inner {
        height: 38px;
    }
}

/* ── Content headings ────────────────────────────────────── */
.espresso-single__content h1 { font-family: var(--mde-serif); font-size: 32px; font-weight: 700; margin: 32px 0 16px; color: var(--mde-black); }
.espresso-single__content h2 { font-family: var(--mde-serif); font-size: 28px; font-weight: 700; margin: 28px 0 14px; color: var(--mde-black); }
.espresso-single__content h3 { font-family: var(--mde-serif); font-size: 24px; font-weight: 700; margin: 24px 0 12px; color: var(--mde-black); }
.espresso-single__content h4 { font-family: var(--mde-serif); font-size: 20px; font-weight: 700; margin: 20px 0 10px; color: var(--mde-black); }
.espresso-single__content h5 { font-family: var(--mde-serif); font-size: 18px; font-weight: 700; margin: 18px 0 8px; color: var(--mde-black); }
.espresso-single__content h6 { font-family: var(--mde-sans); font-size: 16px; font-weight: 700; margin: 16px 0 8px; color: var(--mde-black); text-transform: uppercase; letter-spacing: 1px; }

/* ══════════════════════════════════════════════════════════════
   INLINE RELATED ARTICLE — after 3rd paragraph
   ══════════════════════════════════════════════════════════════ */

.espresso-inline-related {
    margin: 32px 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.espresso-inline-related__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: #d51317;
    display: inline-block;
    padding: 5px 14px;
    margin: 0;
}

.espresso-inline-related__card {
    display: flex;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.espresso-inline-related__img {
    width: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.espresso-inline-related__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.espresso-inline-related__body {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.espresso-inline-related__cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #d51317;
    display: block;
    margin-bottom: 6px;
}

.espresso-inline-related__title {
    font-family: 'Vollkorn', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
    margin: 0 0 6px;
}

.espresso-inline-related__card:hover .espresso-inline-related__title {
    color: #d51317;
}

.espresso-inline-related__time {
    font-size: 11px;
    color: #999;
}

@media (max-width: 767px) {
    .espresso-inline-related__card {
        flex-direction: column;
    }

    .espresso-inline-related__img {
        width: 100%;
        height: 200px;
    }
}

/* ══════════════════════════════════════════════════════════════
   SOCIAL EMBEDS — Single Post
   ══════════════════════════════════════════════════════════════ */

/* YouTube / Vimeo — 16:9 responsive */
.espresso-single__content iframe[src*="youtube"],
.espresso-single__content iframe[src*="youtu.be"],
.espresso-single__content iframe[src*="vimeo"],
.espresso-single__content iframe[src*="dailymotion"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
}

/* Facebook — only max-width, let SDK handle everything else */
.espresso-single__content .fb-video,
.espresso-single__content .fb-video span,
.espresso-single__content .fb-video iframe,
.espresso-single__content .fb-post,
.espresso-single__content .fb_iframe_widget,
.espresso-single__content .fb_iframe_widget span,
.espresso-single__content .fb_iframe_widget iframe {
    max-width: 100% !important;
}

/* Twitter */
.espresso-single__content .twitter-tweet,
.espresso-single__content twitterwidget {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Instagram */
.espresso-single__content .instagram-media,
.espresso-single__content .instagram-media-rendered {
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* TikTok */
.espresso-single__content .tiktok-embed {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Glomex */
.espresso-single__content glomex-player,
.espresso-single__content [class*="glomex"] {
    max-width: 100% !important;
    width: 100% !important;
}

/* Generic iframes — only max-width, no forced sizing */
.espresso-single__content iframe {
    max-width: 100%;
}

/* wp-block-embed wrapper */
.espresso-single__content .wp-block-embed__wrapper {
    position: relative;
    overflow: hidden;
}

.espresso-single__content .wp-block-embed__wrapper iframe {
    max-width: 100% !important;
}
