/*
Theme Name: Celebrity Blog
Theme URI: https://example.com/celebrity-blog
Author: MiMoCode
Author URI: https://example.com
Description: Современный шаблон для блога о знаменитостях
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: celebrity-blog
*/

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

:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --secondary-color: #9c27b0;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-surface: #0f3460;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border-color: #2a2a4a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

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

/* Container */
.wrap-center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

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

.logo img {
    height: 40px;
}

.logo-accent {
    color: var(--primary-color);
}

/* Search */
.search-box {
    flex: 1;
    max-width: 400px;
}

.search-box form {
    display: flex;
    background: var(--bg-surface);
    border-radius: 25px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    padding: 12px 20px;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Navigation */
.main-nav {
    background: var(--bg-surface);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
    padding: 10px 0;
    overflow-x: auto;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--text-primary);
    border-radius: 25px;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-list li a:hover,
.nav-list li a.active {
    background: var(--primary-color);
}

.nav-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero-content {
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.content-area {
    min-width: 0;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    margin-right: 12px;
    vertical-align: middle;
}

/* Sort Links */
.sort-links {
    display: flex;
    gap: 15px;
}

.sort-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.sort-links a:hover,
.sort-links a.active {
    color: var(--primary-color);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Article Card */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(233, 30, 99, 0.2);
}

.article-card a {
    display: block;
    color: inherit;
}

.article-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.article-stats {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 13px;
}

.article-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 15px;
}

.article-content {
    padding: 15px;
}

.article-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
}

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

.pagination .current {
    background: var(--primary-color);
}

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

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

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

/* Popular Posts */
.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

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

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

.popular-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.popular-post-title a {
    color: var(--text-primary);
}

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

.popular-post-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-surface);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
}

.category-list li a:hover {
    background: var(--primary-color);
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 14px;
    background: var(--bg-surface);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Single Post */
.single-post {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    position: relative;
}

.single-post .post-header,
.single-post .post-content,
.single-post .post-tags {
    position: relative;
    z-index: 1;
}

.post-thumbnail {
    width: 100%;
    line-height: 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
}

.post-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.post-category {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-content {
    padding: 30px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 200px;
}

.post-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 25px 0 15px;
    color: var(--primary-color);
    line-height: 1.4;
}

.post-content h2 {
    font-size: 1.5rem;
}

.post-content h3 {
    font-size: 1.3rem;
}

.post-content img {
    border-radius: 8px;
    margin: 20px 0;
    max-width: 100%;
    height: auto;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content ul,
.post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
    padding: 15px 20px;
    background: var(--bg-surface);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content pre {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content code {
    background: var(--bg-surface);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.post-content th,
.post-content td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-content th {
    background: var(--bg-surface);
    font-weight: 600;
}

.post-content .wp-caption {
    max-width: 100%;
}

.post-content .wp-caption-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.post-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.post-content .gallery-item {
    overflow: hidden;
    border-radius: 8px;
}

.post-content .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.post-navigation a {
    color: var(--text-primary);
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 48%;
}

.post-navigation a:hover {
    background: var(--primary-color);
    color: white;
}

.nav-prev {
    flex: 1;
}

.nav-next {
    flex: 1;
    text-align: right;
}

.nav-next a {
    justify-content: flex-end;
    margin-left: auto;
}

/* Comments Section */
.comments-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 30px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.comment-list .comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.comment-reply-link {
    font-size: 12px;
    color: var(--primary-color);
}

/* Comment Form */
.comment-respond {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.comment-reply-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
    margin-bottom: 15px;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input,
.comment-form-comment textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus,
.comment-form-comment textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form-comment textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit input[type="submit"] {
    padding: 12px 30px;
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit input[type="submit"]:hover {
    background: var(--primary-dark);
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.archive-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
}

.footer-links ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
}

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

.footer-disclaimer {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

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

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

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

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

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

    .nav-list {
        padding: 10px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}
