/**
 * Single Post Styles - Dailydishy Theme
 * Individual recipe/post page styles
 */

/* Layout */
.single-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.single-content-row {
    display: grid;
    grid-template-columns: 1fr var(--dh-sidebar-width);
    gap: 48px;
    max-width: var(--dh-container-width);
    margin: 0 auto;
    padding: 48px 40px 64px;
    align-items: start;
}

.single-main {
    min-width: 0;
}

/* Hero Image */
.post-hero {
    width: 100%;
    aspect-ratio: 16/7;
    overflow: hidden;
    background: var(--dh-green-light);
    position: relative;
}

.post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.28) 100%);
    pointer-events: none;
}

/* Article Header */
.post-header {
    max-width: var(--dh-content-width);
    margin: 32px auto 0;
    padding: 0 40px;
}

.post-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--dh-green-light);
    color: var(--dh-green-dark);
    font-family: var(--dh-font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 16px;
    transition: background var(--dh-ease), color var(--dh-ease);
}

.post-cat-badge:hover {
    background: var(--dh-green-mid);
    color: var(--dh-green-dark);
}

.post-cat-badge svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-family: var(--dh-font-ui);
    font-size: 0.78rem;
    color: var(--dh-text-muted);
    margin-bottom: 18px;
}

.post-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-meta svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    flex-shrink: 0;
}

.post-meta .meta-sep {
    color: var(--dh-border);
    font-size: 0.9rem;
}

.post-meta a {
    color: var(--dh-text-muted);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--dh-green);
}

.post-title {
    font-family: var(--dh-font-serif);
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--dh-text);
    line-height: 1.28;
    letter-spacing: -0.3px;
    margin: 0 0 28px;
}

/* Post Content */
.post-body {
    max-width: var(--dh-content-width);
    margin: 0 auto;
    padding: 0 40px;
    font-family: var(--dh-font-serif);
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--dh-text-body);
}

.post-body p {
    margin: 0 0 1.5em;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-body h2 {
    font-family: var(--dh-font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dh-text);
    margin: 2.2em 0 0.7em;
    line-height: 1.25;
    position: relative;
    padding-left: 18px;
}

.post-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.15em;
    background: var(--dh-green);
    border-radius: 3px;
}

.post-body h3 {
    font-family: var(--dh-font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dh-text);
    margin: 1.8em 0 0.5em;
}

.post-body ul,
.post-body ol {
    padding-left: 1.4em;
    margin: 0 0 1.5em;
}

.post-body li {
    margin-bottom: 0.45em;
    line-height: 1.7;
}

.post-body ul li::marker {
    color: var(--dh-green);
}

.post-body a {
    color: var(--dh-green);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.post-body a:hover {
    color: var(--dh-green-dark);
}

.post-body strong {
    font-weight: 700;
    color: var(--dh-text);
}

.post-body em {
    font-style: italic;
}

.post-body img {
    width: 100%;
    height: auto;
    border-radius: var(--dh-radius);
    margin: 1.5em 0;
    display: block;
}

.post-body blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    background: var(--dh-green-light);
    border-left: 4px solid var(--dh-green);
    border-radius: 0 var(--dh-radius) var(--dh-radius) 0;
    font-style: italic;
    font-size: 1.08rem;
    color: var(--dh-green-dark);
}

.post-body blockquote p {
    margin: 0;
}

