/* Single news post: Elementor 4423 "Regular blog/news post". Widget CSS (post banner, related posts) and
   page CSS verbatim; layout from the generated widget settings. */

.tlt-single__body{display:flex;flex-direction:column;gap:20px;max-width:1600px;margin:0 auto;padding:10px;background:#000;}
/* Yellow rules: 24% wide, 3.7px #ffe500, 15px above and below */
.tlt-single .tlt-single__rule{height:0;width:24%;margin:15px 38%!important;align-self:flex-start;border:0;border-top:3.7px solid #ffe500;background:none;opacity:1;}
.tlt-single .tlt-single__rule--top{margin-bottom:calc(15px + 2%)!important;}
/* Excerpt: 23px/400 centred; content: 15px/300 white (margins as on live, % of the container) */
.tlt-single .tlt-single__excerpt{margin:1% 6% 3% 6%!important;text-align:center;font-size:23px;font-weight:400;}
.tlt-single .tlt-single__excerpt p{margin:0;}
.tlt-single .tlt-single__content{margin:-3% 6% 0 7%!important;color:#fff;font-family:"DIN",Sans-serif;font-size:15px;font-weight:300;}

/* ===== Widget CSS ([tillett_post_banner], [tillett_related_posts]) ===== */
/* ---- shortcode #8c5dc6b ---- */
/* ======================================
   TILLETT BLOG POST BANNER
   ====================================== */

.tillett-post-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Image */
.post-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Dark Overlay */
.post-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.3) 0%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0.9) 100%
    );
    z-index: 2;
}

/* Content Container */
.post-banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px;
    max-width: 900px;
}

/* Category Tag */
.post-banner-meta-top {
    margin-bottom: 25px;
}

.post-banner-category {
    display: inline-block;
    padding: 8px 20px;
    background: #F9D616;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    transition: all 0.3s ease;
}

.post-banner-category:hover {
    background: #fff;
    color: #000;
}

/* Title */
.post-banner-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    margin: 0 0 25px 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* Yellow Accent Line */
.post-banner-accent {
    width: 80px;
    height: 4px;
    background: #F9D616;
    margin: 0 auto 25px;
}

/* Meta Info */
.post-banner-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-banner-divider {
    color: rgba(255,255,255,0.3);
}

.post-banner-date,
.post-banner-reading-time {
    color: rgba(255,255,255,0.7);
}

/* Scroll Indicator */
.post-banner-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

.post-banner-scroll svg {
    color: #F9D616;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .tillett-post-banner {
        height: 60vh;
        min-height: 450px;
    }
    
    .post-banner-title {
        font-size: 2.2rem;
    }
    
    .post-banner-content {
        padding: 30px;
    }
}

@media (max-width: 575px) {
    .tillett-post-banner {
        height: 55vh;
        min-height: 400px;
    }
    
    .post-banner-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .post-banner-content {
        padding: 20px;
    }
    
    .post-banner-meta-bottom {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-banner-divider {
        display: none;
    }
    
    .post-banner-scroll {
        display: none;
    }
}

/* ---- shortcode #da9eb69 ---- */
/* ======================================
   TILLETT RELATED POSTS SECTION
   ====================================== */

.tillett-related-posts {
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    position: relative;
    background: #000000;
    padding: 80px 40px;
}

/* Header */
.related-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.related-posts-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    position: relative;
    padding-left: 20px;
}

.related-posts-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #F9D616;
}

.related-posts-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #F9D616;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.related-posts-view-all:hover {
    color: #fff;
}

.related-posts-view-all span {
    transition: transform 0.2s ease;
}

.related-posts-view-all:hover span {
    transform: translateX(4px);
}

/* Grid */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Individual Card */
.related-post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

.related-post-card:hover {
    border-color: rgba(249, 214, 22, 0.3);
}

/* Background Image */
.related-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 1;
}

.related-post-card:hover .related-post-image {
    transform: scale(1.05);
}

/* Overlay */
.related-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
    transition: background 0.3s ease;
}

.related-post-card:hover .related-post-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

