/*
Theme Name: Indostroy
Theme URI: https://example.com/indostroy
Author: Grok Theme
Author URI: https://x.ai
Description: Современный шаблон WordPress, вдохновлённый строительным порталом Indostroy.ru. Каталог компаний, новости, статьи, тендеры.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: indostroy
Tags: construction, news, blog, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f4f6f8;
}

a {
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #e67e22;
}

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

ul, ol {
    list-style: none;
}

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

.site-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 30px 0 50px;
}

@media (max-width: 900px) {
    .site-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Header ===== */
.site-header {
    background: #1a3a5c;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-top {
    background: #142d47;
    padding: 8px 0;
    font-size: 0.85rem;
}

.header-top .site-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: #b0c4de;
}

.header-top a:hover {
    color: #e67e22;
}

.header-main {
    padding: 15px 0;
}

.header-main .site-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

.site-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.site-title span {
    color: #e67e22;
}

.site-description {
    font-size: 0.8rem;
    color: #a0b4cc;
    margin-top: 2px;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.main-navigation a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: #e67e22;
    color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: #e67e22;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #142d47;
        padding: 10px;
        margin-top: 10px;
    }
    .main-navigation.toggled ul {
        display: flex;
    }
}

/* ===== Hero / Page Title ===== */
.page-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c5a8a 100%);
    color: #fff;
    padding: 40px 0;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.page-header p {
    opacity: 0.9;
    margin-top: 8px;
}

/* ===== Sections ===== */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e67e22;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title a {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e67e22;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.news-card .post-thumbnail {
    height: 160px;
    background: #dce4ec;
    overflow: hidden;
}

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

.news-card .card-body {
    padding: 16px;
}

.news-card .entry-meta {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.news-card .entry-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-card .entry-title a {
    color: #1a3a5c;
}

.news-card .entry-title a:hover {
    color: #e67e22;
}

.news-card .entry-summary {
    font-size: 0.9rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Articles list style */
.articles-list .news-card {
    display: flex;
    flex-direction: row;
}

.articles-list .news-card .post-thumbnail {
    width: 140px;
    min-width: 140px;
    height: auto;
}

.articles-list .news-card .card-body {
    flex: 1;
}

@media (max-width: 600px) {
    .articles-list .news-card {
        flex-direction: column;
    }
    .articles-list .news-card .post-thumbnail {
        width: 100%;
        height: 160px;
    }
}

/* ===== Single / Page content ===== */
.entry-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    color: #1a3a5c;
    margin: 1.5em 0 0.6em;
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content ul,
.entry-content ol {
    margin: 1em 0 1em 1.5em;
    list-style: disc;
}

.entry-content img {
    border-radius: 6px;
    margin: 1.5em 0;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-header .entry-title {
    font-size: 1.8rem;
    color: #1a3a5c;
    margin-bottom: 10px;
}

.entry-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e67e22;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #2c3e50;
}

.widget a:hover {
    color: #e67e22;
}

/* Popular news widget style */
.popular-news-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.popular-news-item .thumb {
    width: 70px;
    height: 55px;
    background: #dce4ec;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-news-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-news-item .info .date {
    font-size: 0.75rem;
    color: #95a5a6;
}

.popular-news-item .info .title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

/* ===== Footer ===== */
.site-footer {
    background: #1a3a5c;
    color: #b0c4de;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widgets .widget-title {
    color: #fff;
    border-bottom-color: #e67e22;
}

.footer-widgets a {
    color: #b0c4de;
}

.footer-widgets a:hover {
    color: #e67e22;
}

.site-info {
    border-top: 1px solid #2c5a8a;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.site-info a {
    color: #e67e22;
}

/* ===== Buttons & Misc ===== */
.btn {
    display: inline-block;
    background: #e67e22;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #d35400;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e67e22;
}

/* Pagination */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    color: #1a3a5c;
}

.pagination .current {
    background: #e67e22;
    color: #fff;
}

/* Search form */
.search-form {
    display: flex;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.95rem;
}

.search-form button {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Catalog categories (example) */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.catalog-item {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.2s;
}

.catalog-item:hover {
    background: #1a3a5c;
    color: #fff;
}

.catalog-item:hover a {
    color: #fff;
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
