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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Header and Navigation */
.main-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #0070f3;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0070f3;
    text-decoration: none;
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0070f3;
    border-bottom-color: #0070f3;
}

.nav-search {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 0.25rem;
    font-size: 0.9rem;
    width: 200px;
}

.search-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0070f3 0%, #0056b3 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat-x;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background: #fafbfc;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.main-content-area {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Post Cards */
.posts-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

.featured-post {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.featured-post .post-image {
    order: 2;
}

.featured-post .post-content {
    order: 1;
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 100%);
}

.post-image img[src=""], 
.post-image img:not([src]) {
    opacity: 0.7;
    background: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 100%);
}

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

.featured-post .post-image img {
    height: 300px;
    border-radius: 8px;
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 112, 243, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-category-badge.small {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.post-content {
    padding: 1.5rem;
}

.featured-post .post-content {
    padding: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-date {
    font-weight: 500;
}

.post-separator {
    color: #ccc;
    font-weight: bold;
}

.post-reading-time {
    color: #28a745;
    font-weight: 500;
}

.post-authors {
    color: #0070f3;
}

.post-snippet {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.75rem;
}

.post-actions {
    margin-top: 1.5rem;
}

.read-more-btn {
    background: #0070f3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.3);
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.featured-post .post-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.load-more-btn {
    background: #0070f3;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background: #0056b3;
}

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

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #0070f3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.15);
}

.category-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #0070f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.category-content {
    flex: 1;
}

.category-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-item p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.category-link {
    color: #0070f3;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.category-link:hover {
    color: #0056b3;
}

/* Blogger List */
.blogger-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blogger-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.blogger-avatar i {
    font-size: 2.5rem;
    color: #0070f3;
}

.blogger-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.blogger-info p {
    font-size: 0.8rem;
    color: #666;
}

/* Newsletter Form */
.newsletter-widget {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.newsletter-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.newsletter-icon i {
    font-size: 2rem;
    color: #0070f3;
    background: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 112, 243, 0.1);
}

.newsletter-form p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.6;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.email-input {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: white;
}

.email-input:focus {
    border-color: #0070f3;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
}

.subscribe-btn {
    background: #0070f3;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.subscribe-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.3);
}

.privacy-note {
    text-align: center;
    margin-bottom: 1rem;
}

.privacy-note small {
    color: #888;
    font-size: 0.8rem;
}

.privacy-note i {
    margin-right: 0.25rem;
    color: #28a745;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    color: #666;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #0070f3;
    color: white;
}

/* Footer */
.main-footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0070f3;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-social .social-link {
    background: #333;
}

.footer-social .social-link:hover {
    background: #0070f3;
}

.footer-section p {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-search {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-post {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .featured-post .post-image {
        order: 1;
    }

    .featured-post .post-content {
        order: 2;
        padding-top: 1rem;
    }

    .main-content-area {
        padding: 1.5rem;
    }

    .posts-grid {
        gap: 1.5rem;
    }

    .post-content {
        padding: 1rem;
    }
}

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

    .nav-container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .stat-item {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .category-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .content-section {
        padding: 2rem 0;
    }

    .main-content-area {
        padding: 1rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .featured-post {
        padding: 1.5rem;
    }

    .post-image img {
        height: 200px;
    }

    .featured-post .post-image img {
        height: 250px;
    }
}

/* Animation Utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0070f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search results styles */
.search-results-header {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
}

/* Article modal enhancements */
.post-modal .article-content {
    color: #444;
    line-height: 1.7;
}

.post-modal .article-content h1,
.post-modal .article-content h2,
.post-modal .article-content h3 {
    color: #333;
    margin: 1.5rem 0 1rem 0;
}

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

.post-modal .article-content ul,
.post-modal .article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-modal .article-content li {
    margin-bottom: 0.5rem;
}

.post-modal .article-content strong {
    color: #0070f3;
    font-weight: 600;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #0070f3;
    outline-offset: 2px;
}

button:focus,
input:focus,
a:focus {
    outline: 2px solid #0070f3;
    outline-offset: 2px;
}