/* ============================================
   Share Card - بطاقة مشاركة المقال
   تصميم جريدة ورقية للمشاركة على واتساب وغيره
   ============================================ */

/* Share Card Section */
.share-card-section {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px dashed #d0dce6;
    text-align: center;
}

/* Share Button */
.share-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #5a9fd4 0%, #316595 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(49, 101, 149, 0.3);
}

.share-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(49, 101, 149, 0.4);
}

.share-card-btn i {
    font-size: 1.1rem;
}

/* Modal Overlay */
.share-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.share-card-modal.active {
    display: flex;
}

/* Modal Content */
.share-card-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.share-card-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.share-card-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    font-family: var(--font-family);
}

.share-card-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.share-card-close:hover {
    background: #e74c3c;
    color: #fff;
}

/* Modal Body - Card Container */
.share-card-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   The Share Card Design
   ============================================ */
.share-card {
    width: 400px;
    background: linear-gradient(180deg, #faf8f5 0%, #f0f4f8 100%);
    border: 2px solid #316595;
    border-radius: 0;
    overflow: hidden;
    font-family: 'Rubik', sans-serif;
    direction: rtl;
    text-align: right;
    position: relative;
}

/* Decorative corners */
.share-card::before,
.share-card::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #316595;
}

.share-card::before {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}

.share-card::after {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}

/* Card Header with Logo */
.share-card-header {
    background: linear-gradient(135deg, #316595 0%, #244a6f 100%);
    padding: 20px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5a9fd4, #316595, #5a9fd4);
}

.share-card-logo {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.share-card-logo-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

/* Featured Image */
.share-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.share-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

/* Category Badge */
.share-card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #316595;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    z-index: 2;
}

/* Divider */
.share-card-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #fff;
}

.share-card-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #316595, transparent);
}

.share-card-divider-icon {
    margin: 0 15px;
    color: #316595;
    font-size: 0.9rem;
}

/* Title */
.share-card-title {
    padding: 15px 25px;
    background: #fff;
    text-align: center;
}

.share-card-title h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.6;
    font-family: 'Rubik', sans-serif;
    text-align: center;
}

/* Meta Info */
.share-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 15px 25px;
    background: #f5f8fa;
    border-top: 1px dashed #d0dce6;
    border-bottom: 1px dashed #d0dce6;
}

.share-card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
}

.share-card-meta-item i {
    color: #316595;
    font-size: 0.9rem;
}

/* Footer */
.share-card-footer {
    background: linear-gradient(135deg, #316595 0%, #244a6f 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-card-url {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    direction: ltr;
}

.share-card-url i {
    margin-left: 8px;
}

/* ============================================
   Action Buttons
   ============================================ */
.share-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-card-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-card-action-btn.download {
    background: #27ae60;
    color: #fff;
}

.share-card-action-btn.download:hover {
    background: #219a52;
}

.share-card-action-btn.share-whatsapp {
    background: #25d366;
    color: #fff;
}

.share-card-action-btn.share-whatsapp:hover {
    background: #1da851;
}

.share-card-action-btn.share-native {
    background: linear-gradient(135deg, #5a9fd4 0%, #316595 100%);
    color: #fff;
}

.share-card-action-btn.share-native:hover {
    transform: translateY(-2px);
}

/* Loading State */
.share-card-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px;
}

.share-card-loading.active {
    display: flex;
}

.share-card-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #316595;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.share-card-loading-text {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .share-card {
        width: 100%;
        max-width: 350px;
    }

    .share-card-title h2 {
        font-size: 1.1rem;
    }

    .share-card-meta {
        flex-direction: column;
        gap: 10px;
    }

    .share-card-actions {
        flex-direction: column;
        width: 100%;
    }

    .share-card-action-btn {
        width: 100%;
        justify-content: center;
    }
}