/**
 * CS2 Blog Theme - Custom Styling
 * EXACT match to CS2.AD website design
 */

/* ============================================
   IMPORTS & FONTS
   ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

/* ============================================
   CSS VARIABLES - CS2.AD Color Palette
   ============================================ */
:root {
    /* Backgrounds - Deep, rich dark blues */
    --cs2-background: #0a0e17;
    --cs2-surface-1: #111827;
    --cs2-surface-2: #1a2332;
    --cs2-surface-3: #243044;
    
    /* Text Colors */
    --cs2-foreground: #f8fafc;
    --cs2-text-secondary: #94a3b8;
    --cs2-text-muted: #64748b;
    
    /* Primary - Electric Blue */
    --cs2-primary: #3b82f6;
    --cs2-primary-hover: #60a5fa;
    --cs2-primary-glow: rgba(59, 130, 246, 0.4);
    
    /* Accent Colors */
    --cs2-accent-amber: #f59e0b;
    --cs2-accent-purple: #a855f7;
    --cs2-accent-cyan: #22d3ee;
    
    /* Status Colors */
    --cs2-success: #22c55e;
    --cs2-warning: #eab308;
    --cs2-error: #ef4444;
    
    /* Borders */
    --cs2-border: rgba(255, 255, 255, 0.08);
    --cs2-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --cs2-font-display: 'Outfit', 'Inter', system-ui, sans-serif;
    --cs2-font-body: 'Inter', system-ui, sans-serif;
    --cs2-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   FORCE DARK THEME - EXACT MATCH
   ============================================ */
html {
    scroll-behavior: smooth;
}

body,
body[data-scheme="light"],
body[data-scheme="auto"],
body[data-scheme="dark"] {
    background: var(--cs2-background) !important;
    color: var(--cs2-foreground) !important;
    font-family: var(--cs2-font-body) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.6;
}

/* Override theme CSS variables */
body,
[data-scheme="light"],
[data-scheme="dark"],
[data-scheme="auto"] {
    --cs-site-background: var(--cs2-background) !important;
    --cs-layout-background: var(--cs2-surface-1) !important;
    --cs-header-background: rgba(17, 24, 39, 0.95) !important;
    --cs-header-submenu-background: var(--cs2-surface-2) !important;
    --cs-color-primary: var(--cs2-foreground) !important;
    --cs-color-secondary: var(--cs2-text-secondary) !important;
    --cs-color-border: var(--cs2-border) !important;
    --cs-color-accent: var(--cs2-primary) !important;
}

/* Hide color scheme toggle */
.cs-scheme-toggle,
.cs-toggle-scheme,
[class*="scheme-toggle"] {
    display: none !important;
}

/* ============================================
   FORCE SINGLE COLUMN LAYOUT (NO SIDEBAR)
   Override theme's 2-column grid
   ============================================ */
.cs-main-content,
.cs-page-layout-right .cs-main-content,
.cs-page-layout-left .cs-main-content,
#content.cs-main-content {
    display: block !important;
    grid-template-columns: 1fr !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* Hide sidebar completely */
#secondary,
.cs-sidebar,
aside.widget-area {
    display: none !important;
}

/* Make content area full width */
#primary,
.cs-content-area {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   TYPOGRAPHY - MATCH WEBSITE
   ============================================ */
h1, h2, h3, h4, h5, h6,
.cs-entry__title,
.cs-hero__title {
    font-family: var(--cs2-font-display) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
    color: var(--cs2-foreground) !important;
}

/* ============================================
   CONTAINER - MATCH WEBSITE
   ============================================ */
.container,
.cs-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* ============================================
   CS2.AD HEADER - EXACT MATCH
   ============================================ */
.cs2-header {
    background: rgba(17, 24, 39, 0.95) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Header container - logo left, nav center, search right */
.cs2-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cs2-logo {
    flex-shrink: 0;
}

.cs2-logo img {
    width: 90px;
    height: auto;
    transition: transform 0.3s ease;
}

.cs2-logo:hover img {
    transform: scale(1.05);
}

/* ============================================
   NAVIGATION - SPREAD ACROSS CENTER
   ============================================ */

/* Desktop nav container - centered and spread */
.cs2-desktop-nav {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

@media (min-width: 1024px) {
    .cs2-desktop-nav {
        display: flex;
    }
}

/* Each nav item group - uses 'group' class for hover targeting */
.cs2-nav-group {
    position: relative;
    display: inline-block;
    padding: 0.75rem 0;
}

/* Nav button - slightly larger, matching website */
.cs2-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem; /* 13px - slightly larger */
    font-weight: 500;
    color: var(--cs2-text-secondary);
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cs2-nav-btn:hover {
    color: var(--cs2-foreground);
    background: rgba(255, 255, 255, 0.05);
}

/* Chevron icon */
.cs2-nav-chevron {
    width: 10px;
    height: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.group:hover .cs2-nav-chevron,
.cs2-nav-group:hover .cs2-nav-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.cs2-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% - 0.25rem);
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--cs2-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.2s ease-out;
    z-index: 50;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Show dropdown on hover - dual selectors for compatibility */
.group:hover .cs2-dropdown,
.cs2-nav-group:hover .cs2-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cs2-dropdown li {
    margin: 0;
}

/* Dropdown items */
.cs2-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 13px;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.cs2-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--cs2-foreground);
}

.cs2-dropdown-item img {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    border-radius: 4px;
    object-fit: contain;
}

/* Top items in dropdown */
.cs2-dropdown-top-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.cs2-dropdown-top-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--cs2-foreground);
}

