/* ========================================
   Single Blog Post Styles - Block Template Version
   Full-width cover image with white heading overlay
======================================== */

/* Hero Section with Full-Width Cover Image */
.hero-blog-post {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-blog-post .wp-block-post-featured-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-blog-post .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    z-index: 10 !important;
}

.hero-content {
    text-align: left;
    color: white;
    max-width: 800px;
    padding: 2rem;
    z-index: 11;
    position: relative;
    width: 100%;
}

/* Ensure ALL text in hero section is white */
.hero-blog-post,
.hero-blog-post *,
.hero-overlay,
.hero-overlay *,
.hero-content,
.hero-content * {
    color: white !important;
}

/* Specific block element styling for white text */
.hero-blog-post .wp-block-post-date,
.hero-blog-post .wp-block-post-author,
.hero-blog-post .wp-block-post-terms,
.hero-blog-post .wp-block-post-title,
.hero-blog-post .wp-block-post-excerpt,
.hero-blog-post .wp-block-navigation,
.hero-blog-post .wp-block-navigation *,
.hero-blog-post .wp-block-group,
.hero-blog-post .wp-block-group * {
    color: white !important;
}

/* Override any WordPress default colors */
.hero-blog-post .wp-block-post-date a,
.hero-blog-post .wp-block-post-author a,
.hero-blog-post .wp-block-post-terms a,
.hero-blog-post .wp-block-navigation a {
    color: white !important;
}

.hero-blog-post .wp-block-post-date a:hover,
.hero-blog-post .wp-block-post-author a:hover,
.hero-blog-post .wp-block-post-terms a:hover,
.hero-blog-post .wp-block-navigation a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Breadcrumb Styles */
.hero-blog-post .breadcrumb {
    margin-bottom: 1.5rem;
}

.hero-blog-post .breadcrumb ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-blog-post .breadcrumb li {
    display: flex;
    align-items: center;
    margin: 0 0.25rem;
}

.hero-blog-post .breadcrumb li:not(:last-child)::after {
    content: '';
    margin: 0 0.5rem;
}

.hero-blog-post .breadcrumb a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.hero-blog-post .breadcrumb a:hover {
    color: #ffffff !important;
}

.hero-blog-post .breadcrumb .is-active span {
    color: #ffffff !important;
    font-weight: 500;
}

/* Navigation block styling */
.hero-blog-post .wp-block-navigation {
    margin-bottom: 1.5rem;
}

.hero-blog-post .wp-block-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-blog-post .wp-block-navigation li {
    display: flex;
    align-items: center;
    margin: 0 0.25rem;
}

.hero-blog-post .wp-block-navigation li:not(:last-child)::after {
    content: '';
    margin: 0 0.5rem;
}

.hero-blog-post .wp-block-navigation a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.hero-blog-post .wp-block-navigation a:hover {
    color: #ffffff !important;
}

.hero-blog-post .wp-block-navigation .is-active span {
    color: #ffffff !important;
    font-weight: 500;
}

