/* Entry Footer Section */
.singular__footer {
    padding: 0 0 40px;
}

/* Common Section Styles */
.sns-share-buttons,
.related-posts,
.post-navigation {
    margin-bottom: 50px;
}

.sns-share-buttons h3,
.related-posts h3,
.post-navigation h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
    color: #333;
}

/* SNS Share Buttons */
.share-buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.share-button svg {
    width: 24px;
    height: 24px;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.share-button.x {
    background-color: #000000;
    color: white;
}

.share-button.x:hover {
    background-color: #333333;
}

.share-button.facebook {
    background-color: #1877F2;
    color: white;
}

.share-button.facebook:hover {
    background-color: #166FE5;
}

.share-button.line {
    background-color: #00B900;
    color: white;
}

.share-button.line:hover {
    background-color: #00A000;
}

/* Related Posts Section */
.related-posts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 0;
    margin: 0;
}

.related-post-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.related-post-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail Section */
.related-post-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 100px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.related-post-thumbnail img,
.related-post-thumbnail .thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-post-thumbnail .no-thumbnail {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

/* Category Badge */
.related-post-category {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    padding: 3px 6px;
    border: 1px solid #dbd8d8;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.95);
    font-weight: bold;
    white-space: nowrap;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Category Colors - using CSS variables and slug-based classes */
.related-post-category.category-spiritual {
    border-color: var(--category-spiritual, #8B5CF6);
    background-color: var(--category-spiritual, #8B5CF6);
}

.related-post-category.category-health {
    border-color: var(--category-health, #10B981);
    background-color: var(--category-health, #10B981);
}

.related-post-category.category-positive {
    border-color: var(--category-positive, #3B82F6);
    background-color: var(--category-positive, #3B82F6);
}

/* Content Section */
.related-post-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.related-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 8px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    transition: color 0.3s ease;
    min-height: auto;
}

.related-post-card:hover .related-post-title {
    color: #6FA3D2;
}

/* Title underline */
.related-post-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #6FA3D2 20%, 
        #6FA3D2 80%, 
        transparent 100%);
}

.related-post-excerpt {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.related-post-card:hover .related-post-excerpt {
    color: #6FA3D2;
}

/* Post Navigation (Previous/Next) */
.post-nav-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-previous,
.nav-next {
    display: flex;
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
}

.nav-link:hover {
    background: #efefef;
    transform: translateX(0);
}

.nav-link.prev {
    align-items: flex-start;
}

.nav-link.prev:hover {
    transform: translateX(-5px);
}

.nav-link.next {
    align-items: flex-end;
    text-align: right;
}

.nav-link.next:hover {
    transform: translateX(5px);
}

.nav-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-title {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tablet Design */
@media (max-width: 1024px) {
    .related-posts-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Design */
@media (max-width: 768px) {
    .singular__footer {
        padding: 0 15px;
    }

    .sns-share-buttons h3,
    .related-posts h3,
    .post-navigation h3 {
        font-size: 1.2rem;
    }

    .share-buttons-container {
        justify-content: center;
    }

    .share-button {
        width: 45px;
        height: 45px;
    }
    
    .share-button svg {
        width: 20px;
        height: 20px;
    }

    .related-posts-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-post-category {
        font-size: 8px;
        padding: 2px 5px;
        top: 3px;
        right: 3px;
    }

    .related-post-content {
        padding: 10px;
    }

    .related-post-title {
        font-size: 0.85rem;
        padding-bottom: 6px;
        margin-bottom: 6px;
    }

    .related-post-excerpt {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .related-post-thumbnail {
        max-height: 80px;
    }

    .post-nav-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-link {
        padding: 15px;
    }

    .nav-title {
        font-size: 1rem;
    }
}

