/* Social Share Buttons Custom CSS - Rounded Square Style */
.social-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.75rem !important;  /* 28px */
    height: 1.75rem !important; /* 28px */
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
}

.social-share-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.social-share-btn:active {
    transform: translateY(-1px) !important;
}

.social-share-btn svg {
    width: 1rem !important;  /* 16px */
    height: 1rem !important; /* 16px */
    fill: white !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Specific platform colors */
.social-share-btn[data-platform="facebook"] {
    background-color: #3b5998 !important;
}

.social-share-btn[data-platform="facebook"]:hover {
    background-color: #2d4373 !important;
}

.social-share-btn[data-platform="twitter"],
.social-share-btn[data-platform="x"] {
    background-color: #000000 !important;
}

.social-share-btn[data-platform="twitter"]:hover,
.social-share-btn[data-platform="x"]:hover {
    background-color: #1f2937 !important;
}

.social-share-btn[data-platform="whatsapp"] {
    background-color: #25D366 !important;
}

.social-share-btn[data-platform="whatsapp"]:hover {
    background-color: #1da851 !important;
}

.social-share-btn[data-platform="viber"] {
    background-color: #7360f2 !important;
}

.social-share-btn[data-platform="viber"]:hover {
    background-color: #5e4dbf !important;
}

.social-share-btn[data-platform="telegram"] {
    background-color: #0088cc !important;
}

.social-share-btn[data-platform="telegram"]:hover {
    background-color: #0077b3 !important;
}

.social-share-btn[data-platform="email"] {
    background-color: #ea4335 !important;
}

.social-share-btn[data-platform="email"]:hover {
    background-color: #d23321 !important;
}

.social-share-btn[data-platform="copy"] {
    background-color: #6b7280 !important;
}

.social-share-btn[data-platform="copy"]:hover {
    background-color: #4b5563 !important;
}

.social-share-btn[data-platform="linkedin"] {
    background-color: #0A66C2 !important;
}

.social-share-btn[data-platform="linkedin"]:hover {
    background-color: #084c94 !important;
}

/* Share count styling */
.share-count {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 60px !important;
    text-align: center !important;
}

.share-count-number {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #111827 !important;
}

.share-count-text {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-top: -0.125rem !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .social-share-buttons {
        gap: 0.375rem !important;
        justify-content: center !important;
    }

    .social-share-btn {
        width: 2rem !important;  /* 32px */
        height: 2rem !important; /* 32px */
        border-radius: 8px !important;
    }
    
    .social-share-btn svg {
        width: 0.95rem !important;
        height: 0.95rem !important;
    }

    .single-share-row {
        gap: 0.65rem !important;
        width: 100%;
        justify-content: space-between;
    }

    .single-share-count {
        min-width: 44px !important;
    }

    .single-share-count .share-count-number {
        font-size: 1rem !important;
    }
}

/* Animation for share count updates */
@keyframes shareCountUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.share-count-number.updating {
    animation: shareCountUpdate 0.5s ease-in-out;
}

/* Share message styling */
.share-message {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: #10b981 !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    opacity: 0 !important;
    animation: fadeInOut 3s ease-in-out !important;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10%, 90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Related News Section Styling */
.related-title {
    font-family: 'Mukta', sans-serif !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #111827 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.3s ease !important;
}

.related-title:hover {
    color: #d7001b !important;
}

/* Line clamp utility classes */
.line-clamp-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Related news cards styling */
.related-news-card {
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.related-news-card:hover {
    transform: translateY(-2px) !important;
}

.related-news-card img {
    transition: transform 0.3s ease !important;
}

.related-news-card:hover img {
    transform: scale(1.05) !important;
}

/* Read Also Section Styling */
.readalso-title {
    font-family: 'Mukta', sans-serif !important;
    font-size: 19px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #111827 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.3s ease !important;
}

.readalso-title:hover {
    color: #d7001b !important;
}

/* Ensure consistent image sizes in Read Also section */
.read-also-image {
    width: 110px !important;
    height: 75px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
}

.read-also-placeholder {
    width: 110px !important;
    height: 75px !important;
    flex-shrink: 0 !important;
    border-radius: 4px !important;
    background-color: #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
