/* Blog Page Styles */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --text-light: #7f8c8d;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #f9f9f9;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Loading Indicator */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (min-width: 992px) {
  body.blog-page .header-area.header-transparent {
    height: 220px; /* blog page only */
  }
}


/* Blog Hero */
.blog-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('https://images.unsplash.com/photo-1506929562872-bb421503ef21?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 50px;
}

.blog-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    color: white;
}

.blog-hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: white;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.blog-card-img {
    height: 220px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.1);
}

.blog-card-content {
    padding: 25px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-card-meta i {
    margin-right: 5px;
    color: var(--secondary);
}

.blog-card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.blog-card-excerpt {
    margin-bottom: 20px;
    color: var(--text-light);
}

.read-more {
    display: inline-block;
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--accent);
}

/* Featured Post */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.featured-post-img {
    height: 100%;
}

.featured-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.featured-post-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.featured-post-excerpt {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Categories Section */
.categories-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary);
    position: relative;
    font-family: 'Playfair Display', serif;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.category-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    background: var(--primary);
    padding: 60px 0;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    border-radius: 8px;
}

.newsletter h2 {
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #2980b9;
}

/* Blog Post Page Styles */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-post-header {
    margin-bottom: 40px;
    text-align: center;
}

.blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.blog-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 50px;
}

.blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-content h2 {
    color: var(--primary);
    margin: 30px 0 15px;
    font-family: 'Playfair Display', serif;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.blog-post-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.blog-post-content li {
    margin-bottom: 10px;
}

.back-to-blog {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-to-blog:hover {
    color: var(--accent);
}

.back-to-blog i {
    margin-right: 5px;
}

/* Comments Section */
.comments-section {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.comments-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.comment {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.comment-text {
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    margin-top: 50px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.comment-form h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
}

.submit-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 992px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-post-img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .blog-hero-content h1 {
        font-size: 2.2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 4px;
        padding: 15px;
    }
    
    .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-post-image {
        height: 300px;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-bottom: 15px;
    }
}