/*
Theme Name: RetroVibe
Theme URI: https://retrovibevideo.com
Author: RetroVibe Team
Author URI: https://retrovibevideo.com
Description: A synthwave-inspired WordPress theme with neon cyan and pink aesthetics. SEO-optimized, RankMath compatible, with schema markup, CTA blocks, and newsletter integration. Built for the RetroVibe Video Capture blog.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: retrovibe
Tags: blog, one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================================================================
   CSS CUSTOM PROPERTIES — Warm Editorial / Vintage Camera Palette
   =================================================================== */
:root {
    /* Core palette — warm paper + amber */
    --rv-bg-deep:     #faf7f2;
    --rv-bg-surface:  #f2ede4;
    --rv-bg-card:     #ffffff;
    --rv-bg-elevated: #ede8de;

    /* Accent colours — warm amber & deep navy */
    --rv-cyan:        #b86b2a;   /* amber/rust — replaces all cyan usage */
    --rv-cyan-glow:   rgba(184, 107, 42, 0.15);
    --rv-cyan-dim:    rgba(184, 107, 42, 0.12);
    --rv-pink:        #1e3a5f;   /* deep navy — replaces all pink usage */
    --rv-pink-glow:   rgba(30, 58, 95, 0.12);
    --rv-pink-dim:    rgba(30, 58, 95, 0.08);
    --rv-purple:      #7c3d2a;
    --rv-orange:      #c45a1e;
    --rv-yellow:      #d4a017;

    /* Text */
    --rv-text-primary:   #1a1510;
    --rv-text-secondary: #5a4e42;
    --rv-text-muted:     #8a7e72;

    /* Gradients */
    --rv-gradient-hero:   linear-gradient(135deg, #fdf9f2 0%, #f5ede0 50%, #ede5d5 100%);
    --rv-gradient-card:   linear-gradient(145deg, #ffffff 0%, #faf7f2 100%);
    --rv-gradient-neon:   linear-gradient(90deg, var(--rv-cyan), var(--rv-orange));
    --rv-gradient-sunset: linear-gradient(180deg, #b86b2a 0%, #c45a1e 50%, #d4a017 100%);

    /* Typography — editorial serif + clean sans */
    --rv-font-display: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    --rv-font-heading: 'Lato', 'Source Sans 3', system-ui, sans-serif;
    --rv-font-body:    'Lato', 'Source Sans 3', system-ui, sans-serif;
    --rv-font-mono:    'Share Tech Mono', 'JetBrains Mono', monospace;

    /* Spacing */
    --rv-space-xs:  0.25rem;
    --rv-space-sm:  0.5rem;
    --rv-space-md:  1rem;
    --rv-space-lg:  1.5rem;
    --rv-space-xl:  2.5rem;
    --rv-space-2xl: 4rem;

    /* Layout */
    --rv-max-width:     1280px;
    --rv-sidebar-width: 320px;
    --rv-radius:        5px;
    --rv-radius-lg:     10px;

    /* Borders */
    --rv-border:       #e0d8cc;
    --rv-border-light: #ede8de;

    /* Transitions */
    --rv-transition:      0.25s ease;
    --rv-transition-slow: 0.5s ease;

    /* Shadows */
    --rv-shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --rv-shadow:    0 2px 12px rgba(0,0,0,0.08);
    --rv-shadow-lg: 0 4px 24px rgba(0,0,0,0.10);
}

/* ===================================================================
   RESET & BASE
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--rv-font-body);
    background: var(--rv-bg-deep);
    color: var(--rv-text-primary);
    line-height: 1.75;
    overflow-x: hidden;
}

/* NO scanline overlay, NO perspective grid — clean & readable */

a { color: var(--rv-cyan); text-decoration: none; transition: color var(--rv-transition); }
a:hover { color: var(--rv-orange); }

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

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--rv-font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--rv-text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; font-family: var(--rv-font-heading); font-weight: 700; }

p { margin-bottom: var(--rv-space-md); }

/* ===================================================================
   UTILITY
   =================================================================== */
.rv-container {
    max-width: var(--rv-max-width);
    margin: 0 auto;
    padding: 0 var(--rv-space-lg);
}

.rv-logo {
    font-family: var(--rv-font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--rv-text-primary);
    letter-spacing: 0.01em;
    text-decoration: none;
}

.rv-logo:hover { color: var(--rv-cyan); }

.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

/* ===================================================================
   HEADER
   =================================================================== */
.rv-header {
    background: #ffffff;
    border-bottom: 2px solid var(--rv-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--rv-shadow-sm);
}

.rv-header__inner {
    max-width: var(--rv-max-width);
    margin: 0 auto;
    padding: 0 var(--rv-space-lg);
    display: flex;
    align-items: center;
    gap: var(--rv-space-xl);
    height: 68px;
}

.rv-header__brand {
    flex-shrink: 0;
}

/* Navigation */
.rv-nav { flex: 1; }

.rv-nav ul {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.rv-nav ul a {
    display: block;
    padding: 0.45rem 0.9rem;
    font-family: var(--rv-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rv-text-secondary);
    letter-spacing: 0.02em;
    border-radius: var(--rv-radius);
    transition: var(--rv-transition);
}

.rv-nav ul a:hover,
.rv-nav ul li.current-menu-item > a,
.rv-nav ul li.current_page_item > a {
    color: var(--rv-cyan);
    background: var(--rv-cyan-dim);
}

/* Dropdown */
.rv-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-lg);
    box-shadow: var(--rv-shadow-lg);
    padding: var(--rv-space-sm) 0;
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 200;
}

.rv-nav ul li { position: relative; }
.rv-nav ul li:hover > ul { display: flex; }

.rv-nav ul ul a {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 0;
    color: var(--rv-text-secondary);
}

/* Mobile toggle */
.rv-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 0.4rem 0.8rem;
    font-family: var(--rv-font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--rv-text-secondary);
    transition: var(--rv-transition);
}

