/*
Theme Name: PDA News
Theme URI: https://pda-news.ru
Description: Современная тема для технологического новостного портала о электронике и компьютерном железе
Version: 1.0
Author: PDA News Team
Author URI: https://pda-news.ru
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pda-news
Tags: news, technology, responsive, modern, blog
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-bg);
    margin: 0;
    padding: 0;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.header-top {
    background: var(--dark-bg);
    color: #fff;
    padding: 8px 0;
    font-size: 0.875rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

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

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

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-logo {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo:hover {
    color: var(--secondary-color);
}

/* Navigation */
.main-navigation {
    flex: 1;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.main-navigation a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.current {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
    width: 100%;
}

/* Search Form */
.header-search {
    position: relative;
}

.header-search input[type="search"] {
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    width: 250px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.header-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 300px;
}

.header-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content Area */
.site-main {
    padding: 40px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Featured Post */
.featured-post {
    margin-bottom: 40px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 500px;
    background: var(--darker-bg);
}

.featured-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.featured-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

.featured-post-category {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.featured-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.featured-post-meta {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Post Card */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--border-color);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-content {
    padding: 24px;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.post-card:hover .post-title {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.post-date,
.post-comments {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.widget {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.widget a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--primary-color);
}

/* Popular Posts Widget */
.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

.popular-post-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.popular-post-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Single Post */
.single-post {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

.single-post-header {
    margin-bottom: 32px;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.single-post-thumbnail {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.single-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-post-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 32px 0 16px;
}

.single-post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content img {
    border-radius: 8px;
    margin: 24px 0;
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer-widget h3 {
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-main .container {
        flex-direction: column;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

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

    .featured-post-title {
        font-size: 1.75rem;
    }

    .single-post {
        padding: 24px;
    }

    .single-post-title {
        font-size: 1.875rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--card-shadow);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: #fff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease;
}
