/**
 * ASDF resource pages — Project Manuals, Annual Reports, Publications.
 *
 * One card design shared by the three page templates and the ASDF Documents
 * Elementor widget. Custom properties carry literal fallbacks so the cards still
 * render correctly if the theme's style.css is an older build or cached.
 */

.docs-section {
  padding: 90px 0 100px;
  background: var(--white, #ffffff);
}

.docs-intro {
  max-width: 720px;
  margin: 14px auto 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light, #6d6470);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 26px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--white, #ffffff);
  border: 1px solid var(--border-lavender, #dfd2e3);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.doc-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 16px 38px rgba(94, 16, 98, 0.16);
}

/* ---- Cover ---- */
.doc-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-lavender, #f4ecf5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@supports not (aspect-ratio: 1 / 1) {
  .doc-cover { height: 0; padding-bottom: 62.5%; }
}
.doc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.doc-card:hover .doc-cover img { transform: scale(1.05); }

/* Shown when a document has no cover image. */
.doc-cover-icon { color: var(--primary-purple, #5e1062); opacity: 0.45; }

.doc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 30px;
  background: var(--primary-purple, #5e1062);
  color: var(--white, #ffffff);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ---- Body ---- */
.doc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
}

.doc-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-dark, #2a252c);
}

.doc-desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-light, #6d6470);
}

/* margin-top:auto pins the button to the bottom so uneven descriptions
   still produce a tidy row of aligned buttons. */
.doc-btn {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  background: var(--primary-purple, #5e1062);
  color: var(--white, #ffffff);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.22s ease, transform 0.22s ease;
}
.doc-btn:hover {
  background: var(--primary-purple-hover, #4c0a50);
  transform: translateX(2px);
}
.doc-btn.is-disabled {
  background: var(--bg-lavender, #f4ecf5);
  color: var(--text-light, #6d6470);
  cursor: default;
}
.doc-btn.is-disabled:hover { transform: none; }

.docs-empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border-lavender, #dfd2e3);
  border-radius: 14px;
  color: var(--text-light, #6d6470);
  font-size: 15px;
}

@media (max-width: 600px) {
  .docs-section { padding: 60px 0 70px; }
  .docs-grid { gap: 18px; }
  .doc-body { padding: 16px 16px 18px; }
  .doc-title { font-size: 16px; }
}

/* ===================================================================
   Opportunity cards — Expeditions, Learning Visits, Career Opportunities
   Same section shell as the document pages (.docs-section / .docs-intro),
   with a wider card carrying location, date and an apply/register action.
   =================================================================== */
.opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 26px;
}

.opp-card {
  display: flex;
  flex-direction: column;
  background: var(--white, #ffffff);
  border: 1px solid var(--border-lavender, #dfd2e3);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.opp-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 16px 38px rgba(94, 16, 98, 0.16);
}

.opp-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-lavender, #f4ecf5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@supports not (aspect-ratio: 1 / 1) {
  .opp-cover { height: 0; padding-bottom: 56.25%; }
}
.opp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.opp-card:hover .opp-cover img { transform: scale(1.05); }
.opp-cover-icon { color: var(--primary-purple, #5e1062); opacity: 0.4; }

.opp-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 13px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-purple, #5e1062);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(94, 16, 98, 0.18);
}

.opp-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
}

.opp-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-dark, #2a252c);
}

.opp-meta {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.opp-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-purple, #5e1062);
}
.opp-meta svg { flex: 0 0 auto; opacity: 0.75; }

.opp-desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-light, #6d6470);
}

/* margin-top:auto keeps every button on the same baseline regardless of
   how long each description runs. */
.opp-btn {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 30px;
  background: var(--primary-purple, #5e1062);
  color: var(--white, #ffffff);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.22s ease, gap 0.22s ease;
}
.opp-btn:hover {
  background: var(--primary-purple-hover, #4c0a50);
  gap: 12px;
}

@media (max-width: 600px) {
  .opp-grid { gap: 18px; }
  .opp-body { padding: 16px 16px 18px; }
  .opp-title { font-size: 16.5px; }
}