.cs2-dropdown-icon {
    width: 28px;
    height: 28px;
    margin-right: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(36, 48, 68, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cs2-dropdown-icon img {
    width: 20px;
    height: 20px;
}

/* Section header */
.cs2-dropdown-section {
    display: block;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cs2-text-muted);
    background: rgba(36, 48, 68, 0.3);
}

/* Divider */
.cs2-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.25rem 0.75rem;
}

/* ============================================
   SEARCH WRAPPER - Right side of header
   ============================================ */
.cs2-search-wrapper {
    display: none;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .cs2-search-wrapper {
        display: block;
    }
}

.cs2-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
}

.cs2-search-icon {
    position: absolute;
    left: 0.75rem;
    width: 16px;
    height: 16px;
    color: var(--cs2-text-muted);
    pointer-events: none;
}

.cs2-search-input {
    width: 100%;
    padding: 0.5rem 2.75rem 0.5rem 2.25rem;
    background: var(--cs2-surface-2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--cs2-text-secondary) !important;
    outline: none;
    transition: all 0.2s ease;
}

.cs2-search-input::placeholder {
    color: var(--cs2-text-muted);
    font-size: 0.75rem;
}

.cs2-search-input:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    background: var(--cs2-surface-3) !important;
}

.cs2-search-submit {
    position: absolute;
    right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--cs2-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs2-search-submit:hover {
    background: var(--cs2-primary-hover);
}

.cs2-search-submit svg {
    width: 14px;
    height: 14px;
}

/* Mobile Menu Toggle */
.cs2-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: var(--cs2-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs2-mobile-toggle:hover {
    color: var(--cs2-foreground);
    background: rgba(255, 255, 255, 0.05);
}

.cs2-mobile-toggle svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 1024px) {
    .cs2-mobile-toggle {
        display: none;
    }
    
    .cs2-blog-link {
        display: flex;
    }
}

@media (max-width: 1023px) {
    .cs2-blog-link {
        display: none;
    }
}

/* ============================================
   MOBILE MENU
   ============================================ */
.cs2-mobile-menu {
    display: none;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--cs2-surface-2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cs2-mobile-menu.active {
    display: block;
}

.cs2-mobile-menu-inner {
    padding: 1rem;
}

.cs2-mobile-nav-group {
    margin-bottom: 0.25rem;
}

.cs2-mobile-nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cs2-text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    cursor: pointer;
    list-style: none;
    transition: all 0.2s ease;
}

.cs2-mobile-nav-group summary::-webkit-details-marker {
    display: none;
}

.cs2-mobile-nav-group summary::after {
    content: "›";
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.cs2-mobile-nav-group[open] summary::after {
    transform: rotate(90deg);
}

.cs2-mobile-nav-group summary:hover {
    color: var(--cs2-foreground);
    background: rgba(255, 255, 255, 0.05);
}

.cs2-mobile-nav-content {
    padding: 0.5rem 0 0.5rem 0.5rem;
}

.cs2-mobile-nav-content a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.cs2-mobile-nav-content a:hover {
    color: var(--cs2-foreground);
    background: rgba(255, 255, 255, 0.05);
}

.cs2-mobile-nav-content a img {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 2px;
    object-fit: contain;
}

.cs2-mobile-nav-top {
    font-weight: 500;
    color: var(--cs2-foreground) !important;
}

.cs2-mobile-nav-section {
    display: block;
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cs2-text-muted);
}

.cs2-mobile-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.75rem 0;
}

