/* Blog Styles */

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Single Blog Post Page */
.blog-post-single {
    padding: 40px 0 80px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-header h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 15px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-meta i {
    color: var(--primary-color);
    margin-right: 6px;
}

.post-featured-image {
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto 40px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 32px;
}

.post-content h3 {
    font-size: 26px;
}

.post-content h4 {
    font-size: 22px;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 32px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 20px;
}

.post-content code {
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 32px 0;
}

.post-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-tags i {
    color: var(--primary-color);
}

.post-tags .tag {
    background: var(--bg-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.post-share {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.post-share h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

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

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.email {
    background: #6b7280;
}

.post-navigation {
    max-width: 800px;
    margin: 40px auto 0;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .post-header h1 {
        font-size: 28px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .post-content h2 {
        font-size: 24px;
    }
    
    .post-content h3 {
        font-size: 20px;
    }
    
    .post-share {
        padding: 20px;
    }
}

/* Newsletter Subscription Box */
.newsletter-box {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 50px 40px;
    border-radius: 15px;
    margin-top: 60px;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.newsletter-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: grayscale(20%);
}

.newsletter-box h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #1f2937;
    font-weight: 700;
}

.newsletter-box p {
    margin-bottom: 25px;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}

.newsletter-form {
    margin-bottom: 20px;
}

.newsletter-form .input-group {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.newsletter-form button {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.newsletter-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    font-size: 15px;
}

.newsletter-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.newsletter-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.newsletter-privacy {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

@media (max-width: 768px) {
    .newsletter-box {
        padding: 40px 25px;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .newsletter-box h3 {
        font-size: 24px;
    }
}

/* Blog Section */
.blog-section {
    padding: 60px 0 80px;
}

/* Loading State */
.blog-loading {
    text-align: center;
    padding: 80px 20px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blog-loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Error State */
.blog-error {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.blog-error i {
    font-size: 48px;
    color: var(--error-color);
    margin-bottom: 20px;
}

.blog-error h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

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

/* Blog Post Card */
.blog-post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.blog-post-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
    position: relative;
}

.blog-post-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
}

.blog-post-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.blog-post-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-post-date i {
    color: var(--primary-color);
}

.blog-post-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

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

.blog-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.blog-read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap var(--transition-fast);
}

.blog-post-card:hover .blog-read-more {
    gap: 12px;
}

/* Blog Slider on Homepage */
.blog-slider-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.blog-slider-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-slider-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.blog-slider-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.blog-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.blog-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.blog-slider-item {
    min-width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

@media (max-width: 968px) {
    .blog-slider-item {
        grid-template-columns: 1fr;
    }
}

.blog-slider-image {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.blog-slider-content {
    padding: 48px;
}

.blog-slider-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.blog-slider-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
}

.blog-slider-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 17px;
}

.blog-slider-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.blog-slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.blog-slider-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.blog-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.blog-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.blog-slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}
