/* ============================================================
   Tasty Recipes Display – trd-styles.css
   Matches the reference screenshots: full-bleed image left/right
   alternating list on posts page; clean article layout + related
   grid on single page.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --trd-font-head:    'Georgia', 'Times New Roman', serif;
    --trd-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --trd-color-text:   #1a1a1a;
    --trd-color-muted:  #666;
    --trd-color-accent: #2d8a4e;    /* green – matches the button colour in screenshot */
    --trd-color-tag:    #888;
    --trd-color-border: #e5e5e5;
    --trd-color-bg:     #fff;
    --trd-radius:       4px;
    --trd-transition:   0.22s ease;
    --trd-max-width:    820px;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.trd-recipe-posts-wrap,
.trd-single-wrap {
    font-family: var(--trd-font-body);
    color: var(--trd-color-text);
    max-width: var(--trd-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================================
   POSTS PAGE  –  [recipe_posts]
   ============================================================ */

/* ── List layout (default – reference screenshot) ───────────── */
.trd-list-layout .trd-posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.trd-list-layout .trd-post-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    border-bottom: 1px solid var(--trd-color-border);
    padding: 28px 0;
    align-items: start;
    transition: background var(--trd-transition);
}

.trd-list-layout .trd-post-card:first-child {
    padding-top: 0;
}

/* First card: full-width image above text (like the hero in the screenshot) */
.trd-list-layout .trd-post-card:first-child {
    grid-template-columns: 1fr;
}

.trd-list-layout .trd-post-card:first-child .trd-card-img-wrap {
    height: 340px;
}

.trd-list-layout .trd-post-card:first-child .trd-card-body {
    padding: 20px 0 0;
}

/* ── Card image ─────────────────────────────────────────────── */
.trd-card-img-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.trd-card-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.trd-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.trd-card-img-link:hover .trd-card-img {
    transform: scale(1.04);
}

/* ── Card body ──────────────────────────────────────────────── */
.trd-list-layout .trd-card-body {
    padding: 0 0 0 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Meta line ──────────────────────────────────────────────── */
.trd-card-meta {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--trd-color-tag);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.trd-meta-sep {
    color: var(--trd-color-border);
    margin: 0 2px;
}

.trd-cat-tag {
    color: var(--trd-color-tag);
    text-decoration: none;
    transition: color var(--trd-transition);
}
.trd-cat-tag:hover { color: var(--trd-color-accent); }

/* ── Card title ─────────────────────────────────────────────── */
.trd-card-title {
    font-family: var(--trd-font-head);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px;
    color: var(--trd-color-text);
}

.trd-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--trd-transition);
}
.trd-card-title a:hover { color: var(--trd-color-accent); }

/* ── Card excerpt ───────────────────────────────────────────── */
.trd-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--trd-color-muted);
    margin: 0;
}

/* ── Grid layout ────────────────────────────────────────────── */
.trd-grid-layout .trd-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px 24px;
}

.trd-grid-layout .trd-post-card {
    display: flex;
    flex-direction: column;
}

.trd-grid-layout .trd-card-img-wrap {
    height: 220px;
    border-radius: var(--trd-radius);
}

.trd-grid-layout .trd-card-body {
    padding: 16px 4px 0;
}

/* ── Load more button ───────────────────────────────────────── */
.trd-load-more-wrap {
    text-align: center;
    padding: 36px 0 12px;
}

.trd-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 2px solid var(--trd-color-text);
    color: var(--trd-color-text);
    font-family: var(--trd-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 28px;
    cursor: pointer;
    border-radius: 2px;
    transition: background var(--trd-transition), color var(--trd-transition);
}

.trd-load-more-btn:hover {
    background: var(--trd-color-text);
    color: #fff;
}

.trd-load-more-btn.trd-loading {
    opacity: 0.6;
    pointer-events: none;
}

.trd-btn-arrow {
    font-size: 16px;
    line-height: 1;
}

/* ── No posts ───────────────────────────────────────────────── */
.trd-no-posts {
    color: var(--trd-color-muted);
    font-size: 15px;
    padding: 32px 0;
}

/* ============================================================
   SINGLE POST PAGE  –  [recipe_single]
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────────── */
.trd-single-hero {
    margin: 0 0 32px;
    border-radius: var(--trd-radius);
    overflow: hidden;
    max-height: 500px;
}

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

/* ── Header ─────────────────────────────────────────────────── */
.trd-single-header {
    margin-bottom: 36px;
}

.trd-single-meta {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: var(--trd-color-tag);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.trd-single-cat {
    color: var(--trd-color-tag);
    text-decoration: none;
}
.trd-single-cat:hover { color: var(--trd-color-accent); }

.trd-single-title {
    font-family: var(--trd-font-head);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--trd-color-text);
    margin: 0;
}

/* ── Content area ───────────────────────────────────────────── */
.trd-single-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--trd-color-text);
    margin-bottom: 60px;
}

.trd-single-content h2,
.trd-single-content h3 {
    font-family: var(--trd-font-head);
    font-weight: 700;
    margin-top: 1.8em;
}

.trd-single-content p { margin-bottom: 1.2em; }

.trd-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--trd-radius);
}

/* Tasty Recipes card inside content */
.trd-single-content .tasty-recipes {
    margin: 40px 0;
}

/* ── Related section ────────────────────────────────────────── */
.trd-related-wrap {
    border-top: 2px solid var(--trd-color-text);
    padding-top: 36px;
    margin-top: 12px;
}

.trd-related-title {
    font-family: var(--trd-font-head);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 28px;
    color: var(--trd-color-text);
}

/* Related grid: 3 columns on desktop, 2 on tablet, 1 on mobile */
.trd-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 20px;
}

/* ── Related card ───────────────────────────────────────────── */
.trd-related-card {
    display: flex;
    flex-direction: column;
}

.trd-related-img-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 14px;
}

.trd-related-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: var(--trd-radius);
}

.trd-related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.trd-related-img-link:hover .trd-related-img {
    transform: scale(1.05);
}

.trd-related-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trd-related-card-title {
    font-family: var(--trd-font-head);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin: 6px 0 8px;
    color: var(--trd-color-text);
}

.trd-related-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--trd-transition);
}
.trd-related-card-title a:hover { color: var(--trd-color-accent); }

.trd-related-excerpt {
    font-size: 13px;
    line-height: 1.55;
    color: var(--trd-color-muted);
    margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media ( max-width: 760px ) {
    .trd-list-layout .trd-post-card {
        grid-template-columns: 1fr;
    }
    .trd-list-layout .trd-card-body {
        padding: 14px 0 0;
    }
    .trd-card-img-wrap { height: 220px; }

    .trd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media ( max-width: 480px ) {
    .trd-related-grid {
        grid-template-columns: 1fr;
    }
    .trd-single-title { font-size: 22px; }
    .trd-card-title   { font-size: 17px; }
}
