/*
 * C&C PREVENT — Noutăți (Blog Listing) + Single Article Page Styles
 * Loaded on: page-noutati.php, single.php
 * Shared classes: .ccp-blog-*, .ccp-widget, .ccp-cta-widget, .ccp-reveal
 * ==========================================================================
 */

/* --- BODY OVERRIDE (Astra nuclear fix) --- */
body.ccp-blog-dark,
body.ccp-single-dark {
    background-color: var(--bg-section-2) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body) !important;
    overflow-x: hidden;
}

body.ccp-blog-dark .site,
body.ccp-blog-dark .site-content,
body.ccp-blog-dark .ast-container,
body.ccp-blog-dark #primary,
body.ccp-blog-dark #content,
body.ccp-single-dark .site,
body.ccp-single-dark .site-content,
body.ccp-single-dark .ast-container,
body.ccp-single-dark #primary,
body.ccp-single-dark #content {
    background-color: transparent !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.ccp-blog-dark .ast-article-single .entry-header,
body.ccp-blog-dark .ast-post-title,
body.ccp-blog-dark .entry-title,
body.ccp-blog-dark .ast-archive-description,
body.ccp-blog-dark .ast-breadcrumbs-wrapper,
body.ccp-blog-dark .page-header,
body.ccp-blog-dark .ast-page-header-section,
body.ccp-blog-dark .ast-single-post-order,
body.ccp-single-dark .ast-article-single .entry-header,
body.ccp-single-dark .ast-post-title,
body.ccp-single-dark .entry-title,
body.ccp-single-dark .ast-archive-description,
body.ccp-single-dark .ast-breadcrumbs-wrapper,
body.ccp-single-dark .page-header,
body.ccp-single-dark .ast-page-header-section,
body.ccp-single-dark .ast-single-post-order {
    display: none !important;
}

/* --- WRAPPER --- */
#ccp-blog-wrapper,
#ccp-single-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 180px 0 80px !important;
    overflow: hidden;
    z-index: 1;
}

/* --- BACKGROUND --- */
.ccp-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 107, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

.ccp-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.ccp-bg-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(255, 107, 0, 0.08);
    top: -100px;
    right: -150px;
    animation: aacOrbFloat 20s ease-in-out infinite;
}

.ccp-bg-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(16, 185, 129, 0.05);
    bottom: 20%;
    left: -100px;
    animation: aacOrbFloat 25s ease-in-out infinite reverse;
}

@keyframes aacOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-30px, 40px) scale(1.1); }
}

/* --- CONTAINER --- */
.ccp-blog-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* --- PAGE HEADER --- */
.ccp-blog-header {
    text-align: left;
    margin-bottom: 4rem;
}

.ccp-blog-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.ccp-blog-label::before,
.ccp-blog-label::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent-gold);
    opacity: 0.5;
}

.ccp-blog-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.ccp-blog-title span {
    color: var(--accent-gold);
}

.ccp-blog-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.ccp-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-gold);
    padding-bottom: 2px;
    transition: all 0.3s;
}

.ccp-filter-reset:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* --- LAYOUT --- */
.ccp-blog-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 992px) {
    .ccp-blog-layout {
        flex-direction: row;
    }
    .ccp-blog-main,
    .ccp-single-main {
        width: 65%;
    }
    .ccp-blog-sidebar {
        width: 35%;
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
}

/* --- FEATURED POST --- */
.ccp-featured-post {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 40px;
    transition: all 0.4s ease;
}

.ccp-featured-post:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.ccp-featured-image {
    height: 400px;
    width: 100%;
    overflow: hidden;
    background: var(--bg-card);
}

@media (min-width: 768px) {
    .ccp-featured-image { height: 500px; }
}

.ccp-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.ccp-featured-post:hover .ccp-featured-image img {
    transform: scale(1.05);
}

.ccp-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-dark) 10%, rgba(5, 10, 20, 0.6) 50%, transparent 100%);
    z-index: 10;
}

.ccp-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 20;
}

@media (min-width: 768px) {
    .ccp-featured-content { padding: 40px; }
}

.ccp-meta-tags {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.8rem;
}

.ccp-tag-category {
    background: rgba(255, 107, 0, 0.15);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 0, 0.3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.ccp-tag-date {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ccp-featured-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    font-family: var(--font-display);
}

.ccp-featured-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.ccp-featured-title a:hover {
    color: var(--accent-gold);
}

.ccp-featured-excerpt {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- POSTS GRID --- */
.ccp-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .ccp-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

.ccp-post-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    height: 100%;
}

.ccp-post-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ccp-post-thumb-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.ccp-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ccp-post-card:hover .ccp-post-thumb {
    transform: scale(1.08);
}

.ccp-post-thumb-fallback {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    opacity: 0.4;
}

.ccp-post-thumb-fallback svg {
    width: 48px;
    height: 48px;
}

.ccp-post-tag-floating {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(4px);
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255, 107, 0, 0.3);
    z-index: 5;
}

.ccp-post-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ccp-post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
}

.ccp-post-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    font-family: var(--font-display);
}

.ccp-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.ccp-post-title a:hover {
    color: var(--accent-gold);
}

.ccp-post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- EMPTY STATE --- */
.ccp-empty-state {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 107, 0, 0.3);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
}

.ccp-empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 auto 20px;
    display: block;
}

.ccp-empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.ccp-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* --- BUTTONS --- */
.ccp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.ccp-btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.ccp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.ccp-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.ccp-btn-outline:hover {
    background: rgba(255, 107, 0, 0.08);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.ccp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin-top: 40px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.ccp-view-all:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* --- SIDEBAR WIDGETS --- */
.ccp-widget {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
}

.ccp-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-gold);
    font-family: var(--font-display);
}

.ccp-search-form {
    position: relative;
}

.ccp-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 40px 12px 16px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

.ccp-search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.ccp-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.ccp-search-btn:hover {
    color: var(--accent-gold);
}

.ccp-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.ccp-category-list li:last-child {
    margin-bottom: 0;
}

.ccp-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.ccp-cat-link:hover,
.ccp-cat-link.active {
    color: var(--accent-gold);
    background: rgba(255, 107, 0, 0.08);
    padding-left: 1.2rem;
}

.ccp-cat-name {
    transition: transform 0.3s;
}

.ccp-cat-link:hover .ccp-cat-name {
    transform: translateX(4px);
}

.ccp-cat-count {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* --- CTA WIDGET --- */
.ccp-cta-widget {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(5, 10, 20, 0.95));
    border: 1px solid rgba(255, 107, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ccp-cta-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.ccp-cta-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
}

.ccp-cta-icon svg {
    width: 28px;
    height: 28px;
}

.ccp-cta-widget h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
}

.ccp-cta-widget p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.ccp-btn-cta {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    width: 100%;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
    box-sizing: border-box;
    text-align: center;
}

.ccp-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.ccp-cta-contact {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 2;
}

.ccp-cta-contact span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ccp-cta-contact svg {
    width: 14px;
    height: 14px;
}

/* --- REVEAL ANIMATIONS --- */
.ccp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

.ccp-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
