/*
Theme Name: Brainx Ultimate
Theme URI: https://example.com/brainx
Author: Antigravity
Author URI: https://example.com
Description: A world-class, SEO-optimized, and ultra-responsive news theme. Featuring dynamic tickers, hero grids, and tabbed sidebars.
Version: 4.0.0
License: GNU General Public License v2 or later
Text Domain: brainx
*/

:root {
    --primary: #e31b23;
    /* Vibrant News Red */
    --primary-rgb: 227, 27, 35;
    --primary-dark: #b31217;
    --secondary: #0f172a;
    --navy: #1e293b;

    /* Default (Light) Theme */
    --bg-main: #f8fafc;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 12px;
    --speed: 0.3s;
}

[data-theme="dark"] {
    --bg-main: #020617;
    /* Even deeper blue */
    --bg-alt: #0f172a;
    --surface: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #020617;
    --border: #1e293b;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--speed), color var(--speed);
    padding-top: 0 !important;
    /* No offset needed for static header */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--speed);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ultimate Sticky Header Wrapper */
/* Ultimate Sticky Header Wrapper - Now Static */
.sticky-header-wrapper {
    position: relative !important;
    /* Changed from fixed to relative */
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    z-index: 100 !important;
    background: var(--surface) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
    /* Softer modern shadow */
    border-bottom: none !important;
    /* Cleaner look */
}

body.admin-bar .sticky-header-wrapper {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sticky-header-wrapper {
        top: 46px;
    }
}

.top-bar {
    display: none;
    /* User requested "Small" header - removing top bar to save space */
}

header {
    background: var(--surface);
    padding: 20px 0;
    /* Modern Spacious Padding */
}

.main-menu-combined {
    list-style: none;
    display: flex;
    gap: 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
}

.main-menu-combined li a {
    color: var(--text-main);
    transition: var(--speed);
    padding: 10px 15px;
    /* Comfortable click areas */
    display: block;
    position: relative;
    font-size: 0.9rem;
    /* Restore readable size */
}

.main-menu-combined li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.main-menu-combined li a:hover {
    color: var(--primary);
}

.main-menu-combined li a:hover::after {
    width: 100%;
}

.cat-nav-item a {
    color: var(--text-muted) !important;
}

.cat-nav-item a:hover {
    color: var(--primary) !important;
}

/* Breadcrumb Styling */
.breadcrumb {
    margin: 10px 0 30px;
    animation: fadeIn 0.8s ease;
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(227, 27, 35, 0.3);
}

.back-link:hover {
    transform: translateX(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(227, 27, 35, 0.5);
    background: var(--primary-dark);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    /* Bold Modern Size */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
}

.logo a {
    color: var(--text-main);
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo span {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #ff4d4d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transition: transform 0.4s ease;
}

.logo a:hover {
    transform: scale(1.02);
    letter-spacing: -1px;
}

.logo a::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
    margin-top: -5px;
}

.logo a:hover::after {
    width: 60%;
}

.logo a:hover span {
    transform: rotate(15deg) scale(1.3);
    text-shadow: 0 0 15px rgba(255, 77, 77, 0.6);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
}

nav ul li a {
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Modern Comment Form - Reinforced */
#respond {
    background: var(--surface) !important;
    padding: 40px !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    margin-top: 50px !important;
    border: 1px solid var(--border);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100% !important;
    padding: 15px !important;
    background: var(--bg-main) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.comment-form input:focus,
.comment-form textarea:focus {
    background: var(--surface) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(227, 27, 35, 0.1) !important;
    outline: none !important;
}

p.form-submit {
    margin-top: 20px;
}

#submit,
.form-submit .submit {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 40px !important;
    font-weight: 800 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 20px rgba(227, 27, 35, 0.3) !important;
    display: inline-block;
    width: auto;
}

#submit:hover,
.form-submit .submit:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(227, 27, 35, 0.5) !important;
}

.icon-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--speed);
}

.icon-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Theme Toggle Button Style */
.glass-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--speed);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
}

