/* ============================================
   Single Post Widget – Complete Styles
   ============================================ */

.gpd *, .gpd *::before, .gpd *::after { box-sizing: border-box; }
.gpd { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ═══ FEATURED IMAGE / HERO ═══ */
.gpd-hero {
    width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}

.gpd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    pointer-events: none;
}

.gpd-hero__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #1a8c8c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    z-index: 2;
    transition: opacity 0.2s;
}
.gpd-hero__badge:hover { opacity: 0.85; color: #fff; }

/* ═══ META ═══ */
.gpd-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 500;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 16px;
}
.gpd-meta span, .gpd-meta a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.gpd-meta svg { opacity: 0.5; flex-shrink: 0; }
.gpd-meta__cat {
    background: #eef3f7;
    padding: 3px 12px;
    border-radius: 4px;
    color: #1a8c8c;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.2s;
}
.gpd-meta__cat:hover { background: #dde8ef; }

/* ═══ TITLE ═══ */
.gpd-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a2a3a;
    margin: 0 0 20px;
    font-family: Georgia, 'Times New Roman', serif;
}

/* ═══ CONTENT ═══ */
.gpd-content {
    font-size: 16.5px;
    line-height: 1.85;
    color: #444;
    margin-bottom: 28px;
}
.gpd-content p { margin: 0 0 1.2em; }
.gpd-content h2, .gpd-content h3, .gpd-content h4 {
    color: #1a2a3a;
    margin: 1.8em 0 0.6em;
    font-family: Georgia, 'Times New Roman', serif;
}
.gpd-content h2 { font-size: 26px; }
.gpd-content h3 { font-size: 22px; }
.gpd-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1em 0;
}
.gpd-content blockquote {
    border-left: 4px solid #1a8c8c;
    margin: 1.5em 0;
    padding: 12px 24px;
    background: #f8fafa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}
.gpd-content a { color: #1a8c8c; text-decoration: underline; }
.gpd-content a:hover { opacity: 0.8; }
.gpd-content ul, .gpd-content ol { padding-left: 1.5em; margin: 1em 0; }
.gpd-content li { margin-bottom: 0.4em; }

/* ═══ TAGS ═══ */
.gpd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.gpd-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #f0f2f5;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}
.gpd-tag:hover { background: #1a8c8c; color: #fff; }

/* ═══ ENGAGEMENT BAR ═══ */
.gpd-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    gap: 12px;
}
.gpd-bar__left, .gpd-bar__right { display: flex; align-items: center; gap: 4px; }
.gpd-bar__divider { width: 1px; height: 22px; background: #eee; margin: 0 8px; }

.gpd-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    line-height: 1;
}
.gpd-icon-btn:hover { color: #1a8c8c; background: #f0f8f8; }
.gpd-icon-btn--liked { color: #e24b4a; }
.gpd-icon-btn--liked:hover { color: #e24b4a; background: #fef2f2; }
.gpd-icon-btn--active { color: #1a8c8c; background: #f0f8f8; }
.gpd-icon-btn--copied { color: #1a8c8c !important; background: #e6f7f7 !important; }
.gpd-icon-btn--pop svg { animation: gpd-pop 0.4s ease; }
@keyframes gpd-pop { 0%{transform:scale(1)} 30%{transform:scale(1.3)} 60%{transform:scale(0.9)} 100%{transform:scale(1)} }
.gpd-icon-btn__count { font-weight: 700; font-size: 14px; min-width: 6px; }
.gpd-icon-btn svg { flex-shrink: 0; }

/* ═══ COMMENTS PANEL ═══ */
.gpd-panel {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 28px;
    animation: gpd-slide 0.35s ease;
}
@keyframes gpd-slide { from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:translateY(0)} }

.gpd-panel__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.gpd-panel__title { font-size: 20px; font-weight: 700; color: #1a8c8c; margin: 0; display: flex; align-items: center; gap: 8px; font-family: Georgia, serif; }
.gpd-panel__count { font-size: 15px; font-weight: 500; color: #aaa; font-family: -apple-system, sans-serif; }
.gpd-panel__close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: none; background: #f5f5f5; color: #888; cursor: pointer; transition: all 0.2s; }
.gpd-panel__close:hover { background: #eee; color: #555; }

/* Form */
.gpd-form { margin-bottom: 24px; }
.gpd-form--reply { margin: 12px 0 6px; padding: 14px; background: #f8f9fa; border-radius: 10px; border: 1px solid #eee; }
.gpd-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.gpd-form__input { width: 100%; padding: 11px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; background: #fff; outline: none; }
.gpd-form__input:focus { border-color: #1a8c8c; }
.gpd-form__textarea { width: 100%; padding: 12px 14px; border: 1.5px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; transition: border-color 0.2s; background: #fff; outline: none; line-height: 1.6; }
.gpd-form__textarea:focus { border-color: #1a8c8c; }
.gpd-form__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.gpd-form__btns { display: flex; gap: 8px; margin-left: auto; }
.gpd-form__error { font-size: 13px; color: #e24b4a; display: none; }
.gpd-form__submit { padding: 10px 24px; background: #1a8c8c; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.25s, transform 0.2s; font-family: inherit; line-height: 1; }
.gpd-form__submit:hover { background: #157272; transform: translateY(-1px); }
.gpd-form__submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.gpd-form__cancel { padding: 10px 18px; background: transparent; color: #888; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; line-height: 1; transition: all 0.2s; }
.gpd-form__cancel:hover { background: #f0f0f0; color: #555; }

/* Comments */
.gpd-comments-list { margin-top: 4px; }
.gpd-comment { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; animation: gpd-fade 0.4s ease; }
.gpd-comment--new { animation: gpd-hi 1.5s ease; }
@keyframes gpd-fade { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes gpd-hi { 0%{background:#e6f7f7} 100%{background:transparent} }
.gpd-comment:last-child { border-bottom: none; }
.gpd-comment__avatar { width: 38px; height: 38px; min-width: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; line-height: 1; }
.gpd-comment__main { flex: 1; min-width: 0; }
.gpd-comment__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.gpd-comment__name { font-size: 14px; font-weight: 700; color: #1a8c8c; }
.gpd-comment__date { font-size: 12px; color: #bbb; }
.gpd-comment__body { font-size: 14px; line-height: 1.7; color: #444; margin-bottom: 6px; }
.gpd-comment__body p { margin: 0 0 4px; }
.gpd-comment__body p:last-child { margin-bottom: 0; }
.gpd-comment__reply-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: #1a8c8c; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 0; font-family: inherit; transition: opacity 0.2s; }
.gpd-comment__reply-btn:hover { opacity: 0.7; }

.gpd-replies { margin-left: 50px; border-left: 2px solid #e8e8e8; padding-left: 16px; }
.gpd-replies .gpd-comment { padding: 12px 0; }
.gpd-replies .gpd-comment__avatar { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
.gpd-replies .gpd-replies { margin-left: 42px; }
.gpd-no-comments { text-align: center; padding: 30px 20px; color: #bbb; font-size: 14px; font-style: italic; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .gpd-hero { height: 280px; border-radius: 10px; }
    .gpd-title { font-size: 26px; }
    .gpd-content { font-size: 15.5px; }
    .gpd-bar { flex-wrap: wrap; }
    .gpd-form__row { grid-template-columns: 1fr; }
    .gpd-replies { margin-left: 20px; padding-left: 12px; }
    .gpd-replies .gpd-replies { margin-left: 16px; }
    .gpd-panel { padding: 20px 16px; }
    .gpd-form__footer { flex-direction: column; align-items: stretch; }
    .gpd-form__btns { margin-left: 0; }
    .gpd-form__submit, .gpd-form__cancel { flex: 1; text-align: center; }
    .gpd-meta { gap: 10px; }
}

/* ═══ COMMENT BOX — ALWAYS VISIBLE ═══ */
.gpd-cbox {
    margin-top: 40px; padding: 32px; background: #f8f9fa;
    border-radius: 14px; border: 1px solid #e8e8e8;
}
.gpd-cbox__title {
    font-size: 20px; font-weight: 700; color: #1a8c8c; margin: 0 0 20px;
    display: flex; align-items: center; gap: 10px;
    font-family: Georgia, 'Times New Roman', serif;
}
.gpd-cbox__title svg { opacity: 0.7; }
.gpd-cbox__count { font-size: 15px; font-weight: 500; color: #aaa; font-family: -apple-system, sans-serif; }

/* ═══ BREADCRUMBS ═══ */
.gpd-breadcrumbs {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    color: #888; margin-bottom: 16px;
}
.gpd-breadcrumbs a { color: #555; text-decoration: none; transition: color 0.2s; }
.gpd-breadcrumbs a:hover { color: #1a8c8c; }
.gpd-bc-sep { color: #ccc; }
.gpd-bc-current { color: #aaa; }

/* ═══ CATEGORY TAGS ═══ */
.gpd-cat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.gpd-cat-badge {
    display: inline-block; padding: 5px 14px; background: #1a8c8c; color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    border-radius: 4px; text-decoration: none; transition: opacity 0.2s;
}
.gpd-cat-badge:hover { opacity: 0.85; color: #fff; }

/* ═══ AUDIO ═══ */
.gpd-audio { margin-bottom: 24px; }
.gpd-audio audio { width: 100%; border-radius: 8px; }
.gpd-hero--inline { margin-bottom: 28px; margin-top: 8px; }

/* ═══ RELATED POSTS ═══ */
.gpd-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid #eee; }
.gpd-related__title { font-size: 22px; font-weight: 700; color: #1a2a3a; margin: 0 0 24px; font-family: Georgia, serif; }
.gpd-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gpd-rcard { background: #fff; border-radius: 10px; overflow: hidden; text-decoration: none; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: box-shadow 0.3s, transform 0.3s; display: flex; flex-direction: column; }
.gpd-rcard:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-3px); }
.gpd-rcard__img { width: 100%; height: 160px; background-size: cover; background-position: center; }
.gpd-rcard__body { padding: 14px 16px; }
.gpd-rcard__date { font-size: 12px; color: #aaa; display: block; margin-bottom: 6px; }
.gpd-rcard__name { font-size: 15px; font-weight: 700; color: #1a2a3a; line-height: 1.35; display: block; transition: color 0.2s; }
.gpd-rcard:hover .gpd-rcard__name { color: #1a8c8c; }

@media (max-width: 768px) {
    .gpd-related__grid { grid-template-columns: 1fr; }
    .gpd-cbox { padding: 20px 16px; }
    .gpd-form__row { grid-template-columns: 1fr; }
}