.cs2-mobile-nav-link {
    display: block;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.cs2-mobile-nav-link:hover {
    color: var(--cs2-foreground);
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Search */
.cs2-mobile-search {
    background: var(--cs2-surface-2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

/* ============================================
   SEARCH STYLING
   ============================================ */
.cs2-search-form {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.cs2-search-input {
    width: 100%;
    padding: 0.625rem 5rem 0.625rem 2.75rem;
    background: var(--cs2-surface-2) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--cs2-foreground) !important;
    outline: none;
    transition: all 0.2s ease;
}

.cs2-search-input::placeholder {
    color: var(--cs2-text-muted);
}

.cs2-search-input:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--cs2-surface-3) !important;
}

.cs2-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--cs2-text-muted);
    pointer-events: none;
}

.cs2-search-submit {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.375rem 0.75rem;
    background: var(--cs2-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs2-search-submit:hover {
    background: var(--cs2-primary-hover);
}

/* ============================================
   HERO SECTION
   ============================================ */
.cs2-hero {
    padding: 2.5rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--cs2-surface-1) 0%, var(--cs2-background) 100%);
    border-bottom: 1px solid var(--cs2-border);
    margin-bottom: 2.5rem;
}

.cs2-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.cs2-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.cs2-hero-subtitle {
    font-size: 1rem;
    color: var(--cs2-text-secondary);
    margin-bottom: 1.25rem;
}

.cs2-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.cs2-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--cs2-surface-2);
    border: 1px solid var(--cs2-border);
    border-radius: 0.5rem;
    color: var(--cs2-foreground);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cs2-hero-btn:hover {
    background: var(--cs2-surface-3);
    border-color: var(--cs2-primary);
    color: var(--cs2-foreground);
    transform: translateY(-1px);
}

.cs2-hero-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: transparent;
    color: white;
}

.cs2-hero-btn.primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

@media (max-width: 640px) {
    .cs2-hero h1 {
        font-size: 1.75rem;
    }
    
    .cs2-hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cs2-hero-btn {
        justify-content: center;
    }
}

/* ============================================
   FOOTER - MATCH WEBSITE mt-20 py-12 grid
   ============================================ */
.cs2-footer {
    margin-top: 5rem; /* mt-20 */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, var(--cs2-surface-1) 0%, #0a0a0f 100%);
    position: relative;
}

.cs2-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%, rgba(168, 85, 247, 0.05) 100%);
    pointer-events: none;
}

.cs2-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1rem; /* py-12 px-4 */
    position: relative;
    z-index: 1;
}

/* grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 lg:gap-12 */
.cs2-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .cs2-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .cs2-footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
        gap: 3rem;
    }
}

/* Footer Brand - col-span-2 md:col-span-4 lg:col-span-2 */
.cs2-footer-brand {
    grid-column: span 2;
}

