/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background: #fafafa;
  min-height: 100vh;
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#currentImage {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  width: auto;
  object-fit: contain;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  z-index: 10;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
}

.image-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.indicator.active {
  background: #fff;
  transform: scale(1.2);
}

.page-container {
  min-height: 100vh;
  position: relative;
  padding-left: 12%;
  padding-right: 12%;
}

.post-container {
  display: flex;
  position: relative;
  height: 100vh;
  background: #f8fafc;
  width: 100%;
  color: #333;
  overflow: visible;
}

.post-images {
  max-width: 50%;
  flex: none;
  background: black;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  min-width: 0;
  border-left: 1px solid #efefef;
}
.post-container h3,
.post-container h4 {
  margin-top: 15px;
  color: #389882ff;
}
.post-container strong {
  color: rgb(119, 216, 193);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #efefef;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-title {
  font-weight: 600;
  font-size: 14px;
  align-self: center;
  color: #262626;
}

.more-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  color: #262626;
}

.post-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.caption {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.caption-text {
  flex: 1;
}

.caption-text p {
  color: #262626;
  font-size: 18px;
  line-height: 1.4;
  margin-top: 4px;
}

.more-text {
  color: #8e8e8e;
  cursor: pointer;
  font-size: 14px;
}

.hashtags {
  margin-top: 8px;
  font-size: 14px;
}

.hashtags span {
  color: #0095f6;
  cursor: pointer;
}

.post-time {
  color: #8e8e8e;
  font-size: 12px;
  margin-top: 8px;
  text-transform: uppercase;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #efefef;
}

.action-buttons {
  display: flex;
  gap: 16px;
}

.action-btn,
.save-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.1s;
}

.action-btn:hover,
.save-btn:hover {
  transform: scale(1.1);
}

.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #389882;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-left: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.back-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-2px);
}

@media (max-width: 1368px) {
  .post-images {
    flex: 1;
    background: black;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .post-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-width: 0;
    border-left: 1px solid #efefef;
  }

  .page-container {
    min-height: 100vh;
    position: relative;
    padding-left: 0px;
    padding-right: 0px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .post-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
    flex-direction: column;
  }

  .image-container {
    position: relative;
    max-height: 100%;
    width: 100%;
    display: flex; /* make it a flex container */
    justify-content: center; /* center horizontally */
    align-items: center; /* center vertically */
  }

  #currentImage {
    max-width: 100%;
    max-height: 100%;
  }

  .post-images {
    max-width: 100%;
    flex: 1;
    height: 25vh;
    overflow: hidden;
  }

  .post-details {
    flex: 1;
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid #efefef;
    overflow: visible;
  }

  .back-btn {
    top: 15px;
    left: 15px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Animation for image transition */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
