/*
Theme Name: My First Theme
Author: Danya
Description: A professional theme built with Gemini's help.
Version: 1.7
*/

body {
    /* Noto Sans Devanagari will be used for Marathi, with a fallback to system fonts */
    font-family: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    margin: 0;
}

h1, h2, h3, h4 {
    /* Poppins will be used for all headings */
    font-family: 'Poppins', sans-serif;
}

/* Header Styles */
header {
    text-align: center;
    padding-top: 20px;
}

/* Main Container for Full-Width Pages */
.full-width-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Navigation Menu
   ========================================================================== */
.main-nav {
    margin: 20px 0 30px 0;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 15px;
    background-color: #ffffff;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}
.main-nav li {
    display: inline-block;
    margin: 0 5px;
}
.main-nav a {
    display: inline-block;
    color: #34495e;
    background-color: #eef2f5;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.main-nav a:hover {
    background-color: #c0392b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Ad Widget Styles */
.header-ad-area {
    text-align: center;
    margin: 20px 0;
}

/* ==========================================================================
   Grid Layout for Posts (3-Column)
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.post-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}
.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.post-item .post-thumbnail a {
    display: block;
}
.post-item .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.post-item .post-title {
    font-size: 1.2em;
    margin: 20px;
    height: 3.6em;
    overflow: hidden;
}
.post-item .post-title a {
    text-decoration: none;
    color: #333;
}

/* ==========================================================================
   Single Post Layout & Typography
   ========================================================================== */
.single .single-post-container {
    max-width: 920px;
    margin: 20px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 5px;
}
.single .entry-title {
    font-size: 42px;
    margin-top: 0;
    line-height: 1.3;
    margin-bottom: 20px;
    text-align: center; 
}
.single .post-content {
    font-size: 18px;
    line-height: 1.8;
}
.single .post-content p {
    text-align: left;
    margin-bottom: 1.5em;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}
.single .post-content h2,
.single .post-content h3,
.single .post-content h4 {
    color: #c0392b;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.4;
}
.single .post-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    text-align: left;
}

/* Related Posts Section */
.related-posts-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px 0 20px;
    border-top: 2px solid #f0f0f0;
}
.related-title {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #333;
}
.posts-grid.four-columns {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (max-width: 768px) {
    .main-nav li {
        margin: 5px;
    }
    .single .single-post-container {
        padding: 25px;
    }
    .single .entry-title {
        font-size: 28px;
    }
}
@media screen and (max-width: 580px) {
    .posts-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .single .single-post-container {
        padding: 18px;
    }
    .single .entry-title {
        font-size: 24px;
        line-height: 1.3;
    }
    .single .post-content {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #34495e;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}
.btn:hover {
    background-color: #e67e22;
    color: #ffffff;
    transform: translateY(-3px);
    text-decoration: none;
}
.read-more-container {
    margin: 0 20px 20px 20px;
}

/* In-Post Ads */
.in-post-ad {
    margin: 30px 0;
    padding: 15px;
    background-color: #f1f1f1;
    text-align: center;
    overflow: hidden;
}

/* Back to Top Button */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    border: none;
    background-color: #34495e;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}
#backToTopBtn:hover {
    background-color: #e67e22;
}
