/*
Theme: OneRuby - Eleventy Edition
Description: Modern dark theme for Ruby programming and AI content
Version: 2.0
Author: Oleksandr Kholodniak
*/

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

:root {
    --primary-color: #CC342D;
    --secondary-color: #8B2635;
    --accent-color: #FFD700;
    --bg-dark: #0D1117;
    --bg-darker: #010409;
    --text-light: #F0F6FC;
    --text-gray: #8B949E;
    --border-color: #21262D;
    --code-bg: #161B22;
    --gradient: linear-gradient(135deg, #CC342D 0%, #8B2635 100%);
    --ad-bg: #1C2128;
    --ad-border: #30363D;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo .site-name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo .custom-logo {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.logo .custom-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(204, 52, 45, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, rgba(204, 52, 45, 0.3) 0%, transparent 50%),
               radial-gradient(circle at 70% 80%, rgba(139, 38, 53, 0.3) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(204, 52, 45, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(204, 52, 45, 0.4);
    color: white;
    text-decoration: none;
}

/* ==================== Main Layout ==================== */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.content-area {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 70px;
}

/* About Page Photo */
.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Page Content Styling */
.page-content {
    background: var(--code-bg);
    border-radius: 15px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    line-height: 1.8;
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.2;
}

.page-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: var(--text-light);
}

.page-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-light);
}

.page-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.page-content ul,
.page-content ol {
    margin: 1rem 0 1.5rem 2rem;
    color: var(--text-light);
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-content a:hover {
    color: var(--accent-color);
}

.page-content code {
    background: var(--bg-darker);
    color: var(--accent-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.page-content pre {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.page-content pre code {
    background: none;
    padding: 0;
    color: var(--text-light);
}

.page-content blockquote {
    background: var(--bg-darker);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    color: var(--text-gray);
}

.page-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.page-content strong {
    color: var(--text-light);
    font-weight: 700;
}

.page-content em {
    color: var(--text-gray);
    font-style: italic;
}

/* ==================== Article Container (Single Post) ==================== */
.article-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 70px;
}

.article-main {
    min-width: 0;
}

/* ==================== Advertisement Blocks ==================== */
.ad-block, .ad-zone {
    margin: 2rem 0;
    text-align: center;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

/* Hide ad container if AdSense doesn't fill it */
.ad-block:empty,
.ad-block ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ad-leaderboard {
    width: 100%;
    margin: 2rem auto;
}

.ad-sidebar,
.ad-sidebar-sticky,
.ad-sidebar-bottom {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
}

.sticky-ad {
    position: sticky;
    top: 100px;
    z-index: 10;
}

.ad-incontent {
    margin: 2rem 0;
    max-width: 100%;
}

.ad-between-articles {
    grid-column: 1 / -1;
    margin: 2rem 0;
}

/* Ensure sidebar ads don't overflow */
.sidebar .ad-block {
    max-width: 300px;
    width: 100%;
}

.sidebar ins.adsbygoogle {
    max-width: 100% !important;
}

/* ==================== Section Titles ==================== */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Articles Grid ==================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--code-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    height: fit-content;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.3s ease;
    text-decoration: none;
}

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

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.article-title a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.article-excerpt {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: var(--accent-color);
}

.article-date, .reading-time {
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* ==================== Single Article Layout ==================== */
.article-header {
    margin-bottom: 2rem;
}

.single-article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.article-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

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

.separator {
    color: var(--text-gray);
}

.single-article-content {
    background: var(--code-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    line-height: 1.8;
}

.single-article-content h1,
.single-article-content h2,
.single-article-content h3,
.single-article-content h4,
.single-article-content h5,
.single-article-content h6 {
    color: var(--text-light);
    margin: 2rem 0 1rem 0;
    font-weight: 700;
}

.single-article-content h1 { font-size: 2.2rem; }
.single-article-content h2 { font-size: 1.8rem; }
.single-article-content h3 { font-size: 1.5rem; }
.single-article-content h4 { font-size: 1.3rem; }

.single-article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.single-article-content ul,
.single-article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-light);
}

.single-article-content li {
    margin-bottom: 0.5rem;
}

.single-article-content blockquote {
    background: var(--bg-darker);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-style: italic;
    color: var(--text-gray);
}

.single-article-content code {
    background: var(--bg-darker);
    color: var(--accent-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.single-article-content pre {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.single-article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-light);
}

.single-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.single-article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.single-article-content a:hover {
    color: var(--accent-color);
}

/* ==================== Breadcrumb Navigation ==================== */
.breadcrumb {
    padding: 1rem 0;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ==================== Widgets & Sidebar ==================== */
.widget {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.popular-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.popular-posts a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

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

.popular-posts h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-light);
}

.popular-posts .post-meta {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* ==================== Categories Widget ==================== */
.categories-widget .category-list {
    display: grid;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(204, 52, 45, 0.1);
    border-radius: 8px;
    transition: background 0.3s ease;
    text-decoration: none;
}

.category-item:hover {
    background: rgba(204, 52, 45, 0.2);
}

.category-name {
    font-weight: 600;
    color: var(--text-light);
}

.category-count {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==================== Newsletter Widget ==================== */
.newsletter {
    background: var(--gradient);
    color: white;
    text-align: center;
}

.newsletter p {
    margin-bottom: 1rem;
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
}

.newsletter-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.newsletter-privacy {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==================== Author Card ==================== */
.author-card .author-content {
    text-align: center;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}

.author-card h4 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.author-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.author-social a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

/* ==================== Social Share ==================== */
.social-share {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--code-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.social-share h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.linkedin { background: #0077B5; }
.share-btn.facebook { background: #1877F2; }
.share-btn.hackernews { background: #FF6600; }

/* ==================== Related Articles ==================== */
.related-articles {
    margin: 3rem 0;
}

.related-articles h3 {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-article {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.related-article a {
    text-decoration: none;
}

.related-article h4 {
    color: var(--text-light);
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.related-article p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* ==================== Categories Section ==================== */
.categories,
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--code-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--category-color, var(--gradient));
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--category-color, var(--primary-color));
}

.category-card i {
    font-size: 2.5rem;
    color: var(--category-color, var(--primary-color));
    margin-bottom: 1rem;
}

.category-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.category-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-card .article-count {
    background: var(--category-color, var(--primary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto;
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.category-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Category Header */
.category-header {
    margin-bottom: 2rem;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-header .category-description {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* Category Navigation */
.category-navigation {
    margin-top: 3rem;
    text-align: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--code-bg);
    border-radius: 50%;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ==================== Reading Progress Bar ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* ==================== Scroll to Top Button ==================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(204, 52, 45, 0.3);
}

/* ==================== Scrollbar Styling ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .main-layout, .article-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .sticky-ad {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 17, 23, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        min-height: 70vh;
        margin-top: 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .single-article-title {
        font-size: 2rem;
    }

    .article-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .separator {
        display: none;
    }

    .share-buttons {
        flex-direction: column;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

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

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

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .single-article-content {
        padding: 1rem;
    }

    .logo .custom-logo {
        max-height: 40px;
    }
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== Utility Classes ==================== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
