/*
Theme Name: Y77 Advanced Analytics Theme
Description: Advanced Data Attribution & Performance Marketing Solutions WordPress Theme
Author: MetricByte Consulting
Version: 1.0
Text Domain: y77-theme
*/

/* ===========================
   CSS RESET & BASE STYLES
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Screen Reader Accessibility */
.screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Global anchor scroll offset for sticky header */
[id] { 
    scroll-margin-top: 120px !important; 
}

/* ===========================
   HEADER & NAVIGATION
=========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999 !important;
    min-height: 50px;
    padding: 16px 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-brand a,
.brand-link {
    text-decoration: none;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    display: block;
    height: 100px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
}

.brand-text {
    font-size: 0; /* Hide text visually but keep for a11y/SEO */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

.cta-button {
    background: #2563eb;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #1d4ed8;
}

/* Sticky header offset for main content */
.has-sticky-header main,
.has-sticky-header .main-content,
.has-sticky-header .site-content {
    padding-top: 120px !important;
}

/* ===========================
   HERO SECTION
=========================== */
.hero {
    padding: 10rem 0 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.hero-cta {
    background: white;
    color: #2563eb;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
}

/* ===========================
   SERVICES SECTION
=========================== */
.services {
    padding: 6rem 0;
    background: #f8fafc;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

/* ===========================
   STATS SECTION
=========================== */
.stats {
    padding: 6rem 0;
    background: #1e293b;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===========================
   TESTIMONIALS SECTION
=========================== */
.testimonials {
    padding: 6rem 0;
    background: white;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid #2563eb;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-author {
    font-weight: 600;
    color: #2563eb;
}

/* ===========================
   CTA SECTION
=========================== */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button-large {
    background: white;
    color: #2563eb;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cta-button-large:hover {
    transform: translateY(-2px);
}

/* ===========================
   FOOTER
=========================== */
.footer {
    background: #0f172a;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #60a5fa;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: #94a3b8;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* ===========================
   MAIN CONTENT & SINGLE POSTS
=========================== */
.main-content {
    padding: 16rem 0 4rem;
    min-height: 60vh;
}

/* Single Post Styling */
.single-post .site-content,
.single-post .content-area,
.single-post .entry-content {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: #0f172a;
}

.single-post .post-hero {
    position: relative;
    margin-top: 150px !important;
    padding: 0 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.single-post .post-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

.single-post .post-title {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    scroll-margin-top: 120px !important;
}

.single-post .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 14px;
}

.single-post .post-meta .meta-sep { 
    opacity: .6; 
}

.single-post .post-featured {
    max-width: 1100px;
    margin: 16px auto 24px;
}

.single-post .post-featured img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    background: #f1f5f9;
}

.single-post .entry-content {
    max-width: 780px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
    color: #0f172a;
}

/* Single Post Headings */
.single-post .entry-content h2 {
    font-size: clamp(22px, 2.6vw, 28px);
    margin: 28px 0 12px;
    line-height: 1.25;
}

.single-post .entry-content h3 {
    font-size: clamp(18px, 2.2vw, 22px);
    margin: 24px 0 10px;
    line-height: 1.3;
}

.single-post .entry-content h4 {
    font-size: 17px;
    margin: 18px 0 8px;
    line-height: 1.35;
}

/* Single Post Content Elements */
.single-post .entry-content p { 
    margin: 0 0 16px; 
}

.single-post .entry-content ul,
.single-post .entry-content ol { 
    margin: 0 0 18px 20px; 
}

.single-post .entry-content li { 
    margin: 6px 0; 
}

.single-post blockquote {
    margin: 20px 0;
    padding: 14px 16px;
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    color: #0f172a;
}

.single-post .notice {
    background: #eef2ff;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 18px 0;
}

.single-post .entry-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-post .entry-content a:hover { 
    color: #1d4ed8; 
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.single-post .wp-caption { 
    text-align: center; 
    color: #64748b; 
    font-size: 14px; 
}

.single-post .wp-caption img { 
    border-radius: 10px; 
}

/* Code Blocks */
.single-post pre, 
.single-post code, 
.single-post kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.single-post pre {
    background: #0b1020;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    overflow: auto;
    margin: 18px 0;
}

.single-post code { 
    background: #f1f5f9; 
    padding: 2px 6px; 
    border-radius: 4px; 
}

/* Tables */
.single-post table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 15px;
}

.single-post table th, 
.single-post table td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
}

.single-post table th { 
    background: #f8fafc; 
    text-align: left; 
}

/* In-Article CTA */
.single-post .post-cta {
    margin: 28px auto;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.single-post .post-cta__text {
    color: #0f172a !important;
    font-size: 16px;
    line-height: 1.5;
}

.single-post .post-cta__button,
.single-post .post-cta a.post-cta__button {
    display: inline-block;
    background: #2563eb !important;
    color: #ffffff !important;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    line-height: 1.2;
    border: none;
}

.single-post .post-cta__button:hover { 
    background: #1d4ed8 !important; 
}

/* Safety override for CTA links */
.single-post .post-cta a,
.single-post .post-cta a:visited,
.single-post .post-cta a:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Post Navigation */
.single-post .post-nav {
    max-width: 780px;
    margin: 28px auto 0;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.single-post .post-nav a {
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    display: inline-block;
}

.single-post .post-nav a:hover { 
    background: #eef2ff; 
}

.single-post .byline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 14px;
    margin: 10px 0 0;
}

/* Comments */
.single-post .comments-area {
    max-width: 780px;
    margin: 36px auto 0;
    padding: 0 16px;
}

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

.single-post .comment { 
    border-bottom: 1px solid #e2e8f0; 
    padding: 16px 0; 
}

.single-post .comment-meta { 
    color: #64748b; 
    font-size: 14px; 
    margin-bottom: 8px; 
}

.single-post .comment-content p { 
    margin: 0 0 12px; 
}

.single-post .comment-respond { 
    margin-top: 18px; 
}

.single-post .comment-respond textarea,
.single-post .comment-respond input[type="text"],
.single-post .comment-respond input[type="email"] {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
}

.single-post .form-submit input[type="submit"] {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.single-post .form-submit input[type="submit"]:hover { 
    background: #1d4ed8; 
}

/* Block Editor Support */
.single-post .wp-block-image { 
    margin: 18px 0; 
}

.single-post .wp-block-quote { 
    margin: 18px 0; 
}

.single-post .wp-block-separator { 
    margin: 22px 0; 
}

/* ===========================
   BLOG ARCHIVE
=========================== */
.blog-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 125px;
}

.blog-archive__header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.blog-archive__title {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.blog-archive__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0 0 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0 0;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    min-width: 140px;
    transition: border-color 0.2s ease;
}

.filters select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filters__clear {
    color: white;
    background: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.filters__clear:hover {
    background: #dc2626;
}

/* Blog Grid Layout */
.blog-archive__grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 3rem;
}

/* Post Card - Horizontal Layout */
.post-card {
    display: flex;
    gap: 2rem;
    border: 1px solid #e8ebf0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    padding: 1.5rem;
    align-items: flex-start;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(28, 35, 49, 0.12);
}

/* Post Image */
.post-card__media {
    flex-shrink: 0;
    width: 300px;
    display: block;
    overflow: hidden;
}

.post-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f5f9;
    transition: transform 0.3s ease;
    display: block;
}

.post-card__img:hover {
    transform: scale(1.02);
}

.post-card__img--placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
}

/* Post Content */
.post-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    gap: 1rem;
}

