/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/
/* =========================
   Single Post
========================= */

.custom-single-post {
    width: 100%;
}

.single-post .page-title {
    display: none !important;
}

.custom-single-post-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}

/* =========================================
   Featured Image
========================================= */

.custom-single-post-image {
    position: relative;

    width: 100%;
    margin-bottom: 42px;

    overflow: hidden;

    background: #111;

    isolation: isolate;
}


/* Animated top & bottom border */

.custom-single-post-image::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: linear-gradient(
        90deg,
        #ffffff,
        #ae0f0a,
        #ffffff,
        #ae0f0a,
        #ffffff
    );

    background-size: 300% 100%;

    animation: customImageBorder 5s ease-in-out infinite;

    z-index: 3;

    pointer-events: none;
}


/* Bottom border */

.custom-single-post-image::after {
    content: "";

    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: linear-gradient(
        90deg,
        #ae0f0a,
        #ffffff,
        #ae0f0a,
        #ffffff,
        #ae0f0a
    );

    background-size: 300% 100%;

    animation: customImageBorderReverse 5s ease-in-out infinite;

    z-index: 3;

    pointer-events: none;
}


/* Animation */

@keyframes customImageBorder {

    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }

}


@keyframes customImageBorderReverse {

    0% {
        background-position: 100% 50%;
    }

    50% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }

}


/* Image */

.custom-single-post-image img {
    display: block;

    width: 100%;
    height: 550px;

    object-fit: cover;
    object-position: center;

    position: relative;
    z-index: 2;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1),
        filter .7s ease;
}

/* Glow */

.custom-single-post-image-glow {
    position: absolute;

    width: 45%;
    height: 45%;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: #ae0f0a;

    filter: blur(70px);

    opacity: 0;

    z-index: 1;

    transition:
        opacity .6s ease,
        transform .7s ease;
}


/* Hover */

.custom-single-post-image:hover img {
    transform: scale(1.025);

    filter:
        brightness(.92)
        saturate(1.08);
}

.custom-single-post-image:hover .custom-single-post-image-glow {
    opacity: .35;

    transform:
        translate(-50%, -50%)
        scale(1.35);
}


/* =========================================
   Title
========================================= */

.custom-single-post-title-wrapper {
    display: flex;
    align-items: stretch;

    gap: 18px;

    margin-bottom: 12px;
}


/* Red vertical line */

.custom-single-post-title-line {
    flex: 0 0 4px;

    width: 4px;

    border-radius: 10px;

    background: #ae0f0a;

    box-shadow:
        0 0 14px rgba(174, 15, 10, .22);
}


/* Title */

.custom-single-post-title {
    margin: 0;

    font-size: clamp(28px, 3vw, 42px);

    font-weight: 700;

    line-height: 1.5;

    color: #171717;

    letter-spacing: -0.5px;
}


/* =========================================
   Date
========================================= */

.custom-single-post-date {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 5px;
    margin-bottom: 28px;

    color: #888;

    font-size: 13px;
}

.custom-single-post-date-icon {
    color: #ae0f0a;

    font-size: 18px;

    line-height: 1;
}


/* =========================================
   Excerpt
========================================= */

.custom-single-post-excerpt-box {
    position: relative;

    margin: 30px 0 38px;

    padding: 22px 25px 22px 25px;

    background:
        linear-gradient(
            135deg,
            rgba(174, 15, 10, .045),
            rgba(174, 15, 10, .015)
        );

    border: 1px solid rgba(174, 15, 10, .10);

    border-radius: 12px;

    overflow: hidden;
}


/* Small red accent */

.custom-single-post-excerpt-box::before {
    content: "";

    position: absolute;

    right: 0;
    top: 0;
    bottom: 0;

    width: 3px;

    background: #ae0f0a;
}


/* Excerpt label */

.custom-single-post-excerpt-label {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 10px;

    color: #ae0f0a;

    font-size: 13px;

    font-weight: 700;
}

.custom-single-post-excerpt-label::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #ae0f0a;

    box-shadow:
        0 0 0 4px rgba(174, 15, 10, .08);
}


/* Excerpt text */

.custom-single-post-excerpt {
    color: #555;

    font-size: 15px;

    line-height: 2;

    font-weight: 400;
}

.custom-single-post-excerpt p {
    margin: 0;
}



/* خط */

.custom-single-post-divider {
    width: 100%;
    height: 1px;
    background: #e5e5e5;
    margin: 25px 0;
}


/* نویسنده */

