/*
Theme Name: NorthLink Media
Theme URI: https://northlinkmedia.com
Description: Custom WordPress theme for NorthLink Media - Performance Marketing
Author: NorthLink Media
Version: 1.0
*/

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

:root {
    --navy-dark: #0a1628;
    --navy: #0f1f38;
    --navy-light: #1a2d4d;
    --blue-primary: #3b4f7a;
    --blue-accent: #5271b8;
    --cyan: #00d9ff;
    --cyan-glow: rgba(0, 217, 255, 0.4);
    --white: #ffffff;
    --gray-light: #e8eef5;
    --gray: #a0b3cc;
    --gray-dark: #6b7a94;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--navy-dark);
    color: var(--gray-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === CIRCUIT BACKGROUND === */
#circuitCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

/* === NAVIGATION === */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 79, 122, 0.2);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    background: var(--blue-accent);
    color: var(--white) !important;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--cyan);
    color: var(--navy-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--cyan-glow);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* === MAIN CONTENT AREA === */
.site-main {
    position: relative;
    z-index: 1;
    padding: 140px 5% 100px;
    min-height: 70vh;
}

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

/* === BLOG POST LISTING === */
.blog-header {
    text-align: center;
    margin-bottom: 5rem;
}

.blog-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-header p {
    font-size: 1.25rem;
    color: var(--gray);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.post-card {
    background: rgba(26, 45, 77, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 79, 122, 0.3);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: var(--cyan);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.15);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: rgba(59, 79, 122, 0.3);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--cyan);
}

.post-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-card h2 a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card h2 a:hover {
    color: var(--cyan);
}

.post-excerpt {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--cyan);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* === SINGLE POST === */
.single-post {
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-header .post-meta {
    justify-content: center;
    font-size: 1rem;
}

.featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 3rem;
}

.post-body {
    background: rgba(26, 45, 77, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 79, 122, 0.3);
    border-radius: 16px;
    padding: 3rem;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    color: var(--white);
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.post-body h2 {
    font-size: 2rem;
    border-bottom: 2px solid rgba(0, 217, 255, 0.2);
    padding-bottom: 0.5rem;
}

.post-body h3 {
    font-size: 1.5rem;
}

.post-body p {
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.post-body a {
    color: var(--cyan);
    text-decoration: none;
    border-bottom: 1px solid var(--cyan);
    transition: all 0.3s ease;
}

.post-body a:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

.post-body ul,
.post-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: var(--gray-light);
}

.post-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.post-body blockquote {
    border-left: 4px solid var(--cyan);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 8px;
    font-style: italic;
    color: var(--gray-light);
}

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

.post-body code {
    background: rgba(0, 217, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--cyan);
}

.post-body pre {
    background: rgba(10, 22, 40, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: var(--gray-light);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 4rem 0;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    background: rgba(26, 45, 77, 0.6);
    border: 1px solid rgba(59, 79, 122, 0.3);
    border-radius: 8px;
    color: var(--gray-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--cyan);
    color: var(--navy-dark);
    border-color: var(--cyan);
}

.pagination .current {
    background: var(--cyan);
    color: var(--navy-dark);
    border-color: var(--cyan);
}

/* === FOOTER === */
.footer {
    position: relative;
    padding: 80px 5% 40px;
    background: rgba(10, 22, 40, 0.95);
    border-top: 1px solid rgba(59, 79, 122, 0.2);
    z-index: 1;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 1rem;
    max-width: 300px;
    line-height: 1.8;
}

.footer-links h4 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(59, 79, 122, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--cyan);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 968px) {
    #circuitCanvas {
        opacity: 0.3;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 22, 40, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(59, 79, 122, 0.3);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .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);
    }
    
    .site-main {
        padding: 120px 5% 80px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .blog-header {
        margin-bottom: 3rem;
    }
    
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}
