/*
Theme Name: The Wire Clone
Description: A minimalist, news-focused custom theme replicating the style of TheWire.in
Version: 1.2
*/

/* Reset & Variables */
:root {
    --primary-color: #cc0000;
    --text-color: #000000;
    --background: #ffffff;
    --headings-font: 'Inter', sans-serif;
    --body-font: 'Georgia', 'Times New Roman', 'Merriweather', serif; /* Robust fallback */
}

body, body.elementor-page, body.elementor-kit-* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    font-family: var(--body-font) !important;
    color: var(--text-color);
    background-color: var(--background);
    line-height: 1.6;
}

body .site-main h1, body .site-main h2, body .site-main h3, body .site-main h4, body .site-main h5, body .site-main h6,
body .site-main .hero-title, body .site-main .card-title, body .site-main .small-title, body .site-main .tiny-title {
    font-family: var(--body-font) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--headings-font);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Layout Utilities */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.top-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

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

.news-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Common Components */
.section-title {
    font-size: 0.85rem !important;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    border-bottom: none !important;
    margin-bottom: 20px;
    font-family: var(--headings-font) !important;
    letter-spacing: 1px;
}
.headline-red { border-bottom: none !important; color: var(--primary-color) !important; }

.category-section {
    margin-top: 40px;
}
.category-title {
    font-size: 0.95rem !important;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: var(--headings-font) !important;
    letter-spacing: 1px;
}
.red-top-border { border-top: 1px solid var(--primary-color) !important; padding-top:10px; }
.black-top-border { border-top: 1px solid #e1e1e1 !important; padding-top:10px; }

/* Desktop Elements */
.desktop-split-card {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.small-title {
    font-size: 0.95rem !important; /* Reduced from 1.0 */
    font-family: var(--body-font) !important;
    font-weight: 400 !important;
    line-height: 1.3;
}

.hero-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    margin-bottom: 10px;
}
.hero-title, body.elementor-page .site-main .hero-title, body .site-main h2.hero-title {
    font-size: 1.6rem !important; 
    font-family: var(--body-font) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}
.hero-excerpt { font-size: 0.95rem !important; color: #444; font-family: var(--body-font); line-height: 1.5; }
.hero-author { font-size: 0.8rem !important; color: var(--primary-color); font-weight: bold; font-family: var(--headings-font); text-transform: uppercase; }

.just-in-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.just-in-list li {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.tiny-title, body .site-main .tiny-title { font-size: 0.95rem !important; font-family: var(--body-font) !important; font-weight: 700 !important; line-height: 1.3; margin:0 0 5px 0 !important; display:block; }
.tiny-date { font-size: 0.75rem; color: #777; font-family: var(--headings-font); text-transform: uppercase;}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}
.card-title, body .site-main .card-title, body .site-main h3.card-title {
    font-size: 1rem !important;
    font-family: var(--body-font) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 5px 0 !important;
}
.card-excerpt { font-size: 0.85rem !important; color: #555; }


/* =========================================
   Mobile Responsiveness (Crucial Fix)
========================================= */
@media (max-width: 768px) {
    main#primary {
        padding-top: 0px !important;
    }
    
    .site-container {
        padding: 10px 15px;
    }

    /* Collapse ALL layout grids to single column */
    .top-grid, .news-grid-4, .news-grid-3 {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Force Split Cards on ALL news cards for Mobile! */
    .news-card {
        display: flex !important;
        flex-direction: row;
        align-items: flex-start;
        border-bottom: 1px solid #ebebeb;
        padding-bottom: 15px;
        margin-bottom: 5px;
    }
    .news-card > a {
        flex: 0 0 100px;
        margin-right: 15px;
    }
    .news-card img {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 0px !important;
    }
    .news-card .card-title, .desktop-split-card h4 {
        font-size: 0.95rem !important; /* Smaller on mobile */
        margin: 0 !important;
        line-height: 1.3;
    }
    .news-card p {
        display: none !important; /* Hide excerpts on small feed */
    }
    
    .hero-title { font-size: 1.4rem; line-height: 1.2; }
    .category-title { font-size: 1.2rem; border-bottom: 1px solid #000; padding-bottom: 5px; }
    
    /* Make right sidebar blend seamlessly */
    .right-col {
        border-top: 4px solid var(--primary-color);
        padding-top: 20px;
        margin-top: 20px;
    }
}

/* =========================================
   SINGLE POST (ARTICLE VIEW)
========================================= */
.single-post-container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.article-header { border-bottom: 2px solid #ccc; margin-bottom: 30px; padding-bottom: 20px; }
.article-category a { color: var(--primary-color); text-transform: uppercase; font-weight: bold; font-family: var(--headings-font); font-size: 0.9rem; letter-spacing: 1px; }
.article-title { font-size: 2.5rem !important; font-family: var(--body-font) !important; font-weight: bold; margin: 15px 0; line-height: 1.2; }

.article-meta-block { display: flex; align-items: center; gap: 15px; margin-top: 25px; }
.author-avatar-large img { border-radius: 50%; width: 50px; height: 50px; object-fit: cover; }
.meta-author { display: block; font-family: var(--body-font); font-weight: bold; color: #333; font-size: 1.05rem; }
.meta-date { display: block; font-family: var(--body-font); color: #777; font-size: 0.9rem; }

.entry-content { font-family: var(--body-font); font-size: 1.15rem; line-height: 1.8; color: #222; }
.entry-content p { margin-bottom: 25px; }
.entry-content img { max-width: 100%; height: auto; }

/* Sidebar Latest */
.single-sidebar { position: sticky; top: 20px; }
.sidebar-heading { font-size: 1.8rem; font-family: var(--body-font) !important; color: var(--primary-color); margin-bottom: 30px; border-bottom: none!important; }
.sidebar-card { display: flex; gap: 15px; margin-bottom: 25px; border-bottom: 1px dashed #ccc; padding-bottom: 20px; }
.sidebar-thumb img { width: 80px; height: 80px; object-fit: cover; }
.sidebar-cat { font-size: 0.75rem; letter-spacing: 1px; margin-bottom: 5px; display: block; }
.sidebar-title { font-size: 1rem !important; font-family: var(--body-font) !important; line-height: 1.3; font-weight: bold; margin:0;}

/* Suggested Reads (Dark Mode bottom cards) */
.suggested-reads-mobile { margin-top: 60px; padding-top: 40px; border-top: 2px solid #ccc; }
.suggested-title { color: var(--primary-color); font-family: var(--body-font) !important; font-size: 1.8rem; margin-bottom: 20px; }
.suggested-grid { display: flex; gap: 20px; }
.suggested-card { background: #1a1a1a; width: 50%; border-bottom: 4px solid var(--primary-color); }
.suggested-card img { width: 100%; height: 140px; object-fit: cover; filter: grayscale(100%); display:block; }
.suggested-text { padding: 15px; }
.sugg-category { color: var(--primary-color); text-transform: uppercase; font-size: 0.75rem; font-family: var(--headings-font); font-weight: bold; margin-bottom: 8px; display: block;}
.sugg-title a { color: #fff; font-family: var(--body-font) !important; font-weight: bold; font-size: 0.95rem; }

@media (max-width: 768px) {
    .single-post-container { display: flex; flex-direction: column; }
    .article-title { font-size: 2rem !important; }
    .single-sidebar { display: none; /* Hide standard sidebar on mobile reading view */ }
    .suggested-grid { flex-direction: column; }
    .suggested-card { width: 100%; }
}
