/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== Blog Filters ===== */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* ===== Blog Styles ===== */
.blog-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.blog-header-content {
    max-width: 700px;
    margin: 0 auto;
}

.blog-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin: 1rem 0;
}

.blog-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

.blog-content {
    padding: 4rem 0;
}

.blog-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

.blog-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-post {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.post-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
}

.post-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.post-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.post-link:hover {
    color: var(--primary-dark);
}

/* ===== Blog Pagination ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.pagination-number {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-number:hover,
.pagination-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Blog Sidebar ===== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
}

.search-btn {
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

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

.recent-posts li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.recent-posts a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.recent-posts a:hover {
    color: var(--primary-color);
}

.recent-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

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

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: var(--transition);
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list span {
    color: var(--text-light);
}

.widget-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

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

@media (max-width: 768px) {
    .blog-wrapper {
        grid-template-columns: 1fr;
    }
}

.newsletter-form input[type="email"] {
    border: 1px solid #ccc; /* Grey border */
    padding: 0.5rem;
    border-radius: 0.375rem; /* Match button rounding */
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    margin-bottom: 0.5rem
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #888; /* Slightly darker grey on focus */
}