.rv-menu-toggle:hover {
    border-color: var(--rv-cyan);
    color: var(--rv-cyan);
}

/* Search */
.rv-header__search { position: relative; flex-shrink: 0; }

.rv-header__search input {
    background: var(--rv-bg-surface);
    border: 1px solid var(--rv-border);
    border-radius: 20px;
    padding: 0.4rem 1rem 0.4rem 2.2rem;
    font-family: var(--rv-font-body);
    font-size: 0.85rem;
    color: var(--rv-text-primary);
    width: 180px;
    transition: var(--rv-transition);
}

.rv-header__search input::placeholder { color: var(--rv-text-muted); }

.rv-header__search input:focus {
    outline: none;
    border-color: var(--rv-cyan);
    width: 230px;
    background: #fff;
}

.rv-header__search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--rv-text-muted);
}

/* ===================================================================
   BREADCRUMBS
   =================================================================== */
.rv-breadcrumbs {
    padding: var(--rv-space-md) 0;
    font-family: var(--rv-font-mono);
    font-size: 0.76rem;
    color: var(--rv-text-muted);
}

.rv-breadcrumbs a { color: var(--rv-text-secondary); }
.rv-breadcrumbs a:hover { color: var(--rv-cyan); }

.rv-breadcrumbs span.separator {
    margin: 0 0.4rem;
    color: var(--rv-border);
}

/* ===================================================================
   MAIN LAYOUT
   =================================================================== */
.rv-layout {
    display: grid;
    grid-template-columns: 1fr var(--rv-sidebar-width);
    gap: var(--rv-space-2xl);
    max-width: var(--rv-max-width);
    margin: 0 auto;
    padding: var(--rv-space-xl) var(--rv-space-lg);
}

.rv-layout--full {
    grid-template-columns: 1fr;
}

/* ===================================================================
   ARTICLE GRID (Homepage / Archives)
   =================================================================== */
.rv-hero-banner {
    padding: var(--rv-space-2xl) var(--rv-space-lg);
    text-align: center;
    background: var(--rv-gradient-hero);
    border-bottom: 1px solid var(--rv-border);
    position: relative;
}

/* Subtle film sprocket holes decoration */
.rv-hero-banner::before {
    content: '⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿  ⦿';
    position: absolute;
    top: 8px;
    left: 0; right: 0;
    font-size: 0.5rem;
    letter-spacing: 0.5em;
    color: var(--rv-border);
    text-align: center;
    pointer-events: none;
}

.rv-hero-banner h1 {
    font-family: var(--rv-font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.01em;
    margin-bottom: var(--rv-space-md);
    color: var(--rv-text-primary);
}

.rv-hero-banner p {
    color: var(--rv-text-secondary);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

.rv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--rv-space-xl);
}

.rv-grid--featured {
    grid-template-columns: 1fr;
}

/* ===================================================================
   ARTICLE CARD
   =================================================================== */
