/*
Theme Name: Thanjavur District News
Theme URI: https://example.com/thanjavur-district-news
Author: Your Name
Author URI: https://example.com
Description: A lightweight news theme inspired by Times of India layout for Thanjavur District News.
Version: 1.0
Text Domain: thanjavur-news
*/

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Mukta Malar', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Latha', 'Nirmala UI', sans-serif;
    background: #ffffff;
    color: #222222;
    line-height: 1.6;
}

a {
    color: #d32f2f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-content {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 16px 32px;
}

.site-header {
    border-bottom: 3px solid #d32f2f;
    background: #ffffff;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: #d32f2f;
}

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

.header-search {
    max-width: 320px;
    width: 100%;
}

.header-search form {
    display: flex;
    width: 100%;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #cccccc;
    border-right: 0;
    font-size: 14px;
}

.header-search input[type="submit"],
.header-search button[type="submit"] {
    padding: 6px 10px;
    border: none;
    background: #d32f2f;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.main-navigation {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: #333333;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

.menu-label {
    margin-left: 8px;
    font-weight: 600;
}

.primary-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0 16px;
}

.primary-menu > li {
    margin-right: 24px;
}

.primary-menu > li:last-child {
    margin-right: 0;
}

.primary-menu a {
    display: block;
    padding: 12px 0;
    font-weight: 600;
    color: #111111;
}

.breaking-news-bar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #b71c1c;
    color: #ffffff;
}

.breaking-label {
    font-weight: 700;
    margin-right: 16px;
    text-transform: uppercase;
    font-size: 14px;
}

.breaking-ticker {
    overflow: hidden;
    flex: 1;
}

.breaking-ticker ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ticker-item {
    display: none;
    white-space: nowrap;
}

.ticker-item.is-active {
    display: inline-block;
}

.ticker-item a {
    color: #ffffff;
    font-size: 14px;
}

.top-news-section .featured-and-top {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 24px;
}

.featured-article {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
}

.featured-thumb {
    margin-bottom: 10px;
}

.featured-title {
    font-size: 24px;
    margin: 12px 0 8px;
}

.featured-title a {
    color: #111111;
}

.featured-meta {
    font-size: 12px;
    color: #757575;
    margin-bottom: 8px;
}

.featured-excerpt {
    font-size: 14px;
}

.top-stories {
    border-left: 1px solid #e0e0e0;
    padding-left: 24px;
}

.section-title {
    font-size: 18px;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 4px;
    margin: 0 0 12px;
}

.top-story-item {
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.top-story-item:last-child {
    border-bottom: none;
}

.top-story-title {
    font-size: 15px;
    margin: 0 0 4px;
}

.top-story-title a {
    color: #222222;
}

.top-story-meta {
    font-size: 12px;
    color: #757575;
}

.categories-grid-section {
    margin-top: 32px;
}

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

.category-block {
    border-top: 3px solid #d32f2f;
    padding-top: 8px;
}

.category-title {
    font-size: 16px;
    margin: 0 0 8px;
}

.category-title a {
    color: #111111;
}

.category-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-post-item {
    padding: 4px 0;
    border-bottom: 1px dotted #e0e0e0;
    font-size: 14px;
}

.category-post-item:last-child {
    border-bottom: none;
}

.site-footer {
    border-top: 3px solid #d32f2f;
    padding: 16px;
    background: #f5f5f5;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .top-news-section .featured-and-top {
        grid-template-columns: 1fr;
    }

    .top-stories {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e0e0e0;
        padding-top: 16px;
    }

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

@media (max-width: 600px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-search {
        margin-top: 8px;
        width: 100%;
    }

    .header-search form {
        width: 100%;
    }

    .primary-menu {
        flex-direction: column;
        padding: 0 16px 8px;
        display: none;
    }

    .primary-menu.menu-open {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

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