/* Tech Blog - Medium.com Inspired Design */

:root {
    /* Medium.com-inspired color palette */
    --primary-color: #1a8917;          /* Medium's signature green */
    --secondary-color: #242424;        /* Deep charcoal for text */
    --text-primary: #242424;           /* Main text color */
    --text-secondary: #757575;         /* Subtle text color */
    --text-light: #6B6B6B;            /* Light text */
    --text-muted: #8B8B8B;            /* Muted text */
    --accent-color: #FFC017;           /* Medium's highlight yellow */
    --border-light: #E6E6E6;          /* Light borders */
    --background-gray: #F8F9FA;       /* Light gray background */
    --background-light: #FAFAFA;      /* Light background */
    --background-white: #FFFFFF;      /* Pure white */
    --success-color: #1a8917;
    --warning-color: #FFC017;
    --danger-color: #FF6B6B;
    
    /* Bootstrap color overrides */
    --bs-primary: #1a8917;
    --bs-primary-rgb: 26, 137, 23;
    --bs-success: #1a8917;
    --bs-success-rgb: 26, 137, 23;
}

/* Global Bootstrap Primary Color Overrides */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #16a085 !important;
    border-color: #16a085 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.alert-primary {
    background-color: rgba(26, 137, 23, 0.1) !important;
    border-color: var(--primary-color) !important;
    color: #0d5d0d !important;
}

/* Typography - Medium.com style */
@import url('https://fonts.googleapis.com/css2?family=Charter:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Charter', 'Georgia', 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.58;
    color: var(--text-primary);
    background-color: var(--background-white);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headlines and UI elements use Inter */
h1, h2, h3, h4, h5, h6, .nav, .btn, .navbar, .card-title, .badge {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section - Clean and Minimal */
.hero-section {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    padding: 80px 0;
    position: relative;
}

/* Hero content positioning */
.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.hero-section .lead {
    font-size: 24px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-section .btn {
    position: relative;
    z-index: 3;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    border: 2px solid;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-section .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.hero-section .btn-primary:hover {
    background-color: #16a085;
    border-color: #16a085;
    transform: translateY(-1px);
}

.hero-section .btn-outline-primary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.hero-section .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.hero-illustration {
    display: none; /* Remove for cleaner design */
}

/* Navigation - Clean Medium style */
.navbar {
    background-color: var(--background-white) !important;
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 20px;
    transition: all 0.2s ease;
}

/* General link styling */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #16a085;
    text-decoration: underline;
}

/* Navigation links */
.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(26, 137, 23, 0.1);
}

/* Category links in meta */
.blog-meta a,
.card-meta a {
    color: var(--text-secondary);
    text-decoration: none;
}

.blog-meta a:hover,
.card-meta a:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(26, 137, 23, 0.15);
}

/* Section Titles - Medium style */
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
    position: relative;
}

.section-title.center::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Blog Cards - Medium-inspired design */
.card,
.blog-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: var(--background-white);
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
}

.card:hover,
.blog-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    cursor: pointer;
}

/* Make cards clickable like Medium */
.card[onclick] {
    cursor: pointer;
}

