:root {
    --primary-color: #059669;
    --primary-dark: #047857;
    --secondary-color: #1f2937;
    --text-color: #374151;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--background);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.blog-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.blog-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.blog-logo img {
    border-radius: 8px;
}

.blog-logo span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.admin-link {
    padding: 0.5rem 1rem;
    background: var(--background-alt);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: 0.3s;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #05966910 0%, #04785710 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.hero-search button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-search button:hover {
    background: var(--primary-dark);
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Featured Posts */
.featured-posts {
    padding: 4rem 0;
    background: var(--background-alt);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.card-meta i {
    margin-right: 0.25rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: var(--secondary-color);
    text-decoration: none;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more i {
    transition: transform 0.3s;
}

.read-more:hover i {
    transform: translateX(4px);
}

/* Main Content Layout */
.blog-main {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card-image {
    height: 180px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-content {
    padding: 1.25rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.post-meta i {
    margin-right: 0.25rem;
}

.post-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--secondary-color);
    text-decoration: none;
}

.post-excerpt {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.post-author i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.read-more-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: var(--background-alt);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts-list a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.recent-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.newsletter-widget {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.btn-subscribe {
    width: 100%;
    padding: 0.75rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-subscribe:hover {
    background: var(--background-alt);
    transform: translateY(-2px);
}

/* Footer */
.blog-footer {
    background: var(--secondary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-main {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        z-index: 99;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}