/* Blog Styles for InstaConvo */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Header */
.floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    width: 95%;
    max-width: 900px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-logo {
    height: 20px;
    width: auto;
    flex-shrink: 0;
}

.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    align-items: center;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: white;
}

.header-cta {
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 203, 109, 0.1);
    margin-left: auto;
}

.header-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 203, 109, 0.2);
    color: white;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    justify-content: space-between;
    align-items: center;
}

.mobile-header .header-logo {
    height: 28px;
}

.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 32px;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: #fbcb6d;
}

.mobile-nav .mobile-cta {
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 16px;
}

.mobile-nav .mobile-cta:hover {
    color: white;
}

/* Blog Listing Page */
.blog-hero {
    padding: 150px 0 80px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.blog-hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    padding: 40px 0 100px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 203, 109, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.blog-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-card h3 a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h3 a:hover {
    color: #fbcb6d;
}

.blog-card-excerpt {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: #fbcb6d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #f57373;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Blog Post Layout with TOC */
.blog-post-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 150px 20px 80px;
    gap: 60px;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: sticky;
    top: 120px;
    width: 250px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    flex-shrink: 0;
    padding-right: 20px;
    align-self: flex-start;
}

.toc-sidebar.toc-unstuck {
    position: relative;
    top: auto;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

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

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 6px 0 6px 12px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.toc-list a.active {
    color: #fbcb6d;
    border-left-color: #fbcb6d;
}

/* TOC heading hierarchy - H2 is default, subheadings get progressively smaller */
.toc-list .toc-h2 {
    font-size: 0.9rem;
    font-weight: 500;
}

.toc-list .toc-h3 {
    padding-left: 24px;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
}

.toc-list .toc-h4 {
    padding-left: 36px;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.75;
}

.toc-list .toc-h5 {
    padding-left: 48px;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.65;
}

/* Blog Post Page */
.blog-post {
    padding: 150px 0 80px;
}

.blog-post .container {
    max-width: 800px;
}

.blog-post-content {
    flex: 1;
    max-width: 800px;
    min-width: 0;
}

.blog-header {
    margin-bottom: 60px;
}

.back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #fbcb6d;
}

/* H1 with gradient text */
.blog-post h1,
.blog-post-content h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-meta {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.blog-content .lead {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 48px;
    margin-bottom: 48px;
    line-height: 1.7;
}

/* H2 Headings */
.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 64px 0 24px;
    color: white;
    scroll-margin-top: 100px;
}

/* H3 Headings */
.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 48px 0 20px;
    color: rgba(255, 255, 255, 0.95);
    scroll-margin-top: 100px;
}

.blog-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.blog-content ul, .blog-content ol {
    margin: 24px 0 32px 30px;
    color: rgba(255, 255, 255, 0.8);
}

.blog-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

/* List without bullet markers */
.blog-content ul.list-none {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

/* Blog images */
.blog-content .blog-image {
    margin: 32px 0;
}

.blog-content .blog-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.blog-content .blog-image figcaption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Left-aligned image */
.blog-content .blog-image-left {
    float: left;
    margin: 8px 32px 16px 0;
    max-width: 45%;
}

/* Right-aligned image */
.blog-content .blog-image-right {
    float: right;
    margin: 8px 0 16px 32px;
    max-width: 45%;
}

/* Clear floats after content sections */
.blog-content::after {
    content: "";
    display: table;
    clear: both;
}

.blog-content a {
    color: #fbcb6d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content a:hover {
    color: #f57373;
}

/* Note Cards */
.note-card {
    background: rgba(160, 160, 160, 0.23);
    border: none;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 32px 0;
}

.note-card-content {
    flex: 1;
}

.note-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.note-card-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

/* Tables */
.blog-table-wrapper {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.blog-content thead {
    background: rgba(255, 255, 255, 0.05);
}

.blog-content th {
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content td {
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-content tbody tr {
    transition: background 0.2s ease;
}

.blog-content tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.blog-content tbody tr:last-child td {
    border-bottom: none;
}

/* Code blocks */
.blog-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: #fbcb6d;
}

.blog-content pre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 32px 0;
}

.blog-content pre code {
    background: transparent;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Related Posts Carousel */
.related-posts-section {
    padding: 60px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.related-posts-container {
    position: relative;
}

.related-posts-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    /* Add gradient text styles */
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-container {
    overflow: hidden;
    flex: 1;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease;
}

.carousel-track .blog-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: calc(33.333% - 16px);
}

.carousel-arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    border-color: transparent;
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-arrow:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
}

/* CTA Box */
.cta-box {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 24px 28px;
    text-align: center;
    margin: 40px 0;
}

.cta-box h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(90deg, #fbcb6d 0%, #f57373 50%, #b94aa5 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 203, 109, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 203, 109, 0.15);
    color: white !important;
}

/* Blog Footer */
.blog-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.blog-empty h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .toc-sidebar {
        display: none;
    }

    .blog-post-wrapper {
        padding: 150px 20px 80px;
    }
}

@media (max-width: 768px) {
    .floating-header {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .scroll-progress {
        height: 2px;
    }

    .blog-hero {
        padding: 100px 0 60px;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blog-post,
    .blog-post-wrapper {
        padding: 100px 20px 60px;
    }

    .blog-post h1,
    .blog-post-content h1 {
        font-size: 2rem;
    }

    .blog-content {
        font-size: 1rem;
    }

    .blog-content .lead {
        font-size: 1.1rem;
    }

    .blog-content h2 {
        font-size: 1.5rem;
        margin: 48px 0 20px;
    }

    .blog-content h3 {
        font-size: 1.2rem;
        margin: 36px 0 16px;
    }

    .blog-meta {
        flex-direction: column;
        gap: 5px;
    }

    .cta-box {
        padding: 20px 16px;
    }

    .note-card {
        padding: 16px 20px;
    }

    .blog-content th,
    .blog-content td {
        padding: 12px 16px;
    }

    /* Carousel mobile */
    .related-posts-section {
        padding: 40px 15px 60px;
    }

    .related-posts-title {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .carousel-wrapper {
        gap: 10px;
    }

    .carousel-track .blog-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
    }

    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    .carousel-dots {
        margin-top: 20px;
    }
}

