/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-gray: #f9fafb;
    --danger-color: #dc2626;
    --success-color: #10b981;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.nav a.admin-link {
    color: var(--accent-color);
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Featured Article */
.featured {
    margin-bottom: 60px;
}

.featured-article {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.featured-image {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
}

.featured-title {
    font-size: 42px;
    font-weight: 800;
    margin: 15px 0;
    line-height: 1.2;
}

.featured-title a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.featured-title a:hover {
    opacity: 0.8;
}

.featured-excerpt {
    font-size: 18px;
    margin-bottom: 15px;
    opacity: 0.95;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

/* Content with Sidebar Layout */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.main-content {
    min-width: 0; /* Prevent grid blowout */
}

/* Articles Section */
.articles-section {
    padding: 20px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 800;
}

.no-articles {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: var(--text-light);
}

.no-articles a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-gray);
}

.article-content {
    padding: 25px;
}

.article-title {
    font-size: 22px;
    font-weight: 700;
    margin: 12px 0;
    line-height: 1.3;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 15px;
}

.article-meta,
.article-meta-large {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.article-meta .author,
.article-meta-large .author {
    font-weight: 600;
}

/* Single Article - New Design */
.article-single {
    padding: 0;
}

/* Article Header */
.article-header-new {
    margin-bottom: 40px;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category-badge-large {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.category-badge-large:hover {
    background-color: var(--secondary-color);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.reading-time svg {
    opacity: 0.7;
}

.article-title-new {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-color);
}

.article-excerpt-new {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 30px;
}

.article-author-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.author-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info-inline strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.article-meta-inline {
    font-size: 14px;
    color: var(--text-light);
}

/* Featured Image */
.article-image-featured {
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-gray);
}

/* Article Content */
.article-content-new {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-color);
    margin: 40px 0;
}

.article-content-new p {
    margin-bottom: 1.5em;
}

.article-content-new h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 50px 0 25px 0;
    color: var(--text-color);
    line-height: 1.3;
}

.article-content-new h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px 0;
    color: var(--text-color);
}

.article-content-new strong {
    font-weight: 700;
    color: var(--text-color);
}

.article-content-new em {
    font-style: italic;
}

.article-content-new ul,
.article-content-new ul.plain-list {
    list-style-type: disc;
    padding-left: 30px;
    margin: 1.5em 0;
    position: relative;
    z-index: 1;
}

.article-content-new li {
    margin-bottom: 0.75em;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    color: var(--text-color);
    text-decoration: none;
}

/* Allow links in Key Takeaways but not in plain lists */
.article-content-new ul.plain-list a,
.article-content-new ul.plain-list li a {
    pointer-events: none !important;
    text-decoration: none !important;
    color: var(--text-color) !important;
    cursor: text !important;
}

.article-content-new ul.plain-list li {
    color: var(--text-color);
    cursor: default;
}

/* Markdown lists and no-links - plain text only */
.markdown-list,
ul.markdown-list,
.no-links {
    list-style-type: disc;
    padding-left: 30px;
    margin: 1.5em 0;
}

.markdown-list li,
ul.markdown-list li,
.no-links li {
    color: #1f2937;
    margin-bottom: 0.75em;
    line-height: 1.8;
}

/* Hide links in no-links class */
.no-links a,
.no-links li a {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.article-content-new figure,
.article-content-new figure.article-image-block,
figure.article-image-block {
    position: relative;
    z-index: 10;
    clear: both;
    display: block;
    margin: 40px 0;
    padding: 0;
    background: transparent;
}

.article-content-new figure img,
figure.article-image-block img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 10;
}

/* Tags */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.article-tags strong {
    color: var(--text-color);
}

.article-tags .tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--bg-gray);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s;
}

.article-tags .tag:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Social Share */
.article-share {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.article-share strong {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    color: #fff;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.twitter:hover {
    background-color: #0c85d0;
}

.share-btn.facebook {
    background-color: #1877f2;
}

.share-btn.facebook:hover {
    background-color: #0c63d4;
}

.share-btn.linkedin {
    background-color: #0077b5;
}

.share-btn.linkedin:hover {
    background-color: #005885;
}

.share-btn.email {
    background-color: var(--text-light);
}

.share-btn.email:hover {
    background-color: var(--text-color);
}

/* Author Bio Box */
.author-bio-box {
    display: flex;
    gap: 25px;
    padding: 35px;
    background-color: var(--bg-gray);
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.author-bio-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
}

/* Related Articles */
.related-articles {
    margin: 50px 0;
    padding-top: 50px;
    border-top: 2px solid var(--border-color);
}

.related-articles h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-gray);
}

