/* Header */
.header {
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  transition: background-image 2s ease-in-out;
}

/* Blinking caret */
.header h1.blink {
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: orange; }
}

/* Gallery */
.gallery {
  display: grid;
  gap: 15px;
  padding: 20px;
  justify-items: center;
}

/* Responsive grid columns */
@media (min-width: 1200px) { .gallery { grid-template-columns: repeat(4, 1fr); } } /* Desktop */
@media (min-width: 768px) and (max-width: 1199px) { .gallery { grid-template-columns: repeat(3, 1fr); } } /* Tablet */
@media (max-width: 767px) { .gallery { grid-template-columns: repeat(2, 1fr); } } /* Mobile */

.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  border: 3px solid black;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery img:hover { transform: scale(1.05); }

.date {
  margin-top: 5px;
  color: gray;
  font-size: 14px;
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.close {
  color: white;
  font-size: 40px;
  position: absolute;
  top: 15px;
  right: 35px;
  cursor: pointer;
}

/* Unified Modal Buttons */
.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.download-btn,
.share-btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  display: inline-block;
}

/* Download Button */
.download-btn {
  background: orange;
  color: black;
  border: none;
}

.download-btn:hover {
  background: darkorange;
  color: white;
}

/* Share Button */
.share-btn {
  background: #007bff;
  color: white;
  border: none;
}

.share-btn:hover {
  background: #0056b3;
}

/* Modal swipe helper (optional invisible for mobile swipe) */
.modal-swipe {
  position: absolute;
  width: 50%;
  height: 100%;
  top: 0;
  z-index: 9998;
}

/* Left half swipe area */
.modal-swipe-left { left: 0; }

/* Right half swipe area */
.modal-swipe-right { right: 0; }


.modal-content,
#modalImg {
  touch-action: none;
  transform-origin: center center !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

                                                              
.img-wrapper {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#modalImg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: none;
  transform-origin: center center !important;
}

/* Modal buttons always bottom space */
.modal-actions {
  margin-bottom: 20px;
  z-index: 99999;
}

/* 3D Reveal Animation */
@keyframes reveal3D {
  0% {
    opacity: 0;
    transform: rotateX(70deg) translateY(40px) scale(0.7);
  }
  60% {
    transform: rotateX(-10deg) translateY(-10px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) translateY(0) scale(1);
  }
}

/* Header H1 Base (transparent big text) */
.header h1 {
  opacity: 0;
  transform: scale(0.7);
  background: transparent !important;
  padding: 0 !important;

  color: transparent !important;
  -webkit-text-stroke: 4px white !important;

  font-weight: 900;
  white-space: nowrap;
  border: none !important;
}

/* Trigger 3D animation */
.header h1.show {
  animation: reveal3D 1.4s ease-out forwards;
}

/* Desktop */
@media (min-width: 1200px) {
  .header h1 { font-size: 12em !important; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .header h1 { font-size: 8em !important; }
}

/* Mobile */
@media (max-width: 767px) {
  .header h1 { font-size: 5em !important; }
}

/* Small phones */
@media (max-width: 480px) {
  .header h1 {
    font-size: 4em !important;
    -webkit-text-stroke: 3px white !important;
  }
}