.card[onclick]:hover .card-title a {
    color: var(--primary-color);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.card-body {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.card-title {
    font-family: 'Charter', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-decoration: none;
    position: relative;
    z-index: 3;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    display: block;
    position: relative;
    z-index: 4;
    cursor: pointer;
}

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

/* Create invisible overlay to make entire card clickable */
.card-title a::after {
    content: '';
    position: absolute;
    top: -24px;
    left: -24px;
    right: -24px;
    bottom: -150px;
    z-index: 1;
    cursor: pointer;
}
    text-decoration: none;
}

.card-text {
    font-family: 'Charter', serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.card-meta .author {
    font-weight: 500;
    color: var(--text-secondary);
}

.card-meta .date {
    color: var(--text-muted);
}

.card-category {
    display: inline-block;
    background: rgba(26, 137, 23, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.featured-card {
    position: relative;
    border: 1px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 192, 23, 0.05), rgba(255, 192, 23, 0.1));
}

.featured-card::before {
    content: 'FEATURED';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

/* Category Cards */
.category-card {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
}

.category-card .card {
    border: none;
    transition: all 0.3s ease;
}

.category-card:hover .card {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Blog Content - Enhanced readability like Medium */
.blog-content {
    font-family: 'Charter', serif;
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 40px;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-top: 2em;
    margin-bottom: 1em;
    letter-spacing: -0.02em;
}

.blog-content h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

.blog-content h2 {
    font-size: 2rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content h4 {
    font-size: 1.25rem;
}

.blog-content h5 {
    font-size: 1.125rem;
}

.blog-content h6 {
    font-size: 1rem;
}

.blog-content p {
    margin-bottom: 1.5em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.blog-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(26, 137, 23, 0.05);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    font-size: 18px;
}

.blog-content code {
    background: var(--background-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
    font-family: 'Monaco', 'Consolas', monospace;
}

.blog-content pre {
    background: var(--background-gray);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.blog-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.blog-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* Blog post article layout - Medium style */
.blog-post {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.blog-post header.blog-meta {
    margin-bottom: 48px;
    padding: 0 40px;
}

.blog-post h1 {
    font-family: 'Inter', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.blog-content a:hover {
    color: #16a085;
    text-decoration-thickness: 2px;
}
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.blog-content pre {
/* Read time and meta info */
.blog-meta {
    text-align: center;
    margin: 40px auto;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-light);
    max-width: 900px;
}

.blog-meta .author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-meta .author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.blog-meta .read-time,
.blog-meta .publish-date {
    color: var(--text-muted);
    font-size: 14px;
}

.blog-meta a {
    color: inherit;
    text-decoration: none;
}

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

/* Tags - Medium style */
.blog-tags {
    margin: 40px 0;
}

.blog-tags .badge {
    background: rgba(26, 137, 23, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(26, 137, 23, 0.2);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    text-decoration: none;
}

.blog-tags .badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Archive Styles - Clean design */
.year-header {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 12px;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.month-header {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    margin-top: 32px;
}

.archive-card {
    border: none;
    background: var(--background-white);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.archive-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Subscribe Modal - Clean Medium style */
#subscribeModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

#subscribeModal .modal-header {
    background: var(--background-white);
    color: var(--text-primary);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--border-light);
    padding: 24px 32px;
}

#subscribeModal .modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

#subscribeModal .modal-body {
    padding: 32px;
    background: var(--background-white);
}

#subscribeModal .form-control {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
}

#subscribeModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 137, 23, 0.1);
}

#subscribeModal .btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
}

#subscribeModal .btn-primary:hover {
    background: #16a085;
    transform: translateY(-1px);
}

#subscribeModal .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
}

#subscribeModal .btn-secondary:hover {
    background: var(--background-gray);
    border-color: var(--text-secondary);
}
}

/* Newsletter Section - Clean Medium style */
.newsletter-section {
    background: linear-gradient(135deg, rgba(26, 137, 23, 0.05), rgba(26, 137, 23, 0.1));
    border: 1px solid rgba(26, 137, 23, 0.1);
    border-radius: 12px;
    padding: 40px;
    margin: 60px 0;
    text-align: center;
}

.newsletter-section h3 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.newsletter-section p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar - Clean styling */
.sidebar .card {
    border: none;
    border-radius: 12px;
    background: var(--background-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.sidebar .card-header {
    background: var(--background-gray);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar .card-body {
    padding: 20px;
}

/* Navigation dropdowns */
.navbar .dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 8px;
}

.navbar .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background: rgba(26, 137, 23, 0.1);
    color: var(--primary-color);
}

/* Search Results */
.search-header {
    text-align: center;
    padding: 60px 0 40px;
}

.search-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.search-header .search-meta {
    color: var(--text-muted);
    font-size: 16px;
}

/* Footer - Clean and minimal */
footer {
    background: var(--background-white);
    border-top: 1px solid var(--border-light);
    padding: 40px 0;
    margin-top: 80px;
    font-family: 'Inter', sans-serif;
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer h5 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 16px;
}

footer p,
footer a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    line-height: 1.6;
}

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

footer .list-unstyled {
    padding: 0;
    margin: 0;
}

footer .list-unstyled li {
    margin-bottom: 8px;
}

footer .list-unstyled li a {
    display: inline-block;
    padding: 4px 0;
    transition: color 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 18px;
    }
    
    .blog-content {
        font-size: 18px;
        padding: 0 20px;
        max-width: 100%;
    }
    
    .blog-meta {
        padding: 20px;
        max-width: 100%;
    }
    
    .blog-content h1 {
        font-size: 2rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .newsletter-section {
        padding: 30px 20px;
        margin: 40px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .card-body {
        padding: 16px;
    }
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .section-title::after {
        width: 40px;
    }
}

/* Loading Animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.opacity-25 {
    opacity: 0.25;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    footer,
    .share-buttons {
        display: none;
    }
    
    .blog-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}