.picture-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.picture-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.picture-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.picture-info {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.picture-info p {
  margin: 5px 0;
  font-size: 0.95rem;
}

.picture-info small {
  color: #666;
}

.picture-card button {
  width: 100%;
  margin-top: 10px;
  border-radius: 0;
}

/* iPhone-style photo gallery */
.gallery-page {
  width: 100%;
}

.gallery-heading {
  margin: 8px 0 12px;
  color: var(--primary-color);
}

.gallery-upload-preview {
  margin-top: 12px;
}

.gallery-upload-preview img {
  display: block;
  max-width: 220px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.gallery-upload-actions {
  display: flex;
  gap: 10px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: transparent;
}

.photo-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  transform: scale(1.03);
  opacity: 0.92;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* display:flex must not apply while closed — it overrides the HTML hidden attribute */
.photo-lightbox.is-open {
  display: flex;
}

.photo-lightbox-inner {
  position: relative;
  width: min(920px, 100%);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.photo-lightbox-close {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
}

.photo-lightbox-meta {
  text-align: center;
  color: #fff;
}

.photo-lightbox-title {
  margin: 0;
  font-weight: 600;
}

.photo-lightbox-date {
  margin: 4px 0 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

.photo-lightbox-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.photo-lightbox-actions button {
  min-width: 120px;
}

@media (min-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .photo-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table thead {
  background-color: var(--primary-color);
  color: var(--white);
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
  background-color: var(--light-green);
}

.admin-table select {
  padding: 5px;
  border: 1px solid var(--secondary-color);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 12px;
  font-size: 0.85rem;
}

.guest-card {
  background: var(--white);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent-color);
}

.guest-card p {
  margin: 8px 0;
}

.news-content {
  margin: 15px 0;
  line-height: 1.8;
  color: #555;
}

.news-meta {
  font-size: 0.9rem;
  color: #999;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .admin-table {
    font-size: 0.9rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px;
  }

  .admin-table select {
    max-width: 100px;
  }
}

a.btn-primary, a.btn-secondary, a.btn-danger, a.btn-success {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.sidebar-link {
  display: block;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

/* Keep gallery tiles flat — don't bounce like action buttons */
.photo-tile:hover,
.photo-lightbox-close:hover {
  transform: none;
  box-shadow: none;
}

.news-create-toggle {
  margin-bottom: 0;
}

.news-create-form {
  margin-top: 20px;
}

.news-create-form[hidden] {
  display: none !important;
}

