/*
Theme Name: OrangePulse
Theme URI: https://example.com/orangepulse
Author: Developer
Author URI: https://example.com
Description: Светлая адаптивная тема с оранжевым акцентом, градиентами и SVG-иконками.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orangepulse
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange-primary: #FF6B00;
    --orange-light: #FF8C33;
    --orange-lighter: #FFB066;
    --orange-lightest: #FFF3E6;
    --orange-dark: #E55D00;
    --gradient-primary: linear-gradient(135deg, #FF6B00, #FF8C33);
    --gradient-header: linear-gradient(90deg, #FF6B00, #FFA040);
    --gradient-card: linear-gradient(180deg, #FF6B00, #FF8C33);
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-muted: #888888;
    --bg-white: #FFFFFF;
    --bg-light: #F8F8F8;
    --bg-card: #FFFFFF;
    --border-light: #E8E8E8;
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(255,107,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --max-width: 1280px;
    --sidebar-max: 300px;
    --transition: 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--orange-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--orange-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--gradient-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(255,107,0,0.2);
}

.header-nav {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 20px;
}

.site-branding a {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-branding svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* Primary Menu */
.primary-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.primary-menu li a {
    color: rgba(255,255,255,0.9);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item a {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.primary-menu li a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Search */
.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 30px;
    overflow: hidden;
    transition: background var(--transition);
}

.header-search .search-form:focus-within {
    background: rgba(255,255,255,0.35);
}

.header-search .search-field {
    border: none;
    background: transparent;
    color: #fff;
    padding: 8px 14px;
    font-size: 0.9rem;
    width: 180px;
    outline: none;
}

.header-search .search-field::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search .search-submit {
    border: none;
    background: transparent;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.header-search .search-submit svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

/* Banner */
.header-banner {
    background: var(--bg-light);
}

.header-banner .container {
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
}

/* ===== FOOTER ===== */
.footer-banner {
    background: var(--bg-light);
}

.footer-banner .container {
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
}

.site-footer-bar {
    background: var(--gradient-header);
    color: #fff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.footer-copyright {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-copyright svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.scroll-top-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}

.scroll-top-btn:hover {
    background: rgba(255,255,255,0.35);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ===== SECTIONS ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-title svg {
    width: 24px;
    height: 24px;
    fill: var(--orange-primary);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-left: 10px;
}

/* ===== FEATURED 4 POSTS (круглые превью) ===== */
.featured-row {
    padding: 30px 0;
}

.featured-row-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.featured-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.featured-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.featured-item-thumb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--orange-lighter);
}

.featured-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-item-thumb--placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-item-thumb--placeholder svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

.featured-item-info {
    flex: 1;
    min-width: 0;
}

.featured-item-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.featured-item-info h3 a {
    color: var(--text-primary);
}

.featured-item-info h3 a:hover {
    color: var(--orange-primary);
}

.featured-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-item-date svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* ===== EDITOR'S PICKS ===== */
.editors-picks {
    padding: 30px 0;
    background: var(--orange-lightest);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.editors-picks::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.editors-picks .container {
    position: relative;
}

.editors-picks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===== CARD (общий стиль) ===== */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.post-card-thumb {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.post-card-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.05);
}

.post-card-thumb--placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-thumb--placeholder svg {
    width: 48px;
    height: 48px;
    fill: rgba(255,255,255,0.5);
}

.post-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.post-card-categories a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-categories a svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
}

.post-card-title a {
    color: var(--text-primary);
}

.post-card-title a:hover {
    color: var(--orange-primary);
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-meta svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* ===== LATEST POSTS GRID ===== */
.latest-posts {
    padding: 30px 0;
}

.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===== PAGINATION ===== */
.pagination-wrap {
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination-wrap .nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    margin: 2px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.pagination-wrap .page-numbers:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
}

.pagination-wrap .page-numbers.current {
    background: var(--gradient-primary);
    border-color: var(--orange-primary);
    color: #fff;
}

.pagination-wrap .page-numbers svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== ARCHIVE HEADER ===== */
.archive-header {
    padding: 30px 0 10px;
}

.archive-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-header h1 svg {
    width: 28px;
    height: 28px;
    fill: var(--orange-primary);
}

.archive-header p {
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ===== SINGLE / PAGE ===== */
.single-layout {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.single-content {
    flex: 1;
    min-width: 0;
}

.single-sidebar {
    width: 25%;
    max-width: var(--sidebar-max);
    flex-shrink: 0;
}

.single-sidebar:empty {
    display: none;
}

.single-sidebar:empty + .single-content,
.single-layout:not(:has(.single-sidebar)) .single-content,
.single-layout .single-content:only-child {
    width: 100%;
    max-width: 100%;
}

.entry-header h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.2em;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
    margin: 1.5em 0 0.5em;
    font-weight: 700;
}

.entry-content h2 {
    font-size: 1.5rem;
}

.entry-content h3 {
    font-size: 1.25rem;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 1em 0;
}

.entry-content ul, .entry-content ol {
    margin: 0 0 1.2em 1.5em;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: var(--orange-lighter);
    text-underline-offset: 3px;
}

.entry-content a:hover {
    text-decoration-color: var(--orange-primary);
}

/* Blockquote */
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 24px 24px 24px 28px;
    border-left: 4px solid var(--orange-primary);
    background: var(--orange-lightest);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
}

.entry-content blockquote::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 10px;
    width: 28px;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF6B00' opacity='0.25' d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.entry-content blockquote p {
    margin-bottom: 0;
    padding-left: 0;
}

.entry-content blockquote p:first-child {
    padding-top: 6px;
}

/* Entry footer meta */
.entry-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 2px solid var(--border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.entry-footer-meta .entry-cats a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 6px;
}

.entry-footer-meta .entry-cats a svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.entry-footer-meta .entry-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.entry-footer-meta .entry-date svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* Related posts */
.related-posts {
    margin-top: 40px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-posts .post-card-categories {
    gap: 4px;
    margin-bottom: 6px;
}

.related-posts .post-card-categories a {
    font-size: 0.65rem;
    padding: 2px 7px;
    letter-spacing: 0.3px;
}

.related-posts .post-card-categories a svg {
    width: 10px;
    height: 10px;
}

.related-posts .post-card-title {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.related-posts .post-card-meta {
    font-size: 0.75rem;
}

.related-posts .post-card-meta svg {
    width: 12px;
    height: 12px;
}

.related-posts .post-card-body {
    padding: 10px 12px;
}

/* ===== SIDEBAR ===== */
.sidebar .widget {
    margin-bottom: 28px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--orange-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .widget ul {
    list-style: none;
}

.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar .widget ul li:last-child {
    border-bottom: none;
}

.sidebar .widget ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar .widget ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--orange-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar .widget ul li a:hover {
    color: var(--orange-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .featured-row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-nav {
        flex-wrap: wrap;
    }

    .primary-menu-wrap {
        display: none;
        width: 100%;
        order: 10;
    }

    .primary-menu-wrap.active {
        display: block;
    }

    .primary-menu {
        flex-direction: column;
        padding: 10px 0;
    }

    .primary-menu li a {
        padding: 10px 14px;
    }

    .header-search {
        order: 5;
    }

    .header-search .search-field {
        width: 120px;
    }

    .featured-row-grid {
        grid-template-columns: 1fr;
    }

    .editors-picks-grid,
    .latest-posts-grid {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .single-layout {
        flex-direction: column;
    }

    .single-sidebar {
        display: none;
    }

    .footer-inner {
        height: auto;
        padding: 14px 0;
    }

    .entry-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-search .search-field {
        width: 80px;
    }
}

/* Utility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ===== Рекламный блок ===== */
.carsecrets-content-2 {
    background: linear-gradient(135deg, #FF8C00 0%, #C43E00 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 35px 0;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.25);
}

.carsecrets-content-2 h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3em;
    line-height: 1.4;
}

.carsecrets-content-2 p {
    color: #f8f9fa;
    line-height: 1.6;
    margin-bottom: 15px;
}

.carsecrets-content-2 p:last-child {
    margin-bottom: 0;
}

.carsecrets-content-2 a {
    color: #ffdf00;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s ease;
}

.carsecrets-content-2 a:hover {
    color: #ffffff;
}