/* Post Meta */
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    justify-content: flex-start;
    font-size: 13px;
    color: #6b7280;
}

.post-card__cats {
    display: flex;
    gap: 0.5rem;
}

.post-card__pill {
    display: inline-block;
    font-size: 11px;
    background: #eef4ff;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.post-card__pill:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.post-card__date {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.post-card__dot { 
    opacity: .6; 
}

/* Post Title */
.post-card__title {
    font-size: clamp(20px, 2.2vw, 24px);
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
}

.post-card__title a {
    text-decoration: none;
    color: #1f2937;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__title a:hover {
    color: #2563eb;
}

/* Post Excerpt */
.post-card__excerpt {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post CTA */
.post-card__cta {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    align-self: flex-start;
    margin-top: auto;
    transition: all 0.2s ease;
    background: #2563eb;
    color: #fff !important;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
}

.post-card__cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Category Color Variations */
.post-card__pill[href*="ga4"] { 
    background: #dcfce7; 
    color: #15803d; 
}

.post-card__pill[href*="gtm"] { 
    background: #fef3c7; 
    color: #d97706; 
}

.post-card__pill[href*="implementation"] { 
    background: #e0e7ff; 
    color: #6366f1; 
}

.post-card__pill[href*="attribution"] { 
    background: #fce7f3; 
    color: #c2185b; 
}

.post-card__pill[href*="analytics"] { 
    background: #dbeafe; 
    color: #1d4ed8; 
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.no-posts h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 1rem;
}

/* Pagination */
.blog-archive__pagination {
    margin: 3rem auto 0;
    text-align: center;
}

.blog-archive__pagination .page-numbers {
    display: inline-block;
    margin: 0 4px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.blog-archive__pagination .page-numbers:hover,
.blog-archive__pagination .current {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: translateY(-1px);
}

.blog-archive__pagination .prev,
.blog-archive__pagination .next {
    font-weight: 600;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

/* Large screens */
@media (max-width: 980px) {
    .blog-archive__grid {
        gap: 2rem;
    }

    .post-card {
        flex-direction: column;
        gap: 1.5rem;
    }

    .post-card__media {
        width: 100%;
    }

    .post-card__img {
        height: 220px;
    }

    .filters {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filters select {
        width: 100%;
        max-width: 300px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .hero-title { 
        font-size: 2.5rem; 
    }
    
    .nav-menu { 
        display: none; 
    }
    
    .hero-features { 
        grid-template-columns: 1fr; 
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .testimonials-grid { 
        grid-template-columns: 1fr; 
    }

    .brand-logo { 
        height: 36px; 
    }

    .blog-archive__list .post-card--horizontal {
        flex-direction: column;
    }

    .blog-archive__list .post-card__media {
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .blog-archive {
        padding: 32px 16px;
    }

    .post-card {
        padding: 1rem;
        gap: 1rem;
    }

    .post-card__img {
        height: 200px;
    }

    .post-card__body {
        gap: 0.75rem;
    }

    .post-card__title {
        font-size: 18px;
    }

    .post-card__excerpt {
        font-size: 15px;
    }

    .single-post .post-wrap { 
        padding: 18px 14px 48px; 
    }
    
    .single-post .post-title { 
        font-size: clamp(26px, 5vw, 34px); 
    }
    
    .single-post .post-cta { 
        flex-direction: column; 
        align-items: stretch; 
    }

    .single-post .post-cta__button { 
        text-align: center; 
    }
}

/* ===========================
   MOBILE MENU SYSTEM
=========================== */

/* Hide mobile toggle on desktop */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 10000 !important;
}

/* Hamburger lines */
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #2563eb;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
}

/* Hamburger animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Show mobile toggle */
    .mobile-menu-toggle {
        display: flex !important;
        order: 2;
    }
    
    /* Hide desktop navigation */
    .nav-menu {
        display: none !important;
    }
    
    /* Mobile menu wrapper */
    .nav-menu-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-top: 1px solid #e5e7eb;
        z-index: 9998 !important;
        width: 100%;
    }
    
    .nav-menu-wrapper.active {
        z-index: 9998 !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }
    
    .nav-menu-wrapper.active .nav-menu {
        display: flex !important;
        flex-direction: column;
        padding: 1rem 0;
        margin: 0;
        list-style: none;
        width: 100%;
    }
    
    .nav-menu-wrapper .nav-menu li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .nav-menu-wrapper .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu-wrapper .nav-menu a {
        display: block;
        padding: 1rem 20px;
        color: #333 !important;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-menu-wrapper .nav-menu a:hover {
        background-color: #f8fafc;
        color: #2563eb !important;
    }
    
    .nav-menu-wrapper .nav-menu .cta-button {
        margin: 0.5rem 20px !important;
        padding: 0.75rem 1.5rem !important;
        background: #2563eb !important;
        color: white !important;
        border-radius: 0.5rem;
        text-align: center;
        width: calc(100% - 40px) !important;
        display: block !important;
    }
    
    .nav-menu-wrapper .nav-menu .cta-button:hover {
        background: #1d4ed8 !important;
        color: white !important;
    }
    
    /* Ensure nav container allows mobile menu to show */
    .nav {
        position: relative;
    }
    
    /* Brand adjustments */
    .nav-brand {
        flex: 1;
    }
    
    .brand-logo {
        height: 40px !important;
    }
}

/* Add this specific fix for blog archive pages */
.blog-archive .header,
.page-template-archive .header,
body.archive .header {
    position: fixed !important;
    top: 0 !important;
    z-index: 10000 !important;
}

.blog-archive .mobile-menu-toggle,
.page-template-archive .mobile-menu-toggle,
body.archive .mobile-menu-toggle {
    z-index: 10001 !important;
    pointer-events: auto !important;
}

.blog-archive .nav-menu-wrapper,
.page-template-archive .nav-menu-wrapper,
body.archive .nav-menu-wrapper {
    top: 115px !important; /* Match your header height */
    z-index: 9999 !important;
}
/* Emergency fix for Analytics Insights page */
body.archive .mobile-menu-toggle,
body.blog .mobile-menu-toggle,
.blog-archive .mobile-menu-toggle {
    display: flex !important;
    position: relative !important;
    z-index: 10001 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure menu wrapper works on archive pages */
body.archive .nav-menu-wrapper.active,
body.blog .nav-menu-wrapper.active,
.blog-archive .nav-menu-wrapper.active {
    display: block !important;
    position: absolute !important;
    top: 115px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: white !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

@media (max-width: 768px) {
    body.archive .mobile-menu-toggle,
    body.blog .mobile-menu-toggle,
    .blog-archive .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Force visible hamburger lines */
    body.archive .mobile-menu-toggle span,
    body.blog .mobile-menu-toggle span,
    .blog-archive .mobile-menu-toggle span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background-color: #2563eb !important;
        margin: 2px 0 !important;
    }
}
