/*
Theme Name: Rajiv Custom
Theme URI: https://rajivsreviews.com 
Author: Rajiv
Description: A clean custom theme with even 3-column grid
Version: 1.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: rajiv-custom
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f5e7 !important;
}

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

.header-image {
    margin-bottom: 30px;
}

.header-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.site-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
}

.main-nav li:first-child a {
    background: #0066cc !important;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 0;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    display: block;
    width: 100%;
    aspect-ratio: 2/3; /* Book cover ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 15px;
}

.post-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.post-title a {
    text-decoration: none;
    color: #222;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
}

.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
}

.pagination .current {
    background: #0066cc;
    color: #fff;
}

.site-footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}