/* Page body */
.resources-body {
  max-width: 1060px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}
.resources-body .section-sub {
  max-width: 680px;
}

.resources-body .section-label {
  margin-bottom: 0.4rem;
}

/* Resource card */
.resource-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition:
    box-shadow 0.25s,
    transform 0.25s,
    border-color 0.25s;
  height: 100%;
}

.resource-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(184, 147, 90, 0.12);
  transform: translateY(-3px);
}

/* Badge on preview */
.preview-wrap {
  position: relative;
  background: var(--cream-dark);
  border-bottom: 1.5px solid var(--border);
  aspect-ratio: 4/3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.35s ease;
}

.resource-card:hover .preview-wrap img {
  transform: scale(1.04);
}

.preview-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--ink);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid rgba(184, 147, 90, 0.3);
}

/* Card body */
.resource-card-body {
  padding: 1.75rem;
}

.resource-card-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.resource-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Download buttons grid */
.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px);
  gap: 0.6rem;
  max-width: 520px;
}

.btn-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 0.5rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: "Roboto", sans-serif;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.15s,
    color 0.18s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-dl:active {
  transform: scale(0.97);
}

/* Primary (filled ink) */
.btn-dl-primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn-dl-primary:hover {
  background: #2e2823;
  color: var(--gold-light);
}

/* Outline gold */
.btn-dl-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-dl-outline:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--ink);
}

/* Format tag */
.format-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold-pale);
  color: var(--gold);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  margin-left: 0.2rem;
}

/* How to use section */
.howto-section {
  margin-top: 5rem;
  background: var(--ink);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.howto-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 10% 80%,
    rgba(184, 147, 90, 0.15) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.howto-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.howto-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Roboto", sans-serif;
}

.howto-text strong {
  display: block;
  color: var(--cream);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.howto-text span {
  color: rgba(249, 245, 239, 0.45);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Custom Tabs */
.custom-tabs {
  border-bottom: 2px solid var(--border);
  gap: 2rem;
}
.custom-tabs .nav-link {
  color: var(--muted);
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.75rem 0.25rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -2px;
  background: transparent;
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}
.custom-tabs .nav-link:hover {
  color: var(--ink);
  background: transparent;
}
.custom-tabs .nav-link.active {
  color: var(--ink);
  background: transparent;
  border-bottom: 2px solid var(--gold);
  font-weight: 600;
  box-shadow: none;
}

/* Variant Selectors */
.variant-selector {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.btn-variant {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  padding: 0.6rem 1.25rem;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-variant:last-child {
  border-right: none;
}
.btn-variant:hover {
  background: var(--cream-dark);
  color: var(--ink);
}
.btn-variant.active {
  background: var(--gold-pale);
  color: var(--ink);
  font-weight: 600;
}

/* Contact Toggle */
.contact-toggle-label {
  cursor: pointer;
  margin: 0;
}
.contact-toggle-label .toggle-box {
  border: 1.5px solid var(--border);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s ease;
  background: var(--surface);
}
.contact-toggle-label:hover .toggle-box {
  border-color: var(--gold);
  color: var(--ink);
}
.contact-toggle-label input:checked + .toggle-box {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
  box-shadow: 0 4px 12px rgba(46, 40, 35, 0.15);
}

/* Large Preview */
.preview-wrap-large {
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.02);
}
.preview-wrap-large img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
  transition: transform 0.4s ease;
}
.preview-wrap-large:hover img {
  transform: scale(1.03);
}

/* Divider between resource sections */
.resource-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.5rem 0;
}

/* Responsive */
@media (max-width: 767.98px) {
  .resources-body {
    padding: 2.5rem 1rem 3.5rem;
  }
  .howto-section {
    padding: 2rem 1.25rem;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .custom-tabs .nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
  .preview-wrap-large {
    padding: 1.5rem;
  }
}
