:root {
    --primary: #0f172a;
    /* Navy */
    --primary-hover: #1e293b;
    --accent: #2563eb;
    /* Corporate Blue */
    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #475569;
    --border: #cbd5e1;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background-color: var(--surface);
    border-bottom: 2px solid var(--accent);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-link {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.mobile-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.seo-intro {
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: var(--surface);
    border-top: 4px solid var(--accent);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.seo-intro h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.seo-intro p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.hero {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--primary);
    color: white;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
}

/* Layout with Sidebar */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin-bottom: 5rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--background);
    color: var(--primary);
}

.category-list {
    list-style: none;
}

.category-item a {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.category-item a:hover,
.category-item.active a {
    background-color: var(--background);
    color: var(--accent);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--background);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 9999px;
    margin-bottom: 1rem;
    width: fit-content;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--background);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.btn-read {
    color: var(--accent);
    font-weight: 700;
}

/* Post Detail */
.container-post {
    max-width: 1440px !important;
}

/* Post Page 3-Column Layout */
.post-grid-layout {
    display: grid;
    grid-template-columns: 240px 1fr 260px;
    gap: 4rem;
    align-items: start;
}

.post-sidebar-left,
.post-sidebar-right {
    position: sticky;
    top: 100px;
}

.post-container {
    max-width: none;
    /* Let grid control width */
    margin: 0;
    padding: 3.5rem 4rem;
    background: var(--surface);
    border-radius: 0 0 1.5rem 1.5rem;
    /* Rounded bottom corners only */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Post Main Wrapper - Contains sticky header and content */
.post-main-wrapper {
    display: flex;
    flex-direction: column;
}

/* Sidebar Navigation */
.sidebar-nav-list {
    list-style: none;
    padding: 0;
}

.sidebar-nav-list li {
    margin-bottom: 0.5rem;
}

.sidebar-nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}

.sidebar-nav-list a:hover {
    background: var(--accent);
    color: white;
    transform: translateX(5px);
}

/* Mini Post List */
.post-mini-list {
    list-style: none;
    padding: 0;
}

.post-mini-list li {
    margin-bottom: 1.25rem;
}

.post-mini-list a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mini-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.mini-title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
}

.post-mini-list a:hover .mini-title {
    color: var(--accent);
}

/* Sidebar Ad Cards */
.sidebar-ad-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-ad-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.sidebar-ad-card p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.check-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.check-list li {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.check-list li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 900;
}

.btn-ad {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
}

.btn-ad:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.post-header {
    position: static;
    /* Completely static - no movement */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    margin-bottom: 0;
    padding: 3rem 4rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    z-index: 1;
    /* Ensure it stays below sticky header */
}

.post-header nav a {
    color: rgba(255, 255, 255, 0.7) !important;
}

.post-header nav a:hover {
    color: var(--accent) !important;
}

.post-category {
    color: var(--accent) !important;
}

.post-header .post-title {
    color: white !important;
}

.post-header div[style*="background: #f8fafc"] {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-header div[style*="background: #f8fafc"] strong {
    color: white !important;
}


.post-title {
    font-size: 2.5rem;
    /* Locked size for perfect fit */
    font-weight: 800;
    line-height: 1.25;
    color: var(--primary);
    margin: 0.75rem 0 2rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.post-image {
    width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 3rem;
}

.post-content {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.8;
}

.post-content h2,
.post-content h3 {
    margin: 2.5rem 0 1.25rem;
    color: var(--primary);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 5rem 0 2rem;
}

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

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .main-layout,
    .post-grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar,
    .post-sidebar-left,
    .post-sidebar-right {
        position: static;
        order: -1;
    }

    .post-sidebar-right {
        order: 1;
        /* Move ads to bottom on tablets/mobile */
    }

    .footer-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3.5rem 0;
    }

    .hero h1 {
        font-size: 2.25rem;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1.125rem;
        padding: 0 1rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--surface);
        padding: 6rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        gap: 1.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.125rem;
    }

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

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .footer-col {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .footer-bottom span {
        display: block;
    }

    .seo-cloud {
        justify-content: center;
        padding-top: 1rem;
    }

    .seo-cloud a {
        flex: 1 1 auto;
        text-align: center;
        min-width: 140px;
        /* Ensure enough space for text */
    }

    .footer-col p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .seo-intro {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .seo-intro h2 {
        font-size: 1.5rem;
    }

    .seo-intro p {
        font-size: 1rem;
    }

    .post-container {
        padding: 2rem 1.5rem;
    }

    .post-header {
        padding: 2rem 1.5rem;
        border-radius: 1rem 1rem 0 0;
    }

    .post-title {
        font-size: 1.75rem;
    }
}