/* ============================================
   SOCIAL MEDIA-LIKE INTERACTIONS CSS
   Videos, Gallery, and Content Engagement
   ============================================ */

:root {
  --like-color: #e03f56;
  --comment-color: #0b3d91;
  --share-color: #27ae60;
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
}

/* ======== VIDEO CARD WITH FULL INTERACTIONS ======== */
.video-post {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  transition: box-shadow var(--duration-normal) ease;
}

.video-post:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.video-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.video-uploader-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.video-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #27ae60;
  flex-shrink: 0;
}

.video-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.video-username {
  font-weight: 600;
  font-size: 14px;
  color: #0b1c38;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-timestamp {
  font-size: 11px;
  color: #7b88a0;
}

.video-wrapper {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--duration-normal);
  cursor: pointer;
}

.video-wrapper:hover .video-play-overlay {
  opacity: 1;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
}

.play-btn:hover {
  transform: scale(1.1);
  background: white;
}

.play-btn svg {
  width: 24px;
  height: 24px;
  fill: #0b3d91;
}

.video-content {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  color: #0b1c38;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-description {
  font-size: 13px;
  color: #5a6b84;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-interactions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ======== INTERACTION BUTTONS ======== */
.interaction-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-interaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  background: rgba(11, 61, 145, 0.08);
  color: #0b3d91;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast);
  min-height: 32px;
}

.btn-interaction:hover {
  background: rgba(11, 61, 145, 0.14);
  transform: translateY(-2px);
}

.btn-interaction.active {
  background: rgba(224, 63, 86, 0.12);
  color: #c0392b;
}

.btn-interaction.active svg {
  fill: #c0392b;
}

.btn-interaction svg {
  width: 16px;
  height: 16px;
  transition: fill var(--duration-fast);
}

.btn-like:hover {
  background: rgba(224, 63, 86, 0.12);
}

.btn-comment:hover {
  background: rgba(11, 61, 145, 0.14);
}

.btn-share:hover {
  background: rgba(39, 174, 96, 0.12);
}

.interaction-count {
  font-size: 12px;
  font-weight: 600;
  margin-left: 2px;
}

/* ======== GALLERY CARD WITH INTERACTIONS ======== */
.gallery-item {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all var(--duration-normal);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.gallery-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f0f4f8;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image-wrapper img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-normal);
  padding: 12px;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.gallery-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.gallery-item:hover .gallery-overlay-content {
  opacity: 1;
}

.gallery-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.gallery-action-label {
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.gallery-info {
  padding: 12px;
}

.gallery-title {
  font-size: 14px;
  font-weight: 600;
  color: #0b1c38;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.gallery-uploader {
  font-size: 12px;
  color: #5a6b84;
}

.gallery-interactions {
  display: flex;
  gap: 4px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 8px;
}

/* ======== LIGHTBOX FOR PHOTO ALBUMS ======== */
.photo-album-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  z-index: 2000;
  animation: fadeIn var(--duration-normal);
}

.photo-album-lightbox.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-image-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  animation: zoomInImage var(--duration-normal);
}

@keyframes zoomInImage {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
  border: none;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--duration-fast);
  border: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.lightbox-photo-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  display: flex;
  gap: 12px;
  align-items: center;
}

.lightbox-photo-uploader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-uploader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.lightbox-uploader-name {
  font-size: 12px;
  font-weight: 600;
}

.lightbox-actions {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
}

.lightbox-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--duration-fast);
  border: none;
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ======== CAROUSEL SECTION ======== */
.carousel-section {
  position: relative;
  background: linear-gradient(135deg, #f5f7ff 0%, #e8f0ff 100%);
  padding: 40px 0;
  margin: 40px 0;
  border-radius: 24px;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 16px;
}

.carousel-slide {
  flex: 0 0 calc(33.333% - 11px);
  min-height: 300px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all var(--duration-fast);
}

.carousel-nav:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.carousel-nav.prev {
  left: 20px;
}

.carousel-nav.next {
  right: 20px;
}

/* ======== MOBILE RESPONSIVENESS ======== */
@media (max-width: 768px) {
  .video-post {
    border-radius: 12px;
    margin-bottom: 16px;
  }

  .video-header {
    padding: 12px;
  }

  .video-content {
    padding: 12px;
  }

  .video-title {
    font-size: 14px;
  }

  .video-description {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }

  .btn-interaction {
    padding: 5px 10px;
    font-size: 11px;
    min-height: 28px;
  }

  .carousel-slide {
    flex: 0 0 calc(50% - 8px);
  }

  .lightbox-container {
    padding: 10px;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }

  .lightbox-photo-info {
    bottom: 10px;
    left: 10px;
    font-size: 11px;
  }

  .lightbox-actions {
    bottom: 10px;
    right: 10px;
    gap: 6px;
  }

  .lightbox-action-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .video-interactions {
    justify-content: space-between;
  }

  .btn-interaction {
    flex: 1;
    min-width: 60px;
  }

  .carousel-slide {
    flex: 0 0 100%;
  }

  .gallery-item {
    border-radius: 8px;
  }

  .lightbox-image-wrapper {
    max-width: 95%;
    max-height: 85%;
  }
}
