/*
Theme Name: Prem Theme
Author: Prem Prasad Paudel
Description: Custom theme for premprasadpaudel.com.np with 4-column grid, sidebar, and header menu.
Version: 1.0
*/

/* ================= आधारभूत सेटिङ (Basic Reset) ================= */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Mukta', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: #f4f4f4; /* साइटको ब्याकग्राउन्ड हल्का खैरो */
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #0073aa;
    transition: color 0.3s ease;
}

a:hover {
    color: #d9534f;
}

/* ================= हेडर र मेनु (Header & Menu) ================= */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #0073aa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* साइटको नाम बायाँ, मेनु दायाँ */
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.site-branding h1 {
    margin: 0;
    font-size: 28px;
}

.site-branding h1 a {
    color: #222;
}

.site-branding p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* मेनुको डिजाइन */
.site-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.site-navigation ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

/* Hover गर्दा निलो रेखा आउने */
.site-navigation ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #0073aa;
    transition: width 0.3s;
}

.site-navigation ul li a:hover {
    color: #0073aa;
}

.site-navigation ul li a:hover::after,
.site-navigation .current-menu-item a::after {
    width: 100%;
}

/* ================= मुख्य कन्टेनर र साइडबार लेआउट ================= */
.site-content-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.content-sidebar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* बायाँ भाग (Main Content Area) */
.main-content-area {
    flex: 1 1 68%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* दायाँ भाग (Sidebar Area) */
.sidebar-area {
    flex: 1 1 28%;
    min-width: 280px;
}

/* ================= सेक्सन शीर्षक ================= */
.section-title, .widget-title {
    font-size: 22px;
    color: #222;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    display: inline-block;
}

/* ================= ४ ग्रिडको पोस्ट लेआउट (CSS Grid) ================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* ४ कोलम */
    gap: 20px;
}

.grid-post-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grid-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.grid-post-card .grid-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.grid-post-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-post-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.grid-post-info h3 a {
    color: #222;
}

.grid-post-info .read-more {
    font-size: 14px;
    color: #d9534f;
    font-weight: bold;
    align-self: flex-start;
}

/* ================= साइडबार (Sidebar) ================= */
.sidebar-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.sidebar-widget .widget-title {
    font-size: 18px;
    border-bottom: 2px solid #ddd;
    display: block;
}

/* साइडबारको लोकप्रिय पोस्ट कार्ड */
.sidebar-post-card {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
}

.sidebar-post-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sidebar-post-card .sidebar-thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.sidebar-post-card .sidebar-post-info h4 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
}

.sidebar-post-card .sidebar-post-info h4 a {
    color: #333;
}

/* ================= फुटर (Footer) ================= */
.site-footer {
    text-align: center;
    padding: 25px;
    background: #222;
    color: #ccc;
    margin-top: 40px;
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

/* ================= Responsive Design (Mobile & Tablet) ================= */

/* ट्याब्लेटको लागि (१०२४px भन्दा सानो) */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr); /* २ कोलम */
    }
    .main-content-area, .sidebar-area {
        flex: 1 1 100%; /* साइडबार तल झर्ने */
    }
}

/* सानो ट्याब्लेटको लागि (७६८px भन्दा सानो) */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .site-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

/* मोबाइलको लागि (६००px भन्दा सानो) */
@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr; /* १ कोलम */
    }
    .site-branding h1 {
        font-size: 24px;
    }
}
/* परीक्षणको लागि मेनु देखाउने */
.site-navigation {
    display: block !important;
    background-color: #ffe6e6 !important; /* परीक्षणको लागि रातो ब्याकग्राउन्ड */
    padding: 10px !important;
    width: 100%;
}
.site-navigation ul {
    display: flex !important;
    list-style: none !important;
    gap: 20px;
    margin: 0;
    padding: 0;
}
.site-navigation ul li a {
    color: #000 !important;
    font-weight: bold;
    text-decoration: none;
}