/* Post Meta Hero */
.post-meta-hero {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.post-meta-hero span {
    display: inline-flex;
    align-items: center;
}

.post-meta-hero .post-categories a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.post-meta-hero .post-categories a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Post Title Hero */
.post-title-hero {
    font-size: 3rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 0 1.5rem 0 !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Post Excerpt Hero */
.post-excerpt-hero {
    font-size: 1.2rem !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 600px;
    margin: 0 auto !important;
}

/* Blog Post Content */
.blog-post-content {
    padding: 4rem 0;
    background: #ffffff;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.blog-post {
    background: #ffffff;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem 0;
    color: #333;
    font-weight: 600;
}

.post-content h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.3rem; }
.post-content h5 { font-size: 1.1rem; }
.post-content h6 { font-size: 1rem; }

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid #118cf6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.post-tags h4,
.social-sharing h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.tag-list {
    margin-bottom: 2rem;
}

.tag-list a {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-list a:hover {
    background: #118cf6;
    color: #ffffff;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.facebook {
    background: #4267b2;
}

.share-button.linkedin {
    background: #0077b5;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Sidebar */
.blog-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    margin-bottom: 2.5rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #118cf6;
    padding-bottom: 0.5rem;
}

.recent-posts-list,
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-posts-list li,
.categories-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.recent-posts-list li:last-child,
.categories-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts-list a,
.categories-list a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
}

.recent-posts-list a:hover,
.categories-list a:hover {
    color: #118cf6;
}

.recent-posts-list small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.categories-list .count {
    color: #666;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Post Navigation */
.post-navigation {
    background: #f8f9fa;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

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

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

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1rem 1.5rem;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #118cf6;
    color: #ffffff;
    border-color: #118cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 140, 246, 0.3);
}

.nav-next {
    text-align: right;
}

/* Comments Section */
.comments-section {
    background: #ffffff;
}

.comments-area {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #118cf6;
}

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

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

.comment-list .comment .comment-author .fn {
    font-weight: 600;
    color: #333;
    font-style: normal;
}

.comment-list .comment .comment-meta {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.comment-list .comment .comment-content {
    line-height: 1.6;
    color: #333;
}

.comment-list .comment .reply {
    margin-top: 1rem;
}

.comment-list .comment .reply a {
    color: #118cf6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.comment-list .comment .reply a:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form p {
    margin: 0;
}

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

.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 #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #118cf6;
    box-shadow: 0 0 0 3px rgba(17, 140, 246, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form input[type="submit"] {
    background: #118cf6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-self: start;
}

.comment-form input[type="submit"]:hover {
    background: #0d6fca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 140, 246, 0.3);
}

/* Comment Navigation */
.comment-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
    display: inline-block;
}

.comment-navigation .nav-previous {
    float: left;
}

.comment-navigation .nav-next {
    float: right;
}

.comment-navigation a {
    color: #118cf6;
    text-decoration: none;
    font-weight: 500;
}

.comment-navigation a:hover {
    text-decoration: underline;
}

/* Clear floats */
.comment-navigation::after {
    content: '';
    display: table;
    clear: both;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
    
    .post-title-hero {
        font-size: 2.5rem !important;
    }
}

@media screen and (max-width: 768px) {
    .hero-blog-post {
        height: 60vh;
        min-height: 400px;
    }
    
    .post-title-hero {
        font-size: 2rem !important;
    }
    
    .post-excerpt-hero {
        font-size: 1.1rem !important;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .post-meta-hero {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .blog-post-content {
        padding: 2rem 0;
    }
}

@media screen and (max-width: 480px) {
    .hero-blog-post {
        height: 50vh;
        min-height: 350px;
    }
    
    .post-title-hero {
        font-size: 1.8rem !important;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-button {
        text-align: center;
        justify-content: center;
    }
}

/* Block Template Specific Styles */
.wp-block-group.hero-blog-post {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
}

.wp-block-post-featured-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-group.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.wp-block-group.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
    z-index: 11;
    position: relative;
}

/* Ensure proper spacing for block elements */
.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms {
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-post-title {
    margin: 0 0 1.5rem 0 !important;
}

.wp-block-post-excerpt {
    margin: 0 !important;
}

/* Container and layout styles */
.wp-block-group.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wp-block-columns.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media screen and (max-width: 1024px) {
    .wp-block-columns.content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Ensure proper button styling */
.wp-block-button .wp-block-button__link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Navigation link styling */
.wp-block-post-navigation-link a {
    display: block;
    padding: 1rem 1.5rem;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.wp-block-post-navigation-link a:hover {
    background: #118cf6;
    color: #ffffff;
    border-color: #118cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 140, 246, 0.3);
}

/* Latest posts and categories styling */
.wp-block-latest-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-block-latest-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.wp-block-latest-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wp-block-latest-posts a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
}

.wp-block-latest-posts a:hover {
    color: #118cf6;
}

.wp-block-latest-posts time {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.wp-block-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-block-categories li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.wp-block-categories li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wp-block-categories a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
}

.wp-block-categories a:hover {
    color: #118cf6;
}

.wp-block-categories .wp-block-categories-list-item-count {
    color: #666;
    font-size: 0.85rem;
    font-weight: 400;
}
