/* ===== MEDIA ALL PAGE STYLES ===== */

/* Section */
.media-all.section {
  padding: 80px 0;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

/* Media Tabs */
.media-tabs-wrapper {
  margin-bottom: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  padding: 10px;
}

.media-nav-tabs {
  border: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.media-nav-tabs .nav-item {
  margin-bottom: 0;
}

.media-nav-tabs .nav-link {
  border: none;
  background: transparent;
  color: #6c757d;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.media-nav-tabs .nav-link i {
  font-size: 1.1rem;
}

.media-nav-tabs .nav-link .badge {
  background: #e9ecef;
  color: #6c757d;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 5px;
}

.media-nav-tabs .nav-link:hover {
  background: rgba(137, 40, 127, 0.1);
  color: #89287f;
}

.media-nav-tabs .nav-link:hover .badge {
  background: rgba(137, 40, 127, 0.2);
  color: #89287f;
}

.media-nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #89287f 0%, #5271ff 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(137, 40, 127, 0.3);
}

.media-nav-tabs .nav-link.active .badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Media Cards */
.media-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(137, 40, 127, 0.15);
}

/* Media Image Wrapper */
.media-image-wrapper {
  position: relative;
  height: 320px;
  background: #f8f9fa;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.media-thumbnail-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.media-card:hover .media-thumbnail-img {
  transform: scale(1.05);
}

/* Media Placeholder (when no image) */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #89287f 0%, #5271ff 100%);
}

.media-placeholder i {
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Media Card Content */
.media-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Type Badge */
.media-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(137, 40, 127, 0.1);
  color: #89287f;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
  width: fit-content;
}

.media-type-badge i {
  font-size: 0.9rem;
}

/* Media Title */
.media-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Media Subtitle */
.media-card-subtitle {
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Media Actions */
.media-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 10px;
}

.media-card-actions .btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-preview {
  background: linear-gradient(135deg, #89287f 0%, #5271ff 100%);
  color: white;
}

.btn-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(137, 40, 127, 0.4);
  color: white;
}

.btn-download-menu {
  background: white;
  color: #89287f;
  border: 2px solid #89287f;
}

.btn-download-menu:hover {
  background: #89287f;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(137, 40, 127, 0.3);
}

/* Download Options */
.download-options {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-top: 10px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding: 0 15px;
  }
  to {
    opacity: 1;
    max-height: 300px;
    padding: 15px;
  }
}

.download-options-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2c3e50;
}

.btn-close-options {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.btn-close-options:hover {
  color: #89287f;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-buttons .btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-buttons .btn small {
  font-size: 0.75rem;
  opacity: 0.8;
}

.download-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Download Section in Card */
.media-download-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px dashed #e9ecef;
}

.download-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-label i {
  color: #89287f;
}

.download-buttons-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-buttons-inline .btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.download-buttons-inline .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: white;
}

.download-buttons-inline .btn-success {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  border: none;
  color: white;
}

.download-buttons-inline .btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border: none;
  color: #212529;
}

.download-buttons-inline .btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border: none;
  color: white;
}

.download-buttons-inline .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
}

.download-buttons-inline .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  border: none;
  color: white;
}

.download-buttons-inline .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* No Files Message */
.no-files-message {
  text-align: center;
  padding: 15px;
  color: #6c757d;
  font-size: 0.9rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 10px;
}

.no-files-message i {
  margin-right: 5px;
}
.no-media {
  text-align: center;
  padding: 80px 20px;
}

.no-media i {
  font-size: 5rem;
  color: #e0e0e0;
  margin-bottom: 30px;
  display: block;
}

.no-media h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

.no-media p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 30px;
}

/* ===== MEDIA MODAL STYLES ===== */

.media-modal {
  z-index: 99999 !important;
}

.media-modal .modal-backdrop {
  z-index: 99998 !important;
}

.media-modal .modal-dialog {
  max-width: 900px;
  z-index: 99999 !important;
}

.media-modal .modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  overflow: hidden;
  border: none;
}

.media-modal .modal-header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 30px;
}

.media-modal .modal-title {
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.media-modal .btn-close-white {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.media-modal .btn-close-white:hover {
  opacity: 1;
}

/* Media Preview Wrapper */
.media-preview-wrapper {
  padding: 30px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Preview Image */
.media-preview-image {
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.media-preview-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: contain;
}

/* Media Info */
.media-modal-info {
  text-align: center;
  color: white;
}

.media-modal-info h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: white;
}

.media-modal-info p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* Download Actions in Modal */
.media-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.media-download-actions .btn {
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-download-actions .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: white;
}

.media-download-actions .btn-success {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  border: none;
  color: white;
}

.media-download-actions .btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border: none;
  color: #212529;
}

.media-download-actions .btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border: none;
  color: white;
}

.media-download-actions .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
}

.media-download-actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.media-download-actions .btn small {
  font-size: 0.8rem;
  opacity: 0.9;
}

@media (max-width: 992px) {
  .media-all.section {
    padding: 60px 0;
  }
  
  .media-nav-tabs {
    gap: 3px;
  }
  
  .media-nav-tabs .nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .media-image-wrapper {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .media-all.section {
    padding: 40px 0;
  }
  
  .media-tabs-wrapper {
    padding: 8px;
  }
  
  .media-nav-tabs {
    gap: 5px;
  }
  
  .media-nav-tabs .nav-link {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .media-nav-tabs .nav-link i {
    font-size: 1rem;
  }
  
  .media-nav-tabs .nav-link .badge {
    font-size: 0.75rem;
    padding: 2px 8px;
  }
  
  .media-image-wrapper {
    height: 250px;
  }
  
  .media-card-content {
    padding: 20px;
  }
  
  .media-card-title {
    font-size: 1.15rem;
  }
  
  .media-card-subtitle {
    font-size: 0.9rem;
  }
  
  .download-buttons-inline {
    gap: 6px;
  }
  
  .download-buttons-inline .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .no-media {
    padding: 60px 20px;
  }
  
  .no-media i {
    font-size: 4rem;
  }
  
  .no-media h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .media-tabs-wrapper {
    padding: 5px;
  }
  
  .media-nav-tabs {
    flex-direction: column;
    gap: 5px;
  }
  
  .media-nav-tabs .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 15px;
  }
  
  .media-image-wrapper {
    height: 220px;
    padding: 15px;
  }
  
  .media-placeholder i {
    font-size: 4rem;
  }
  
  .media-type-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
  
  .media-card-title {
    font-size: 1rem;
  }
  
  .media-card-subtitle {
    font-size: 0.85rem;
  }
  
  .download-buttons-inline {
    flex-direction: column;
  }
  
  .download-buttons-inline .btn {
    width: 100%;
    justify-content: center;
  }
  
  .no-media i {
    font-size: 3rem;
    margin-bottom: 20px;
  }
  
  .no-media h3 {
    font-size: 1.3rem;
  }
  
  .no-media p {
    font-size: 1rem;
  }
}

/* Smooth Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.media-card {
  animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.media-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.media-card.loading .media-placeholder i {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}