.related-content {
    padding: 20px;
}

.category-badge-small {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.related-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.3;
}

.related-content h4 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.related-content h4 a:hover {
    color: var(--primary-color);
}

.related-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Article Footer */
.article-footer-new {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--secondary-color);
}

/* Old Article Styles (Deprecated but kept for backwards compatibility) */
.article-header {
    margin-bottom: 30px;
}

.article-title-large {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin: 20px 0;
}

.article-meta-large {
    display: flex;
    gap: 15px;
    font-size: 16px;
    margin-top: 20px;
}

.article-meta-large .separator {
    color: var(--border-color);
}

.article-image-large {
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-gray);
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-line;
}

.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 10px 16px;
    background-color: #fff;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
}

.pagination-link:hover {
    background-color: var(--bg-gray);
    border-color: var(--primary-color);
}

.pagination-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: var(--secondary-color);
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.category-list a:hover {
    background-color: var(--bg-gray);
    color: var(--primary-color);
    padding-left: 18px;
}

.category-list .count {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post {
    display: flex;
    gap: 15px;
}

.recent-post-image {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: var(--bg-gray);
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.recent-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-title a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 13px;
    color: var(--text-light);
}

/* About Widget */
.about-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.newsletter-widget .sidebar-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.newsletter-text {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.newsletter-button {
    padding: 12px 20px;
    background-color: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-button:hover {
    background-color: var(--bg-gray);
    transform: translateY(-2px);
}

/* Most Visit Widget */
.most-visit-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.most-visit-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.most-visit-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.most-visit-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s;
}

.most-visit-link:hover {
    color: var(--primary-color);
}

.most-visit-link span {
    flex: 1;
}

.most-visit-count {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    margin-left: 22px;
}

/* Footer */
.footer {
    background-color: var(--bg-gray);
    padding: 30px 0;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

/* Admin Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h2 {
    font-size: 32px;
    font-weight: 800;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--text-light);
    color: #fff;
}

.btn-secondary:hover {
    background-color: var(--text-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-small {
    padding: 8px 14px;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert ul {
    margin-left: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Admin Table */
.admin-table-container {
    overflow-x: auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--bg-gray);
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background-color: var(--bg-gray);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Forms */
.article-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 40px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 350px;
    }

    .featured-title {
        font-size: 28px;
    }

    .featured-excerpt {
        font-size: 16px;
    }

    /* New Article Responsive */
    .article-title-new {
        font-size: 32px;
    }

    .article-excerpt-new {
        font-size: 18px;
    }

    .article-image-featured {
        height: 300px;
    }

    .article-content-new {
        font-size: 17px;
    }

    .article-content-new h2 {
        font-size: 26px;
    }

    .article-content-new h3 {
        font-size: 22px;
    }

    .author-bio-box {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }

    .author-avatar-large {
        margin: 0 auto;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
        width: 100%;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Old Article Styles */
    .article-title-large {
        font-size: 32px;
    }

    .article-image-large {
        height: 300px;
    }

    .nav {
        gap: 15px;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }

    .article-form {
        padding: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .featured-overlay {
        padding: 20px;
    }

    .featured-title {
        font-size: 24px;
    }

    .logo {
        font-size: 24px;
    }

    .article-title-large {
        font-size: 28px;
    }

    .article-body {
        font-size: 16px;
    }
}

/* ========================================
   KEY TAKEAWAYS WITH INTERNAL LINKS
   ======================================== */
.key-takeaways-list li,
ul.key-takeaways-list li,
.article-content-new .key-takeaways-list li {
    margin-bottom: 0.75em;
    line-height: 1.8;
}

.key-takeaways-list li a,
ul.key-takeaways-list li a,
.article-content-new .key-takeaways-list li a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.key-takeaways-list li a:hover,
ul.key-takeaways-list li a:hover,
.article-content-new .key-takeaways-list li a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* ========================================
   MOBILE MENU & HAMBURGER
   ======================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide navigation by default on mobile */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 30px 30px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
        overflow-y: auto;
        gap: 0;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 16px;
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .nav a.active::after {
        display: none;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* Prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Adjust header for mobile */
    .header-content {
        justify-content: space-between;
    }

    .logo {
        font-size: 22px;
    }

    /* Back to top button smaller on mobile */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    /* Featured article adjustments */
    .featured-title {
        font-size: 28px;
    }

    /* Article grid - single column on mobile */
    .articles-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar full width on mobile */
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 20px;
    }

    .featured-title {
        font-size: 24px;
    }

    .article-card-title {
        font-size: 18px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}
