/* Blog Styles for BlockHaven */

/* Import main site variables */
:root {
    --charcoal-black: #1A1A1A;
    --bone-white: #F8F8F8;
    --surgical-steel: #D1D5D8;
    --slate-purple: #7367F0;
    --slate-purple-dark: #5e52c2;
    --cool-gray: #8A9299;
}

/* Override main site background for blog pages */
body {
    background: #FAFAFA !important; /* blockhaven bone white */
    color: var(--charcoal-black);
}

/* Navigation */
.navbar {
    padding: 0 !important; /* Remove any padding from the navbar itself */
}

.nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px; /* Match the blog-container max-width */
    margin: 0 auto; /* Center the container */
    width: 100%;
    box-sizing: border-box;
    height: 100%; /* Ensure full height of navbar */
    padding: 0 clamp(1.25rem, 5vw, 3rem) !important; /* Match the blog-container padding */
}

/* Override any main site styles that might affect blog navigation */
.navbar .nav-container .nav-links {
    display: flex;
    align-items: center;
    margin-left: 0 !important; /* Force override any auto margin */
    justify-content: flex-start !important; /* Force left alignment */
    padding-left: 0 !important; /* No padding, align with container padding */
    height: 100%; /* Full height for vertical centering */
}

/* Ensure the link is vertically centered */
.navbar .nav-container .nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-right: 1rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--slate-purple);
}

.nav-link svg {
    margin-right: 0.5rem;
}

/* Blog-specific layout */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 3rem); /* Responsive padding that scales with viewport */
    width: 100%; /* Ensure it takes full width of its parent */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Adjust for fixed navbar */
.post-container {
    padding-top: 70px; /* Add padding to account for fixed navbar */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 clamp(1.25rem, 5vw, 3rem); /* Match blog-container padding */
}

/* Blog header with enhanced background */
.blog-header {
    background-color: var(--charcoal-black);
    color: white;
    padding: 2rem 0; /* Remove horizontal padding */
    padding-top: 70px; /* Add padding to account for fixed navbar */
    text-align: left;
    position: relative;
    overflow: hidden;
}

.blog-header .blog-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative; /* For positioning context */
    background-image: radial-gradient(circle at 25% 50%, 
                      rgba(115, 103, 240, 0.05), 
                      rgba(115, 103, 240, 0.03) 40%, 
                      rgba(115, 103, 240, 0.01) 70%, 
                      transparent 100%);
    background-size: 120% 100%; /* Extend beyond container for softer edges */
    background-position: right center;
    background-repeat: no-repeat;
    /* Use the same responsive padding as the main container */
    padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.blog-title {
    font-family: 'Poppins', sans-serif;
    color: white;
    text-shadow: 0 0 15px rgba(132, 100, 226, 0.25), 0 0 5px rgba(255, 255, 255, 0.15);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 10px;
}

.blog-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: rgba(115, 103, 240, 0.8);
    border-radius: 2px;
}

.blog-title-main {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    display: block;
    margin-bottom: 0;
    color: white; /* Keep "Unblocked" white */
}

/* Create a wrapper for the gradient text that spans both elements */
.blog-title-gradient-wrapper {
    background: linear-gradient(to right, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline; /* Allow it to flow with the text */
}

.blog-title-by {
    font-style: italic;
    font-weight: 400;
    font-size: 0.64em; /* 20% smaller than normal */
    padding-right: 0.2em; /* Add padding to prevent text from being cut off */
}

.blog-title-brand {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
    display: block;
    margin-top: -0.75rem; /* Significantly tighten spacing */
    background: linear-gradient(to right, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.blog-description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 100; /* Reduced to the thinnest standard weight */
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: -0.25rem 0 0 0; /* Tighter to the heading */
    margin-left: 10px; /* Align with the text above, not the bar */
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

/* Remove underline from BlockHaven name in navigation */
.nav-logo a, .nav-link {
    text-decoration: none;
}

/* Blog navigation */
.blog-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem clamp(1.25rem, 5vw, 3rem);
    border-bottom: 1px solid var(--surgical-steel);
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.blog-categories {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-filter {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    background: none;
    border: 1px solid var(--cool-gray);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-filter:hover {
    background-color: var(--slate-purple);
    color: white;
    border-color: var(--slate-purple);
}

.category-filter.active {
    background-color: var(--slate-purple);
    color: white;
    border-color: var(--slate-purple);
}

/* Featured post */
.featured-post {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    overflow: hidden;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.featured-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.featured-post-content {
    padding: 1.5rem;
}

.featured-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--slate-purple);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.featured-post-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--charcoal-black);
}

.featured-post-title a {
    color: var(--charcoal-black);
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post-title a:hover {
    color: var(--slate-purple);
}

.featured-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--cool-gray);
}

.featured-post-date {
    margin-right: 1rem;
}

.featured-post-categories {
    display: flex;
    gap: 0.5rem;
}

.category-tag {
    font-size: 0.8rem;
    background-color: var(--bone-white);
    border-radius: 20px;
    padding: 0.15rem 0.5rem;
    color: var(--charcoal-black);
}

.featured-post-excerpt {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--charcoal-black);
}

.read-more {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--slate-purple);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--slate-purple-dark);
}

