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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Header styles */
header {
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    max-width: 100px;
    height: auto;
    
}

/* Main content styles */
main {
    width: 70%;
    float: left;
}

.main-post {
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-post img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-post h1 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #222;
}

.main-post p {
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
    text-indent: 20px;
}

.main-post p:last-of-type {
    margin-bottom: 30px;
}

.post-meta {
    margin-bottom: 20px;
    color: #666;
}

.post-meta span {
    margin-right: 20px;
}

.post-meta i {
    margin-right: 5px;
}

.download-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #0056b3;
}

/* Related posts styles */
.related-posts {
    margin: 40px 0;
}

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

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

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

.post-card h3 {
    padding: 15px;
    font-size: 1.1em;
}

.post-card p {
    padding: 0 15px 15px;
    color: #666;
}

/* Comments section styles */
.comments {
    margin-top: 40px;
}

.comment {
    display: flex;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-content h4 {
    margin-bottom: 5px;
    color: #222;
}

.comment-date {
    color: #666;
    font-size: 0.9em;
}

/* Sidebar styles */
.sidebar {
    width: 25%;
    float: right;
}

.sidebar-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.newsletter {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.newsletter h3 {
    margin-bottom: 10px;
    color: #222;
}

.newsletter p {
    color: #666;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.newsletter-form button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #0056b3;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #007bff;
}

.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post {
    display: flex;
    gap: 15px;
}

.popular-post img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-post-info h4 {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.popular-post-info span {
    color: #666;
    font-size: 0.8em;
}

/* Sidebar Ad with responsive limits */
.sidebar-ad {
    margin-bottom: 30px;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-ad img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    padding: 10px;
}

/* In-content Ad with responsive limits */
.content-ad {
    width: 100%;
    max-width: 768px;
    height: 400px;
    text-align: center;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 20px;
}

.content-ad img {
    width: 100%;
    height: 80%;
    object-fit: contain;
    border-radius: 8px;
}

/* Ad container for multiple ads */
.ads-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.ad-item {
    width: 100%;
    height: 300px;
    overflow: hidden;  
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.ad-item img {
    width: 100%;
    height: 90%;
    object-fit: contain;
    border-radius: 8px;
    padding: 15px;
}

.social-media {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    color: #333;
    font-size: 1.5em;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #007bff;
}

/* Responsive design */
@media screen and (max-width: 1024px) {
    body {
        padding: 15px;
    }

    main {
        width: 65%;
    }

    .sidebar-ad {
        height: 200px;
    }
    
    .content-ad {
        height: 300px;
    }
    
    .ad-item {
        height: 200px;
    }
    
    .ads-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }

    main {
        width: 100%;
        float: none;
    }

    .sidebar {
        width: 100%;
        float: none;
        margin-top: 30px;
    }

    .header-top {
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }

    .logo {
        margin-right: auto;
    }

    .logo img {
        max-width: 80px;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .popular-posts {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }

    .sidebar-ad {
        height: 180px;
        margin-bottom: 20px;
    }
    
    .content-ad {
        height: 200px;
        margin: 20px auto;
        max-width: 100%;
    }
    
    .ad-item {
        height: 180px;
    }
    
    .ads-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .main-post {
        padding: 15px;
        margin-bottom: 30px;
    }

    .main-post h1 {
        font-size: 1.6em;
    }

    .main-post p {
        font-size: 0.95em;
        line-height: 1.7;
        text-indent: 15px;
    }

    .sidebar-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .newsletter {
        padding: 15px;
        margin-bottom: 20px;
    }
    .content-ad img{
        height: 120px;
        width: 500px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header-top {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
    }

    .logo img {
        max-width: 70px;
    }

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

    .main-post {
        padding: 12px;
        margin-bottom: 25px;
    }

    .main-post h1 {
        font-size: 1.4em;
        margin-bottom: 12px;
    }

    .main-post p {
        font-size: 0.9em;
        line-height: 1.6;
        text-indent: 12px;
        margin-bottom: 15px;
    }

    .main-post img {
        height: 300px;
        width: 350px;
        margin-bottom: 15px;
    }

    .content-ad img{
        height: 200px;
        width: 250px;
    }
    .sidebar-ad {
        height: 200px;
        margin-bottom: 15px;
    }
    
    .content-ad {
        height: 150px;
        margin: 15px auto;
        padding: 15px;
    }
    
    .ad-item {
        height: 150px;
    }
    
    .ads-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0;
    }

    .sidebar-section {
        padding: 12px;
        margin-bottom: 15px;
    }

    .newsletter {
        padding: 12px;
        margin-bottom: 15px;
    }

    .newsletter h3 {
        font-size: 1.1em;
    }

    .newsletter p {
        font-size: 0.9em;
    }

    .popular-post img {
        width: 80px;
        height: 80px;
    }

    .popular-post-info h4 {
        font-size: 0.85em;
    }

    .related-posts h2 {
        font-size: 1.3em;
    }

    .post-card h3 {
        font-size: 1em;
        padding: 12px;
    }

    .post-card p {
        padding: 0 12px 12px;
        font-size: 0.9em;
    }

    .site-footer {
        margin-top: 30px;
        padding: 15px;
    }

    .footer-content p {
        font-size: 0.85em;
    }
 
}

/* Footer styles */
.site-footer {
    clear: both;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.footer-content p {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.footer-content p:last-child {
    margin-bottom: 0;
}
