/* Blog Page - Preview2 Theme */
/* Based on contact/FAQ page design with blog-specific layout */

:root {
    --primary: #0EA5E9;
    --primary-hover: #0284C7;
    --cta: #14B8A6;
    --navy: #0F172A;
    --navy-soft: #1E293B;
    --surface: #FFFFFF;
    --bg: #F8FAFC;
    --border: #E2E8F0;
    --text: #475569;
}

body.dark-mode {
    --bg: #020617;
    --surface: #0F172A;
    --navy: #E2E8F0;
    --navy-soft: #CBD5E1;
    --primary: #38BDF8;
    --cta: #2DD4BF;
    --border: #334155;
    --text: #94A3B8;
}

/* Header Logo Section Fix */
.logo-section a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-section .site-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.logo-section h1 {
    font-size: 20px;
    margin: 0;
    color: white;
    font-weight: 700;
}

body.dark-mode .logo-section h1 {
    color: white;
}

/* Blog Hero Section */
.blog-hero {
    text-align: center;
    color: white;
    margin: 50px 0 40px 0;
    padding: 20px;
}

.blog-hero h1 {
    font-size: 40px;
    margin-bottom: 16px;
    font-weight: 700;
    color: white;
}

.blog-hero p {
    font-size: 18px;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

/* Featured Section */
.featured-section {
    max-width: 1200px;
    margin: 0 auto 50px auto;
}

.featured-section h2 {
    color: white;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

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

.featured-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.featured-card h3 {
    margin: 16px 0 12px 0;
    font-size: 20px;
}

.featured-card h3 a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s;
}

.featured-card h3 a:hover {
    color: var(--primary);
}

.featured-card p {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 15px;
}

.featured-card .read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.featured-card .read-more:hover {
    color: var(--primary-hover);
}

/* Blog Content Layout */
.blog-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 50px auto;
}

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

.widget {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.widget h3 {
    color: var(--navy);
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.category-list,
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.quick-links li {
    margin-bottom: 8px;
}

.category-list a,
.quick-links a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.category-list a:hover,
.quick-links a:hover {
    background: var(--bg);
    color: var(--navy);
    transform: translateX(4px);
}

.category-list a.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* Posts Main Section */
.posts-main {
    min-height: 600px;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.page-header h2 {
    color: white;
    font-size: 28px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.page-header .back-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.page-header .back-link:hover {
    color: white;
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.no-posts h3 {
    color: var(--navy);
    font-size: 24px;
    margin: 0 0 12px 0;
}

.no-posts p {
    color: var(--text);
    margin: 0 0 24px 0;
    font-size: 16px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
    margin: 12px 0;
    font-size: 18px;
    line-height: 1.4;
}

.post-card h3 a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s;
}

.post-card h3 a:hover {
    color: var(--primary);
}

.post-card p {
    color: var(--text);
    line-height: 1.6;
    margin: 0 0 16px 0;
    font-size: 14px;
}

.post-card .read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.post-card .read-more:hover {
    color: var(--primary-hover);
}

/* Post Meta */
.post-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}

.post-meta .category {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.post-meta .category a {
    color: white;
    text-decoration: none;
}

.post-meta .date {
    color: var(--text);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.btn-nav {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.page-info {
    color: var(--navy);
    font-weight: 600;
}

/* Dark Mode Overrides */
body.dark-mode .blog-hero h1,
body.dark-mode .blog-hero p {
    color: #F1F5F9;
}

body.dark-mode .featured-section h2 {
    color: #F1F5F9;
}

body.dark-mode .featured-card {
    background: var(--surface);
    border-left-color: var(--primary);
}

body.dark-mode .featured-card h3 a {
    color: var(--navy);
}

body.dark-mode .featured-card p {
    color: var(--text);
}

body.dark-mode .widget {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .widget h3 {
    color: var(--navy);
}

body.dark-mode .category-list a,
body.dark-mode .quick-links a {
    color: var(--text);
}

body.dark-mode .category-list a:hover,
body.dark-mode .quick-links a:hover {
    background: var(--bg);
    color: var(--navy);
}

body.dark-mode .page-header h2 {
    color: #F1F5F9;
}

body.dark-mode .page-header .back-link {
    color: rgba(241, 245, 249, 0.9);
}

body.dark-mode .no-posts {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .no-posts h3 {
    color: var(--navy);
}

body.dark-mode .no-posts p {
    color: var(--text);
}

body.dark-mode .post-card {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .post-card h3 a {
    color: var(--navy);
}

body.dark-mode .post-card p {
    color: var(--text);
}

body.dark-mode .pagination {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .page-info {
    color: var(--navy);
}

/* Surfshark VPN Banner */
.ad-card {
    grid-column: 1 / -1;
    margin: 30px 0;
    width: 100%;
    max-width: 100%;
}

.surfshark-banner {
    background: linear-gradient(135deg, #0b3c49, #0f766e);
    color: #ffffff;
    border-radius: 14px;
    padding: 32px;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
}

.surfshark-left {
    flex: 1 1 350px;
}

.surfshark-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.surfshark-title span {
    color: #5eead4;
}

.surfshark-desc {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 18px;
    opacity: 0.95;
}

.surfshark-points {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.surfshark-points li {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.5;
}

.surfshark-points li::before {
    content: "✔";
    margin-right: 10px;
    color: #5eead4;
    font-weight: bold;
}

.surfshark-cta {
    display: inline-block;
    background: #5eead4;
    color: #064e3b;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surfshark-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(94, 234, 212, 0.4);
}

.surfshark-right {
    flex: 1 1 280px;
    text-align: center;
}

.surfshark-badge {
    background: rgba(255, 255, 255, 0.12);
    padding: 20px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.surfshark-badge strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    color: #5eead4;
}

/* Dark Mode - Surfshark Banner */
body.dark-mode .surfshark-banner {
    background: linear-gradient(135deg, #0b3c49, #0f766e);
}

/* Responsive Design */
@media (max-width: 1000px) {
    .blog-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
    }

    .widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 32px;
    }

    .blog-hero p {
        font-size: 16px;
    }

    .featured-section h2 {
        font-size: 24px;
    }

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

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

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

    .pagination {
        flex-direction: column;
        gap: 12px;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
    }

    .surfshark-banner {
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        text-align: center;
    }

    .surfshark-left,
    .surfshark-right {
        flex: 1 1 100%;
    }

    .surfshark-title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .blog-hero h1 {
        font-size: 28px;
    }

    .blog-hero p {
        font-size: 15px;
    }

    .featured-card,
    .post-card,
    .widget {
        padding: 20px;
    }

    .page-header h2 {
        font-size: 24px;
    }

    .surfshark-banner {
        padding: 20px;
        gap: 16px;
    }

    .surfshark-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .surfshark-desc {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .surfshark-points {
        margin-bottom: 16px;
    }

    .surfshark-points li {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .surfshark-cta {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        text-align: center;
    }

    .surfshark-badge {
        padding: 16px;
        font-size: 14px;
    }

    .surfshark-badge strong {
        font-size: 18px;
    }
}