.custom-single-post-author {
    font-size: 14px;
    margin-bottom: 20px;
}

/* =========================================
   Taxonomy Section
========================================= */

.custom-single-post-taxonomy-section {
    margin: 28px 0;
}


/* Heading */

.custom-single-post-taxonomy-heading {
    margin-bottom: 10px;

    color: #777;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.5;
}


/* Labels container */

.custom-single-post-taxonomy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
}


/* Label */

.custom-post-label {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border: 1px solid rgba(174, 15, 10, .16);
    border-radius: 50px;

    background: rgba(174, 15, 10, .035);

    color: #ae0f0a !important;

    font-size: 12px;
    font-weight: 500;

    line-height: 1.5;

    text-decoration: none !important;

    transition:
        background-color .25s ease,
        border-color .25s ease,
        color .25s ease,
        transform .25s ease;
}


/* Category hover */

a.custom-post-label:hover {
    background: #ae0f0a;

    border-color: #ae0f0a;

    color: #fff !important;

    transform: translateY(-2px);
}


/* Tags */

span.custom-post-label {
    cursor: default;
}


/* =========================================
   Content spacing
========================================= */

.custom-single-post-content {
    margin-top: 30px;
    margin-bottom: 35px;
}

.custom-single-post-content img {
    max-width: 100%;
    height: auto;
}



/* =========================================
   Related Posts
========================================= */

.custom-related-posts {
    width: 100%;
    margin-top: 60px;
}


/* Header */

.custom-related-posts-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}


/* Title */

.custom-related-posts-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
}

/* =========================================
   Related Posts Buttons
========================================= */

.custom-related-posts-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    flex-shrink: 0;
}


/* Button */

.custom-related-posts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 6px 11px;

    border: 1px solid rgba(174, 15, 10, 0.35);
    border-radius: 50px;

    background: rgba(174, 15, 10, 0.03);

    color: #ae0f0a !important;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;

    text-decoration: none !important;

    transition:
        all .3s cubic-bezier(.4, 0, .2, 1);
}


/* Arrow */

.custom-related-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
    line-height: 1;

    transition:
        transform .3s ease;
}


/* Hover */

.custom-related-posts-button:hover {
    background: #ae0f0a;
    border-color: #ae0f0a;

    color: #fff !important;

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(174, 15, 10, 0.18);
}


.custom-related-posts-button:hover .custom-related-arrow {
    transform: translateX(-3px);
}
/* =========================================
   Posts Slider
========================================= */

.custom-related-posts-slider {
    display: flex;

    gap: 20px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;

    padding-bottom: 15px;

    scrollbar-width: none;

    cursor: grab;
}

.custom-related-posts-slider::-webkit-scrollbar {
    display: none;
}

.custom-related-posts-slider:active {
    cursor: grabbing;
}


/* 6 cards */

.custom-related-post-card {
    flex: 0 0 calc((100% - 60px) / 4);

    min-width: 0;

    background: #fff;

    border: 1px solid #e8e8e8;
    border-radius: 8px;

    overflow: hidden;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


/* Card hover */

.custom-related-post-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}


/* Image */

.custom-related-post-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.custom-related-post-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .4s ease;
}

.custom-related-post-card:hover .custom-related-post-image img {
    transform: scale(1.05);
}


/* Content */

.custom-related-post-content {
    padding: 15px;
}


/* Date */

.custom-related-post-date {
    margin-bottom: 8px;

    font-size: 12px;

    color: #888;
}


/* Title */

.custom-related-post-title {
    margin: 0 0 10px;

    font-size: 16px;
    line-height: 1.7;
}

.custom-related-post-title a {
    color: #222 !important;
    text-decoration: none !important;
}


/* Excerpt */

.custom-related-post-excerpt {
    margin-bottom: 12px;

    font-size: 13px;
    line-height: 1.8;

    color: #666;
}


/* Read more */

.custom-related-post-more {
    display: inline-block;

    font-size: 13px;
    font-weight: 600;

    color: #ae0f0a !important;

    text-decoration: none !important;
}


/* =========================================
   Responsive
========================================= */

@media (max-width: 1200px) {

    .custom-related-post-card {
        flex: 0 0 calc((100% - 60px) / 4);
    }

}




/* =========================================
   Mobile Optimization
   ========================================= */