.rv-card {
    background: var(--rv-bg-card);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-lg);
    overflow: hidden;
    transition: var(--rv-transition);
    position: relative;
}

.rv-card:hover {
    transform: translateY(-3px);
    border-color: var(--rv-cyan);
    box-shadow: var(--rv-shadow-lg);
}

.rv-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.rv-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--rv-transition-slow);
}

.rv-card:hover .rv-card__image img {
    transform: scale(1.04);
}

.rv-card__image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(250,247,242,0.6));
}

.rv-card__category {
    position: absolute;
    top: var(--rv-space-md);
    left: var(--rv-space-md);
    z-index: 2;
    font-family: var(--rv-font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.7rem;
    background: var(--rv-cyan);
    color: #fff;
    border-radius: 3px;
}

.rv-card__body {
    padding: var(--rv-space-lg);
}

.rv-card__title {
    font-family: var(--rv-font-display);
    font-size: 1.1rem;
    margin-bottom: var(--rv-space-sm);
    line-height: 1.4;
}

.rv-card__title a { color: var(--rv-text-primary); }
.rv-card__title a:hover { color: var(--rv-cyan); }

.rv-card__excerpt {
    color: var(--rv-text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: var(--rv-space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rv-card__meta {
    display: flex;
    align-items: center;
    gap: var(--rv-space-md);
    font-family: var(--rv-font-mono);
    font-size: 0.73rem;
    color: var(--rv-text-muted);
    border-top: 1px solid var(--rv-border-light);
    padding-top: var(--rv-space-sm);
    margin-top: var(--rv-space-sm);
}

.rv-card__meta svg {
    width: 12px; height: 12px;
    margin-right: 4px;
    vertical-align: -1px;
}

/* Featured card (first post) */
.rv-card--featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.rv-card--featured .rv-card__image {
    aspect-ratio: auto;
    min-height: 300px;
}

.rv-card--featured .rv-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--rv-space-xl);
}

.rv-card--featured .rv-card__title {
    font-size: 1.5rem;
}

/* ===================================================================
   SINGLE ARTICLE
   =================================================================== */
.rv-article { max-width: 100%; }

.rv-article__header {
    margin-bottom: var(--rv-space-xl);
}

.rv-article__categories {
    display: flex;
    gap: var(--rv-space-sm);
    margin-bottom: var(--rv-space-md);
}

.rv-article__categories a {
    font-family: var(--rv-font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rv-cyan);
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--rv-cyan);
    border-radius: 3px;
    transition: var(--rv-transition);
}

.rv-article__categories a:hover {
    background: var(--rv-cyan);
    color: #fff;
}

.rv-article__title {
    font-family: var(--rv-font-display);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    letter-spacing: -0.01em;
    margin-bottom: var(--rv-space-md);
    line-height: 1.2;
}

.rv-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rv-space-lg);
    font-family: var(--rv-font-mono);
    font-size: 0.78rem;
    color: var(--rv-text-muted);
    padding-bottom: var(--rv-space-lg);
    border-bottom: 2px solid var(--rv-border);
}

.rv-article__meta-item {
    display: flex;
    align-items: center;
    gap: var(--rv-space-xs);
}

.rv-article__meta-item svg {
    width: 14px; height: 14px;
    color: var(--rv-cyan);
}

.rv-article__featured-image {
    margin-bottom: var(--rv-space-xl);
    border-radius: var(--rv-radius-lg);
    overflow: hidden;
    border: 1px solid var(--rv-border);
    box-shadow: var(--rv-shadow);
}

/* Article body — optimised for long-form reading */
.rv-article__content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--rv-text-primary);
    max-width: 740px;
}

.rv-article__content h2 {
    font-size: 1.55rem;
    margin: var(--rv-space-2xl) 0 var(--rv-space-md);
    padding-bottom: var(--rv-space-sm);
    border-bottom: 2px solid var(--rv-border);
    color: var(--rv-text-primary);
}

.rv-article__content h3 {
    font-size: 1.2rem;
    margin: var(--rv-space-xl) 0 var(--rv-space-md);
    color: var(--rv-cyan);
}

.rv-article__content h4 {
    margin: var(--rv-space-lg) 0 var(--rv-space-sm);
}

.rv-article__content p {
    margin-bottom: var(--rv-space-lg);
}

.rv-article__content a {
    color: var(--rv-cyan);
    border-bottom: 1px solid var(--rv-cyan-dim);
}

.rv-article__content a:hover {
    color: var(--rv-orange);
    border-bottom-color: var(--rv-orange);
}

.rv-article__content blockquote {
    margin: var(--rv-space-xl) 0;
    padding: var(--rv-space-lg) var(--rv-space-xl);
    background: var(--rv-bg-surface);
    border-left: 4px solid var(--rv-cyan);
    border-radius: 0 var(--rv-radius) var(--rv-radius) 0;
    font-style: italic;
    color: var(--rv-text-secondary);
    font-size: 1.05rem;
}

.rv-article__content pre,
.rv-article__content code {
    font-family: var(--rv-font-mono);
}

.rv-article__content pre {
    background: #1e2428;
    color: #e8e6e0;
    border-radius: var(--rv-radius);
    padding: var(--rv-space-lg);
    overflow-x: auto;
    margin: var(--rv-space-lg) 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.rv-article__content code {
    background: var(--rv-bg-elevated);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.88em;
    color: var(--rv-cyan);
    border: 1px solid var(--rv-border);
}

.rv-article__content pre code {
    background: none;
    padding: 0;
    color: #e8e6e0;
    border: none;
}

.rv-article__content ul, .rv-article__content ol {
    margin: var(--rv-space-md) 0 var(--rv-space-lg) var(--rv-space-xl);
}

.rv-article__content li {
    margin-bottom: var(--rv-space-sm);
}

.rv-article__content li::marker {
    color: var(--rv-cyan);
}

.rv-article__content img {
    border-radius: var(--rv-radius);
    margin: var(--rv-space-lg) 0;
    box-shadow: var(--rv-shadow);
    border: 1px solid var(--rv-border);
}

.rv-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--rv-space-lg) 0;
    font-size: 0.95rem;
}

.rv-article__content th, .rv-article__content td {
    padding: 0.65rem var(--rv-space-md);
    border: 1px solid var(--rv-border);
    text-align: left;
}

.rv-article__content th {
    background: var(--rv-bg-surface);
    font-family: var(--rv-font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rv-pink);
}

.rv-article__content tr:nth-child(even) td {
    background: var(--rv-bg-deep);
}

/* ===================================================================
   TAGS
   =================================================================== */
.rv-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rv-space-sm);
    margin-top: var(--rv-space-xl);
    padding-top: var(--rv-space-lg);
    border-top: 1px solid var(--rv-border);
}

.rv-article__tags a {
    font-family: var(--rv-font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--rv-text-secondary);
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--rv-border);
    border-radius: 3px;
    transition: var(--rv-transition);
    background: var(--rv-bg-surface);
}

.rv-article__tags a:hover {
    border-color: var(--rv-cyan);
    color: var(--rv-cyan);
    background: var(--rv-cyan-dim);
}

/* ===================================================================
   AUTHOR BOX
   =================================================================== */
.rv-author-box {
    display: flex;
    gap: var(--rv-space-lg);
    margin-top: var(--rv-space-2xl);
    padding: var(--rv-space-xl);
    background: var(--rv-bg-surface);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-lg);
}

.rv-author-box__avatar { flex-shrink: 0; }

.rv-author-box__avatar img {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid var(--rv-cyan);
    box-shadow: var(--rv-shadow-sm);
}

.rv-author-box__name {
    font-family: var(--rv-font-display);
    font-size: 1.05rem;
    color: var(--rv-text-primary);
    margin-bottom: var(--rv-space-xs);
}

.rv-author-box__bio {
    font-size: 0.9rem;
    color: var(--rv-text-secondary);
    line-height: 1.65;
}

/* ===================================================================
   RELATED ARTICLES
   =================================================================== */
.rv-related {
    margin-top: var(--rv-space-2xl);
    padding-top: var(--rv-space-2xl);
    border-top: 1px solid var(--rv-border);
}

.rv-related__title {
    font-family: var(--rv-font-display);
    font-size: 1.35rem;
    margin-bottom: var(--rv-space-xl);
    color: var(--rv-text-primary);
}

.rv-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--rv-space-lg);
}

/* ===================================================================
   SIDEBAR
   =================================================================== */
.rv-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--rv-space-xl);
}

.rv-widget {
    background: var(--rv-bg-card);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-lg);
    padding: var(--rv-space-xl);
}

.rv-widget__title {
    font-family: var(--rv-font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-cyan);
    margin-bottom: var(--rv-space-lg);
    padding-bottom: var(--rv-space-sm);
    border-bottom: 2px solid var(--rv-border);
}