.read-more svg {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.read-more:hover svg {
    transform: translateX(3px);
}

/* Posts list */
.posts-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--charcoal-black);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-list-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.post-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-list-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.post-list-content {
    padding: 1.5rem;
}

.post-list-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--charcoal-black);
}

.post-list-title a {
    color: var(--charcoal-black);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-list-title a:hover {
    color: var(--slate-purple);
}

.post-list-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--cool-gray);
}

.post-list-date {
    margin-right: 1rem;
}

.post-list-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-list-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--charcoal-black);
}

/* Coming soon message */
.coming-soon {
    background-color: var(--bone-white);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.coming-soon h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--charcoal-black);
}

.coming-soon p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--slate-purple);
    max-width: 600px;
    margin: 0 auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination-button {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    background: none;
    border: 1px solid var(--cool-gray);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background-color: var(--slate-purple);
    color: white;
    border-color: var(--slate-purple);
}

.pagination-button.active {
    background-color: var(--slate-purple);
    color: white;
    border-color: var(--slate-purple);
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Individual blog post styles */
.post-container {
    max-width: 1200px; /* Match the blog-container max-width */
    margin: 0 auto;
    padding: 2rem clamp(1.25rem, 5vw, 3rem) 0;
    width: 100%;
    box-sizing: border-box;
}

/* Featured image for blog posts */
.post-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0; /* Override the default margin in .post-content img */
}

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--charcoal-black);
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--cool-gray);
}

.post-date {
    margin-right: 1rem;
}

.reading-time {
    margin-right: 1.5rem;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: 0;
    padding-left: 0;
}

.post-content {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: var(--charcoal-black);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    color: var(--charcoal-black);
}

.post-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--charcoal-black);
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--slate-purple);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--cool-gray);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content code {
    font-family: monospace;
    background-color: var(--bone-white);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.post-content pre {
    background-color: var(--bone-white);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--surgical-steel);
}

.post-navigation a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--slate-purple);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: var(--slate-purple-dark);
}

.post-navigation .prev svg {
    margin-right: 0.5rem;
}

.post-navigation .next svg {
    margin-left: 0.5rem;
}

/* Post survey */
.post-survey {
    background-color: var(--bone-white);
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
}

/* CTA Section */
.cta-section {
    background-color: var(--bone-white);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0 0 0 !important;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.cta-title, 
.cta-description {
    text-align: left;
}

.cta-form {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
}

.post-survey-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--charcoal-black);
}

.post-survey-question {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--charcoal-black);
}

.post-survey-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.post-survey-option {
    display: flex;
    align-items: center;
}

.post-survey-option input[type="radio"] {
    margin-right: 0.75rem;
}

.post-survey-option label {
    font-family: 'Montserrat', sans-serif;
}

.post-survey-submit {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    background-color: var(--slate-purple);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.post-survey-submit:hover {
    background-color: var(--slate-purple-dark);
}

.post-survey-thanks {
    display: none;
    font-family: 'Montserrat', sans-serif;
    color: var(--slate-purple);
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Footer */
.blog-footer {
    background-color: var(--charcoal-black);
    color: var(--cool-gray);
    text-align: center;
    padding: 1rem 1.25rem;
    margin-top: 0;
}

.blog-footer p {
    font-family: 'Montserrat', sans-serif;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.social-icon {
    color: var(--cool-gray);
    stroke: var(--cool-gray);
    fill: none;
    transition: all 0.2s ease;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    color: var(--cool-gray);
}

.social-links a:hover .social-icon {
    color: var(--slate-purple);
    stroke: var(--slate-purple);
    transform: translateY(-3px);
}

/* Utility classes */
.hidden {
    display: none;
}

.reading-time-small {
    font-size: 0.8rem;
    color: var(--cool-gray);
    font-style: italic;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles */
:focus {
    outline: 3px solid var(--slate-purple);
    outline-offset: 2px;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .featured-post-title {
        font-size: 1.4rem;
    }
    
    .post-list-title {
        font-size: 1.2rem;
    }
    
    .post-title {
        font-size: 1.6rem;
        line-height: 1.3; /* Add proper line height for wrapped title */
        white-space: normal; /* Allow wrapping */
    }
    
    .featured-post-title a,
    .post-list-title a {
        white-space: normal; /* Allow wrapping for these elements */
    }
    
    /* Fix metadata wrapping */
    .post-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-date, .reading-time {
        margin-right: 0; /* Remove right margin that was pushing items */
    }
    
    /* Remove indentation when categories wrap */
    .post-categories {
        margin-left: 0;
        padding-left: 0;
    }
    
    /* Improve coming soon message on mobile */
    .coming-soon {
        padding: 1.5rem 1rem;
    }
    
    .coming-soon p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Fix CTA section alignment on mobile */
    .cta-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .cta-form {
        width: 100%;
        max-width: 100%;
    }
}
