/* Global Blog Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f0f2f5;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Blog Index Page */
.blog-hero {
    background-color: #f9f9f9;
    text-align: center;
    padding: 60px 0;
}

.blog-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.blog-hero p {
    font-size: 1.2rem;
    color: #666666;
}

.blog-posts {
    padding: 60px 0;
}

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

.post-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.post-card a {
    text-decoration: none;
    color: inherit;
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .post-header {
    padding: 25px;
}

.post-card .post-content {
    padding: 0 25px 25px;
}

.post-card .post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    margin-top: 15px;
}

.post-meta {
    font-weight: 600;
    color: #007bff;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* Single Blog Post Styles */
.blog-post-single {
    padding: 20px 0;
}

.post-container {
    max-width: 900px;
    width: 100%;
    background-color: #ffffff;
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
}

.post-container .post-title {
    font-size: 3em;
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    color: #2c3e50;
    line-height: 1.25;
    font-weight: 700;
}

.post-content h2, .post-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.25;
    font-weight: 700;
}

.post-content h2 {
    font-size: 2.2em;
    margin-top: 45px;
    border-bottom: 2px solid #dcdcdc;
    padding-bottom: 12px;
    position: relative;
}

.post-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

.post-content h3 {
    font-size: 1.7em;
    margin-top: 35px;
    color: #34495e;
    border-left: 5px solid #007bff;
    padding-left: 15px;
}

.post-content p {
    margin-bottom: 18px;
    font-size: 1.05em;
}

.post-content ul, .post-content ol {
    margin-left: 35px;
    margin-bottom: 20px;
}

.post-content ul li, .post-content ol li {
    margin-bottom: 10px;
    font-size: 1.0em;
}

.post-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-content section {
    margin-bottom: 60px;
}

.post-content section:last-of-type {
    margin-bottom: 0;
}

.meta-description-text {
    text-align: center;
    font-style: italic;
    color: #6a7f8e;
    margin-bottom: 50px;
    font-size: 1.15em;
    padding: 20px;
    background-color: #e9f2f9;
    border-radius: 10px;
    border: 1px dashed #cce0f2;
}

/* Custom Lists */
.intro-list li {
    font-weight: 500;
    color: #0056b3;
    list-style-type: none;
}
.intro-list li:before {
    content: '✓ ';
    color: #28a745;
    font-weight: bold;
}

.good-posture-list li {
    list-style-type: none;
}
.good-posture-list li:before {
    content: '✅ ';
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

.bad-posture-list li {
    list-style-type: none;
}
.bad-posture-list li:before {
    content: '👎 ';
    color: #dc3545;
    font-weight: bold;
    margin-right: 10px;
}

.best-keyboards-list {
    list-style-type: none;
    counter-reset: keyboard-item-counter;
    padding-left: 0;
}

.best-keyboards-list li {
    counter-increment: keyboard-item-counter;
    margin-bottom: 40px;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 30px;
    position: relative;
}

.best-keyboards-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.best-keyboards-list li h3 {
    margin-top: 0;
    padding-left: 50px;
    position: relative;
    border-left: none;
    font-size: 1.5em;
}

.best-keyboards-list li h3::before {
    content: counter(keyboard-item-counter) ".";
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2.5em;
    font-weight: bold;
    color: #007bff;
    line-height: 1;
}

.best-keyboards-list li p, .best-keyboards-list li ul {
    margin-left: 50px;
}
.best-keyboards-list li ul {
    margin-left: 75px;
    list-style-type: disc;
}

/* Table Styles */
.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.styled-table th, .styled-table td {
    border: 1px solid #e0e0e0;
    padding: 16px 20px;
    text-align: left;
    vertical-align: top;
    font-size: 0.95em;
}

.styled-table th {
    background-color: #eef2f7;
    color: #364f6b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.9em;
}

.styled-table tr:nth-child(even) {
    background-color: #f9fbfd;
}

.styled-table tr:hover {
    background-color: #eaf3fa;
}

/* FAQ Styles */
.post-content dl {
    margin-top: 30px;
    margin-bottom: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.post-content dt {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.18em;
    position: relative;
    padding-left: 30px;
}

.post-content dt::before {
    content: "Q: ";
    color: #007bff;
    font-weight: 700;
    position: absolute;
    left: 0;
}

.post-content dd {
    margin-bottom: 18px;
    padding-left: 30px;
    border-left: 4px solid #28a745;
    padding: 12px 15px;
    font-size: 1.0em;
    background-color: #fcfdff;
    border-radius: 0 8px 8px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-single {
        overflow-x: hidden;
    }

    .post-container {
        padding: 40px 15px;
        width: 100%;
    }

    .post-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .post-content img {
        max-width: 100%;
        height: auto;
    }

    .styled-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .post-content iframe {
        max-width: 100%;
    }
}
