/**
 * Nexus Offers Pro - Core Stylesheet
 * Senior AI Architect & Ultra-Clean Performance Styling
 *
 * @package Nexus_Offers_Pro
 */

/* ==========================================================================
   1. CSS Reset & Variables
   ========================================================================== */
:root {
    --nexus-primary: #1e3a8a;
    --nexus-primary-hover: #1d4ed8;
    --nexus-primary-light: #eff6ff;
    --nexus-accent: #2563eb;
    --nexus-dark: #0f172a;
    --nexus-gray-900: #111827;
    --nexus-gray-800: #1f2937;
    --nexus-gray-700: #374151;
    --nexus-gray-600: #4b5563;
    --nexus-gray-500: #6b7280;
    --nexus-gray-400: #9ca3af;
    --nexus-gray-300: #d1d5db;
    --nexus-gray-200: #e5e7eb;
    --nexus-gray-100: #f3f4f6;
    --nexus-gray-50: #f8fafc;
    --nexus-body-bg: #f5f6f9;
    --nexus-card-bg: #ffffff;
    
    --nexus-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --nexus-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    --nexus-radius-sm: 4px;
    --nexus-radius-md: 8px;
    --nexus-radius-lg: 12px;
    --nexus-radius-full: 9999px;
    
    --nexus-shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
    --nexus-shadow-card: 0 2px 6px -1px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --nexus-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
    
    --nexus-transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --nexus-transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--nexus-font-sans);
    background-color: var(--nexus-body-bg);
    color: var(--nexus-gray-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nexus-site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: var(--nexus-primary);
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

a:hover {
    color: var(--nexus-primary-hover);
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #ffffff;
    clip: auto !important;
    clip-path: none;
    color: var(--nexus-dark);
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 8px;
    line-height: normal;
    padding: 14px 22px;
    position: fixed !important;
    top: 8px;
    width: auto;
    z-index: 100000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-radius: var(--nexus-radius-sm);
}

/* Container */
.nexus-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. Header & Navigation (Clean Modern Centered Architecture)
   ========================================================================== */
.nexus-site-header {
    background-color: #ffffff;
    padding: 40px 0 24px;
    text-align: center;
}

.nexus-site-branding {
    margin-bottom: 18px;
}

.nexus-site-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
}

.nexus-site-title a {
    color: var(--nexus-gray-900);
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

.nexus-site-title a:hover {
    color: var(--nexus-primary);
}

.nexus-main-navigation {
    position: relative;
}

.nexus-menu-items {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nexus-menu-items li {
    position: relative;
}

.nexus-menu-items li a {
    color: var(--nexus-gray-700);
    font-size: 15px;
    font-weight: 600;
    padding: 6px 4px;
    display: inline-block;
    position: relative;
    transition: var(--nexus-transition-fast);
}

.nexus-menu-items li a:hover,
.nexus-menu-items li.current-menu-item > a {
    color: var(--nexus-gray-900);
}

.nexus-menu-items li.current-menu-item > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--nexus-primary);
    border-radius: 2px;
}

.nexus-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nexus-header-separator {
    height: 1px;
    background-color: var(--nexus-gray-200);
    margin-bottom: 36px;
}

/* ==========================================================================
   3. Main Layout Grid (Content + Right Sidebar)
   ========================================================================== */
.nexus-site-content {
    flex: 1 0 auto;
    padding-bottom: 60px;
}

.nexus-main-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.nexus-content-area {
    flex: 1 1 0%;
    min-width: 0;
}

.nexus-sidebar-area {
    width: 320px;
    flex-shrink: 0;
}

/* ==========================================================================
   4. Post Card Styling (Horizontal Card Layout Matching Screenshot)
   ========================================================================== */
.nexus-post-card {
    background-color: var(--nexus-card-bg);
    border: 1px solid var(--nexus-gray-200);
    border-radius: var(--nexus-radius-md);
    padding: 22px;
    margin-bottom: 22px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    box-shadow: var(--nexus-shadow-card);
    transition: var(--nexus-transition-smooth);
}

.nexus-post-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--nexus-shadow-hover);
}

/* Card Left: Thumbnail */
.nexus-card-left {
    width: 250px;
    flex-shrink: 0;
}

.nexus-card-thumb-link {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
}

.nexus-card-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 6px;
    background-color: var(--nexus-gray-100);
}

.nexus-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Fallback placeholder */
.nexus-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
}

