/* Memories Gallery Container */
.snhs-memories-page .snhs-container {
  max-width: 1200px;
  margin: 20px auto;
}

.snhs-memories-actions {
  text-align: right;
  margin-bottom: 20px;
}

/* Gallery Grid */
.snhs-gallery-grid {
  margin: 0 auto; /* Center alignment if grid is smaller than container */
}

/* Clearfix for Masonry */
.snhs-gallery-grid:after {
  content: "";
  display: block;
  clear: both;
}

.snhs-gallery-disabled {
  pointer-events: none !important;
}

.snhs-gallery-item {
  width: calc(33.333% - 10px); /* 3 columns with gutter allowance */
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.snhs-gallery-item:hover {
  transform: translateY(-5px); /* Lift effect */
}

.snhs-gallery-item img {
  width: 100%;
  height: auto; /* Allow natural height */
  display: block;
  border-radius: 8px;
}

.snhs-gallery-item .memory-year {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  backdrop-filter: blur(2px);
}

/* Responsive */
@media (max-width: 900px) {
  .snhs-gallery-item {
    width: calc(50% - 10px);
  }
}

@media (max-width: 600px) {
  .snhs-gallery-item {
    width: 100%;
  }
  .snhs-memories-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Modal */
.snhs-memories-modal {
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.snhs-memories-modal-content {
  background-color: #fff;
  padding: 0; /* Let header fill the top */
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

.snhs-memories-modal-header {
  background-color: #05254b;
  padding: 20px;
  text-align: center;
  position: relative;
}

.snhs-memories-modal-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.snhs-memories-modal-body {
  padding: 30px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.snhs-close {
  color: #fff;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: normal;
  background: rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}

.snhs-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.snhs-memories-modal form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.snhs-memories-modal label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #374151;
  text-align: left;
}

/* Inputs */
.snhs-memories-modal input[type="text"],
.snhs-memories-modal select,
.snhs-memories-modal textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
  background: #fff;
}

.snhs-memories-modal input[type="text"]:focus,
.snhs-memories-modal select:focus,
.snhs-memories-modal textarea:focus {
  outline: none;
  border-color: #05254b;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Custom File Input */
.snhs-file-input-wrapper {
  position: relative;
  width: 100%;
}

.snhs-file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.snhs-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background-color: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: #4b5563;
}

.snhs-file-label:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.snhs-file-label .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* Button override */
button.alt {
  background-color: #05254b;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: background-color 0.2s;
}

button.alt:hover {
  background-color: #03162e;
}

#snhs-upload-message {
  text-align: center;
  font-weight: 500;
  display: none;
}
.snhs-success {
  color: #059669;
}
.snhs-error {
  color: #dc2626;
}
/* SimpleLightbox Overrides */
.sl-overlay {
  background: #000 !important;
  opacity: 0.9;
}

.sl-wrapper {
  z-index: 100000;
}

.sl-wrapper .sl-navigation button {
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  margin-top: -30px;
  transition: background 0.3s;
  color: #fff;
}

.sl-wrapper .sl-navigation button:hover {
  background: rgba(0, 0, 0, 0.5);
}

.sl-wrapper .sl-close {
  font-size: 40px;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  top: 20px;
  right: 20px;
  transition: background 0.3s;
  color: #fff;
}

.sl-wrapper .sl-close:hover {
  background: rgba(0, 0, 0, 0.5);
}

.sl-wrapper .sl-counter {
  top: 30px;
  left: 30px;
  font-size: 16px;
  color: #fff;
}

.sl-wrapper .sl-caption {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  font-size: 1rem;
  font-weight: 400;
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
