/* ==========================================================================
   SOCIAL SHARE CARD & MODAL SYSTEM (hasakgul Portfolio & Blog)
   Dynamic, Responsive, High-Resolution Export Ready
   ========================================================================== */

/* Modal Overlay */
.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Window */
.share-modal-window {
  background: #ffffff;
  border: 1px solid var(--border-color, rgba(15, 23, 42, 0.1));
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.share-modal-overlay.active .share-modal-window {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.share-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-modal-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.share-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   DYNAMIC SOCIAL SHARE CARD (PREVIEW CONTAINER)
   ========================================================================== */
.share-card-canvas-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
}

.share-card-preview {
  position: relative;
  width: 100%;
  min-height: 290px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* Theme Gradients */
.share-card-preview.theme-personal {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 50%, #4c0519 100%);
}

.share-card-preview.theme-ai {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #1e1b4b 100%);
}

.share-card-preview.theme-engineering {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #042f2e 100%);
}

.share-card-preview.theme-edtech {
  background: linear-gradient(135deg, #d97706 0%, #ea580c 50%, #451a03 100%);
}

.share-card-preview.theme-project {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #312e81 100%);
}

/* Decorative background shapes */
.share-card-preview::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.share-card-preview::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Card Top Bar */
.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.card-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-cat-badge {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Card Content Area */
.card-body-content {
  position: relative;
  z-index: 2;
  margin: 18px 0;
}

.card-post-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-post-summary {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-tags-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tag-item {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Card Footer Bar */
.card-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
}

.card-author-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.card-url-pill {
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   MODAL ACTIONS & EXPORT BUTTONS
   ========================================================================== */
.share-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  background: #ffffff;
  color: #0f172a;
}

.modal-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.modal-action-btn.btn-download-img {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.modal-action-btn.btn-download-img:hover {
  background: #1e293b;
}

.modal-action-btn.btn-copy-card {
  background: var(--color-primary-light, #eef2ff);
  color: var(--color-primary, #4f46e5);
  border-color: rgba(79, 70, 229, 0.2);
}

.modal-action-btn.btn-copy-card:hover {
  background: var(--color-primary, #4f46e5);
  color: #ffffff;
}

/* Social Quick Links in Modal */
.modal-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Responsive Modal */
@media (max-width: 600px) {
  .share-modal-window {
    padding: 20px;
  }
  .share-card-preview {
    padding: 20px;
    min-height: 250px;
  }
  .card-post-title {
    font-size: 1.2rem;
  }
  .share-action-buttons {
    grid-template-columns: 1fr;
  }
}
