/*
Theme Name: Tech Blog Theme
Description: A modern, clean blog theme with white design and hero image layout. Features crisp typography, single column layout, and social media integration. Perfect for tech blogs and professional writing.
Version: 3.0.1
Author: Andy Kemp
Text Domain: andykemp-blog
Tags: blog, clean, modern, responsive, white, light-mode, minimal
*/

/* CSS Variables for Light Theme */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --accent-color: #3498db;
    --signature-color: #2980b9;
    --signature-hover: #1c5f8d;
    --overlay-bg: rgba(255, 255, 255, 0.95);
    --menu-bg: rgba(255, 255, 255, 0.98);
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --code-bg: #f4f4f4;
    --code-border: #ddd;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-bg: #1a1d23;
    --secondary-bg: #25292f;
    --content-bg: #2d3139;
    --text-primary: #e8eaed;
    --text-secondary: #b8bdc5;
    --accent-color: #5dade2;
    --signature-color: #5dade2;
    --signature-hover: #85c1e9;
    --overlay-bg: rgba(26, 29, 35, 0.95);
    --menu-bg: rgba(26, 29, 35, 0.98);
    --border-color: #3a3f47;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --code-bg: #25292f;
    --code-border: #3a3f47;
    --light-bg: #25292f;
}

/* Reset and Base Styles */
html {
    scroll-behavior: smooth;
}

/* Skip to Content Link for Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    transition: all 0.3s ease;
    font-size: 16px;
    margin: 0;
    padding: 0;
    min-width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--signature-hover);
}

/* Button Styles */
.btn, 
button, 
input[type="submit"], 
input[type="button"], 
.wp-block-button__link,
.read-more,
.button {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent-color);
    color: #ffffff;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover,
