/* ===============================================
   3-COLUMN BLOG LAYOUT OVERRIDE
   Matches the reference image layout
   =============================================== */

/* Blog Grid Layout - 3 Columns */
.blog-main-content {
    display: block !important;
    width: 100% !important;
}

.blog-posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2.5rem !important;
    margin-bottom: 3rem !important;
}

/* Featured Post - Full Width */
.blog-featured-post {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0;
    min-height: 450px;
    margin-bottom: 3rem;
    width: 100%;
}

.blog-featured-image {
    height: 450px;
}

.blog-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: optimizeQuality !important;
}

.blog-featured-title {
    font-size: 2.75rem !important;
    font-weight: 800;
    line-height: 1.2;
}

.blog-featured-meta {
    font-size: 1.2rem !important;
    gap: 2rem;
}

.blog-featured-excerpt {
    font-size: 1.4rem !important;
    line-height: 1.7;
}

/* Regular Blog Cards - Larger Fonts */
.blog-card-title {
    font-size: 1.75rem !important;
    font-weight: 700;
    line-height: 1.3;
}

.blog-card-meta {
    font-size: 1.1rem !important;
    gap: 1.5rem;
}

.blog-card-excerpt {
    font-size: 1.25rem !important;
    line-height: 1.6;
}

.blog-card-image {
    height: 320px !important;
}

.blog-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: optimizeQuality !important;
}

.blog-card-content {
    padding: 2.5rem !important;
}

.blog-read-time {
    font-size: 1rem !important;
}

/* Button Styling */
.blog-btn {
    font-size: 1rem !important;
    padding: 0.875rem 1.75rem !important;
    font-weight: 600;
}

.blog-btn-sm {
    font-size: 0.95rem !important;
    padding: 0.75rem 1.5rem !important;
}

/* Hide sidebar completely */
.blog-sidebar {
    display: none !important;
}

/* Blog Detail Full Width */
.blog-detail-container-fullwidth {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.blog-detail-content {
    width: 100% !important;
    max-width: none !important;
}

.blog-detail-title {
    font-size: 3rem !important;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.blog-detail-meta {
    font-size: 1.4rem !important;
    margin-bottom: 2rem;
}

.blog-detail-content-text {
    font-size: 1.6rem !important;
    line-height: 1.8;
}

.blog-detail-content-text h2 {
    font-size: 2.6rem !important;
}

.blog-detail-content-text h3 {
    font-size: 2rem !important;
}

.blog-detail-content-text h4 {
    font-size: 1.8rem !important;
}

.blog-detail-content-text p {
    font-size: 1.6rem !important;
    margin-bottom: 1.5rem;
}

/* Blog Detail Image Quality */
.blog-detail-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 600px !important;
    object-fit: cover !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: optimizeQuality !important;
}

/* General Image Quality Improvements */
.blog-card img,
.blog-featured-post img,
.blog-detail-image img,
.recent-post-thumb img {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: optimizeQuality !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* Social Share Buttons */
.social-share {
    margin: 2rem 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.social-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1877f2, #000000, #0a66c2, #25d366, #e60023, #0088cc, #6b7280, var(--blog-primary));
    border-radius: 20px 20px 0 0;
}

.social-share h4 {
    font-size: 1.4rem !important;
    font-weight: 700;
    color: var(--blog-secondary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.social-share h4::before,
.social-share h4::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.share-buttons {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 1.5rem !important;
    max-width: 900px;
    margin: 0 auto;
}

.share-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    padding: 1.2rem 1rem !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(0) !important;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.share-btn:hover::after {
    width: 300px;
    height: 300px;
}

.share-btn i,
.share-btn svg {
    font-size: 1.3rem !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease !important;
}

.share-btn:hover i,
.share-btn:hover svg {
    transform: scale(1.1) rotate(5deg) !important;
}

.share-btn span {
    font-weight: 700 !important;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* Individual Social Platform Colors with Enhanced Gradients */
.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 50%, #0d5bd9 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3) !important;
}

.share-facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #0d5bd9 50%, #0a4bc2 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(24, 119, 242, 0.5) !important;
}

.share-x {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #333333 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.share-x:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 50%, #4d4d4d 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
}

.share-linkedin {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 50%, #003366 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(10, 102, 194, 0.3) !important;
}

.share-linkedin:hover {
    background: linear-gradient(135deg, #004182 0%, #003366 50%, #002952 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(10, 102, 194, 0.5) !important;
}

.share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 50%, #075e54 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 50%, #054740 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5) !important;
}

.share-pinterest {
    background: linear-gradient(135deg, #e60023 0%, #bd081c 50%, #8a0615 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(230, 0, 35, 0.3) !important;
}

.share-pinterest:hover {
    background: linear-gradient(135deg, #bd081c 0%, #8a0615 50%, #66050f 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(230, 0, 35, 0.5) !important;
}

.share-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 50%, #004466 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3) !important;
}

.share-telegram:hover {
    background: linear-gradient(135deg, #006699 0%, #004466 50%, #003355 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.5) !important;
}

.share-email {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3) !important;
}

.share-email:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 50%, #1f2937 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(107, 114, 128, 0.5) !important;
}

.share-copy {
    background: linear-gradient(135deg, var(--blog-primary) 0%, #c2410c 50%, #9a3412 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(215, 63, 21, 0.3) !important;
}

.share-copy:hover {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 50%, #7c2d12 100%) !important;
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(215, 63, 21, 0.5) !important;
}

.share-copy.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    animation: copySuccess 0.8s ease-in-out;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5) !important;
}

.share-copy.copied:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%) !important;
}

