/* Blog Specific Styles */

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 120px 20px 80px;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.blog-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Blog Main Content */
.blog-main {
    padding: 80px 20px;
    background-color: #ffffff;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.blog-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Blog Posts */
.blog-post {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.blog-post img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.blog-post-content {
    padding: 30px;
}

/* Blog Meta Information */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.blog-category {
    background-color: #dc2626;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-post h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #b91c1c;
    gap: 10px;
}

/* Blog Sidebar */
.blog-sidebar {
    background: #fef2f2;
    padding: 40px 30px;
    border-radius: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    color: #dc2626;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #b91c1c;
}

/* Categories */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #666;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background-color: white;
    color: #dc2626;
}

.category-count {
    background-color: #dc2626;
    color: white;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    padding: 0;
}

.recent-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.recent-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.recent-post-content h4 {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #666;
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
}

.newsletter-signup h3 {
    color: white;
    margin-bottom: 15px;
}

.newsletter-signup p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
}

.newsletter-form button {
    background-color: white;
    color: #dc2626;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #f8f8f8;
    transform: translateY(-1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination a:hover,
.pagination a.active {
    border-color: #dc2626;
    background-color: #dc2626;
    color: white;
}

/* Blog Loading States */
.blog-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.blog-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dc2626;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Blog Error States */
.blog-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 15px;
    margin: 20px 0;
}

/* Blog Empty States */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.blog-empty i {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 20px;
}

/* Responsive Design for Blog */
@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-header p {
        font-size: 1.1rem;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
    
    .recent-post {
        flex-direction: column;
    }
    
    .recent-post img {
        width: 100%;
        height: 150px;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 100px 20px 60px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-main {
        padding: 60px 20px;
    }
    
    .blog-post-content {
        padding: 20px;
    }
    
    .blog-post h2 {
        font-size: 1.5rem;
    }
    
    .blog-sidebar {
        padding: 30px 20px;
    }
    
    .newsletter-signup {
        padding: 25px 20px;
    }
}

/* Blog Content Blocks Styles */
.blog-subtitle {
    color: #173150;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 35px 0 20px 0;
    line-height: 1.4;
    border-left: 5px solid #22C9C3;
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(34, 201, 195, 0.1) 0%, transparent 100%);
    padding: 15px 15px 15px 20px;
    border-radius: 0 8px 8px 0;
}

.blog-subtitle:first-child {
    margin-top: 0;
}

.blog-point {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.9;
    margin: 0 0 18px 0;
    padding-left: 35px;
    position: relative;
    text-align: justify;
}

.blog-point::before {
    content: '\2713';
    color: #22C9C3;
    font-weight: bold;
    font-size: 1.3rem;
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(34, 201, 195, 0.15);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.blog-point:last-child {
    margin-bottom: 30px;
}

/* Blog Article Styles (para blog-firebase.js) */
.article-content {
    padding: 30px;
    background: white;
    border-radius: 15px;
}

.article-content .blog-subtitle {
    margin-top: 40px;
}

.article-content .blog-subtitle:first-of-type {
    margin-top: 20px;
}

.article-content .blog-point {
    padding-left: 40px;
    margin-bottom: 20px;
}

.article-content p:not(.blog-point) {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

/* Responsive Blog Content */
@media (max-width: 768px) {
    .blog-subtitle {
        font-size: 1.25rem;
        padding: 12px 12px 12px 15px;
        margin: 25px 0 15px 0;
        border-left-width: 4px;
    }

    .blog-point {
        font-size: 1rem;
        line-height: 1.75;
        padding-left: 32px;
        margin-bottom: 16px;
        text-align: left;
    }

    .blog-point::before {
        font-size: 1.1rem;
        width: 22px;
        height: 22px;
    }

    .article-content {
        padding: 20px;
    }

    .article-content p:not(.blog-point) {
        font-size: 1rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .blog-subtitle {
        font-size: 1.1rem;
        padding: 10px 10px 10px 12px;
        margin: 20px 0 12px 0;
    }

    .blog-point {
        font-size: 0.95rem;
        line-height: 1.7;
        padding-left: 30px;
        margin-bottom: 14px;
    }

    .blog-point::before {
        font-size: 1rem;
        width: 20px;
        height: 20px;
    }

    .article-content {
        padding: 15px;
    }
}