@media (min-width: 768px) {
    .cs2-footer-brand {
        grid-column: span 4;
    }
}

@media (min-width: 1024px) {
    .cs2-footer-brand {
        grid-column: span 1;
    }
}

.cs2-footer-brand img {
    width: 100px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cs2-footer-brand img:hover {
    opacity: 1;
}

.cs2-footer-brand p {
    font-size: 0.875rem;
    color: var(--cs2-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 24rem;
}

.cs2-footer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.cs2-footer-email:hover {
    color: var(--cs2-primary);
}

.cs2-footer-email svg {
    width: 16px;
    height: 16px;
}

/* Social Links - gap-3 */
.cs2-footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* w-9 h-9 rounded-lg */
.cs2-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--cs2-text-muted);
    transition: all 0.2s ease;
}

.cs2-footer-social a:hover {
    transform: scale(1.1);
}

.cs2-footer-social a.twitter:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--cs2-primary);
}

.cs2-footer-social a.instagram:hover {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.cs2-footer-social a.tiktok:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.cs2-footer-social a.youtube:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.cs2-footer-social a.facebook:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.cs2-footer-social svg {
    width: 16px;
    height: 16px;
}

/* Footer Columns - text-sm mb-4 */
.cs2-footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cs2-foreground);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* w-1 h-4 rounded-full */
.cs2-footer-col h4::before {
    content: '';
    width: 4px;
    height: 16px;
    border-radius: 9999px;
}

.cs2-footer-col.quick-links h4::before {
    background: linear-gradient(180deg, var(--cs2-primary) 0%, #1d4ed8 100%);
}

.cs2-footer-col.categories h4::before {
    background: linear-gradient(180deg, var(--cs2-accent-cyan) 0%, #06b6d4 100%);
}

.cs2-footer-col.resources h4::before {
    background: linear-gradient(180deg, var(--cs2-accent-purple) 0%, #7c3aed 100%);
}

/* space-y-2.5 */
.cs2-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs2-footer-col li {
    margin-bottom: 0.625rem;
}

/* text-sm hover:translate-x-1 */
.cs2-footer-col a {
    font-size: 0.875rem;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cs2-footer-col a:hover {
    color: var(--cs2-foreground);
    transform: translateX(4px);
}

.cs2-footer-col a .external-icon {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

/* Footer Bottom - mt-12 pt-6 text-xs */
.cs2-footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .cs2-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.cs2-footer-copyright {
    font-size: 0.75rem;
    color: var(--cs2-text-muted);
    text-align: center;
}

@media (min-width: 640px) {
    .cs2-footer-copyright {
        text-align: left;
    }
}

.cs2-footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
}

.cs2-footer-links a {
    color: var(--cs2-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.cs2-footer-links span {
    opacity: 0.3;
}

/* ============================================
   HIDE SIDEBAR ON HOMEPAGE
   ============================================ */
body.home .cs-site-primary,
body.blog .cs-site-primary {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.home .cs-site-secondary,
body.blog .cs-site-secondary,
body.home .cs-sidebar,
body.blog .cs-sidebar {
    display: none !important;
}

body.home .cs-site-inner,
body.blog .cs-site-inner {
    display: block !important;
}

/* ============================================
   3-COLUMN POST GRID - TITLE + DATE ONLY
   ============================================ */
.cs2-posts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .cs2-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cs2-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Post Card - matches website skin cards */
.cs2-post-card {
    background: var(--cs2-surface-1);
    border: 1px solid var(--cs2-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.cs2-post-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.12);
    transform: translateY(-4px);
}

.cs2-post-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--cs2-surface-2);
}

.cs2-post-card-content {
    padding: 1rem;
}

.cs2-post-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cs2-foreground);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs2-post-card-date {
    font-size: 0.75rem;
    color: var(--cs2-text-muted);
}

/* Hide default post elements we don't need */
.cs2-post-card .cs-entry__content,
.cs2-post-card .cs-entry__excerpt,
.cs2-post-card .cs-post-author,
.cs2-post-card .cs-meta-author,
.cs2-post-card .cs-meta-comments,
.cs2-post-card .cs-meta-reading-time,
.cs2-post-card .cs-share-links {
    display: none !important;
}

/* ============================================
   CONTENT AREA OVERRIDES
   ============================================ */
.cs-site,
.cs-site-inner,
.cs-site-primary,
.cs-site-content,
.cs-main-content {
    background: transparent !important;
}

.cs-posts-area,
.cs-entry {
    background: transparent !important;
}

/* Single post styling */
.single .cs-entry__inner {
    background: var(--cs2-surface-1) !important;
    border: 1px solid var(--cs2-border) !important;
    border-radius: 1rem !important;
    padding: 2rem !important;
}

/* Entry Meta */
.cs-entry__post-meta,
.cs-meta-date,
.cs-meta-author,
.cs-meta-category a {
    color: var(--cs2-text-secondary) !important;
}

.cs-meta-category a {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--cs2-primary) !important;
    border-radius: 9999px !important;
    padding: 0.25rem 0.625rem !important;
    font-size: 0.75rem !important;
}

/* Buttons */
.cs-button,
button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.cs-button:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35) !important;
    transform: translateY(-1px);
}

/* ============================================
   SCROLLBAR & SELECTION
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cs2-surface-1);
}

::-webkit-scrollbar-thumb {
    background: var(--cs2-surface-3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cs2-text-muted);
}

::selection {
    background: var(--cs2-primary);
    color: white;
}

/* ============================================
   MAIN CONTENT CONTAINER
   ============================================ */
.cs2-main-content {
    min-height: 50vh;
}

.cs2-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   POST CARD PLACEHOLDER IMAGE
   ============================================ */
.cs2-post-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cs2-surface-2) 0%, var(--cs2-surface-3) 100%);
    color: var(--cs2-text-muted);
}

