/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #272626;
    background-color: #f4f5f7;
}

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

/* Header styles */
body > header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

body > header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body > header nav .logo {
    display: flex;
    align-items: center;
}

body > header nav .logo img {
    height: 40px;
    width: auto;
}

body > header nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

body > header nav a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

body > header nav a:hover {
    color: #2f5aae;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    background-color: #ffffff;
    margin: 2rem auto;
    max-width: 1170px;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 2px 0 rgba(0,0,0,0.15);
}

/* Homepage */
.homepage {
    display: flex;
    gap: 2rem;
}

.main-content {
    flex: 2;
}

.homepage h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.homepage .main-content > p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* Post list */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Featured image styles for single posts */
.featured-image {
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

.featured-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

.post-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 2px 0 rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #f4f5f7;
    flex-shrink: 0;
}

.post-item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.post-item h2,
.post-item h3 {
    margin-bottom: 0.5rem;
    color: #272626;
    font-weight: 600;
    line-height: 1.3;
}

.post-item a {
    color: #333;
    text-decoration: none;
}

.post-item a:hover {
    color: #2f5aae;
}

.post-item time {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-item p {
    margin: 1rem 0;
    color: #495057;
    line-height: 1.6;
}

.read-more {
    color: #2f5aae;
    text-decoration: none;
    margin-top: auto;
    padding-top: 1rem;
}

/* Single post */
.post header {
    margin-bottom: 2rem;
}

.post h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.post-meta .author {
    margin-left: 1rem;
    font-weight: 500;
}

.post-meta .categories,
.post-meta .tags {
    margin-top: 0.5rem;
}

.post-meta .categories a,
.post-meta .tags a {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.post-meta .categories a:hover,
.post-meta .tags a:hover {
    background: #2f5aae;
    color: #fff;
}

.tags {
    margin-top: 0.5rem;
}

.tags a {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    margin-right: 0.5rem;
}

.content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    margin: 2rem 0 1rem;
}

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

.content img {
    max-width: 100%;
    height: auto;
}

/* Sidebar */
.sidebar {
    flex: 1;
    min-width: 300px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: #272626;
    font-size: 1.2rem;
    border-bottom: 2px solid #2f5aae;
    padding-bottom: 0.5rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #2f5aae;
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

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

.recent-posts a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 0.3rem;
}

.recent-posts a:hover {
    color: #2f5aae;
}

.recent-posts time {
    color: #666;
    font-size: 0.9rem;
}

.cta-button {
    display: inline-block;
    background: #2f5aae;
    color: #fff;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    margin-top: 1rem;
    font-weight: 500;
}

.cta-button:hover {
    background: #254a94;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 90, 174, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-prev,
.pagination-next,
.pagination-number {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-prev:hover,
.pagination-next:hover,
.pagination-number:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination-current {
    padding: 10px 15px;
    background: #2f5aae;
    color: #ffffff;
    border: 1px solid #2f5aae;
    border-radius: 6px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(47, 90, 174, 0.3);
}

.pagination-ellipsis {
    padding: 10px 15px;
    color: #272626;
    border: 1px solid transparent;
    border-radius: 6px;
    user-select: none;
    min-width: 45px;
    text-align: center;
    font-weight: 500;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-tagline {
    color: #2f5aae;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

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

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: #2f5aae;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.contact-info strong {
    color: #ffffff;
}

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

.social-links a {
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-links a:hover {
    background-color: #2f5aae;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-certification p {
    margin: 0;
    font-size: 0.8rem;
    color: #95a5a6;
    line-height: 1.3;
}

.footer-certification strong {
    color: #ffffff;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-columns {
        gap: 1rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body > header nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    body > header nav ul {
        gap: 1rem;
    }
    
    .homepage {
        flex-direction: column;
    }
    
    .sidebar {
        min-width: auto;
    }
    
    .homepage h1 {
        font-size: 2rem;
    }
    
    .post h1 {
        font-size: 2rem;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .featured-image {
        margin: 1.5rem 0;
    }
    
    .featured-image img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }
    
    .post h1 {
        font-size: 1.8rem;
    }
}