.glass-btn:hover {
    background: var(--border);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

/* Inline Search Styles (Right-Aligned) */
.inline-search-wrap {
    background: var(--surface);
    border-bottom: 2px solid var(--primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    position: absolute;
    width: 350px;
    right: 5%;
    top: 100px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

.inline-search-wrap.active {
    max-height: 80px;
}

.search-form-inline {
    display: flex;
    padding: 15px 20px;
    gap: 10px;
}

.search-input-inline {
    flex: 1;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
}

.search-submit-inline {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.search-submit-inline:hover {
    background: var(--primary-dark);
}

/* Trending Tags in Search */
.trending-search {
    margin-top: 50px;
    animation: fadeIn 1s ease 0.4s both;
}

.trending-title {
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.trending-tags {
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    display: flex;
}

.trend-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.trend-tag:hover {
    background: #fff;
    color: var(--primary);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}


/* Ticker */
/* Ticker in Sticky Header */
/* Slide-Bar Ticker (Clean Light Style) */
.ticker-box {
    background: var(--surface);
    color: var(--text-main);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: 0.85rem;
}

.ticker-content a {
    color: var(--text-main) !important;
    font-weight: 600;
}

.ticker-label {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.65rem;
    margin-right: 12px;
}

.ticker-content {
    border-left: 3px solid var(--primary);
    padding-left: 20px;
    flex-grow: 1;
    overflow: hidden;
}

.ticker-content a {
    font-weight: 600;
}

.ticker-sep {
    margin: 0 15px;
    color: var(--text-muted);
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding-top: 40px;
    min-height: 80vh;
}

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 320px);
    /* Increased height to show full images */
    gap: 20px;
    margin-bottom: 50px;
}

.hero-big,
.hero-small {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-big:hover,
.hero-small:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.hero-big:hover img,
.hero-small:hover img {
    transform: scale(1.1);
}

.hero-big img,
.hero-small img {
    transition: transform 0.8s ease;
}

.thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    z-index: 2;
}

.hero-big .entry-title {
    font-size: 2.2rem;
    margin-top: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.hero-small .entry-title {
    font-size: 1.2rem;
    margin-top: 8px;
    font-weight: 700;
}

.cat-tag a {
    background: var(--primary);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Content List */
.section-title.modern-style {
    font-size: 1.8rem;
    font-weight: 800;
    border-bottom: 4px solid var(--primary);
    display: inline-block;
    margin-bottom: 30px;
    padding-bottom: 5px;
}

.list-item {
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.post-thumbnail-mini {
    width: 280px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.item-content .entry-title {
    margin: 12px 0;
    font-size: 1.8rem;
    line-height: 1.3;
    font-weight: 800;
}

.cat-link a {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Article/Page Styles */
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
}

.entry-header-single {
    margin-bottom: 40px;
}

.entry-header-single .entry-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-top: 20px;
}

.featured-image-single {
    margin-bottom: 40px;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-content {
    font-size: 1.2rem;
    color: var(--text-main);
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 25px;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    z-index: 10001;
    width: 100%;
    height: 4px;
    background: transparent;
}

.progress-bar {
    height: 4px;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--primary);
}

/* Premium Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.loader-logo span {
    color: var(--primary);
}

/* Hero Grid - Image Fix */
.hero-grid img,
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Focus on the top-center (faces) */
}

/* Card Styling & Hover */
.card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    /* Fallback for transparency */
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

.card:hover img {
    transform: scale(1.05);
}

.post-thumbnail img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

html {
    scroll-behavior: smooth;
}

/* Mobile Bottom Bar (Refined) */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    /* Space between Home and Group */
    align-items: center;
    padding: 10px 30px;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    display: none !important;
    /* Force Hidden on PC */
    box-sizing: border-box;
    /* Fix padding issues */
}

/* SHOW ONLY ON MOBILE */
@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex !important;
    }
}

.mobile-action-group {
    display: flex;
    gap: 25px;
    /* Group Search & Share together */
}

.mobile-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary);
}

.m-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

/* 📱 Mobile Responsive Fixes (The "Image Problem" Fix) */
@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
    }

    .site-footer {
        padding-bottom: 90px;
    }

    /* Prevent overlap */

    /* 1. Un-crop Hero Images */
    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .hero-big,
    .hero-small {
        height: auto !important;
        /* Stop forcing fixed height */
        aspect-ratio: 16/9;
        /* Force TV-like wide shape */
    }

    .hero-grid img,
    .post-thumbnail img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    /* 2. Text Readability */
    .thumb-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
        padding: 15px;
    }

    .entry-title {
        font-size: 1.1rem;
        /* Smaller text for mobile */
        line-height: 1.4;
    }
}

/* Sidebar Tabs Improvement */
.sidebar-tabs {
    border: none;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: background var(--speed);
}

.tabs-header {
    background: var(--bg-alt);
    display: flex;
    padding: 5px;
    gap: 5px;
}

.tab-link {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: var(--speed);
    border-radius: 8px;
}

.tab-link.active {
    color: var(--text-inverse);
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(204, 0, 0, 0.2);
}

.mini-post {
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    border-radius: 10px;
    transition: var(--speed);
}

.mini-post:hover {
    background: var(--bg-alt);
}

.mini-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-info h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.mini-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post Navigation & Related */
.post-navigation {
    margin: 40px 0;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.nav-previous a,
.nav-next a {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Widgets */
.widget {
    margin-bottom: 30px;
    padding: 30px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.widget:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 800;
    border-left: 5px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* Footer */
/* Footer */
.site-footer {
    background: #000;
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

.footer-links {
    list-style: none;
    margin-top: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 50px;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Responsive */
@media (max-width: 1100px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-container {
        margin-bottom: 10px;
    }

    .post-thumbnail-mini {
        width: 100%;
    }

    .item-content .entry-title {
        font-size: 1.4rem;
    }

    .entry-header-single .entry-title {
        font-size: 2.2rem;
    }
}

/* Inline Search Styles (Right-Aligned) */
.inline-search-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: absolute;
    width: 380px;
    max-width: 90%;
    right: 20px;
    top: 100%;
    z-index: 999;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
}

.inline-search-wrap.active {
    max-height: 80px;
}

.search-form-inline {
    display: flex;
    padding: 15px 20px;
    gap: 10px;
}

.search-input-inline {
    flex: 1;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
}

.search-submit-inline {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.search-submit-inline:hover {
    background: var(--primary-dark);
}

/* Back to Top - REMOVED per user request */

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Related Posts Fix for Spacing */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}