/* ============================================
   PAGINATION
   ============================================ */
.cs2-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cs2-border);
}

.cs2-pagination a,
.cs2-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cs2-text-secondary);
    background: var(--cs2-surface-1);
    border: 1px solid var(--cs2-border);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cs2-pagination a:hover {
    color: var(--cs2-foreground);
    background: var(--cs2-surface-2);
    border-color: var(--cs2-primary);
}

.cs2-pagination .current {
    color: white;
    background: var(--cs2-primary);
    border-color: var(--cs2-primary);
}

.cs2-pagination .prev,
.cs2-pagination .next {
    padding: 0 1rem;
}

.cs2-pagination .dots {
    background: transparent;
    border: none;
    color: var(--cs2-text-muted);
}

/* ============================================
   NO POSTS MESSAGE
   ============================================ */
.cs2-no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--cs2-text-secondary);
}

/* ============================================
   CATEGORY / ARCHIVE PAGE HEADER
   ============================================ */
.cs2-archive-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--cs2-border);
}

.cs2-archive-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cs2-foreground);
    margin-bottom: 0.5rem;
}

.cs2-archive-header p {
    font-size: 1rem;
    color: var(--cs2-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Category badge in header */
.cs2-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--cs2-primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */
.single .cs2-main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cs2-single-header {
    margin-bottom: 2rem;
}

.cs2-single-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cs2-foreground);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.cs2-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--cs2-text-secondary);
}

.cs2-single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--cs2-text-secondary);
}

