/* Social Sharing Image Optimization */

/* Ensure images are properly sized for social media */
.post-image, 
.featured-image,
.news-image {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* WhatsApp-specific optimizations */
@media (max-width: 400px) {
    .post-image {
        width: 100%;
        min-height: 200px;
        max-height: 300px;
        object-fit: cover;
    }
}

/* Social media preview optimization */
.social-preview {
    display: none; /* Hidden div for social media crawlers */
    position: absolute;
    top: -9999px;
    left: -9999px;
}

.social-preview img {
    width: 1200px;
    height: 630px;
    object-fit: cover;
}

/* Structured data helper styles */
.structured-data {
    display: none;
}

/* Default social image styling */
.default-social-image {
    background: linear-gradient(135deg, #0769d2 0%, #050550 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', 'Arial', sans-serif;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 40px;
    box-sizing: border-box;
}

/* Responsive social sharing buttons */
.social-share-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.social-share-btn {
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.social-share-btn:hover {
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.whatsapp-share:hover {
    background: #20ba5a;
    color: white;
}

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

.facebook-share:hover {
    background: #166fe5;
    color: white;
}

.telegram-share {
    background: #0088cc;
}

.telegram-share:hover {
    background: #0077b5;
    color: white;
}

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

.twitter-share:hover {
    background: #1a91da;
    color: white;
}

@media (max-width: 768px) {
    .social-share-buttons {
        justify-content: center;
    }
    
    .social-share-btn {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Fix for WhatsApp Web preview */
.whatsapp-preview-fix {
    position: relative;
}

.whatsapp-preview-fix::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

/* Ensure proper meta tag rendering */
meta[property="og:image"],
meta[name="twitter:image"] {
    content: attr(content) !important;
}
