/* Blog detail page specific styles */

.page-container {
    background-color: var(--color-background);
}

.content-container {
    margin: 0 auto;
    z-index: 12;
}


/* Back link */

.back-link {
    margin: 2rem 3rem;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-normal);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.back-link a:hover {
    opacity: 0.7;
}

.back-link i {
    margin-right: 0.5rem;
}


/* Article header */

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-title {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--blog-detail-title-size);
    line-height: var(--blog-detail-title-line-height);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.article-date {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-normal);
    color: var(--color-text-secondary);
}


/* Featured image */

.article-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
}


/* Article content */

.article-content {
    margin: 0 auto 4rem;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    font-size: var(--blog-detail-content-size);
    line-height: var(--blog-detail-content-line-height);
    color: var(--color-text-primary);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}


/* Recommended for you section */

.recommended-section {
    margin-bottom: 4rem;
}

.recommended-title {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--blog-recommended-title-size);
    color: var(--color-text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.recommended-slider {
    display: flex;
    align-items: center;
    position: relative;
}

.recommended-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    padding: 0.5rem 0;
    width: 100%;
}


/* Hide scrollbar for Chrome, Safari and Opera */

.recommended-container::-webkit-scrollbar {
    display: none;
}

.recommended-item {
    flex: 0 0 calc(33.333% - 1.5rem);
    min-width: 280px;
}

.recommended-item:hover .recommended-item-title {
    font-weight: var(--font-weight-bold);
}

.recommended-link {
    display: block;
    text-decoration: none;
    color: var(--color-text-primary);
}

.recommended-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    position: relative;
    margin-bottom: 1rem;
}

.recommended-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.recommended-item-title {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--blog-article-title-size);
    line-height: var(--blog-article-title-line-height);
    margin-bottom: 0.5rem;
    transition: all 0.1s ease;
}

.recommended-item-date {
    font-family: var(--font-primary);
    font-size: var(--blog-article-date-size);
    line-height: var(--blog-article-date-line-height);
    color: var(--color-blog-date);
}


/* Navigation arrows */

.slider-nav {
    width: var(--blog-slider-nav-size);
    height: var(--blog-slider-nav-size);
    background-color: var(--color-white);
    border: 1px solid var(--color-line);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
}

.slider-nav:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.prev-recommended {
    left: -20px;
}

.next-recommended {
    right: -20px;
}


/* Responsive styles */

@media (max-width: 768px) {
    .back-link {
        margin: 2rem 1.25rem;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .recommended-item {
        flex: 0 0 calc(50% - 1rem);
    }
    .prev-recommended {
        left: -10px;
    }
    .next-recommended {
        right: -10px;
    }
}