/* Tags */
.post-tags {
    max-width: var(--dh-content-width);
    margin: 28px auto 0;
    padding: 0 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.post-tags .tag-label {
    font-family: var(--dh-font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dh-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-tags a {
    font-family: var(--dh-font-ui);
    font-size: 0.78rem;
    background: var(--dh-bg-soft);
    border: 1px solid var(--dh-border);
    color: var(--dh-text-muted);
    text-decoration: none;
    padding: 4px 11px;
    border-radius: 20px;
    transition: background var(--dh-ease), color var(--dh-ease), border-color var(--dh-ease);
}

.post-tags a:hover {
    background: var(--dh-green-light);
    color: var(--dh-green);
    border-color: var(--dh-green-mid);
}

/* Share */
.post-share-wrap {
    max-width: var(--dh-content-width);
    margin: 40px auto 0;
    padding: 0 40px;
}

.post-share-box {
    background: linear-gradient(135deg, var(--dh-green-light) 0%, var(--dh-green-mid) 100%);
    border: 1px solid var(--dh-green-mid);
    border-radius: var(--dh-radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.post-share-text h4 {
    font-family: var(--dh-font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dh-text);
    margin: 0 0 4px;
}

.post-share-text p {
    font-family: var(--dh-font-ui);
    font-size: 0.8rem;
    color: var(--dh-text-muted);
    margin: 0;
}

.post-share-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--dh-radius);
    font-family: var(--dh-font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform var(--dh-ease), box-shadow var(--dh-ease), opacity var(--dh-ease);
    white-space: nowrap;
    will-change: transform;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--dh-shadow-md);
}

.share-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.share-btn-pinterest {
    background: #e60023;
    color: var(--dh-white);
}

.share-btn-facebook {
    background: #1877f2;
    color: var(--dh-white);
}

.share-btn-copy {
    background: var(--dh-white);
    color: var(--dh-text);
    border: 1px solid var(--dh-border);
}

/* Related Posts */
.post-related {
    max-width: var(--dh-content-width);
    margin: 52px auto 0;
    padding: 0 40px;
}

.section-heading {
    font-family: var(--dh-font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dh-text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dh-border);
}

/* Comments */
.post-comments {
    max-width: var(--dh-content-width);
    margin: 52px auto 0;
    padding: 0 40px 64px;
}

.comments-area .comments-title {
    font-family: var(--dh-font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dh-text);
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments-area .comments-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dh-border);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    padding: 22px 0;
    border-bottom: 1px solid var(--dh-border);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-body-wrap {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.comment-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid var(--dh-green-mid);
}

.comment-content-wrap {
    flex: 1;
    min-width: 0;
}

.comment-meta-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-author-name {
    font-family: var(--dh-font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dh-text);
}

.comment-date {
    font-family: var(--dh-font-ui);
    font-size: 0.73rem;
    color: var(--dh-text-muted);
}

.comment-text {
    font-family: var(--dh-font-serif);
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--dh-text-body);
}

.comment-text p {
    margin: 0;
}

.comment-reply-link {
    font-family: var(--dh-font-ui);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--dh-green);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    transition: color var(--dh-ease);
}

.comment-reply-link:hover {
    color: var(--dh-green-dark);
}

.comment-list .children {
    list-style: none;
    padding-left: 58px;
    margin: 0;
}

/* Comment form */
#respond {
    margin-top: 40px;
    background: var(--dh-bg-soft);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-lg);
    padding: 32px;
}

#respond .comment-reply-title {
    font-family: var(--dh-font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dh-text);
    margin: 0 0 22px;
}

#respond .comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

#respond p {
    margin: 0;
}

.comment-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.comment-form-field label {
    font-family: var(--dh-font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dh-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
    width: 100%;
    font-family: var(--dh-font-ui);
    font-size: 0.88rem;
    color: var(--dh-text);
    background: var(--dh-bg);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    padding: 11px 14px;
    outline: none;
    transition: border-color var(--dh-ease), box-shadow var(--dh-ease);
    box-sizing: border-box;
    resize: vertical;
}

#respond input[type="text"]:focus,
#respond input[type="email"]:focus,
#respond input[type="url"]:focus,
#respond textarea:focus {
    border-color: var(--dh-green);
    box-shadow: 0 0 0 3px rgba(32, 80, 40, 0.15);
}

#respond textarea {
    min-height: 130px;
    margin-bottom: 14px;
}

#respond .form-submit {
    margin: 0;
}

#respond input[type="submit"] {
    background: var(--dh-green);
    color: var(--dh-white);
    border: none;
    cursor: pointer;
    font-family: var(--dh-font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--dh-radius);
    transition: background var(--dh-ease), transform var(--dh-ease);
    letter-spacing: 0.02em;
}

#respond input[type="submit"]:hover {
    background: var(--dh-green-dark);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1024px) {
    .single-content-row {
        grid-template-columns: 1fr;
        padding: 32px 24px 48px;
        gap: 32px;
    }

    .single-sidebar {
        display: block;
        position: static !important;
    }

    .post-header,
    .post-body,
    .post-tags,
    .post-share-wrap,
    .post-related,
    .post-comments {
        padding-left: 0;
        padding-right: 0;
    }

    .post-header {
        margin-top: 24px;
    }
}

@media (max-width: 680px) {
    .post-hero {
        aspect-ratio: 16/9;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .post-share-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    #respond {
        padding: 20px;
    }

    #respond .comment-form-row {
        grid-template-columns: 1fr;
    }

    .comment-list .children {
        padding-left: 32px;
    }
}