.rv-widget .wp-block-search__label,
.rv-widget > h2,
.rv-widget > h3:not(.rv-widget__title) {
    font-family: var(--rv-font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-cyan);
    margin-bottom: var(--rv-space-lg);
    padding-bottom: var(--rv-space-sm);
    border-bottom: 2px solid var(--rv-border);
}

.rv-widget .wp-block-search__inside-wrapper {
    display: flex;
    gap: var(--rv-space-sm);
}

.rv-widget input[type="search"],
.rv-widget input[type="text"],
.rv-widget .wp-block-search__input {
    flex: 1;
    padding: 0.55rem 1rem;
    background: var(--rv-bg-surface);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    color: var(--rv-text-primary);
    font-family: var(--rv-font-body);
    font-size: 0.88rem;
    transition: var(--rv-transition);
}

.rv-widget input[type="search"]:focus,
.rv-widget input[type="text"]:focus,
.rv-widget .wp-block-search__input:focus {
    outline: none;
    border-color: var(--rv-cyan);
    background: #fff;
}

.rv-widget input[type="submit"],
.rv-widget .wp-block-search__button {
    padding: 0.55rem 1.1rem;
    background: var(--rv-cyan);
    border: none;
    border-radius: var(--rv-radius);
    font-family: var(--rv-font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
    transition: var(--rv-transition);
}

.rv-widget input[type="submit"]:hover,
.rv-widget .wp-block-search__button:hover {
    background: var(--rv-orange);
}

.rv-widget ul { list-style: none; padding: 0; margin: 0; }

.rv-widget > ul > li,
.rv-widget .wp-block-latest-posts__list li {
    margin-bottom: var(--rv-space-sm);
    padding: var(--rv-space-sm) 0;
    border-bottom: 1px solid var(--rv-border-light);
}

.rv-widget > ul > li:last-child,
.rv-widget .wp-block-latest-posts__list li:last-child {
    border-bottom: none;
}

.rv-widget > ul a,
.rv-widget .wp-block-latest-posts__list a {
    color: var(--rv-text-secondary);
    font-size: 0.9rem;
    transition: var(--rv-transition);
}

.rv-widget > ul a:hover,
.rv-widget .wp-block-latest-posts__list a:hover {
    color: var(--rv-cyan);
}

/* Calendar */
.rv-widget .wp-calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--rv-font-mono);
    font-size: 0.78rem;
}

.rv-widget .wp-calendar-table th {
    color: var(--rv-cyan);
    padding: var(--rv-space-sm);
    font-weight: 600;
}

.rv-widget .wp-calendar-table td {
    padding: var(--rv-space-sm);
    text-align: center;
    color: var(--rv-text-muted);
}

.rv-widget .wp-calendar-table td a {
    color: var(--rv-orange);
    font-weight: 700;
}

/* Newsletter */
.rv-newsletter {
    background: var(--rv-bg-surface);
    border-color: var(--rv-border);
    text-align: center;
}

.rv-newsletter__icon { font-size: 2rem; margin-bottom: var(--rv-space-md); }

.rv-newsletter__text {
    font-size: 0.88rem;
    color: var(--rv-text-secondary);
    margin-bottom: var(--rv-space-lg);
}

.rv-newsletter input[type="email"] {
    width: 100%;
    padding: 0.65rem 1rem;
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    color: var(--rv-text-primary);
    font-family: var(--rv-font-body);
    font-size: 0.88rem;
    margin-bottom: var(--rv-space-sm);
    transition: var(--rv-transition);
}

.rv-newsletter input[type="email"]:focus {
    outline: none;
    border-color: var(--rv-cyan);
}