.cs2-single-content h2,
.cs2-single-content h3,
.cs2-single-content h4 {
    color: var(--cs2-foreground);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cs2-single-content p {
    margin-bottom: 1.25rem;
}

.cs2-single-content a {
    color: var(--cs2-primary);
    text-decoration: underline;
}

.cs2-single-content a:hover {
    color: var(--cs2-primary-hover);
}

.cs2-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.cs2-single-content ul,
.cs2-single-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.cs2-single-content li {
    margin-bottom: 0.5rem;
}

.cs2-single-content blockquote {
    border-left: 3px solid var(--cs2-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--cs2-text-muted);
    font-style: italic;
}

.cs2-single-content pre,
.cs2-single-content code {
    font-family: var(--cs2-font-mono);
    background: var(--cs2-surface-2);
    border-radius: 0.375rem;
}

.cs2-single-content code {
    padding: 0.125rem 0.375rem;
    font-size: 0.875em;
}

.cs2-single-content pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.cs2-single-content pre code {
    padding: 0;
    background: transparent;
}

/* ============================================
   HIDE ORIGINAL HEADER/FOOTER
   ============================================ */
.cs-header,
.cs-footer {
    display: none !important;
}

/* ============================================
   SINGLE POST PAGE - FULL WIDTH NO SIDEBAR
   ============================================ */
.cs2-single-post {
    padding: 2rem 0 4rem;
}

.cs2-article {
    max-width: 800px;
    margin: 0 auto;
}

.cs2-post-hero {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
}

.cs2-post-hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
}

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

.cs2-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--cs2-foreground);
}

.cs2-post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: var(--cs2-text-muted);
    font-size: 0.875rem;
}

.cs2-post-meta a {
    color: var(--cs2-primary);
}

.cs2-post-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--cs2-text-secondary);
}

.cs2-post-content h2,
.cs2-post-content h3,
.cs2-post-content h4 {
    color: var(--cs2-foreground);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cs2-post-content p {
    margin-bottom: 1.25rem;
}

.cs2-post-content a {
    color: var(--cs2-primary);
}

.cs2-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.cs2-post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cs2-border);
}

.cs2-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs2-tag {
    padding: 0.375rem 0.75rem;
    background: var(--cs2-surface-2);
    border: 1px solid var(--cs2-border);
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--cs2-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.cs2-tag:hover {
    border-color: var(--cs2-primary);
    color: var(--cs2-primary);
}

/* Related Posts */
.cs2-related-posts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cs2-border);
}

.cs2-related-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--cs2-foreground);
}

.cs2-posts-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .cs2-post-title {
        font-size: 1.75rem;
    }
    
    .cs2-posts-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SINGLE POST PAGE FIXES
   ============================================ */
/* Remove header background - CORRECT SELECTORS */
.single-post .cs-entry__inner,
.single-post .cs-entry__inner.cs-entry__content,
.single-post .cs-entry__header,
.single-post .cs-entry__header-standard,
.single-post .cs-entry__header.cs-entry__header-standard {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Add spacing below header (before image) */
.single-post .cs-entry__header,
.single-post .cs-entry__header-standard {
    margin-bottom: 2.5rem !important;
    padding-bottom: 1rem !important;
}

/* Add spacing above and below featured image */
.single-post .cs-entry__thumbnail {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
}

/* Limit single post width to 950px */
.single .cs-site-primary,
.single-post .cs-site-primary,
.single #primary,
.single-post #primary,
.single .cs-content-area,
.single-post .cs-content-area {
    max-width: 950px !important;
    margin: 0 auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Ensure entry header respects width */
.single .cs-entry-header,
.single-post .cs-entry-header {
    max-width: 950px !important;
    margin: 0 auto !important;
    padding: 2rem 1rem !important;
}

/* Featured image width */
.single .cs-entry__thumbnail img,
.single-post .cs-entry__thumbnail img {
    max-width: 100% !important;
    border-radius: 0.75rem;
}

/* Content width */
.single .entry-content,
.single-post .entry-content,
.single .cs-entry-content,
.single-post .cs-entry-content {
    max-width: 950px !important;
    margin: 0 auto !important;
}

/* Push social share icons further left */
.single .cs-share-buttons,
.single-post .cs-share-buttons,
.cs-entry__share {
    left: -80px !important;
    position: absolute !important;
}

/* Ensure relative positioning for content */
.single .cs-entry-content,
.single-post .cs-entry-content {
    position: relative !important;
}