.nexus-placeholder-badge {
    font-size: 10px;
    letter-spacing: 1.5px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.nexus-placeholder-initial {
    font-size: 32px;
}

/* Card Right: Title, Excerpt, Read More */
.nexus-card-right {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.nexus-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}

.nexus-card-title a {
    color: var(--nexus-gray-900);
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

.nexus-card-title a:hover {
    color: var(--nexus-primary);
}

.nexus-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--nexus-gray-600);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nexus-card-action {
    margin-top: auto;
}

.nexus-read-more-btn {
    display: inline-block;
    background-color: var(--nexus-primary);
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: var(--nexus-radius-sm);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: var(--nexus-transition-fast);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.nexus-read-more-btn:hover {
    background-color: var(--nexus-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

/* ==========================================================================
   5. Numbered Pagination (1, 2, → Matching Screenshot)
   ========================================================================== */
.nexus-pagination {
    margin: 36px 0 20px;
    display: flex;
    justify-content: center;
}

.nexus-pagination-list {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
}

.nexus-page-item a,
.nexus-page-item span {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nexus-radius-sm);
    font-size: 14px;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid var(--nexus-gray-300);
    color: var(--nexus-gray-700);
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

.nexus-page-item a:hover {
    background-color: var(--nexus-gray-100);
    color: var(--nexus-gray-900);
    border-color: var(--nexus-gray-400);
}

/* Active page box: Dark matching screenshot */
.nexus-page-item .current {
    background-color: var(--nexus-gray-800);
    color: #ffffff;
    border-color: var(--nexus-gray-800);
}

/* ==========================================================================
   6. Sidebar Widgets & "My Recommendation" Card
   ========================================================================== */
.nexus-widget {
    background-color: var(--nexus-card-bg);
    border: 1px solid var(--nexus-gray-200);
    border-radius: var(--nexus-radius-md);
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--nexus-shadow-card);
}

.nexus-widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--nexus-gray-900);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--nexus-primary);
}

/* 1. Search Box */
.nexus-search-group {
    display: flex;
    border: 1px solid var(--nexus-gray-300);
    border-radius: var(--nexus-radius-sm);
    overflow: hidden;
    background-color: #ffffff;
    transition: var(--nexus-transition-fast);
}

.nexus-search-group:focus-within {
    border-color: var(--nexus-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
}

.nexus-search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--nexus-gray-800);
}

.nexus-search-submit {
    background-color: var(--nexus-primary);
    border: none;
    color: #ffffff;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--nexus-transition-fast);
}

.nexus-search-submit:hover {
    background-color: var(--nexus-primary-hover);
}

/* 2. "My Recommendation" ("মায়ার রিকমেন্ডেশন") Card */
.nexus-rec-card {
    background: linear-gradient(135deg, #f0f7ff, #ffffff);
    border: 2px solid #3b82f6;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.nexus-rec-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: var(--nexus-radius-full);
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.nexus-rec-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--nexus-dark);
    margin: 0 0 8px;
    line-height: 1.35;
}

.nexus-rec-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--nexus-gray-600);
    margin-bottom: 16px;
}

.nexus-rec-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--nexus-primary), #2563eb);
    color: #ffffff !important;
    padding: 12px 18px;
    border-radius: var(--nexus-radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
    transition: var(--nexus-transition-smooth);
}

.nexus-rec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.45);
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

.nexus-btn-arrow {
    transition: transform 0.2s ease;
}

.nexus-rec-btn:hover .nexus-btn-arrow {
    transform: translateX(4px);
}

/* 3. Recent Posts List */
.nexus-recent-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nexus-recent-post-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--nexus-gray-100);
}

.nexus-recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nexus-recent-post-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--nexus-gray-700);
    font-size: 13.5px;
    line-height: 1.45;
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

.nexus-recent-post-link:hover {
    color: var(--nexus-primary);
}

.nexus-recent-post-bullet {
    color: var(--nexus-primary);
    font-size: 16px;
    line-height: 1.2;
}

.nexus-recent-post-title {
    font-weight: 500;
}

/* ==========================================================================
   7. Single Article & Full Content Styling (Review Compatible)
   ========================================================================== */
.nexus-single-article {
    background-color: var(--nexus-card-bg);
    border: 1px solid var(--nexus-gray-200);
    border-radius: var(--nexus-radius-md);
    padding: 36px 40px;
    margin-bottom: 24px;
    box-shadow: var(--nexus-shadow-card);
}

/* Breadcrumbs */
.nexus-breadcrumbs {
    font-size: 13px;
    color: var(--nexus-gray-500);
    margin-bottom: 18px;
}

.nexus-breadcrumb-sep {
    margin: 0 6px;
    color: var(--nexus-gray-400);
}

.nexus-breadcrumb-current {
    color: var(--nexus-gray-800);
    font-weight: 600;
}

/* Entry Header */
.nexus-entry-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.4px;
    color: var(--nexus-gray-900);
    margin: 0 0 16px;
}

.nexus-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--nexus-gray-500);
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--nexus-gray-100);
}

.nexus-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--nexus-gray-700);
}

.nexus-author-avatar {
    border-radius: var(--nexus-radius-full);
}