@keyframes copySuccess {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.1) rotate(2deg);
    }

    50% {
        transform: scale(1.05) rotate(-1deg);
    }

    75% {
        transform: scale(1.08) rotate(1deg);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive Social Buttons */
@media (max-width: 768px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    .share-btn {
        padding: 1rem 0.75rem !important;
        font-size: 0.85rem !important;
    }

    .share-btn i,
    .share-btn svg {
        font-size: 1.2rem !important;
        width: 18px !important;
        height: 18px !important;
    }

    .social-share {
        padding: 2rem !important;
        border-radius: 16px;
    }

    .social-share h4 {
        font-size: 1.2rem !important;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        grid-template-columns: 1fr !important;
        max-width: 320px;
        gap: 1rem !important;
    }

    .social-share {
        padding: 1.5rem !important;
        border-radius: 12px;
    }

    .share-btn {
        padding: 1.1rem !important;
        font-size: 0.9rem !important;
        border-radius: 12px !important;
    }

    .share-btn:hover {
        transform: translateY(-3px) scale(1.02) !important;
    }
}

/* Blog header improvements */
.blog-header h1 {
    font-size: 3.5rem !important;
    font-weight: 800;
    margin-bottom: 1rem;
}

.blog-header .description {
    font-size: 1.3rem !important;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Responsive Design for 3-Column Layout */
@media (max-width: 1400px) {
    .blog-posts-grid {
        gap: 2rem !important;
    }

    .blog-card-content {
        padding: 2rem !important;
    }

    .blog-featured-title {
        font-size: 2.5rem !important;
    }

    .blog-card-title {
        font-size: 1.6rem !important;
    }

    .blog-card-excerpt {
        font-size: 1.15rem !important;
    }
}

@media (max-width: 1200px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .blog-featured-post {
        grid-template-columns: 1fr !important;
        min-height: auto;
    }

    .blog-featured-image {
        height: 350px;
    }

    .blog-featured-title {
        font-size: 2.25rem !important;
    }

    .blog-card-title {
        font-size: 1.5rem !important;
    }

    .blog-card-excerpt {
        font-size: 1.1rem !important;
    }
}

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

    .blog-featured-content {
        padding: 2rem;
    }

    .blog-featured-title {
        font-size: 2rem !important;
    }

    .blog-featured-excerpt {
        font-size: 1.2rem !important;
    }

    .blog-card-content {
        padding: 1.5rem !important;
    }

    .blog-card-title {
        font-size: 1.4rem !important;
    }

    .blog-card-excerpt {
        font-size: 1.05rem !important;
    }

    .blog-card-image {
        height: 250px !important;
    }

    .blog-card-meta {
        font-size: 1rem !important;
    }

    .blog-header h1 {
        font-size: 2.5rem !important;
    }

    .blog-header .description {
        font-size: 1.1rem !important;
    }

    .blog-card {
        margin-bottom: 2rem;
    }

    .blog-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .blog-read-count {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .blog-featured-title {
        font-size: 1.75rem !important;
    }

    .blog-featured-excerpt {
        font-size: 1.1rem !important;
    }

    .blog-card-title {
        font-size: 1.3rem !important;
    }

    .blog-card-excerpt {
        font-size: 1rem !important;
    }

    .blog-card-meta {
        font-size: 0.95rem !important;
    }

    .blog-header h1 {
        font-size: 2rem !important;
    }
}

/* Enhanced Social Share Effects */
/* Enhanced Social Share Button Effects */

/* Infinite Scroll Styles */
.infinite-scroll-loading {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--blog-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--blog-text-muted);
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.end-of-posts {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--blog-radius-lg);
    border: 2px dashed #cbd5e1;
}

.end-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.end-message i {
    font-size: 3rem;
    color: var(--blog-primary);
    margin-bottom: 0.5rem;
}

.end-message p {
    color: var(--blog-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.blog-btn-outline {
    background: transparent !important;
    color: var(--blog-primary) !important;
    border: 2px solid var(--blog-primary) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--blog-radius) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.blog-btn-outline:hover {
    background: var(--blog-primary) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive adjustments for infinite scroll */
@media (max-width: 768px) {
    .infinite-scroll-loading {
        padding: 2rem 1rem;
    }

    .end-of-posts {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    .spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }

    .end-message i {
        font-size: 2.5rem;
    }

    .end-message p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .infinite-scroll-loading {
        padding: 1.5rem 0.5rem;
    }

    .end-of-posts {
        padding: 1.5rem 0.5rem;
    }

    .loading-spinner p {
        font-size: 0.9rem;
    }

    .blog-btn-outline {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem !important;
    }
}

/* Blog Tags Styles */
.blog-card-tags {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-tag {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background: var(--blog-primary);
    transform: scale(1.05);
}

/* Blog Read Count Styles */
.blog-read-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--blog-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-read-count i {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Enhanced blog card footer for category pages */
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

/* Responsive adjustments for tags and read count */
@media (max-width: 768px) {
    .blog-card-tags {
        top: 0.75rem;
        left: 0.75rem;
    }

    .blog-tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }

    .blog-read-count {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .blog-card-tags {
        top: 0.5rem;
        left: 0.5rem;
    }

    .blog-tag {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
    }

    .blog-card-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .blog-read-count {
        align-self: flex-end;
    }
}

/* Heating Calculator Promotion Styles */
.heating-calculator-promo {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.heating-calculator-promo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.heating-calculator-promo:hover::before {
    left: 100%;
}

.heating-calculator-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.heating-calculator-promo .promo-icon {
    position: relative;
    display: inline-block;
}

.heating-calculator-promo .promo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.heating-calculator-promo:hover .promo-icon::after {
    transform: translate(-50%, -50%) scale(1.2);
}

.heating-calculator-promo .promo-icon i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.heating-calculator-promo:hover .promo-icon i {
    transform: scale(1.1);
    color: #0056b3;
}

.heating-calculator-promo h3 {
    position: relative;
    transition: color 0.3s ease;
}

.heating-calculator-promo:hover h3 {
    color: #1a252f;
}

.heating-calculator-promo .promo-features {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.heating-calculator-promo:hover .promo-features {
    opacity: 1;
}

.heating-calculator-promo .feature {
    transition: transform 0.3s ease;
}

.heating-calculator-promo:hover .feature {
    transform: translateY(-2px);
}

.heating-calculator-promo .blog-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.heating-calculator-promo .blog-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.heating-calculator-promo .blog-btn:hover::before {
    left: 100%;
}

.heating-calculator-promo .blog-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    background-color: #0056b3;
}

/* Responsive adjustments for heating calculator promo */
@media (max-width: 768px) {
    .heating-calculator-promo {
        margin: 2rem 0;
        padding: 1.5rem;
    }

    .heating-calculator-promo .promo-icon i {
        font-size: 2.5rem;
        padding: 0.8rem;
    }

    .heating-calculator-promo h3 {
        font-size: 1.3rem;
    }

    .heating-calculator-promo p {
        font-size: 1rem;
    }

    .heating-calculator-promo .promo-features {
        flex-direction: column;
        gap: 1rem;
    }

    .heating-calculator-promo .blog-btn {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .heating-calculator-promo {
        margin: 1.5rem 0;
        padding: 1rem;
    }

    .heating-calculator-promo .promo-features {
        gap: 0.8rem;
    }

    .heating-calculator-promo .feature span {
        font-size: 0.9rem;
    }
}