/*
Theme Name: ContextPlz
Theme URI: https://contextplz.com
Author: Antigravity
Description: A high-speed, minimalist, GenZ-styled Viral News Portal.
Version: 2.0
Text Domain: contextplz
*/

:root {
    /* GenZ Palette */
    --c-bg: #ffffff;
    --c-text: #1a1a1a;
    --c-accent: #ff4757;
    /* Viral Red */
    --c-secondary: #2f3542;
    --c-tech: #3742fa;
    --c-finance: #2ed573;
    --c-border: #f1f2f6;
    --c-gray: #747d8c;

    /* Typography */
    --font-main: 'Libre Baskerville', serif;
    /* GenZ Trendy Serif */
    --font-bengali: 'Hind Siliguri', sans-serif;

    /* Spacing */
    --gap: 20px;
    --container: 1400px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-bengali), var(--font-main);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

a:hover {
    color: var(--c-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

.font-serif {
    font-family: var(--font-main);
}

/* Layout Grid (PC 3-Col) */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 15px;
}

.site-main {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    /* Left - Main - Right */
    gap: 30px;
    margin-top: 30px;
}

/* Header: Jannah Style */
.top-bar {
    background: #2f3542;
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-ticker {
    display: flex;
    align-items: center;
    overflow: hidden;
    max-width: 50%;
}

.ticker-label {
    background: var(--c-accent);
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.ticker-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.ticker-content li {
    margin-right: 20px;
    white-space: nowrap;
}

.header-inner {
    padding: 30px 0;
    align-items: center;
}

.header-ad {
    margin-left: auto;
    width: 728px;
    height: 90px;
    background: #dfe4ea;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.ad-placeholder {
    color: #a4b0be;
}

/* Sticky Main Nav */
.main-navigation-wrapper {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li a {
    padding: 0 20px;
    font-weight: 700;
    color: var(--c-secondary);
    text-transform: uppercase;
}

.main-navigation li a:hover {
    color: var(--c-accent);
}

.nav-search-trigger {
    cursor: pointer;
    font-size: 1.2rem;
}

/* Breadcrumbs */
.breadcrumb {
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--c-gray);
}

.breadcrumb a {
    font-weight: 600;
}

/* Smart Sidebars (Sticky) */
.left-sidebar,
.right-sidebar {
    position: sticky;
    top: 90px;
    /* Offset for Sticky Nav */
    height: fit-content;
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
    border-top: 1px solid var(--c-border);
    padding-top: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.related-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-item h4 {
    font-size: 1rem;
    line-height: 1.4;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .header-ad {
        display: none;
    }

    .top-ticker {
        display: none;
    }

    .site-main {
        grid-template-columns: 1fr;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    /* User wanted specific mobile optimizations */
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
    }

    /* Hide PC menu */
    .mobile-ad-break {
        display: block;
    }
}


@media (max-width: 768px) {
    .site-main {
        grid-template-columns: 1fr;
        /* Single Column */
    }

    .right-sidebar {
        display: none;
        /* Hide PC sidebar, move contents via PHP/CSS order if needed, but per requirement we hide sidebar */
    }

    /* Mobile Ad Placement Logic */
    .mobile-ad-break {
        display: block !important;
    }

    .cat-grid-layout {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .header-search {
        width: 100%;
    }
}

.mobile-ad-break {
    display: none;
    margin: 30px 0;
}