/* ===================================
   TECH MAGAZINE TEMPLATE
   Modern Tech Blog/Magazine
   Built with RSL Framework
   =================================== */

/* ===================================
   CSS VARIABLES
   =================================== */

:root {
    /* Brand Colors */
    --color-primary: #6E7BFF;
    --color-primary-light: #8B97FF;
    --color-primary-dark: #5563E8;
    --color-accent: #FF6B9D;
    --color-accent-light: #FF8BB3;

    /* Neutrals */
    --color-bg: #FFFFFF;
    --color-surface: #F8F9FA;
    --color-border: #E1E4E8;
    --color-text: #1F2937;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* ===================================
   BASE STYLES
   =================================== */

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

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

.section-padding {
    padding: var(--space-3xl) 0;
}

/* ===================================
   NAVIGATION
   =================================== */

.tech-nav {
    background: var(--color-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.brand-icon {
    color: var(--color-primary);
    font-size: 1.75rem;
    margin-right: var(--space-xs);
}

.brand-accent {
    color: var(--color-accent);
}

.tech-nav .rsl-navbar-link {
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.tech-nav .rsl-navbar-link:hover {
    color: var(--color-primary);
}

.tech-nav .rsl-navbar-link.active {
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
}

.tech-nav .rsl-navbar-link.active:hover {
    color: white;
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

/* Mega Menu Styling Overrides */
.rsl-navbar-mega-menu {
    max-width: 1000px;
}

.rsl-navbar-mega-menu h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.rsl-navbar-mega-menu h4 i {
    font-size: 1rem;
}

/* Mega Menu Links with Descriptions */
.mega-link {
    display: flex;
    flex-direction: column;
    padding: var(--space-sm) var(--space-md);
    margin: 0 calc(var(--space-md) * -1);
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.mega-link:hover {
    background: var(--color-surface);
    transform: translateX(4px);
}

.mega-link-text {
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.mega-link-desc {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

.mega-link:hover .mega-link-text {
    color: var(--color-primary);
}

/* Featured Article in Mega Menu */
.mega-featured {
    background: var(--color-surface);
    border-radius: 8px;
    padding: var(--space-lg);
}

.mega-featured-content {
    position: relative;
}

.mega-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.mega-featured-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: var(--space-sm);
}

.mega-featured-content h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
    text-transform: none;
    letter-spacing: normal;
}

.mega-featured-content p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.mega-featured-content .btn {
    width: 100%;
    justify-content: center;
}

/* Dark mode adjustments */
[data-theme="dark"] .mega-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .mega-featured {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    background: linear-gradient(135deg, #6E7BFF 0%, #A855F7 100%);
    color: white;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-xs) var(--space-lg);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #FFD700, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    justify-content: center;
    flex-wrap: wrap;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-label {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   FEATURED SECTION (Balanced Layout)
   =================================== */

.featured-section {
    background: var(--color-surface);
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
}

.card-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-primary);
    font-weight: 600;
}

.meta-date {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-muted);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

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

.card-excerpt {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
}

.author-role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.read-more {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: gap var(--transition-fast);
}

.read-more:hover {
    gap: var(--space-sm);
}

/* ===================================
   TUTORIALS SECTION (Sidebar Layout)
   =================================== */

.tutorials-section {
    background: white;
}

/* Sidebar Widgets */
.widget {
    background: var(--color-surface);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text);
}

.widget-title i {
    color: var(--color-primary);
}

.widget-text {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: var(--space-xs);
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.category-list a:hover {
    background: white;
    color: var(--color-primary);
}

.category-list .count {
    background: var(--color-primary);
    color: white;
    padding: 0.125rem var(--space-xs);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Newsletter Widget */
.newsletter-form input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Popular Posts Widget */
.popular-list {
    list-style: none;
}

.popular-item {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.popular-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.popular-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.popular-content a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.popular-content a:hover {
    color: var(--color-primary);
}

.popular-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag-item {
    padding: var(--space-xs) var(--space-md);
    background: white;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid var(--color-border);
}

.tag-item:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Tutorial Cards */
.tutorial-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(8px);
}

.tutorial-image {
    position: relative;
    padding-top: 50%;
    overflow: hidden;
}

.tutorial-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tutorial-duration {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.tutorial-content {
    padding: var(--space-lg);
}

.tutorial-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.meta-difficulty {
    padding: 0.25rem var(--space-sm);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty-beginner {
    background: #D1FAE5;
    color: #065F46;
}

.difficulty-intermediate {
    background: #FEF3C7;
    color: #92400E;
}

.difficulty-advanced {
    background: #FEE2E2;
    color: #991B1B;
}

.tutorial-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.tutorial-excerpt {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

.tutorial-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.tutorial-author {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 600;
}

.tutorial-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.tutorial-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.tutorial-stats span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Full-Width CTA */
.full-width-content {
    margin-top: var(--space-2xl);
}

.cta-banner {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: var(--space-2xl);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.cta-content h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
    color: white;
}

.cta-content p {
    opacity: 0.9;
    margin: 0;
}

/* ===================================
   NEWS SECTION
   =================================== */

.news-section {
    background: var(--color-surface);
}

.news-card {
    background: white;
    padding: var(--space-lg);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.news-source {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.news-time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.news-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.news-excerpt {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.news-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.news-link:hover {
    gap: var(--space-sm);
}

/* ===================================
   COMMUNITY SECTION
   =================================== */

.community-section {
    background: white;
}

.community-card {
    background: var(--color-surface);
    padding: var(--space-xl);
    border-radius: 12px;
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.community-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 2.5rem;
    color: white;
}

.community-card h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.community-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

/* ===================================
   FOOTER
   =================================== */

.tech-footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-brand i {
    color: var(--color-primary);
}

.footer-description {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: block;
    padding: var(--space-xs) 0;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: var(--space-xs) 0;
}

.footer-bottom i {
    color: var(--color-accent);
}

/* ===================================
   OFF-CANVAS FILTERS
   =================================== */

.off-canvas-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Off-canvas needs higher z-index than mobile navbar */
#filtersPanel.off-canvas {
    z-index: 10100 !important;
}

#offCanvasOverlay.off-canvas-overlay {
    z-index: 10099 !important;
}

.off-canvas {
    z-index: 10100 !important;
}

.off-canvas-overlay {
    z-index: 10099 !important;
}

.filter-group {
    margin-bottom: var(--space-xl);
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.filter-checkbox:hover,
.filter-radio:hover {
    background: var(--color-surface);
}

.filter-checkbox input,
.filter-radio input {
    cursor: pointer;
}

.filter-checkbox span,
.filter-radio span {
    color: var(--color-text-secondary);
}

/* ===================================
   ARTICLE PAGE
   =================================== */

/* Override RSL Sidebar Defaults - Force correct layout */
.rsl-sidebar-layout {
    overflow: auto !important;
}

.rsl-sidebar-right {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    /* Do NOT override float, width, or margin - let RSL handle it */
}

.rsl-main-with-sidebar {
    display: block !important;
    /* Let RSL CSS handle the rest */
}

/* Ensure all block elements in sidebar content respect the float */
.rsl-main-with-sidebar > *,
.rsl-main-with-sidebar .article-content > * {
    max-width: 100%;
    box-sizing: border-box;
}

.article-content .article-quote,
.article-content .code-block {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

/* Style the widgets inside sidebar */
.rsl-sidebar-right .widget {
    background: var(--color-surface);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}


.article-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #A855F7 100%);
    color: white;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.article-header-content {
    max-width: 800px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.article-date,
.article-reading-time {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.9;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.article-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.author-title {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Article Content */
.article-container {
    margin-bottom: var(--space-3xl);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.article-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.article-content p {
    margin-bottom: var(--space-lg);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-featured-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: var(--space-xl);
    display: block;
}

.code-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: var(--color-text-primary);
}

.article-quote {
    border-left: 4px solid var(--color-primary);
    padding: var(--space-lg) var(--space-md);
    margin: var(--space-xl) 0;
    background: var(--color-surface);
    border-radius: 0 8px 8px 0;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-text-primary);
    max-width: 100%;
    box-sizing: border-box;
    margin-right: 1rem;
    overflow: auto;
}

.article-quote cite {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.9rem;
    font-style: normal;
    color: var(--color-text-muted);
}

/* Article Footer */
.article-footer {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-lg);
}

.tag-label {
    font-weight: 600;
    color: var(--color-text-muted);
}

.tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.article-share {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.share-label {
    font-weight: 600;
    color: var(--color-text-muted);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Sidebar Widgets for Article Page */
.author-widget-content {
    text-align: center;
}

.author-widget-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: var(--space-md);
    border: 3px solid var(--color-border);
}

.author-widget-content h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.author-widget-bio {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.author-social {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.author-social a:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

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

.toc-list li {
    margin-bottom: var(--space-sm);
}

.toc-list a {
    display: block;
    padding: var(--space-xs) 0;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-left: 2px solid transparent;
    padding-left: var(--space-md);
}

.toc-list a:hover {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.related-article {
    display: flex;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.related-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-article img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-article-content {
    flex: 1;
}

.related-article-content h4 {
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.related-article-content h4 a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.related-article-content h4 a:hover {
    color: var(--color-primary);
}

.related-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Below MD breakpoint (< 768px) - matches RSL grid MD breakpoint */
@media (max-width: 767px) {
    /* Mobile Navbar Layout Fixes */
    .tech-nav .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .tech-nav .rsl-navbar-brand {
        order: 1;
        flex: 0 0 auto;
    }

    .tech-nav .rsl-navbar-toggle {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .tech-nav .rsl-navbar-menu {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .cta-banner .btn {
        width: 100%;
    }

    /* Mobile Mega Menu Fixes */
    .rsl-navbar-item[data-menu-type="mega"] .rsl-navbar-mega-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        left: 0 !important;
        right: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: var(--space-md) !important;
        margin: 0 !important;
        background: var(--color-bg) !important;
        overflow-x: hidden !important;
        transform: none !important;
    }

    .rsl-navbar-mega-menu * {
        box-sizing: border-box !important;
    }

    .rsl-navbar-mega-menu .slot-layout {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .rsl-navbar-mega-menu .slot-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mega-section {
        width: 100% !important;
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .mega-section:last-of-type {
        border-bottom: none;
    }

    .mega-section h4 {
        width: 100% !important;
    }

    .mega-featured {
        width: 100% !important;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        padding: var(--space-md);
        margin-top: var(--space-md);
    }

    .mega-featured-content {
        width: 100% !important;
    }

    .mega-featured-image {
        width: 100% !important;
        height: 150px;
    }

    .mega-link {
        width: 100% !important;
        padding: var(--space-sm) var(--space-xs);
        margin: 0 calc(var(--space-xs) * -1);
    }

    .mega-link-text,
    .mega-link-desc {
        width: 100% !important;
    }

    .mega-link:hover {
        transform: none;
    }

    /* Force mobile menu to contain everything */
    .rsl-navbar-menu.mobile-open {
        overflow-x: hidden !important;
    }

    [data-theme="dark"] .rsl-navbar-item[data-menu-type="mega"] .rsl-navbar-mega-menu {
        background: var(--color-bg) !important;
    }

    [data-theme="dark"] .mega-featured {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Below SM breakpoint (< 480px) - matches RSL grid SM breakpoint */
@media (max-width: 479px) {
    .section-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ===================================
   DARK MODE THEME
   =================================== */

[data-theme="dark"] {
    /* Dark Mode Colors */
    --color-bg: #0F1419;
    --color-surface: #1A1F25;
    --color-border: #2D3748;
    --color-text: #F7FAFC;
    --color-text-secondary: #A0AEC0;
    --color-text-muted: #718096;

    /* Adjust brand colors for better contrast */
    --color-primary: #8B97FF;
    --color-primary-light: #A3ADFF;
    --color-accent: #FF8BB3;
}

/* Dark mode specific overrides */
[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

[data-theme="dark"] .tech-nav {
    background: rgba(15, 20, 25, 0.95);
    border-bottom-color: var(--color-border);
}

/* Dark mode hamburger menu styling */
[data-theme="dark"] .rsl-navbar-toggle {
    background: transparent !important;
}

[data-theme="dark"] .rsl-navbar-toggle span {
    background-color: var(--color-text) !important;
}

[data-theme="dark"] .rsl-navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .rsl-navbar-toggle.active {
    background: transparent !important;
}

[data-theme="dark"] .rsl-navbar-toggle.active span {
    background-color: var(--color-text) !important;
}

[data-theme="dark"] .rsl-navbar-toggle.active:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .featured-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .tutorial-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .widget {
    background: var(--color-bg);
}

[data-theme="dark"] .category-list a:hover {
    background: var(--color-surface);
}

[data-theme="dark"] .newsletter-form input {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .tag-item {
    background: var(--color-bg);
    border-color: var(--color-border);
}

[data-theme="dark"] .community-card {
    background: var(--color-surface);
}

[data-theme="dark"] .card-footer,
[data-theme="dark"] .tutorial-footer {
    border-top-color: var(--color-border);
}

[data-theme="dark"] .tutorials-section {
    background: var(--color-bg);
}

[data-theme="dark"] .community-section {
    background: var(--color-bg);
}

[data-theme="dark"] .tech-footer {
    background: #000000;
}

/* ===================================
   ACCESSIBILITY WIDGET THEME OVERRIDES
   Matching Tech Magazine Colors
   =================================== */
:root {
    --rsl-a11y-primary: #6E7BFF;
    --rsl-a11y-primary-dark: #5563E8;
    --rsl-a11y-primary-light: #8B97FF;
    --rsl-a11y-secondary: #FF6B9D;
    --rsl-a11y-button-gradient: linear-gradient(135deg, #6E7BFF 0%, #FF6B9D 100%);
    --rsl-a11y-button-shadow: 0 4px 16px rgba(110, 123, 255, 0.4);
    --rsl-a11y-button-shadow-hover: 0 6px 24px rgba(110, 123, 255, 0.5);
    --rsl-a11y-header-gradient: linear-gradient(135deg, #6E7BFF 0%, #FF6B9D 100%);
    --rsl-a11y-toggle-gradient: linear-gradient(135deg, #6E7BFF 0%, #8B97FF 100%);
    --rsl-a11y-success: #10b981;
}