/* Content */
.related-post-content {
    position: relative;
    z-index: 3;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Category Tag */
.related-post-tag {
    display: inline-block;
    width: fit-content;
    padding: 5px 12px;
    background: #F9D616;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

/* Title */
.related-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-card:hover .related-post-title {
    color: #F9D616;
}

/* Meta */
.related-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.related-post-date,
.related-post-read-time {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Yellow Accent Bar */
.related-post-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #F9D616;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 4;
}

.related-post-card:hover .related-post-accent {
    transform: scaleX(1);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .tillett-related-posts {
        padding: 60px 30px;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .related-post-card {
        min-height: 280px;
    }
    
    .related-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .related-posts-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .tillett-related-posts {
        padding: 50px 20px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-post-card {
        min-height: 260px;
    }
    
    .related-posts-title {
        font-size: 1.3rem;
    }
    
    .related-post-content {
        padding: 20px;
    }
    
    .related-post-title {
        font-size: 1rem;
    }
}
```

**Features:**

- **Pulls related posts** from the same category first, falls back to recent posts
- **Excludes current post** so you don't see the same article
- **Matches the blog highlights style** - dark background, image cards, yellow accents
- **Yellow accent bar** slides in on hover
- **Image zoom** on hover
- **Category tag** with rhombus shape
- **Reading time** calculated automatically
- **"View All Articles" link** to the blog archive
- **Fully responsive** - 3 columns → 2 columns → 1 column

**To use:**

1. Add the PHP to your child theme's `functions.php`
2. Add the CSS to your site's custom CSS
3. Add `[tillett_related_posts]` after your post content

**Shortcode options:**
```
[tillett_related_posts posts="3"]   // Default - 3 posts
[tillett_related_posts posts="4"]   // Show 4 posts
[tillett_related_posts posts="6"]   // Show 6 posts

/* ===== Page CSS ===== */
/* ======================================
   TILLETT BLOG POST BANNER
   ====================================== */

.tillett-post-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Image */
.post-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Dark Overlay */
.post-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.3) 0%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0.9) 100%
    );
    z-index: 2;
}

/* Content Container */
.post-banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px;
    max-width: 900px;
}

/* Category Tag */
.post-banner-meta-top {
    margin-bottom: 25px;
}

.post-banner-category {
    display: inline-block;
    padding: 8px 20px;
    background: #F9D616;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    transition: all 0.3s ease;
}

.post-banner-category:hover {
    background: #fff;
    color: #000;
}

/* Title */
.post-banner-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    margin: 0 0 25px 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* Yellow Accent Line */
.post-banner-accent {
    width: 80px;
    height: 4px;
    background: #F9D616;
    margin: 0 auto 25px;
}

/* Meta Info */
.post-banner-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-banner-divider {
    color: rgba(255,255,255,0.3);
}

.post-banner-date,
.post-banner-reading-time {
    color: rgba(255,255,255,0.7);
}

/* Scroll Indicator */
.post-banner-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

.post-banner-scroll svg {
    color: #F9D616;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .tillett-post-banner {
        height: 60vh;
        min-height: 450px;
    }
    
    .post-banner-title {
        font-size: 2.2rem;
    }
    
    .post-banner-content {
        padding: 30px;
    }
}

@media (max-width: 575px) {
    .tillett-post-banner {
        height: 55vh;
        min-height: 400px;
    }
    
    .post-banner-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .post-banner-content {
        padding: 20px;
    }
    
    .post-banner-meta-bottom {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-banner-divider {
        display: none;
    }
    
    .post-banner-scroll {
        display: none;
    }
}
/* Elementor containers wrap on phones (--flex-wrap-mobile:wrap); with wide content (policy tables) the
   content box then takes the full container width, as on live. Same flex rule, so posts are unaffected. */
@media (max-width:767px){.tlt-single__body{flex-wrap:wrap;}.tlt-single__body>*{max-width:100%;}}

/* 404: live serves it through the same Elementor template as posts, with no banner and empty excerpt and
   content widgets between the two rules (measured Nov 2026: rules at 60 and 141px, 10 and 70px on phones). */
.tlt-single--404 .tlt-single__body{margin-top:-15px;padding-bottom:25px;}
.tlt-404__gap{height:0;margin-bottom:-20px;}

/* Order received: boxed like live's (text starts 157px in at 1440). Live's page with a real order on it
   could not be measured from outside; check on staging with a test order. */
.tlt-single--order .tlt-single__content{box-sizing:border-box;max-width:1140px;margin:12px auto 0;padding:0 7px;}