.nexus-meta-dot {
    color: var(--nexus-gray-300);
}

.nexus-single-featured-wrap {
    margin-bottom: 28px;
    border-radius: 8px;
    overflow: hidden;
}

.nexus-single-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Typography */
.nexus-entry-content {
    font-size: 16.5px;
    line-height: 1.75;
    color: #2d3748;
}

.nexus-entry-content p {
    margin-bottom: 20px;
}

.nexus-entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nexus-gray-900);
    margin: 36px 0 16px;
    line-height: 1.3;
}

.nexus-entry-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--nexus-gray-900);
    margin: 28px 0 14px;
}

.nexus-entry-content ul,
.nexus-entry-content ol {
    margin: 0 0 22px 24px;
    padding: 0;
}

.nexus-entry-content li {
    margin-bottom: 8px;
}

.nexus-entry-content blockquote {
    border-left: 4px solid var(--nexus-primary);
    background-color: var(--nexus-gray-50);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--nexus-gray-700);
}

/* Markdown & Comparison Table Support */
.nexus-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 14.5px;
}

.nexus-entry-content th {
    background-color: var(--nexus-primary);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 13px 18px;
}

.nexus-entry-content td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--nexus-gray-200);
}

.nexus-entry-content tr:nth-child(even) {
    background-color: #f8fafc;
}

.nexus-entry-content tr:hover {
    background-color: #f1f5f9;
}

/* Tag Pills */
.nexus-entry-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 32px 0 24px;
    padding-top: 20px;
    border-top: 1px solid var(--nexus-gray-200);
}

.nexus-tags-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--nexus-gray-600);
}

.nexus-tag-pill {
    background-color: var(--nexus-gray-100);
    color: var(--nexus-gray-700);
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--nexus-radius-full);
    text-decoration: none;
    transition: var(--nexus-transition-fast);
}

.nexus-tag-pill:hover {
    background-color: var(--nexus-primary);
    color: #ffffff;
}

/* Author Box */
.nexus-author-box {
    display: flex;
    gap: 18px;
    align-items: center;
    background-color: var(--nexus-gray-50);
    border: 1px solid var(--nexus-gray-200);
    border-radius: var(--nexus-radius-md);
    padding: 22px;
    margin: 28px 0;
}

.nexus-author-avatar-wrap {
    flex-shrink: 0;
}

.nexus-author-bio-avatar {
    border-radius: var(--nexus-radius-full);
}

.nexus-author-bio-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--nexus-gray-900);
    margin: 0 0 6px;
}

.nexus-author-bio-desc {
    font-size: 13.5px;
    color: var(--nexus-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Post Navigation (Prev / Next) */
.nexus-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 32px 0;
    padding-top: 20px;
    border-top: 1px solid var(--nexus-gray-200);
}

.nexus-nav-prev,
.nexus-nav-next {
    flex: 1;
}

.nexus-nav-next {
    text-align: right;
}

.nexus-nav-sub {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--nexus-gray-500);
    margin-bottom: 4px;
}

.nexus-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--nexus-gray-800);
    transition: var(--nexus-transition-fast);
}

.nexus-nav-prev a:hover .nexus-nav-title,
.nexus-nav-next a:hover .nexus-nav-title {
    color: var(--nexus-primary);
}

/* ==========================================================================
   8. Site Footer & Back to Top
   ========================================================================== */
.nexus-site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--nexus-gray-200);
    padding: 32px 0;
    text-align: center;
}

.nexus-footer-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 0 0 16px;
    padding: 0;
}

.nexus-footer-menu li a {
    font-size: 14px;
    font-weight: 500;
    color: var(--nexus-gray-600);
}

.nexus-footer-menu li a:hover {
    color: var(--nexus-primary);
}

.nexus-footer-copyright p {
    font-size: 13px;
    color: var(--nexus-gray-500);
    margin: 0 0 6px;
}

.nexus-footer-credit {
    font-size: 12px;
    color: var(--nexus-gray-400);
}

/* Floating Back to Top Button */
.nexus-back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: var(--nexus-radius-full);
    background-color: var(--nexus-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--nexus-transition-smooth);
    z-index: 999;
}

.nexus-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nexus-back-to-top:hover {
    background-color: var(--nexus-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.45);
}

/* ==========================================================================
   9. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .nexus-main-layout {
        flex-direction: column;
    }

    .nexus-sidebar-area {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .nexus-site-title {
        font-size: 30px;
    }

    .nexus-post-card {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nexus-card-left {
        width: 100%;
    }

    .nexus-single-article {
        padding: 22px 18px;
    }

    .nexus-entry-title {
        font-size: 24px;
    }

    .nexus-post-nav {
        flex-direction: column;
    }

    .nexus-nav-next {
        text-align: left;
    }
}
