/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2e4a8e;
    --secondary-color: #4a7bc8;
    --accent-color: #5b8dd9;
    --text-color: #1a2540;
    --text-light: #4a5568;
    --background: #ffffff;
    --background-alt: #f7f9fc;
    --border-color: #d4dce8;
    --shadow: 0 2px 8px rgba(46, 74, 142, 0.1);
    --shadow-hover: 0 4px 16px rgba(46, 74, 142, 0.2);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
}

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

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-link img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

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

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.site-title a:hover {
    color: var(--secondary-color);
}

.site-description {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
}

/* Navigation */
.main-navigation {
    flex: 2;
    display: flex;
    justify-content: flex-end;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Main Content */
.site-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Blog Section */
.blog-section {
    flex: 1;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Blog Posts */
.blog-post {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: var(--transition);
}

.blog-post:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.blog-post.featured {
    border: 2px solid var(--primary-color);
}

.post-thumbnail {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.blog-post:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.post-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.module-specs {
    list-style: none;
    padding: 0;
}

.module-specs li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.module-specs li:last-child {
    border-bottom: none;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 10px;
}

.read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.post-comments {
    font-size: 14px;
    color: var(--text-light);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.widget {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: var(--transition);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-submit {
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.search-submit:hover {
    background: var(--secondary-color);
}

/* Widget Lists */
.recent-posts-list,
.recent-comments-list,
.links-list {
    list-style: none;
}

.recent-posts-list li,
.recent-comments-list li,
.links-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts-list li:last-child,
.recent-comments-list li:last-child,
.links-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a,
.recent-comments-list a,
.links-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.recent-posts-list a:hover,
.recent-comments-list a:hover,
.links-list a:hover {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--background-alt);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 14px;
    color: var(--text-light);
    margin: 8px 0;
}

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

.footer-text a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo-link img {
        height: 40px;
    }

    .site-title {
        font-size: 20px;
    }

    .site-description {
        font-size: 12px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        width: 100%;
        order: 3;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
        gap: 0;
        background: var(--background-alt);
        border-radius: 8px;
        padding: 20px;
    }

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

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px;
    }

    .section-title {
        font-size: 28px;
    }

    .post-title {
        font-size: 20px;
    }
}

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

    .logo-link {
        gap: 10px;
    }

    .logo-link img {
        height: 35px;
    }

    .site-title {
        font-size: 18px;
    }

    .site-description {
        font-size: 11px;
    }

    .section-title {
        font-size: 24px;
    }

    .post-content {
        padding: 20px;
    }

    .widget {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post {
    animation: fadeIn 0.5s ease-out;
}

.blog-post:nth-child(2) {
    animation-delay: 0.1s;
}

.blog-post:nth-child(3) {
    animation-delay: 0.2s;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }