/* Resources section: books gallery, PDF lists */
.resources-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.resources-asset-grid figure {
  margin: 0;
  text-align: center;
}

.resources-asset-grid img {
  width: 100%;
  height: auto;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
}

.resources-asset-grid figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
}

/* Photo album grids: responsive masonry, no filenames, click opens lightbox */
.resources-photo-grid {
  display: block;
  margin: 24px 0;
}

.resources-photo-grid.resources-masonry-ready {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.resources-photo-grid.resources-masonry-ready > figure {
  display: none;
}

.resources-photo-masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resources-photo-grid figure,
.resources-photo-masonry-col figure {
  margin: 0;
  width: 100%;
}

.resources-photo-grid figcaption {
  display: none;
}

.resources-photo-grid .resources-lightbox-trigger {
  display: block;
  cursor: zoom-in;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
}

.resources-photo-grid img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.resources-photo-grid .resources-lightbox-trigger:hover img {
  opacity: 0.92;
  transform: scale(1.01);
}

@media (max-width: 575px) {
  .resources-photo-grid.resources-masonry-ready {
    display: block;
  }

  .resources-photo-grid.resources-masonry-ready > figure {
    display: block;
  }

  .resources-photo-masonry-col {
    display: none;
  }
}

body.resources-lightbox-open {
  overflow: hidden;
}

.resources-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.resources-lightbox[hidden] {
  display: none !important;
}

.resources-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.resources-lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 72px;
  box-sizing: border-box;
}

.resources-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.resources-lightbox-btn {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.resources-lightbox-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
}

.resources-lightbox-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.resources-lightbox-close {
  top: 16px;
  right: 16px;
  font-size: 32px;
}

.resources-lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.resources-lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 767px) {
  .resources-lightbox-stage {
    padding: 48px 12px;
  }

  .resources-lightbox-prev {
    left: 8px;
  }

  .resources-lightbox-next {
    right: 8px;
  }
}

.resources-page-intro {
  text-align: center;
  margin: 0 0 8px;
  padding: 20px 0 0;
}

.resources-page-intro-logo {
  display: block;
  width: 90px;
  height: auto;
  margin: 0 auto 24px;
}

.post-content .resources-page-intro .resources-page-intro-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  line-height: 1.3;
  font-weight: 700;
  color: #1e294b;
  text-align: center !important;
  display: block;
  width: 100%;
}

.post-content .resources-page-intro .resources-page-intro-description {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 16px !important;
  font-size: 20px;
  line-height: 1.5;
  color: #333;
  text-align: center !important;
}

.resources-page-intro-divider {
  width: 170px;
  max-width: 100%;
  height: 0;
  margin: 15px auto 35px;
  border: 0;
  border-top: 1px solid #ef9a3d;
}

.resources-pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.resources-pdf-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.resources-pdf-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.resources-pdf-preview {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 280px;
  padding: 12px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-bottom: 1px solid #e8edf2;
}

.resources-pdf-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.resources-pdf-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-size: 16px;
}

.resources-pdf-preview-ready .resources-pdf-fallback,
.resources-pdf-preview-error .resources-pdf-fallback {
  display: none;
}

.resources-pdf-preview-error::after {
  content: "PDF";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #94a3b8;
}

.resources-pdf-title {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px 16px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  color: #1e294b;
  overflow-wrap: anywhere;
}

.resources-pdf-list {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.resources-pdf-list li {
  margin: 0 0 12px;
  padding: 14px 18px;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  background: #f8fafc;
}

.resources-pdf-list a {
  font-weight: 600;
  text-decoration: none;
}

.resources-pdf-list a:hover {
  text-decoration: underline;
}

.resources-cover-preview {
  max-width: 320px;
  margin: 16px 0 24px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.resources-prospectus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.resources-prospectus-actions a {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 4px;
  background: #1e294b;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}

.resources-prospectus-actions a:hover {
  background: #2a3a66;
}

.resources-prospectus-actions a.secondary {
  background: #e9e9ed;
  color: #1e294b !important;
}

.resources-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.resources-album-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.resources-album-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.resources-album-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.resources-album-meta {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px 16px;
}

.resources-album-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  color: #1e294b;
  overflow-wrap: anywhere;
}

.resources-album-count {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.3;
  color: #666;
}

.resources-back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 600;
  text-decoration: none;
}

.resources-back-link:hover {
  text-decoration: underline;
}

.resources-album-heading {
  margin: 0 0 20px;
  font-size: 1.5rem;
  color: #1e294b;
}
