/* Header Styles */
header {
    background: linear-gradient(to right, #302e4d, rgb(38, 135, 173));
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: rgb(38, 135, 173);
    background: white;
    padding: 8px;
    border-radius: 50%;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

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

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-img {
    height: 200px;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-content {
    padding: 1.5rem;
}

.post-date {
    color: rgb(38, 135, 173);
    font-size: 0.85rem;
    font-weight: 500;
}

.post-title {
    color: #302e4d;
    margin: 0.5rem 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.post-excerpt {
    color: #666;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.read-more {
    display: inline-block;
    color: rgb(38, 135, 173);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.read-more:hover {
    border-color: rgb(38, 135, 173);
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-title {
    color: #302e4d;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgb(38, 135, 173);
}

.categories li {
    list-style: none;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
}

.categories li:before {
    content: "•";
    color: rgb(38, 135, 173);
    font-weight: bold;
    margin-right: 10px;
}

.categories a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories a:hover {
    color: rgb(38, 135, 173);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(38, 135, 173, 0.1);
    color: #302e4d;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgb(38, 135, 173);
    color: white;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.subscribe-btn {
    background: rgb(38, 135, 173);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-btn:hover {
    background: #302e4d;
}

/* Footer */
footer {
    background: #302e4d;
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: rgb(38, 135, 173);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: rgb(38, 135, 173);
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgb(38, 135, 173);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 0.9rem;
}

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

    .posts {
        order: 2;
    }

    .sidebar {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }

    nav ul li {
        margin: 0 0.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 0.3rem;
    }

    .post-title {
        font-size: 1.2rem;
    }
}

.blog-post {
    position: fixed;
    bottom: 0;
    width: 100%;
}