.rv-newsletter button,
.rv-btn-primary {
    width: 100%;
    padding: 0.65rem 1.5rem;
    background: var(--rv-cyan);
    border: none;
    border-radius: var(--rv-radius);
    font-family: var(--rv-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    transition: var(--rv-transition);
}

.rv-newsletter button:hover,
.rv-btn-primary:hover {
    background: var(--rv-orange);
    transform: translateY(-1px);
}

/* Popular posts */
.rv-popular-posts__item {
    display: flex;
    gap: var(--rv-space-md);
    padding: var(--rv-space-sm) 0;
    border-bottom: 1px solid var(--rv-border-light);
}

.rv-popular-posts__item:last-child { border-bottom: none; }

.rv-popular-posts__thumb {
    flex-shrink: 0;
    width: 70px; height: 50px;
    border-radius: var(--rv-radius);
    overflow: hidden;
    border: 1px solid var(--rv-border);
}

.rv-popular-posts__thumb img { width: 100%; height: 100%; object-fit: cover; }

.rv-popular-posts__title {
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 600;
}

.rv-popular-posts__title a { color: var(--rv-text-primary); }
.rv-popular-posts__title a:hover { color: var(--rv-cyan); }

.rv-popular-posts__date {
    font-family: var(--rv-font-mono);
    font-size: 0.7rem;
    color: var(--rv-text-muted);
    margin-top: 2px;
}

/* Categories */
.rv-categories-list { list-style: none; }
.rv-categories-list li { margin-bottom: var(--rv-space-sm); }

.rv-categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--rv-space-sm) var(--rv-space-md);
    color: var(--rv-text-secondary);
    border-radius: var(--rv-radius);
    font-size: 0.9rem;
    transition: var(--rv-transition);
}

.rv-categories-list a:hover {
    background: var(--rv-cyan-dim);
    color: var(--rv-cyan);
}

.rv-categories-list .count {
    font-family: var(--rv-font-mono);
    font-size: 0.72rem;
    color: var(--rv-text-muted);
    background: var(--rv-bg-elevated);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

/* ===================================================================
   CTA BLOCK — Software Promotion (warm amber style)
   =================================================================== */
.rv-cta {
    position: relative;
    background: linear-gradient(135deg, #3a2210 0%, #1e2f4a 100%);
    border: 1px solid rgba(184, 107, 42, 0.25);
    border-radius: var(--rv-radius-lg);
    padding: var(--rv-space-xl) var(--rv-space-2xl);
    margin: var(--rv-space-2xl) 0;
    overflow: hidden;
}

.rv-cta::before {
    content: '';
    position: absolute;
    top: -40%; right: -15%;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(184,107,42,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.rv-cta::after {
    content: '';
    position: absolute;
    bottom: -40%; left: -10%;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(30,58,95,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.rv-cta__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--rv-space-xl);
}

.rv-cta__content { flex: 1; }

.rv-cta__badge {
    display: inline-block;
    font-family: var(--rv-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-yellow);
    border: 1px solid var(--rv-yellow);
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    margin-bottom: var(--rv-space-md);
}

.rv-cta__title {
    font-family: var(--rv-font-display);
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: var(--rv-space-sm);
    color: #fff;
}

.rv-cta__desc {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
    margin-bottom: var(--rv-space-lg);
    max-width: 500px;
}

.rv-cta__price {
    font-family: var(--rv-font-display);
    font-size: 1.6rem;
    color: var(--rv-yellow);
    margin-bottom: var(--rv-space-xs);
}

.rv-cta__trial {
    font-family: var(--rv-font-mono);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: var(--rv-space-lg);
}

.rv-cta__actions {
    display: flex;
    gap: var(--rv-space-md);
    flex-wrap: wrap;
}

.rv-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--rv-space-sm);
    padding: 0.7rem 1.8rem;
    border-radius: var(--rv-radius);
    font-family: var(--rv-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--rv-transition);
    border: none;
}

.rv-cta__btn--primary {
    background: var(--rv-cyan);
    color: #fff;
}

.rv-cta__btn--primary:hover {
    background: var(--rv-orange);
    transform: translateY(-2px);
    color: #fff;
}

.rv-cta__btn--secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.85);
}

.rv-cta__btn--secondary:hover {
    border-color: #fff;
    color: #fff;
}

.rv-cta__visual {
    flex-shrink: 0;
    width: 200px;
    text-align: center;
}

.rv-cta__visual img { max-width: 100%; }

/* Inline CTA */
.rv-cta--inline { padding: var(--rv-space-lg); }
.rv-cta--inline .rv-cta__inner { flex-direction: column; text-align: center; }
.rv-cta--inline .rv-cta__desc { margin-left: auto; margin-right: auto; }
.rv-cta--inline .rv-cta__actions { justify-content: center; }

/* Sidebar CTA */
.rv-cta--sidebar { padding: var(--rv-space-lg); }
.rv-cta--sidebar .rv-cta__inner { flex-direction: column; text-align: center; align-items: center; }
.rv-cta--sidebar .rv-cta__title { font-size: 1.1rem; }
.rv-cta--sidebar .rv-cta__price { font-size: 1.3rem; }
.rv-cta--sidebar .rv-cta__actions { flex-direction: column; align-items: center; width: 100%; }
.rv-cta--sidebar .rv-cta__btn { width: 100%; justify-content: center; }

/* ===================================================================
   PAGINATION
   =================================================================== */
.rv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--rv-space-sm);
    margin-top: var(--rv-space-2xl);
    padding-top: var(--rv-space-xl);
}

.rv-pagination a,
.rv-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--rv-space-sm);
    font-family: var(--rv-font-mono);
    font-size: 0.85rem;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    color: var(--rv-text-secondary);
    transition: var(--rv-transition);
    background: #fff;
}

.rv-pagination a:hover {
    border-color: var(--rv-cyan);
    color: var(--rv-cyan);
}

.rv-pagination .current {
    background: var(--rv-cyan);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

/* ===================================================================
   COMMENTS
   =================================================================== */
.rv-comments {
    margin-top: var(--rv-space-2xl);
    padding-top: var(--rv-space-2xl);
    border-top: 1px solid var(--rv-border);
}

.rv-comments__title {
    font-family: var(--rv-font-display);
    font-size: 1.2rem;
    margin-bottom: var(--rv-space-xl);
}

.rv-comment-list { list-style: none; }

.rv-comment {
    display: flex;
    gap: var(--rv-space-md);
    padding: var(--rv-space-lg);
    margin-bottom: var(--rv-space-md);
    background: var(--rv-bg-surface);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
}

.rv-comment .avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--rv-border);
    flex-shrink: 0;
}

.rv-comment__author {
    font-family: var(--rv-font-heading);
    font-weight: 700;
    color: var(--rv-cyan);
    font-size: 0.95rem;
}

.rv-comment__date {
    font-family: var(--rv-font-mono);
    font-size: 0.72rem;
    color: var(--rv-text-muted);
}

.rv-comment__body p {
    font-size: 0.92rem;
    color: var(--rv-text-secondary);
    margin-top: var(--rv-space-sm);
}

.rv-comment .children {
    list-style: none;
    margin-left: var(--rv-space-2xl);
    margin-top: var(--rv-space-md);
}

/* Comment form */
.rv-comment-form label {
    font-family: var(--rv-font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--rv-text-secondary);
    display: block;
    margin-bottom: var(--rv-space-xs);
}

.rv-comment-form input,
.rv-comment-form textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    color: var(--rv-text-primary);
    font-family: var(--rv-font-body);
    font-size: 0.95rem;
    margin-bottom: var(--rv-space-md);
    transition: var(--rv-transition);
}

.rv-comment-form input:focus,
.rv-comment-form textarea:focus {
    outline: none;
    border-color: var(--rv-cyan);
}

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

/* ===================================================================
   SEARCH PAGE
   =================================================================== */
.rv-search-header {
    text-align: center;
    padding: var(--rv-space-2xl) 0;
}

.rv-search-header h1 { font-family: var(--rv-font-display); }
.rv-search-header h1 span { color: var(--rv-cyan); }

.rv-search-form-large {
    max-width: 600px;
    margin: var(--rv-space-xl) auto 0;
    position: relative;
}

.rv-search-form-large input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: 50px;
    font-family: var(--rv-font-body);
    font-size: 1.05rem;
    color: var(--rv-text-primary);
    transition: var(--rv-transition);
    box-shadow: var(--rv-shadow);
}

.rv-search-form-large input:focus {
    outline: none;
    border-color: var(--rv-cyan);
}

.rv-search-form-large button {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    padding: 0.6rem 1.5rem;
    background: var(--rv-cyan);
    border: none;
    border-radius: 50px;
    font-family: var(--rv-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
    transition: var(--rv-transition);
}

.rv-search-form-large button:hover { background: var(--rv-orange); }

.rv-search-form-large svg {
    position: absolute;
    left: 1.2rem; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--rv-text-muted);
}

.rv-no-results { text-align: center; padding: var(--rv-space-2xl) 0; }
.rv-no-results__icon { font-size: 3rem; margin-bottom: var(--rv-space-lg); }
.rv-no-results p { color: var(--rv-text-secondary); max-width: 500px; margin: 0 auto var(--rv-space-lg); }

/* ===================================================================
   404 PAGE
   =================================================================== */
.rv-404 {
    text-align: center;
    padding: var(--rv-space-2xl) 0;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rv-404__code {
    font-family: var(--rv-font-display);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--rv-border);
    line-height: 1;
    margin-bottom: var(--rv-space-md);
}

.rv-404__title {
    font-family: var(--rv-font-display);
    font-size: 1.5rem;
    margin-bottom: var(--rv-space-md);
}

