:root {
    --bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --accent: #059669;
    --card: #f8fafc;
    --max-width: 1100px;

    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}
a { text-decoration: none; color: inherit; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px;
}


header.site-header {
    border-bottom: 1px solid #e6edf3;
    background: var(--accent);
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.logo {
    width: 44px; height: 44px;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
}
.brand-title { font-weight: 700; }
.brand-subtitle { font-size: 13px; color: #cfd9e4; }

.hero { padding: 26px 0 10px; }
.hero-layout {
    display: grid;
    grid-template-columns: 1fr 360px; /* main left, sidebar right */
    gap: 20px;
    align-items: start;
}
.hero-card {
    background: linear-gradient(180deg,#fff,#fbfeff);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e6eef6;
    display: flex; flex-direction: column;
}
.hero-media {
    width: 100%; height: auto; min-height: 340px;
}
.hero-media img { width: 100%; height: auto; object-fit: contain; }
.hero-content { padding: 18px; }
.kicker {
    display: inline-block;
    background: #eef6ff;
    color: var(--accent);
    padding: 6px 8px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 13px;
}
.hero-title { font-size: 1.6rem; margin: 0 0 8px; }
.hero-excerpt { color: var(--muted); margin: 0 0 12px; }

.side-card {
    background: var(--card);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    margin-bottom: 14px;
}
.side-card h3 { margin: 0 0 8px; font-size: 1rem; }
.headline {
    display: flex; gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-top: 1px solid rgba(15,23,42,0.03);
}
.headline:first-of-type { border-top: 0; }
.thumb { width: 80px; height: 56px; border-radius: 6px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.headline h4 { margin: 0; font-size: 0.95rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.side-card2 {
    background: var(--card);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    margin-bottom: 14px;
    text-align: center;
}
.side-card2 img { width: 100%; border-radius: 8px; }


.comments {
    margin-top: 30px;
    background: var(--card);
    border: 1px solid #eef3f8;
    border-radius: 10px;
    padding: 18px;
}
.comments h2 {
    font-size: 1.2rem;
    margin: 0 0 12px;
}
.comment-form {
    display: flex; flex-direction: column;
    gap: 10px; margin-bottom: 20px;
}
.comment-form textarea {
    min-height: 100px; padding: 10px;
    border: 1px solid #dbe3eb; border-radius: 8px;
    resize: vertical; font-family: inherit;
}
.comment-form button {
    align-self: flex-end;
    background: var(--accent); color: #fff;
    padding: 8px 14px; border-radius: 6px;
    font-weight: 600; border: none; cursor: pointer;
}
.comment-form button:hover { background: #094a87; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment {
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
}
.comment strong { font-weight: 600; }
.comment .muted { margin-left: 6px; font-size: 0.85rem; }

.related-news {
    margin-top: 30px;
    padding: 18px;
    background: var(--card);
    border: 1px solid #eef3f8;
    border-radius: 10px;
}
.related-news h2 { font-size: 1.2rem; margin: 0 0 12px; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-list article { border-top: 1px solid #eaeef3; padding-top: 10px; }
.related-list article:first-child { border-top: none; padding-top: 0; }
.related-list h3 { font-size: 1rem; margin: 0; }
.related-list a { color: var(--accent); }
.related-list a:hover { text-decoration: underline; }


.latest-side .post-row {
    display: flex; gap: 8px; align-items: center;
    padding: 6px 0; border: none;
}
.latest-side .post-row img {
    width: 70px; height: 50px;
    object-fit: cover; border-radius: 6px;
}
.latest-side h4 { font-size: 0.95rem; margin: 0; }


.section { padding: 22px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
#trending .post-grid { grid-template-columns: repeat(2,1fr); }
#trending .post-card:first-child { grid-column: span 2; }

/* Sponsored content above footer styling */
#trending {
    text-align: center;
}

#trending .post-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid #eef3f8;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

#trending .post-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

#trending .post-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}
.post-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    border: 1px solid #eef3f8;
    display: flex; flex-direction: column;
}
.post-card img { width: 100%; height: 150px; object-fit: cover; }
.post-content { padding: 12px; }
.pill {
    display: inline-block; background: #f0f9ff; color: var(--accent);
    padding: 4px 8px; border-radius: 999px; font-weight: 700;
    font-size: 12px; margin-bottom: 8px;
}
.post-title { margin: 8px 0 6px; font-size: 1rem; }


footer.site-footer {
    padding: 18px 0; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    margin-top: 22px;
    background: var(--accent);
    color: #fff;
}
.footer-inner { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between;
    gap: 20px; 
}
.footer-brand { 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.footer-title { 
    font-weight: 700; 
    font-size: 1.1rem;
    color: #fff;
}
.footer-sub { 
    color: rgba(255, 255, 255, 0.8); 
    font-size: 12px; 
}
.footer-links { 
    display: flex; 
    gap: 15px; 
}
.footer-links a { 
    color: rgba(255, 255, 255, 0.8); 
    font-size: 12px; 
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}
.footer-links a:hover { 
    color: #fff; 
    background: rgba(255, 255, 255, 0.1);
}


@media (max-width:980px) {
    .hero-layout { grid-template-columns: 1fr; }
    
}


@media (max-width: 768px) {
    .container {
        padding: 14px;
    }

    .hero-layout {
        grid-template-columns: 1fr; 
    }

    .hero-media {
        height: auto; min-height: 250px;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr); 
    }

    #trending .post-grid {
        grid-template-columns: 1fr; 
    }

    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .side-card, 
    .side-card2 {
        margin-bottom: 18px;
    }

    footer.site-footer {
        padding: 14px 0;
    }
    .footer-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .footer-links {
        gap: 10px;
    }
    .footer-links a {
        padding: 6px 12px;
    }
     .ad-slot {
        height: 250px; 
        font-size: 12px;
        padding: 12px;
    }

    .ad-slot img {
        object-fit: cover;
        border-radius: 6px;
    }

    .ads{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        text-align: center;
        place-items: center;
    }
    .side-card2 {
        margin-bottom: 18px;
        height: 400px;
        width: 400px;
        justify-content:center;
    }

    .side-card2 img{
        height: 100%;
        width: 100%;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-excerpt {
        font-size: 0.95rem;
    }

    .hero-media {
        height: auto; min-height: 200px;
    }

    .post-grid {
        grid-template-columns: 1fr; 
    }

    .post-card img {
        height: 180px;
    }

    .comment-form textarea {
        min-height: 80px;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 90%;
        padding: 16px 20px;
    }

    .ad-slot {
        height: 180px; 
        font-size: 11px;
        padding: 5px;
    }

    .ad-slot img {
        object-fit: contain;
        border-radius: 6px;
    }

    .side-card2 {
        margin-bottom: 18px;
        height: 250px;
        width: 350px;;
    }

    .side-card2 img{
        height: 100%;
        width: 100%;
    }

    
}

    .modal {
        display: none; 
        position: fixed; 
        z-index: 1000; 
        left: 0; 
        top: 0; 
        width: 100%; 
        height: 100%; 
        background: rgba(0,0,0,0.5); 
        justify-content: center; 
        align-items: center;
    }
    .modal-content {
        background: #fff;
        padding: 20px 30px;
        border-radius: 10px;
        max-width: 400px;
        text-align: center;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        animation: fadeIn 0.3s ease;
    }
    .modal-content h3 {
        margin-bottom: 10px;
    }
    .modal-content button {
        margin-top: 15px;
        padding: 8px 16px;
        background: #222;
        color: #fff;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }
    .modal-content button:hover {
        background: #444;
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: scale(0.9); }
        to { opacity: 1; transform: scale(1); }
    }

    .ad-slot{
        background: #f7fbff; 
        border: 1px dashed #dff1ff;
        border-radius: 8px; 
        padding: 14px;
        text-align: center; 
        color: var(--muted); 
        font-weight: 600;
        font-size: 13px;
        height: 350px;
    }

    .ad-slot img{
        width: 100%;
        height: 100%;
    }