/*
 Theme Name:   PC Parts Blog
 Theme URI:    https://blog.pcparts.ro
 Description:  Custom theme matching pcparts.ro blog design
 Author:       PC Parts
 Author URI:   https://pcparts.ro
 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:  pcparts-blog
 Requires at least: 6.0
 Requires PHP: 8.0
*/

/* ============================================
   Reset & Variables
   ============================================ */
:root {
    --theme-black: #111111;
    --theme-dark-gray: #282828;
    --theme-gray: #555555;
    --theme-light-gray: #F0F0F0;
    --theme-orange: #F15A29;
    --theme-orange-dark: #d64c20;
    --theme-white: #FFFFFF;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 19px;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
    --header-height: 70px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--theme-light-gray);
    color: var(--theme-dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 20px;
    background-color: var(--theme-black);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    transition: padding var(--transition), background-color var(--transition);
}

.site-header.scrolled {
    background-color: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(5px);
}

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

.site-branding .logo-link {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--theme-white);
    text-decoration: none;
    gap: 10px;
}

.site-branding .logo-icon {
    color: var(--theme-orange);
    font-size: 1.3rem;
    transition: transform var(--transition);
}

.site-branding .logo-link:hover .logo-icon {
    transform: rotate(20deg) scale(1.1);
}

.site-branding .logo-text-bold {
    color: var(--theme-white);
    font-weight: 700;
}

.site-branding .logo-text-accent {
    color: var(--theme-orange);
    font-weight: 700;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.main-nav ul li a {
    color: var(--theme-white);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-nav ul li a:hover {
    color: var(--theme-orange);
}

.main-nav ul li a .nav-icon {
    font-size: 0.85rem;
}

/* Dropdown */
.main-nav ul li.has-dropdown {
    position: relative;
}

.main-nav ul li.has-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--theme-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    padding: 8px 0;
    z-index: 100;
    margin-top: 8px;
}

.main-nav ul li.has-dropdown:hover .dropdown-menu {
    display: block;
}

.main-nav ul li.has-dropdown .dropdown-menu a {
    color: var(--theme-dark-gray);
    padding: 10px 20px;
    display: block;
    font-size: 0.9rem;
    border-radius: 0;
}

.main-nav ul li.has-dropdown .dropdown-menu a:hover {
    background: var(--theme-light-gray);
    color: var(--theme-orange);
}

.main-nav ul li.has-dropdown .dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--theme-light-gray);
    margin: 4px 0;
}

/* Right-side nav items */
.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-right a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.nav-right a:hover {
    color: var(--theme-orange);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--theme-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   Hero Section (Blog Home)
   ============================================ */
.blog-hero {
    margin-top: var(--header-height);
    padding: 60px 20px 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--theme-black);
    margin-bottom: 16px;
}

.blog-hero .hero-description {
    font-size: 1.1rem;
    color: var(--theme-gray);
    max-width: 700px;
    line-height: 1.7;
}

/* ============================================
   Featured Post Card
   ============================================ */