.rv-404__text {
    color: var(--rv-text-secondary);
    max-width: 500px;
    margin: 0 auto var(--rv-space-xl);
}

/* ===================================================================
   ARCHIVE HEADER
   =================================================================== */
.rv-archive-header {
    padding: var(--rv-space-2xl) 0 var(--rv-space-xl);
    border-bottom: 1px solid var(--rv-border);
    margin-bottom: var(--rv-space-xl);
}

.rv-archive-header__label {
    font-family: var(--rv-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-cyan);
    margin-bottom: var(--rv-space-sm);
}

.rv-archive-header h1 { font-family: var(--rv-font-display); }

.rv-archive-header__desc {
    color: var(--rv-text-secondary);
    margin-top: var(--rv-space-sm);
    max-width: 600px;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.rv-footer {
    margin-top: var(--rv-space-2xl);
    border-top: 2px solid var(--rv-border);
    background: #1a1510;
    color: #c8bfb4;
}

.rv-footer__inner {
    max-width: var(--rv-max-width);
    margin: 0 auto;
    padding: var(--rv-space-2xl) var(--rv-space-lg);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--rv-space-2xl);
}

.rv-footer__brand .rv-logo {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: var(--rv-space-md);
    display: inline-block;
}

.rv-footer__brand p {
    font-size: 0.88rem;
    color: #8a7e72;
    line-height: 1.6;
}

.rv-footer__heading {
    font-family: var(--rv-font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-cyan);
    margin-bottom: var(--rv-space-lg);
}

.rv-footer ul { list-style: none; }
.rv-footer ul li { margin-bottom: var(--rv-space-sm); }

.rv-footer ul a {
    color: #8a7e72;
    font-size: 0.88rem;
    transition: var(--rv-transition);
}

.rv-footer ul a:hover { color: var(--rv-cyan); }

.rv-footer__bottom {
    max-width: var(--rv-max-width);
    margin: 0 auto;
    padding: var(--rv-space-lg);
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--rv-font-mono);
    font-size: 0.72rem;
    color: #5a4e42;
}

/* ===================================================================
   SHARE BUTTONS — social sharing after articles
   =================================================================== */
.rv-share {
    margin-top: var(--rv-space-xl);
    padding-top: var(--rv-space-lg);
    border-top: 1px solid var(--rv-border);
}

.rv-share__label {
    font-family: var(--rv-font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rv-text-muted);
    margin-bottom: var(--rv-space-sm);
}

.rv-share__btns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rv-space-sm);
}

.rv-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-family: var(--rv-font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: var(--rv-transition);
}

.rv-share__btn:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }
.rv-share__btn--twitter  { background: #000; }
.rv-share__btn--facebook { background: #1877f2; }
.rv-share__btn--reddit   { background: #ff4500; }
.rv-share__btn--email    { background: var(--rv-cyan); }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
    .rv-layout { grid-template-columns: 1fr; }
    .rv-card--featured { grid-template-columns: 1fr; }
    .rv-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .rv-nav { display: none; }
    .rv-nav.is-open { display: block; }
    .rv-menu-toggle { display: block; }

    .rv-header__inner { flex-wrap: wrap; }

    .rv-nav.is-open {
        width: 100%;
        order: 3;
        padding-top: var(--rv-space-md);
        border-top: 1px solid var(--rv-border);
    }

    .rv-nav.is-open ul {
        flex-direction: column;
        gap: 0;
    }

    .rv-nav.is-open ul ul {
        position: static;
        display: flex;
        background: var(--rv-bg-surface);
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        border-radius: 0;
        border-left: 2px solid var(--rv-border);
        margin-left: var(--rv-space-md);
    }

    .rv-nav.is-open ul ul a {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

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

    .rv-cta__inner { flex-direction: column; text-align: center; }
    .rv-cta__actions { justify-content: center; }

    .rv-footer__inner { grid-template-columns: 1fr; }
    .rv-author-box { flex-direction: column; text-align: center; }
    .rv-article__meta { flex-direction: column; gap: var(--rv-space-sm); }
    .rv-article__content { max-width: 100%; }
}

@media (max-width: 480px) {
    :root {
        --rv-space-lg:  1rem;
        --rv-space-xl:  1.5rem;
        --rv-space-2xl: 2.5rem;
    }

    .rv-404__code { font-size: 5rem; }
    .rv-hero-banner::before { display: none; }
}
