/*
Theme Name: Roadside Link — Hello Elementor Child
Description: Minimal Hello Elementor child theme with a blog-post-only featured-image hero.
Author: Roadside Link
Template: hello-elementor
Version: 1.1.0
Text Domain: roadside-link-blog-child
*/

/* Only single blog posts; service and location pages stay unchanged. */
body.single-post .rl-blog-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 360px;
    padding: 70px 0;
    overflow: hidden;
    isolation: isolate;
    background: #252525; /* Fallback when a post has no featured image. */
}

body.single-post .rl-blog-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

body.single-post .rl-blog-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

body.single-post .rl-blog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,.70), rgba(0,0,0,.43) 70%, rgba(0,0,0,.30));
    pointer-events: none;
}

body.single-post .rl-blog-hero__inner {
    position: relative;
    z-index: 2;
    width: calc(100% - 40px);
    max-width: 1140px;
    margin: 0 auto;
    text-align: left;
}

body.single-post .rl-blog-hero h1.rl-blog-hero__title {
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 4vw, 60px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: left;
}

@media (max-width: 767px) {
    body.single-post .rl-blog-hero {
        min-height: 260px;
        padding: 50px 0;
    }

    body.single-post .rl-blog-hero__inner {
        width: calc(100% - 36px);
    }

    body.single-post .rl-blog-hero h1.rl-blog-hero__title {
        font-size: clamp(30px, 7vw, 40px);
    }
}



/* ======================================
   ROADSIDE LINK — FOOTER CTA
   Dynamic shortcode text only
====================================== */

/* Dynamic CTA heading */
.roadside-cta-dynamic-title .elementor-shortcode {
    color: #ffffff !important;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    font-family: inherit;
}

/* Dynamic CTA description */
.roadside-cta-dynamic-description .elementor-shortcode,
.roadside-cta-dynamic-description .elementor-shortcode p {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
    font-family: inherit;
}

/* Paragraph spacing */
.roadside-cta-dynamic-description .elementor-shortcode p {
    margin: 0 0 14px;
}

.roadside-cta-dynamic-description .elementor-shortcode p:last-child {
    margin-bottom: 0;
}

/* Mobile */
@media (max-width: 767px) {
    .roadside-cta-dynamic-title .elementor-shortcode {
        font-size: 24px;
    }

    .roadside-cta-dynamic-description .elementor-shortcode,
    .roadside-cta-dynamic-description .elementor-shortcode p {
        font-size: 15px;
        line-height: 1.5;
    }
}



/* Spacing after blog hero */
body.single-post .rl-blog-hero {
    margin-bottom: 50px;
}

/* Mobile */
@media (max-width: 767px) {
    body.single-post .rl-blog-hero {
        margin-bottom: 30px;
    }
}


/* =====================================
   ROADSIDE LINK BLOG — SIDEBAR LAYOUT
===================================== */

/* Article and sidebar columns */
body.single-post main.rl-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 45px;
    align-items: start;
    width: calc(100% - 40px);
    max-width: 1140px;
    margin: 0 auto 80px;
    padding: 0;
}

/* Article column */
body.single-post .rl-blog-article {
    min-width: 0;
}

/* Sticky sidebar */
body.single-post .rl-blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    min-width: 0;
}

/* CTA box */
body.single-post .rl-blog-sidebar__card {
    background: #f7f7f7;
    border-top: 4px solid #EE3131;
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 5px 22px rgba(0,0,0,.07);
}

/* CTA title */
body.single-post .rl-blog-sidebar__card h2 {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    margin: 0 0 15px;
}

/* Business name */
body.single-post .rl-blog-sidebar__card h3 {
    color: #EE3131;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

/* CTA text */
body.single-post .rl-blog-sidebar__card p {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    margin: 0 0 16px;
}

body.single-post .rl-blog-sidebar__card
.rl-sidebar-tagline {
    font-style: italic;
}

/* Call button */
body.single-post .rl-sidebar-call {
    display: block;
    background: #EE3131;
    color: #fff !important;
    padding: 14px 16px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background .2s ease;
}

body.single-post .rl-sidebar-call:hover {
    background: #cc2525;
    color: #fff !important;
}

/* Tablet and mobile:
   Hide sidebar to avoid repeating footer CTA */
@media (max-width: 1023px) {
    body.single-post main.rl-blog-layout {
        display: block;
        max-width: 820px;
        width: calc(100% - 36px);
    }


}



/* =====================================
   BLOG — MORE POSTS SECTION
===================================== */

body.single-post .rl-more-posts {
    max-width: 1140px;
    width: calc(100% - 40px);
    margin: 0 auto 85px;
}

body.single-post .rl-more-posts > h2 {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    margin: 0 0 28px;
}

/* Three-column grid */
body.single-post .rl-more-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Individual post card */
body.single-post .rl-more-posts__card {
    background: #fff;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    min-width: 0;
}

/* Featured images */
body.single-post .rl-more-posts__thumbnail {
    display: block;
    overflow: hidden;
    background: #eee;
}

body.single-post .rl-more-posts__thumbnail img,
body.single-post .rl-more-posts__placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1.8 / 1;
    object-fit: cover;
}

body.single-post .rl-more-posts__body {
    padding: 20px 15px 24px;
}

/* Date */
body.single-post .rl-more-posts__date {
    display: block;
    color: #888;
    font-size: 14px;
    margin-bottom: 9px;
}

/* Post title */
body.single-post .rl-more-posts__card h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
}

/* No underlines on card links */
body.single-post .rl-more-posts__card a,
body.single-post .rl-more-posts__card a:hover,
body.single-post .rl-more-posts__card a:focus {
    text-decoration: none !important;
}

body.single-post .rl-more-posts__card h3 a {
    color: #EE3131;
}

body.single-post .rl-more-posts__card h3 a:hover {
    color: #c92626;
}

/* Short excerpt */
body.single-post .rl-more-posts__card p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Tablet */
@media (max-width: 1023px) {
    body.single-post .rl-more-posts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 767px) {
    body.single-post .rl-more-posts {
        width: calc(100% - 36px);
        margin-bottom: 55px;
    }

    body.single-post .rl-more-posts > h2 {
        font-size: 27px;
    }

    body.single-post .rl-more-posts__grid {
        grid-template-columns: 1fr;
    }
}



/* Elementor post card titles and buttons */
body .elementor-post__title a,
body .elementor-post__title a:hover,
body .elementor-button,
body .elementor-button:hover,
body .ekit-btn,
body .ekit-btn:hover,
body .elementskit-btn,
body .elementskit-btn:hover {
    text-decoration: none !important;
}