.featured-post {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.featured-post-card {
    background: var(--theme-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

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

.featured-badge {
    display: inline-block;
    background: var(--theme-orange);
    color: var(--theme-white);
    padding: 4px 14px;
    border-radius: var(--border-radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.featured-post-card h2 {
    margin: 0;
}

.featured-post-card h2 a {
    color: var(--theme-orange);
    font-size: 1.5rem;
    font-weight: 700;
}

.featured-post-card h2 a:hover {
    color: var(--theme-orange-dark);
}

.featured-post-card .featured-excerpt {
    color: var(--theme-gray);
    margin-top: 8px;
    font-size: 0.95rem;
}

.featured-post-card .featured-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--theme-gray);
    font-size: 0.85rem;
}

.featured-post-icon {
    font-size: 4rem;
    color: var(--theme-light-gray);
    opacity: 0.7;
}

/* ============================================
   Articles Section
   ============================================ */
.articles-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.articles-main h3.section-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--theme-black);
    margin-bottom: 24px;
}

/* Post Card */
.post-card {
    background: var(--theme-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.post-card-inner {
    display: flex;
    gap: 0;
}

.post-card .post-thumbnail {
    flex: 0 0 280px;
    overflow: hidden;
}

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

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

.post-card .post-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card .post-content h4 {
    margin: 0 0 8px;
}

.post-card .post-content h4 a {
    color: var(--theme-black);
    font-weight: 700;
    font-size: 1.1rem;
}

.post-card .post-content h4 a:hover {
    color: var(--theme-orange);
}

.post-card .post-excerpt {
    color: var(--theme-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--theme-gray);
    margin-bottom: 12px;
}

.post-card .post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.post-tag {
    display: inline-block;
    background: var(--theme-light-gray);
    color: var(--theme-gray);
    padding: 3px 12px;
    border-radius: var(--border-radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--transition);
}

.post-tag:hover {
    background: var(--theme-orange);
    color: var(--theme-white);
}

.read-more-link {
    display: inline-block;
    color: var(--theme-orange);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

.read-more-link:hover {
    color: var(--theme-orange-dark);
}

/* Post card without thumbnail */
.post-card-simple .post-card-inner {
    display: block;
}

.post-card-simple .post-content {
    padding: 20px 24px;
}

/* ============================================
   Sidebar
   ============================================ */
.articles-sidebar h3.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-black);
    margin-bottom: 16px;
}

.sidebar-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-tag {
    display: inline-block;
    background: var(--theme-white);
    color: var(--theme-dark-gray);
    padding: 8px 18px;
    border-radius: var(--border-radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.topic-tag:hover {
    background: var(--theme-orange);
    color: var(--theme-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--theme-orange) 0%, var(--theme-orange-dark) 100%);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-top: 30px;
    color: var(--theme-white);
}

.newsletter-cta h4 {
    color: var(--theme-white);
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-cta p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--theme-black);
    color: var(--theme-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.newsletter-form button:hover {
    background: var(--theme-dark-gray);
    transform: translateY(-1px);
}

/* ============================================
   Single Post
   ============================================ */
.single-post-container {
    max-width: 800px;
    margin: calc(var(--header-height) + 40px) auto 60px;
    padding: 0 20px;
}

.single-post-article {
    background: var(--theme-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    overflow: hidden;
}

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

.single-post-article .post-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--theme-black);
    line-height: 1.3;
    margin-bottom: 16px;
}

.single-post-article .post-header .post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--theme-gray);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.single-post-article .post-featured-image {
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-bottom: 30px;
    overflow: hidden;
}

.single-post-article .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article content */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--theme-dark-gray);
}

.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--theme-black);
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--theme-black);
}

.entry-content p {
    margin-bottom: 1.25rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--theme-orange);
    background: var(--theme-light-gray);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-style: italic;
}

.entry-content pre {
    background: var(--theme-dark-gray);
    color: var(--theme-light-gray);
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.entry-content code {
    background: var(--theme-light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.entry-content pre code {
    background: transparent;
    padding: 0;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content img {
    border-radius: var(--border-radius-md);
    margin: 1rem 0;
}

/* Back to blog link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--theme-gray);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color var(--transition);
}

.back-to-blog:hover {
    color: var(--theme-orange);
}

/* CTA after post */
.post-cta-banner {
    background: linear-gradient(135deg, var(--theme-black) 0%, var(--theme-dark-gray) 100%);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.post-cta-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(241, 90, 41, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(241, 90, 41, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.post-cta-banner h3 {
    color: var(--theme-white);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.post-cta-banner p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.post-cta-banner .cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--theme-orange) 0%, var(--theme-orange-dark) 100%);
    color: var(--theme-white);
    padding: 12px 32px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    position: relative;
    z-index: 1;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(241, 90, 41, 0.3);
}

.post-cta-banner .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(241, 90, 41, 0.4);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: var(--theme-black);
    color: rgba(255,255,255,0.7);
    padding: 50px 20px 30px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h5 {
    color: var(--theme-white);
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--theme-orange);
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ============================================
   Pagination
   ============================================ */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-block;
    padding: 10px 16px;
    background: var(--theme-white);
    color: var(--theme-dark-gray);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.pagination-wrap a:hover,
.pagination-wrap .current {
    background: var(--theme-orange);
    color: var(--theme-white);
}

/* ============================================
   Comments
   ============================================ */
.comments-area {
    margin-top: 40px;
}

.comments-area h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

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

.comment-body {
    background: var(--theme-light-gray);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.comment-author {
    font-weight: 700;
    color: var(--theme-black);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: border-color var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--theme-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(241, 90, 41, 0.1);
}

.comment-form .submit {
    background: linear-gradient(135deg, var(--theme-orange) 0%, var(--theme-orange-dark) 100%);
    color: var(--theme-white);
    border: none;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(241, 90, 41, 0.3);
}

.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(241, 90, 41, 0.4);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
    .articles-section {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 15px;
    }
    
    .main-nav, .nav-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .featured-post-card {
        padding: 20px;
    }
    
    .post-card .post-card-inner {
        flex-direction: column;
    }
    
    .post-card .post-thumbnail {
        flex: 0 0 200px;
    }
    
    .single-post-article {
        padding: 24px;
    }
    
    .single-post-article .post-featured-image {
        width: calc(100% + 48px);
        margin-left: -24px;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 40px 15px 30px;
    }
    
    .blog-hero h1 {
        font-size: 1.5rem;
    }
    
    .featured-post-card h2 a {
        font-size: 1.2rem;
    }
}
