/* Single Post Redesign CSS for SimpleCPR
   This file contains styles for the redesigned single post layout
*/

/* Main container styles */
.single-post-redesigned {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Featured image styles - full width with proper aspect ratio */
.post-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post content container */
.post-content-container {
    padding: 0 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Post title and meta styles */
.entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #333;
}

.post-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1rem;
}

.post-date {
    color: #666;
    font-size: 0.9rem;
}

/* Share button and popup styles */
.post-share {
    position: relative;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

.share-popup {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 0.5rem;
    padding: 1rem;
}

.share-popup.active {
    display: block;
}

.share-popup-content {
    display: flex;
    align-items: center;
}

#share-url {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-size: 0.9rem;
}

#copy-link-button {
    padding: 0.5rem 1rem;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

#copy-link-button:hover {
    background: #005d8c;
}

/* Post tags */
.post-tags {
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

/* Post content styles */
.entry-content {
    margin-bottom: 3rem;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* Takeaway box styles */
.takeaway {
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Post navigation styles */
.post-navigation {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-previous, .nav-next {
    max-width: 40%;
}

.nav-previous a, .nav-next a {
    color: #0073aa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-arrow {
    font-size: 1.2rem;
}

.back-to-blog {
    text-align: center;
}

.back-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0073aa;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #005d8c;
    text-decoration: none;
}

/* Related posts section */
.related-posts-section {
    margin: 4rem 0;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #0073aa;
    margin: 0.75rem auto 0;
}

.grid-posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .grid-posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-posts-container {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-blog {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .nav-previous, .nav-next {
        max-width: 100%;
        width: 100%;
    }
    
    .post-meta-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Grid post styles for related posts */
.grid-post {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.grid-post-link {
    text-decoration: none;
    color: inherit;
}

.grid-post-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-post-image {
    height: 200px;
    overflow: hidden;
}

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

.grid-post:hover .grid-post-image img {
    transform: scale(1.05);
}

.grid-post .entry-header {
    padding: 1.25rem 1.25rem 0;
}

.grid-post .entry-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.grid-post .post-tags {
    margin: 0.5rem 0;
}

.grid-post .entry-content {
    padding: 0 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.grid-post .post-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #eaeaea;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.grid-post .read-more {
    color: #0073aa;
    font-weight: 500;
}

/* Comments section */
.comments-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.comments-section h3.comments-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.comment-form {
    margin-top: 2rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.comment-form input[type="submit"] {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-form input[type="submit"]:hover {
    background-color: #005d8c;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 1rem;
}

.comment-metadata {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.comment-content {
    line-height: 1.6;
}
