/* ================================================
   BLOG STYLES
   Espinoza Installations
   ================================================ */

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

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

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

/* Blog Card */
.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 {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #CC0000;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

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

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-title {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: #CC0000;
}

.blog-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #CC0000;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.3s;
}

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

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

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

.widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
    color: #111827;
}

.category-list {
    list-style: none;
}

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

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: #CC0000;
    color: white;
}

.category-list span {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.cta-widget {
    background: linear-gradient(135deg, #CC0000 0%, #a00 100%);
    color: white;
    text-align: center;
}

.cta-widget h3 {
    color: white;
    margin-bottom: 10px;
}

.cta-widget p {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: #333;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover {
    background: #CC0000;
    color: white;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    color: #333;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-number:hover,
.pagination-number.active {
    background: #CC0000;
    color: white;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

.no-posts i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-posts h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.no-posts p {
    color: #666;
}

/* ================================================
   SINGLE POST
   ================================================ */

.post-header {
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.post-category-badge {
    display: inline-block;
    background: #CC0000;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 15px;
}

.post-title {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #111827;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 14px;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-content-section {
    padding: 60px 0;
    background: #f7f7f9;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.post-featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.post-content h2 {
    font-size: 28px;
    margin: 30px 0 20px;
    color: #111827;
}

.post-content h3 {
    font-size: 22px;
    margin: 25px 0 15px;
    color: #111827;
}

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

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

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-content a {
    color: #CC0000;
    text-decoration: underline;
}

.post-content a:hover {
    text-decoration: none;
}

/* Share Buttons */
.post-share {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-share h4 {
    margin-bottom: 15px;
    color: #111827;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

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

.share-btn.twitter {
    background: #000;
}

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

/* Related Posts */
.related-posts {
    margin-top: 40px;
}

.related-posts h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #111827;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.related-post-card:hover {
    transform: translateY(-3px);
}

.related-post-image {
    height: 150px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 20px;
}

.related-post-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.related-post-content h4 a {
    color: #111827;
    text-decoration: none;
}

.related-post-content h4 a:hover {
    color: #CC0000;
}

.related-post-date {
    font-size: 13px;
    color: #666;
}

.post-sidebar .contact-info {
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.post-sidebar .contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-sidebar .contact-info i {
    color: #CC0000;
    width: 18px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar,
    .post-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-content {
        padding: 25px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