@media (max-width: 767px) {

    /* Container */
    .custom-single-post-container {
        width: 100%;
        max-width: 100%;
        padding: 22px 14px 45px;
    }

    /* Featured Image */
    .custom-single-post-image {
        width: 100%;
        height: 210px;
        margin-bottom: 22px;
        border-radius: 8px;
    }

    .custom-single-post-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Border */
    .custom-single-post-image::before,
    .custom-single-post-image::after {
        height: 2px;
    }

    /* Glow */
    .custom-single-post-image-glow {
        width: 50%;
        height: 50%;
        filter: blur(45px);
    }


    /* =========================================
       Title
       ========================================= */

    .custom-single-post-title-wrapper {
        gap: 9px;
        margin-bottom: 8px;
    }

    .custom-single-post-title-line {
        flex: 0 0 3px;
        width: 3px;
    }

    .custom-single-post-title {
        font-size: 21px;
        line-height: 1.65;
        letter-spacing: 0;
    }


    /* =========================================
       Date
       ========================================= */

    .custom-single-post-date {
        gap: 5px;
        margin-top: 3px;
        margin-bottom: 20px;
        font-size: 11px;
    }

    .custom-single-post-date-icon {
        font-size: 15px;
    }


    /* =========================================
       Excerpt
       ========================================= */

    .custom-single-post-excerpt-box {
        margin: 20px 0 25px;
        padding: 15px 15px 15px 17px;
        border-radius: 9px;
    }

    .custom-single-post-excerpt-label {
        gap: 6px;
        margin-bottom: 7px;
        font-size: 11px;
    }

    .custom-single-post-excerpt-label::before {
        width: 5px;
        height: 5px;
    }

    .custom-single-post-excerpt {
        font-size: 12px;
        line-height: 1.9;
    }


    /* =========================================
       Author
       ========================================= */

    .custom-single-post-author {
        font-size: 12px;
        margin-bottom: 15px;
    }


    /* =========================================
       Taxonomy
       ========================================= */

    .custom-single-post-taxonomy-section {
        margin: 22px 0;
    }

    .custom-single-post-taxonomy-heading {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .custom-single-post-taxonomy {
        gap: 5px;
    }

    .custom-post-label {
        padding: 4px 8px;
        font-size: 10px;
    }


    /* =========================================
       Content
       ========================================= */

    .custom-single-post-content {
        margin-top: 22px;
        margin-bottom: 28px;
        font-size: 14px;
        line-height: 1.9;
    }

    .custom-single-post-content img {
        width: 100%;
        height: auto;
    }


    /* =========================================
       Divider
       ========================================= */

    .custom-single-post-divider {
        margin: 20px 0;
    }


    /* =========================================
       Related Posts
       ========================================= */

    .custom-related-posts {
        margin-top: 40px;
    }

    .custom-related-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .custom-related-posts-title {
        font-size: 20px;
        line-height: 1.5;
    }


    /* Buttons */
    .custom-related-posts-buttons {
        width: 100%;
        gap: 6px;
        flex-wrap: wrap;
    }

    .custom-related-posts-button {
        padding: 6px 10px;
        font-size: 11px;
        gap: 5px;
    }

    .custom-related-arrow {
        font-size: 13px;
    }


    /* =========================================
       Related Posts Slider
       ========================================= */

    .custom-related-posts-slider {
        gap: 12px;
        padding-bottom: 10px;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    /* نمایش حدود 1.2 کارت در موبایل */
    .custom-related-post-card {
        flex: 0 0 78%;
        min-width: 0;
        border-radius: 8px;
    }


    /* Related Image */
    .custom-related-post-image {
        aspect-ratio: 16 / 10;
    }


    /* Related Content */
    .custom-related-post-content {
        padding: 11px;
    }

    .custom-related-post-date {
        margin-bottom: 5px;
        font-size: 10px;
    }

    .custom-related-post-title {
        margin-bottom: 7px;
        font-size: 14px;
        line-height: 1.6;
    }

    .custom-related-post-excerpt {
        margin-bottom: 8px;
        font-size: 11px;
        line-height: 1.7;

        /* حداکثر 3 خط */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .custom-related-post-more {
        font-size: 11px;
    }
}


/* =========================================
   Very Small Phones
   ========================================= */

@media (max-width: 380px) {

    .custom-single-post-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .custom-single-post-image {
        height: 185px;
    }

    .custom-single-post-title {
        font-size: 19px;
    }

    .custom-single-post-excerpt {
        font-size: 11px;
    }

    .custom-related-posts-title {
        font-size: 18px;
    }

    .custom-related-post-card {
        flex: 0 0 84%;
    }
}






