/* =============================================
   Blog Styles for AI Solutions Hub
   ============================================= */

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

:root {
    --primary-color: #1e40af;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
    padding-top: 80px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item a:hover,
.nav-item a.active {
    background: var(--gradient-primary);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
}

.hamburger-inner {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    top: 8px;
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

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

    .nav-item {
        width: 100%;
        padding: 10px 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .hamburger-inner {
        background: transparent;
    }

    .hamburger.active .hamburger-inner::before {
        transform: rotate(45deg);
        top: 0;
    }

    .hamburger.active .hamburger-inner::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.main-content {
    flex: 1 1 calc(70% - 15px);
    min-width: 300px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar {
    flex: 1 1 calc(30% - 15px);
    min-width: 250px;
}

/* Article Header */
.article-header {
    margin-bottom: 30px;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 20px;
}

.article-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

/* Featured Image */
.featured-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Article Content */
.article-content h2 {
    font-size: 1.8em;
    color: #0066cc;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

.article-content h3 {
    font-size: 1.4em;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.9;
    font-size: 1.05em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    margin-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.article-content strong {
    font-weight: 600;
    color: #0066cc;
}

.article-content blockquote {
    border-left: 4px solid #0066cc;
    padding: 15px 20px;
    margin: 25px 0;
    background-color: #f0f7ff;
    font-style: italic;
    color: #555;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.highlight-box h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 15px;
}

.highlight-box p {
    margin-bottom: 10px;
}

/* Social Share Buttons */
.social-share {
    margin: 40px 0;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.social-share h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.95em;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.twitter {
    background-color: #1DA1F2;
}

.share-btn.facebook {
    background-color: #1877F2;
}

/* Sidebar Styles */
.sidebar-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-section h3 {
    font-size: 1.3em;
    color: #0066cc;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toc-list a:hover {
    background-color: #f0f7ff;
    color: #0066cc;
}

/* Ad Section */
.ad-section {
    text-align: center;
}

.ad-placeholder {
    margin-top: 15px;
}

.ad-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Blog Index Styles */
.blog-index-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 40px;
}

.blog-index-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.blog-index-header p {
    font-size: 1.2em;
    opacity: 0.95;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 1.5em;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.read-more-btn:hover {
    background-color: #0052a3;
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        flex: 1 1 100%;
    }

    .sidebar {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 25px 20px;
    }

    .article-title {
        font-size: 1.8em;
    }

    .article-content h2 {
        font-size: 1.5em;
    }

    .article-content h3 {
        font-size: 1.2em;
    }

    .blog-index-header h1 {
        font-size: 2em;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

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

    .article-title {
        font-size: 1.5em;
    }

    .main-content {
        padding: 20px 15px;
    }

    .sidebar-section {
        padding: 20px;
    }
}
