/* ============================================
   PulseWave Blog Styles
   ============================================ */

/* Import base variables from main site */
:root {
    --blue: #4285F4;
    --red: #EA4335;
    --yellow: #FBBC05;
    --green: #34A853;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--blue), var(--green));
    --gradient-warm: linear-gradient(135deg, var(--red), var(--yellow));
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--green);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Layout
   ============================================ */

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-main {
    padding-top: 0;
    min-height: 100vh;
}

/* ============================================
   Blog Header/Hero
   ============================================ */

.blog-hero {
    text-align: center;
    padding: 140px 20px 80px;
    /* More padding top for header space */
    background: radial-gradient(circle at 50% 50%, rgba(66, 133, 244, 0.08) 0%, transparent 70%);
    /* More subtle gradient like main */
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    margin-top: 0;
}

.blog-hero h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 15px;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.blog-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Category Filter
   ============================================ */

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.category-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

/* ============================================
   Articles Grid
   ============================================ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
}

.article-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.article-category {
    background: rgba(66, 133, 244, 0.15);
    color: var(--blue);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 500;
}

.article-date,
.article-read-time {
    color: var(--text-muted);
}

.article-card h2 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-card h2 a {
    color: var(--text-primary);
}

.article-card h2 a:hover {
    color: var(--blue);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 500;
    font-size: 0.9rem;
}

.article-read-more svg {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.article-card:hover .article-read-more svg {
    transform: translateX(5px);
}

/* ============================================
   Single Article Page
   ============================================ */

.article-header {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 40px 20px;
    text-align: center;
}

.article-header .article-category {
    display: inline-block;
    margin-bottom: 20px;
}

.article-header h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-header-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-header-meta svg {
    width: 16px;
    height: 16px;
}

.article-featured-image {
    max-width: 1000px;
    margin: 0 auto 50px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* ============================================
   Article Content
   ============================================ */

.article-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-content h2 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 50px 0 20px;
    color: var(--text-primary);
}

.article-content h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 40px 0 15px;
    color: var(--text-primary);
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 25px 25px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-content img {
    border-radius: var(--radius-md);
    margin: 30px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--blue);
    padding: 20px 30px;
    margin: 30px 0;
    background: rgba(66, 133, 244, 0.1);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--blue);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--green);
}

/* Code blocks */
.article-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin: 30px 0;
}

.article-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.article-content p code {
    background: rgba(66, 133, 244, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--blue);
}

/* ============================================
   Table of Contents
   ============================================ */

.article-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px 30px;
    margin: 30px 0;
}

.article-toc h4 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.article-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-toc li {
    margin-bottom: 10px;
}

.article-toc a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-toc a:before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    flex-shrink: 0;
}

.article-toc a:hover {
    color: var(--blue);
}

/* ============================================
   Social Share
   ============================================ */

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 30px 0;
    margin: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.article-share span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
    color: white;
}

.share-btn.twitter:hover {
    background: #000;
    border-color: #000;
    color: white;
}

.share-btn.copy:hover {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* ============================================
   Related Articles
   ============================================ */

.related-articles {
    margin: 60px 0;
    padding: 0 20px;
}

.related-articles h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ============================================
   CTA Section
   ============================================ */

.article-cta {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15), rgba(52, 168, 83, 0.15));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    margin: 60px auto;
    max-width: 800px;
}

.article-cta h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.article-cta p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.article-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.3);
}

.article-cta .btn-primary svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 100px 20px 20px;
    /* Increased top padding to clear fixed header */
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--blue);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-secondary);
}

/* ============================================
   No Results
   ============================================ */

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ============================================
   Responsive
   ============================================ */

/* Mobile Navigation - Must match main site breakpoint */
@media (max-width: 992px) {
    .nav-links {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding-top: 80px;
    }

    .blog-hero {
        padding: 40px 20px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .article-header {
        padding: 30px 15px;
    }

    .article-content {
        padding: 0 15px;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content p {
        font-size: 1rem;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-cta {
        padding: 35px 25px;
        margin: 40px 15px;
    }

    .category-filter {
        gap: 8px;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(1) {
    animation-delay: 0.1s;
}

.article-card:nth-child(2) {
    animation-delay: 0.2s;
}

.article-card:nth-child(3) {
    animation-delay: 0.3s;
}

.article-card:nth-child(4) {
    animation-delay: 0.4s;
}

.article-card:nth-child(5) {
    animation-delay: 0.5s;
}

.article-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* ============================================
   Navbar Styles (copied from main for consistency)
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    /* Restore main site horizontal padding, remove vertical */
    border-bottom: none;
    /* Main site default */
}

/* Scrolled state override only for background/blur on blog pages */
.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    /* Dark background for blog */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

/* Inherit nav-container from styles.css */
/* Minimal overrides if needed, but height: 72px should come from styles.css */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* height: 72px inherited from styles.css */
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.logo-text span:nth-child(1) {
    color: #4285F4;
}

.logo-text span:nth-child(2) {
    color: #EA4335;
}

.logo-text span:nth-child(3) {
    color: #FBBC05;
}

.logo-text span:nth-child(4) {
    color: #4285F4;
}

.logo-text span:nth-child(5) {
    color: #34A853;
}

.logo-text span:nth-child(6) {
    color: #EA4335;
}

.logo-text span:nth-child(7) {
    color: #4285F4;
}

.logo-text span:nth-child(8) {
    color: #34A853;
}

.logo-text span:nth-child(9) {
    color: #FBBC05;
}

/* Nav Links - Overriding to match main site exact style */
/* Nav Links - Let main styles.css handle most, override specifically where needed for dark theme */
.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    /* Using secondary text color for consistency */
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
    /* Main site uses 13px */
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
}

.nav-links a:hover {
    color: var(--blue);
    /* Main site uses google blue */
    background: rgba(255, 255, 255, 0.05);
    /* Slight hover background */
}

/* Underline effect from main site */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 20px;
}

.nav-links .nav-cta {
    background: var(--gradient-primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
}

.nav-links .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(66, 133, 244, 0.4);
}

/* Mobile Menu - inherits all styles from main styles.css */
/* Only override colors for dark theme */
.mobile-nav {
    background: rgba(10, 10, 10, 0.98) !important;
}

.mobile-nav-links a {
    color: var(--text-secondary) !important;
}

.mobile-nav-links a:hover {
    color: var(--text-primary) !important;
}

.hamburger span {
    background: #ffffff !important;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   Footer Styles
   ============================================ */

.footer {
    background: var(--bg-card);
    padding: 50px 20px 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--blue);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-content>p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.4);
}

/* ============================================
   Related Articles - Minimalist Override
   ============================================ */

.related-articles {
    margin: 40px 0;
    padding: 20px 20px;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 25px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.related-grid .article-card {
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: column;
}

.related-grid .article-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.related-grid .article-card-image {
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.related-grid .article-card-content {
    padding: 0;
    background: transparent;
}

.related-grid .article-card-meta {
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.related-grid .article-category {
    padding: 2px 8px;
    font-size: 0.75rem;
}

.related-grid h4 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

.related-grid .article-card:hover h4 {
    color: var(--blue);
}