.read-more:hover,
.button:hover {
    background-color: var(--signature-hover);
    border-color: var(--signature-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* Categories Dropdown Menu */
.categories-dropdown {
    min-width: 250px;
    width: max-content;
    max-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
    word-wrap: break-word;
    white-space: normal;
}

.categories-dropdown::-webkit-scrollbar {
    width: 6px;
}

.categories-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.categories-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 3px;
    opacity: 0.6;
}

.categories-dropdown::-webkit-scrollbar-thumb:hover {
    opacity: 1;
}

.categories-dropdown .menu-item-has-children {
    position: relative;
}

.categories-dropdown .menu-item-has-children > a {
    position: relative;
    padding-right: 35px !important;
}

/* Remove the CSS-generated arrow since we're using JavaScript */
.categories-dropdown .menu-item-has-children > a::after {
    display: none;
}

.categories-dropdown .sub-menu {
    left: 100%;
    top: 0;
    min-width: 220px;
    width: max-content;
    max-width: 280px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: normal;
    word-wrap: break-word;
    position: absolute;
    display: none !important;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Remove hover-based expansion */
.categories-dropdown .menu-item-has-children:hover > .sub-menu {
    /* Removed hover expansion */
}

.categories-dropdown a {
    padding: 8px 12px;
    display: block;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
}

@media (max-width: 768px) {
    .categories-dropdown {
        position: static;
        max-height: 60vh;
        min-width: 100%;
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.05);
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .categories-dropdown .sub-menu {
        position: static;
        left: auto;
        top: auto;
        margin-left: 1rem;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 4px;
        margin-top: 0.5rem;
        max-height: 200px;
        min-width: auto;
        width: 100%;
        max-width: none;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .categories-dropdown .menu-item-has-children > a::after {
        content: '▼';
        transform: rotate(0deg);
        transition: transform 0.3s ease;
    }
    
    .categories-dropdown .menu-item-has-children.menu-open > a::after {
        transform: rotate(180deg);
    }
    
    .nav-menu {
        max-height: 80vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
    flex-wrap: nowrap;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

/* Submenu styles */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 15px 0;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    list-style: none;
    z-index: 1001;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    display: block;
    width: 100%;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 14px 25px;
    white-space: nowrap;
    border-radius: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.nav-menu .sub-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 30px;
}

/* Nested submenus */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 5px;
}

.nav-menu .menu-item-has-children > a:after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 5px;
    font-size: 12px;
}

.nav-menu .sub-menu .menu-item-has-children > a:after {
    content: "\f105";
    float: right;
    margin-left: 10px;
}

.nav-social-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.nav-social-link {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: transparent;
}

.nav-social-link:hover {
    color: #ffffff;
    background: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* Settings Menu */
.settings-menu-wrapper {
    position: relative;
    margin-left: 10px;
}

.settings-toggle {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.settings-toggle:hover {
    color: #ffffff;
    background: rgba(52, 152, 219, 0.3);
    transform: rotate(90deg);
}

.settings-dropdown {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: #2d3139;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    border: 1px solid #3a3f47;
    overflow: hidden;
}

.settings-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.settings-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.settings-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-header h3::before {
    content: "⚙️";
    font-size: 1.2rem;
}

.settings-content {
    padding: 20px 24px;
    background: #2d3139;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #3a3f47;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e8eaed;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

.setting-label i {
    color: #5dade2;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-slider:hover {
    background-color: #a0aec0;
}

input:checked + .toggle-slider:hover {
    background-color: var(--signature-hover);
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    gap: 10px;
}

.font-size-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3a3f47;
    background: #25292f;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #b8bdc5;
}

.font-size-btn:hover {
    border-color: #5dade2;
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.font-size-btn.active {
    border-color: #5dade2;
    background: #5dade2;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Font Size Adjustments */
:root[data-font-size="small"] {
    font-size: 14px;
}

:root[data-font-size="medium"] {
    font-size: 16px;
}

:root[data-font-size="large"] {
    font-size: 18px;
}

html[data-font-size="small"] body {
    font-size: 14px;
}

html[data-font-size="medium"] body {
    font-size: 16px;
}

html[data-font-size="large"] body {
    font-size: 18px;
}

html[data-font-size="small"] .entry-content {
    font-size: 16px;
}

html[data-font-size="medium"] .entry-content {
    font-size: 18px;
}

html[data-font-size="large"] .entry-content {
    font-size: 20px;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    padding: 8px 18px;
    border-radius: 0;
    transition: all 0.3s ease;
    display: block;
    letter-spacing: 0.3px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    background-color: transparent;
    color: #ffffff;
    transform: translateX(2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.mobile-menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

.mobile-menu-toggle:active {
    opacity: 0.7;
}

.hamburger-line {
    display: block;
    width: 26px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    border-radius: 2px;
    position: absolute;
    left: 9px;
    pointer-events: none;
}

.hamburger-line:nth-child(1) {
    top: 12px;
}

.hamburger-line:nth-child(2) {
    top: 20px;
}

.hamburger-line:nth-child(3) {
    top: 28px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 70px;
    overflow: hidden;
    background-color: #3498db;
    z-index: 5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 40px 20px;
}

.site-branding {
    margin-bottom: 20px;
}

.site-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.site-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    line-height: 1.6;
}

/* Social Media Links */
.social-media-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    width: 85%;
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--primary-bg);
    border-radius: 20px 20px 0 0;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.content-section {
    background: var(--content-bg);
    border-radius: 12px;
    box-shadow: 0 2px 20px var(--shadow);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

/* Blog Post Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.blog-post {
    background: var(--primary-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 25;
    height: fit-content;
}

/* Add subtle fade effect for posts near the hero */
.blog-post:first-child {
    opacity: 0.98;
}

.blog-post:nth-child(2) {
    opacity: 1;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.post-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail a {
    display: flex;
    height: 100%;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.blog-post:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrapper {
    padding: 20px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.entry-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.entry-title a {
    color: var(--text-primary);
}

.entry-title a:hover {
    color: var(--accent-color);
}

.entry-meta {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 10px;
    align-items: center;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entry-meta .post-views {
    color: #3498db;
    font-weight: 500;
}

.entry-meta .post-reactions {
    color: #e91e63;
    font-weight: 600;
}

.entry-meta a {
    color: var(--text-secondary);
}

.entry-meta a:hover {
    color: var(--accent-color);
}

.entry-excerpt {
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 2px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.entry-footer-link {
    margin-top: auto;
    text-align: left;
    padding-top: 8px;
}

.read-more-link {
    color: var(--accent-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more-link:hover {
    color: var(--signature-hover);
}

/* Single Post */
.single-post-content {
    padding: 40px;
}

/* Post Categories Header */
.post-categories-header {
    margin: 1rem 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.category-links i {
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    margin-right: 0.2rem;
}

.categories-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-right: 0.3rem;
    font-weight: 400;
}

.category-links a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 400;
    background: rgba(52, 152, 219, 0.08);
    transition: all 0.2s ease;
    display: inline-block;
}

.category-links a:hover {
    background: rgba(52, 152, 219, 0.15);
    color: var(--signature-hover);
    transform: none;
    box-shadow: none;
}

.post-featured-image {
    margin: -40px -40px 40px -40px;
    border-radius: 0;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 100%;
    margin: 0 auto;
}

.entry-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
}

.entry-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.entry-content ul li {
    list-style-type: disc;
    margin-left: 0;
}

.entry-content ol li {
    list-style-type: decimal;
    margin-left: 0;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--accent-color);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.entry-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content strong,
.entry-content b {
    font-weight: 600;
    color: var(--text-primary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.entry-content pre,
.entry-content code {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.entry-content pre {
    padding: 20px;
    overflow-x: auto;
    margin: 30px 0;
}

.entry-content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Tags and Categories */
.entry-footer {
    padding: 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.post-tags,
.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.post-tags a,
.post-categories a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--secondary-bg);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.post-tags a:hover,
.post-categories a:hover {
    background: var(--accent-color);
    color: #ffffff;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding: 30px;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
}

.nav-next {
    text-align: right;
}

.nav-previous a,
.nav-next a {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--accent-color);
}

/* Pagination */
.posts-navigation,
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-numbers {
    display: inline-block;
    padding: 10px 16px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

/* Footer */
.site-footer {
    background: var(--secondary-bg);
    color: var(--text-secondary);
    padding: 60px 20px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.footer-main.footer-no-newsletter {
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-about p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.footer-social-link:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu ul li {
    margin-bottom: 12px;
}

.footer-menu ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-menu ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
}

.footer-copyright p,
.footer-credits p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-credits a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credits a:hover {
    color: var(--signature-hover);
    text-decoration: underline;
}

/* Footer Newsletter */
.footer-newsletter p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.footer-newsletter-form {
    margin-top: 15px;
}

.newsletter-input-wrapper {
    display: block;
    margin-bottom: 12px;
}

.footer-newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.footer-newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.footer-newsletter-form button {
    width: 100%;
    padding: 12px 24px;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-newsletter-form button:hover {
    background: var(--signature-hover);
    transform: translateY(-2px);
}

.footer-newsletter-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.newsletter-consent input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
}

.newsletter-consent a {
    color: var(--accent-color);
    text-decoration: underline;
}

.newsletter-message {
    margin-top: 10px;
    font-size: 13px;
}

.newsletter-message .newsletter-success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.newsletter-message .newsletter-error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

/* Unsubscribe Page Notices */
.notice {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.success-notice {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #155724;
}

.error-notice {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

.info-notice {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    color: #004085;
}

.unsubscribe-confirmation {
    background: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.unsubscribe-confirmation .button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.unsubscribe-confirmation .button-primary {
    background: #dc3545;
    color: #ffffff;
}

.unsubscribe-confirmation .button-primary:hover {
    background: #c82333;
}

.unsubscribe-confirmation .button:not(.button-primary) {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.unsubscribe-confirmation .button:not(.button-primary):hover {
    background: var(--border-color);
}

/* Widgets */
.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-navigation {
        height: 60px;
    }

    .nav-container {
        justify-content: space-between;
        position: relative;
        z-index: 1000;
    }

    .mobile-menu-toggle {
        display: block;
        order: -1;
        position: relative;
        z-index: 1002;
    }

    .nav-menu {
        display: none;
        position: absolute;
    }

    .nav-menu.mobile-menu-open {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 999;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: none !important;
        margin: 0;
        box-sizing: border-box;
        transition: none;
    }
    
    .nav-menu.mobile-menu-open {
        display: flex !important;
        visibility: visible;
        opacity: 1;
        animation: none;
        transform: translateX(0) translateY(0);
        position: fixed;
        left: 0;
        right: 0;
    }
    
    .nav-menu.mobile-menu-open li {
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: relative;
        margin: 0;
    }
    
    .nav-menu.mobile-menu-open li:last-child {
        border-bottom: none;
    }
    
    .nav-menu.mobile-menu-open > li {
        margin: 0;
    }
    
    .nav-menu.mobile-menu-open a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        color: rgba(255, 255, 255, 0.95);
        text-decoration: none;
        transition: color 0.3s ease;
        border: none;
    }
    
    .nav-menu.mobile-menu-open a:hover {
        color: #3498db;
        background: none;
    }
    
    /* Mobile submenu styles */
    .nav-menu.mobile-menu-open .sub-menu {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-menu.mobile-menu-open li.menu-open > .sub-menu {
        display: block;
    }
    
    .nav-menu.mobile-menu-open .sub-menu a {
        padding-left: 30px;
        font-size: 0.95em;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .nav-menu.mobile-menu-open .sub-menu .sub-menu a {
        padding-left: 50px;
    }
    
    .nav-menu.mobile-menu-open .menu-item-has-children > a {
        position: relative;
        padding-right: 40px;
    }
    
    .nav-menu.mobile-menu-open .menu-item-has-children > a:after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        right: 15px;
        transition: transform 0.3s ease;
    }
    
    .nav-menu.mobile-menu-open li.menu-open > a:after {
        transform: rotate(180deg);
    }
    
    .nav-social-links {
        position: relative;
        right: auto;
        top: auto;
    }

    /* Hide carousel buttons on mobile */
    .carousel-btn {
        display: none !important;
    }
    
    /* Adjust carousel wrapper for mobile */
    .carousel-wrapper-horizontal {
        gap: 0;
        padding: 20px;
        margin: 0;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Make carousel track scrollable on mobile */
    .carousel-track-container {
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 15px 0;
    }
    
    .carousel-track-container::-webkit-scrollbar {
        display: none;
    }
    
    .carousel-track-horizontal {
        scroll-snap-type: x mandatory;
        gap: 25px;
        padding: 0 25px;
        width: auto;
    }
    
    .carousel-card-horizontal {
        scroll-snap-align: center;
        flex: 0 0 85%;
        min-width: 85%;
        max-width: 85%;
        margin: 0 auto;
        height: 500px;
    }
    
    .carousel-card-image {
        flex: 0 0 200px;
        height: 200px;
    }
    
    .carousel-card-content {
        padding: 15px;
        gap: 8px;
    }
    
    .carousel-card-title {
        font-size: 1.2rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .carousel-card-excerpt {
        font-size: 0.85rem;
        line-height: 1.4;
        -webkit-line-clamp: 3;
        margin: 8px 0;
    }

    .blog-post {
        flex-direction: column;
        height: auto;
    }

    .post-thumbnail {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
    
    .post-content-wrapper {
        padding: 20px;
    }
    
    .entry-excerpt {
        display: block !important;
        visibility: visible !important;
        margin: 10px 0 15px 0 !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        color: var(--text-secondary) !important;
        opacity: 1 !important;
        background: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        display: -webkit-box !important;
    }

    .hero-section {
        height: 50vh;
        min-height: 400px;
        margin-top: 60px;
        background-attachment: scroll !important;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .site-description {
        font-size: 1.1rem;
    }
    
    /* Mobile carousel improvements */
    .latest-posts {
        padding: 40px 15px;
    }
    
    .carousel-wrapper-horizontal {
        gap: 0;
        padding: 0;
        margin: 0 -15px;
        overflow: visible;
    }
    
    .carousel-track-container {
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 20px 15px;
    }
    
    .carousel-track-horizontal {
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 0;
        width: auto;
        display: flex;
        align-items: stretch;
    }
    
    .carousel-card-horizontal {
        scroll-snap-align: start;
        flex: 0 0 280px;
        min-width: 280px;
        max-width: 280px;
        height: 400px;
    }
    
    .carousel-card-image {
        flex: 0 0 160px;
        height: 160px;
    }
    
    .carousel-card-content {
        padding: 12px;
        gap: 6px;
    }
    
    .carousel-card-title {
        font-size: 1.05rem;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .carousel-card-excerpt {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
        margin: 6px 0 !important;
    }
    
    /* Show and style dots for mobile */
    .carousel-indicators {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        margin-top: 25px;
        padding: 0;
    }
    
    .carousel-indicator {
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border: none !important;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .carousel-indicator.active {
        background: var(--accent-color) !important;
        transform: scale(1.2);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .post-thumbnail {
        height: 200px;
    }

    .single-post-content,
    .post-content-wrapper {
        padding: 20px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-next {
        text-align: left;
    }

    .entry-content {
        font-size: 16px;
    }
}

/* Latest Posts Carousel */
.latest-posts-carousel-section {
    margin: 40px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.latest-posts-carousel-section .carousel-container {
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-heading {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.carousel-heading .carousel-icon {
    font-size: 36px;
}

.carousel-wrapper-horizontal {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 15px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.carousel-track-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0;
}

.carousel-btn {
    background: white;
    color: #3498db;
    border: 2px solid #e0e0e0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
    align-self: center;
}

.carousel-btn i {
    color: #3498db;
    font-size: 20px;
}

.carousel-btn-prev {
    order: 1;
}

.carousel-btn-next {
    order: 3;
}

.carousel-track-container {
    order: 2;
}

.carousel-btn:hover {
    background: #f5f5f5;
    color: #3498db;
    border-color: #3498db;
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.carousel-track-horizontal {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 120%;
    padding: 0;
    align-items: stretch;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card-horizontal {
    flex: 0 0 60%;
    min-width: 0;
    background: var(--primary-bg);
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    position: relative;
    z-index: 1;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    height: auto;
    min-height: 500px;
}

.carousel-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.carousel-card-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

.carousel-card-horizontal:hover {
    transform: translateY(-8px) scale(1.01) translateZ(0) !important;
    box-shadow: 0 15px 40px var(--shadow-hover) !important;
    z-index: 10;
    border-radius: 8px !important;
    overflow: hidden !important;
}
    border-radius: 8px !important;
    overflow: hidden !important;
}


.carousel-card-image {
    flex: 0 0 300px;
    height: 300px;
    overflow: hidden !important;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
    border-radius: 8px 8px 0 0 !important;
    width: 100%;
}

.carousel-card-image img {
    border-radius: 8px 8px 0 0 !important;
}

.carousel-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.carousel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.carousel-card-horizontal:hover .carousel-card-image img {
    transform: scale(1.05);
}

.carousel-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    gap: 10px;
}

.carousel-card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 600;
}

.carousel-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.carousel-card-title a:hover {
    color: var(--accent-color);
}

.carousel-card-meta {
    display: flex;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.carousel-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.carousel-card-meta .post-date {
    color: #666;
}

.carousel-card-meta .post-views {
    color: #3498db;
    font-weight: 500;
}

.carousel-card-meta .post-reactions {
    color: #e91e63;
    font-weight: 600;
}

.carousel-card-meta i {
    font-size: 0.65rem;
}

.carousel-card-excerpt {
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 10px 0 !important;
    flex-grow: 1;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

.carousel-card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.carousel-card-link:hover {
    color: var(--signature-hover);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: #3498db;
    width: 32px;
    border-radius: 6px;
}

.carousel-indicator:hover {
    background: #999;
}

@media (max-width: 1200px) {
    .carousel-track-horizontal {
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .carousel-card-horizontal {
        flex: 0 0 calc((100% - 20px) / 1.8);
    }
}

@media (max-width: 768px) {
    .latest-posts-carousel-section {
        width: 100%;
        padding: 20px 15px;
    }
    
    .carousel-btn {
        display: none !important;
    }
    
    .carousel-wrapper-horizontal {
        gap: 0;
        padding: 0;
        margin: 0 -15px;
        overflow: visible;
    }
    
    .carousel-track-container {
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 20px 15px;
    }
    
    .carousel-track-horizontal {
        overflow-x: auto;
        gap: 15px;
        padding: 0;
        width: auto;
        display: flex;
        align-items: stretch;
        scroll-snap-type: x mandatory;
    }
    
    .carousel-heading {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .carousel-card-horizontal {
        flex: 0 0 280px !important;
        min-width: 280px;
        max-width: 280px;
        height: 400px;
        scroll-snap-align: start;
    }
    
    .carousel-card-image {
        height: 160px !important;
        flex: 0 0 160px;
    }
    
    .carousel-card-content {
        padding: 12px;
        gap: 6px;
    }
    
    .carousel-card-title {
        font-size: 1.05rem;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .carousel-card-excerpt {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
        margin: 6px 0 !important;
    }
}
    
    .carousel-card-content {
        padding: 15px;
    }
    
    .carousel-card-title {
        font-size: 0.95rem;
    }
    
    .carousel-card-meta {
        font-size: 0.7rem;
    }
    
    .carousel-card-excerpt {
        font-size: 0.8rem;
    }
    
    .carousel-card-horizontal:hover {
        transform: translateY(-5px);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .main-navigation,
    .hero-section,
    .social-media-links,
    .post-navigation,
    .site-footer {
        display: none;
    }
}

/* ========================================
   SIDEBAR AND CONTENT LAYOUT
   ======================================== */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    min-width: 0; /* Allow content to shrink */
}

/* Archive Header Styles */
.archive-header {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 40px !important;
    margin-bottom: 40px !important;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.archive-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px 0;
}

.archive-description {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.archive-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.archive-count {
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.archive-count i {
    margin-right: 5px;
}

/* Sidebar Styles */
.sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    z-index: 1001;
    background: var(--primary-bg);
}

.widget-area {
    margin-bottom: 20px;
}

.widget-area:last-child {
    margin-bottom: 0;
}

.widget {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.widget > * {
    padding: 25px;
}

.widget .table-of-contents {
    padding: 0;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

/* Popular Posts Widget */
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    margin-bottom: 20px;
}

.popular-posts li:last-child {
    margin-bottom: 0;
}

.popular-post-link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.popular-post-link:hover {
    color: var(--accent-color);
}

.popular-post-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.popular-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Tag Cloud Widget */
.tagcloud {
    line-height: 1.8;
}

.tagcloud a {
    display: inline-block;
    padding: 5px 12px;
    margin: 2px;
    background: var(--light-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tagcloud a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Recent Comments Widget */
.recent-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-comments li {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.recent-comments li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.comment-author strong {
    font-size: 0.9rem;
    color: var(--text-color);
}

.comment-content a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 5px;
}

.comment-content a:hover {
    color: var(--accent-color);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Newsletter Widget */
.newsletter-signup {
    text-align: center;
}

.newsletter-signup p {
    margin: 0 0 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--light-bg);
    color: var(--text-color);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.newsletter-submit {
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Archives Widget */
.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list li {
    margin-bottom: 8px;
}

.archive-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.archive-list a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    padding-left: 10px;
}

/* ========================================
   SEARCH FUNCTIONALITY
   ======================================== */

/* Navigation Search */
.nav-search {
    flex-shrink: 0;
}

/* Navigation right section (search + social) */
.nav-right-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    position: relative;
    display: inline-block;
}

.search-field {
    padding: 8px 40px 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    width: 200px;
    height: 40px;
    box-sizing: border-box;
}

.search-field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.search-submit:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
}

.search-submit:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
}

.search-submit i {
    font-size: 0.8rem;
    pointer-events: none;
}

/* ========================================
   RESPONSIVE SIDEBAR LAYOUT
   ======================================== */

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 250px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        max-height: none;
        order: 2;
    }
    
    .content-area {
        order: 1;
    }
    
    .search-field {
        width: 150px;
    }
    
    .search-field:focus {
        width: 180px;
    }
    
    .nav-search {
        margin-left: 20px;
    }
}

@media (max-width: 480px) {
    .nav-search {
        display: none; /* Hide search on very small screens */
    }
    
    .widget {
        padding: 20px;
    }
}

/* Desktop Carousel Card Fixes */
@media (min-width: 769px) {
    .carousel-card-horizontal {
        border-radius: 8px !important;
        overflow: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .carousel-card-horizontal:hover {
        transform: translateY(-8px) scale(1.01) translateZ(0) !important;
        box-shadow: 0 15px 40px var(--shadow-hover) !important;
        z-index: 10 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .carousel-card-wrapper {
        cursor: pointer !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        text-decoration: none !important;
        color: inherit !important;
        border-radius: 8px !important;
    }
    
    .carousel-card-wrapper:hover {
        text-decoration: none !important;
        color: inherit !important;
    }
    
    .carousel-card-title,
    .carousel-card-title a {
        color: inherit !important;
        text-decoration: none !important;
    }
}

/* Carousel Card Fixes - Override any conflicting styles */
.carousel-card-horizontal,
.carousel-card-horizontal:hover,
.carousel-card-horizontal:focus,
.carousel-card-horizontal:active {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.carousel-card-image,
.carousel-card-image img {
    border-radius: 8px 8px 0 0 !important;
}

.carousel-card-wrapper {
    cursor: pointer;
}

.carousel-card-link {
    pointer-events: none !important;
}

/* MOBILE CAROUSEL - Final Override */
@media (max-width: 768px) {
    /* Make entire mobile layout full width */
    * {
        box-sizing: border-box !important;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        width: 100% !important;
    }
    
    .main-container,
    .site-container,
    .container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Make carousel section full width */
    .latest-posts-carousel-section,
    .latest-posts {
        padding: 30px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .carousel-wrapper-horizontal {
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .carousel-track-container {
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 20px 15px !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        width: 100% !important;
    }
    
    .carousel-track-container::-webkit-scrollbar {
        display: none !important;
    }
    
    .carousel-track-horizontal {
        display: flex !important;
        gap: 20px !important;
        padding: 0 !important;
        width: auto !important;
        overflow-x: visible !important;
        scroll-snap-type: x mandatory !important;
    }
    
    .carousel-card-horizontal {
        flex: 0 0 300px !important;
        min-width: 300px !important;
        max-width: 300px !important;
        width: 300px !important;
        height: 450px !important;
        scroll-snap-align: start !important;
        margin: 0 !important;
    }
    
    .carousel-card-image {
        flex: 0 0 180px !important;
        height: 180px !important;
        min-height: 180px !important;
    }
    
    .carousel-card-content {
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        flex: 1 !important;
    }
    
    .carousel-card-title {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    .carousel-card-excerpt {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin: 10px 0 !important;
        -webkit-line-clamp: 3 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .carousel-card-meta {
        font-size: 0.8rem !important;
        margin-bottom: 10px !important;
    }
    
    .carousel-card-link {
        font-size: 0.85rem !important;
        margin-top: auto !important;
    }
    
    /* Show dots prominently on mobile */
    .carousel-indicators {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-top: 25px !important;
        padding: 0 !important;
    }
    
    .carousel-indicator {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .carousel-indicator.active {
        background: var(--accent-color) !important;
        transform: scale(1.2) !important;
    }
    
    /* Remove any content area padding */
    .content-wrapper,
    .content-area,
    main {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Make hero section full width too */
    .hero-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Sidebar Widget Separation and Styling */
.sidebar .widget {
    background: var(--content-bg);
    margin-bottom: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar .widget:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    border-color: rgba(74, 144, 226, 0.2);
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar .widget .widget-title {
    margin: 0;
    padding: 1.3rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--signature-hover));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .widget-content {
    padding: 1.5rem;
}

/* Page Header Section for non-home pages */
.page-header-section {
    background: linear-gradient(135deg, var(--accent-color), var(--signature-hover));
    padding: 5rem 0 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.page-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.page-header-meta {
    flex: 1;
    text-align: left;
    max-width: 60%;
    order: 1;
}

.site-branding-minimal {
    flex: 0 0 auto;
    text-align: right;
    order: 2;
}
.site-branding-minimal .site-title-small {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    line-height: 1.2;
    text-align: right;
}

.site-branding-minimal .site-title-small a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-branding-minimal .site-title-small a:hover {
    opacity: 0.8;
}

.site-branding-minimal .site-logo-small {
    margin-bottom: 0.5rem;
}

.site-branding-minimal .site-logo-small img {
    max-height: 60px;
    width: auto;
}

.site-branding-minimal .site-description-small {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    text-align: right;
}

.page-header-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    text-align: left;
}

.page-header-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

.page-header-info {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.page-header-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-info i {
    opacity: 0.8;
}

/* Mobile responsiveness for page header */
@media (max-width: 768px) {
    .page-header-section {
        padding: 4rem 0 2rem 0;
    }
    
    .page-header-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .page-header-meta {
        text-align: center;
        max-width: 100%;
        order: 2;
    }
    
    .site-branding-minimal {
        text-align: center;
        order: 1;
    }
    
    .page-header-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
        text-align: center;
    }
    
    .page-header-info {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .site-branding-minimal .site-title-small {
        font-size: 1.6rem;
        text-align: center;
    }
    
    .site-branding-minimal .site-description-small {
        font-size: 1rem;
        text-align: center;
    }
}

/* Archives Hierarchical Dropdown Menu Styling */
.widget_archive {
    position: relative !important;
}

/* Hide the duplicate widget title for archives */
.widget_archive .widget-title {
    display: none !important;
}

.widget_archive ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--content-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}
}

/* Year items */
.archive-year {
    background: rgba(74, 144, 226, 0.08) !important;
    border: 1px solid rgba(74, 144, 226, 0.2) !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.archive-year:hover {
    background: rgba(74, 144, 226, 0.15) !important;
    border-color: rgba(74, 144, 226, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.archive-year-header {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 18px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
}

.archive-year-header:hover {
    background: rgba(74, 144, 226, 0.2) !important;
    color: var(--accent-color) !important;
    transform: translateY(-1px) !important;
}

/* Aggressively hide ALL WordPress archive arrows except our custom one */
.widget_archive a::after,
.widget_archive a::before,
.widget_archive span::after,
.widget_archive span::before,
.widget_archive li::after,
.widget_archive li::before,
.archive-year-header .toggle-indicator,
.archive-year-header::before,
.archive-year-header span::after,
.archive-year-header span::before,
.archive-year-header a::after,
.archive-year-header a::before,
.archive-item::after,
.archive-item::before,
.widget_archive .dropdown-toggle::after,
.widget_archive .dropdown-toggle::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* Remove any WordPress generated content in archive elements */
.widget_archive * {
    position: relative;
}

.widget_archive *::after,
.widget_archive *::before {
    display: none !important;
    content: none !important;
}

/* Our single custom arrow - positioned on the container, not inner elements */
.widget_archive li::after,
.nav-menu .widget_archive li::after,
.nav-menu .archive-year::after {
    content: "▶" !important;
    font-size: 0.9rem !important;
    transition: transform 0.3s ease !important;
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--accent-color) !important;
    font-weight: bold !important;
    display: block !important;
    pointer-events: none !important;
}

/* Make sure the container has position relative */
.widget_archive li,
.nav-menu .widget_archive li,
.nav-menu .archive-year {
    position: relative !important;
}

/* Hide our arrow on expanded state and show rotated version */
.widget_archive li.expanded::after,
.nav-menu .widget_archive li.expanded::after,
.nav-menu .archive-year.expanded::after {
    transform: translateY(-50%) rotate(90deg) !important;
}

/* Hide our arrow on expanded state and show rotated version */


/* Month submenu */
.archive-months {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, padding 0.4s ease !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.archive-year.expanded .archive-months {
    max-height: 600px !important;
    padding: 8px 0 !important;
}

.archive-months li {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.archive-months li:last-child {
    border-bottom: none !important;
}

.archive-months li:hover {
    background: rgba(74, 144, 226, 0.1) !important;
}

.archive-months a {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    display: block !important;
    padding: 8px 15px 8px 35px !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    font-weight: 400 !important;
}

.archive-months a:hover {
    color: var(--accent-color) !important;
    padding-left: 40px !important;
}

/* Mobile Archives Dropdown Styles */
@media (max-width: 768px) {
    .archive-year {
        margin: 0 0 4px 0 !important;
        border-radius: 4px !important;
    }
    
    .archive-year-header {
        padding: 12px 15px !important;
        font-size: 1rem !important;
    }
    
    /* Force all archive months to be collapsed by default on mobile */
    .archive-months {
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        transition: max-height 0.3s ease, padding 0.3s ease !important;
    }
    
    /* Only show when explicitly expanded */
    .archive-year.expanded .archive-months {
        max-height: 200px !important;
        padding: 6px 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .archive-months a {
        padding: 6px 12px 6px 25px !important;
        font-size: 0.8rem !important;
    }
    
    /* Ensure archives work in mobile navigation */
    .nav-menu .widget_archive {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .nav-menu .archive-year {
        background: rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    .nav-menu .archive-months {
        background: rgba(0, 0, 0, 0.08) !important;
    }
}

.archive-months a::before {
    content: "📄" !important;
    margin-right: 6px !important;
    opacity: 0.6 !important;
    font-size: 0.8rem !important;
}

.archive-months a:hover::before {
    opacity: 1 !important;
}

.archive-year {
    position: relative !important;
}

/* ========================================
   ABOUT PAGE STYLING
   ======================================== */

/* About Page Styling */
.about-page {
    padding: 2rem 0;
}

.about-hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 4rem 2rem;
    border-radius: 20px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.about-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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.profile-section {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: justify;
}

.profile-image {
    float: left;
    margin: 0 2rem 1.5rem 0;
    width: 300px;
    flex-shrink: 0;
    shape-outside: margin-box;
}

.profile-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.about-text {
    padding: 0;
    line-height: 1.8;
    text-align: justify;
}

.about-subtitle {
    font-size: 1.3rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-align: left;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.about-description p {
    margin-bottom: 1.5rem;
}

/* Certifications Section */
.certifications-section {
    margin: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.certification-item {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    position: relative;
    overflow: hidden;
}

.certification-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.cert-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cert-image img {
    max-width: 120px;
    height: auto;
    transition: transform 0.3s ease;
}

.cert-image a:hover img {
    transform: scale(1.05);
}

.cert-content {
    text-align: center;
}

.cert-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.cert-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cert-title a:hover {
    color: var(--accent-color);
}

.cert-issuer {
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.cert-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-style: italic;
    text-align: center;
}

.cert-expires {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
    font-style: italic;
    text-align: center;
}

.cert-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.cert-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white;
}

.cert-link i {
    font-size: 0.8rem;
}

/* Microsoft Learn specific styling */
.learn-cert .cert-issuer {
    color: #0078d4;
}

.cert-source-badge {
    display: inline-block;
    background: #0078d4;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 10px;
}

.no-certifications {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

.no-certifications p {
    margin: 0;
    font-size: 1.1rem;
}

/* Skills Section (Optional) */
.skills-section {
    margin: 4rem 0;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 20px;
}

.skills-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-name {
    font-weight: 600;
    color: var(--primary-color);
}

.skill-percentage {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 1s ease-in-out;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .profile-section {
        text-align: center;
    }
    
    .profile-image {
        float: none;
        margin: 0 auto 2rem auto;
        max-width: 250px;
        width: 100%;
    }
    
    .about-text {
        text-align: left;
    }
    
    .about-subtitle {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .certification-item {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .about-hero {
        padding: 1.5rem 0.5rem;
    }
    
    .certification-item {
        padding: 1rem;
    }
    
    .cert-image img {
        max-width: 100px;
    }
}

/* Animation for certifications on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certification-item {
    animation: fadeInUp 0.6s ease forwards;
}

.certification-item:nth-child(even) {
    animation-delay: 0.1s;
}

.certification-item:nth-child(3n) {
    animation-delay: 0.2s;
}

/* About Preview Widget for Home Page */
.about-preview-widget {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-preview-widget:hover {
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.about-preview-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.about-preview-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
}

.about-preview-widget:hover .about-preview-image img {
    transform: scale(1.05);
}

.about-preview-text {
    flex: 1;
}

.about-preview-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.about-preview-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.about-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.3);
}

.about-preview-link:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);
    color: white;
}

.about-preview-link i {
    transition: transform 0.3s ease;
}

.about-preview-link:hover i {
    transform: translateX(3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .about-preview-widget {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .about-preview-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .about-preview-image {
        width: 100px;
        height: 100px;
    }
    
    .about-preview-subtitle {
        font-size: 1.3rem;
    }
    
    .about-preview-description {
        font-size: 0.95rem;
    }
    
    .about-preview-link {
        padding: 0.7rem 1.3rem;
        font-size: 0.95rem;
    }
}

/* About Preview Block Editor Styles */
.about-preview-placeholder {
    border: 2px dashed var(--border-color) !important;
    background: rgba(74, 144, 226, 0.05) !important;
    text-align: center !important;
    padding: 2rem !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.about-preview-placeholder p {
    margin: 0 !important;
    color: var(--text-secondary) !important;
}

.about-preview-placeholder a {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
}

.about-preview-editor {
    margin: 1rem 0;
}
/* Footer Responsive Styles */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-newsletter {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-newsletter {
        grid-column: auto;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .newsletter-input-wrapper {
        flex-direction: column;
    }
    
    .footer-newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-main {
        gap: 30px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
}
