/* ================================================================
   LXMUN · resources.css
   Styles for resources/index.html
   Requires: global.css, components.css
   ================================================================ */


/* ── Hero ── */
.res-hero {
  position: relative;
  padding-top: var(--navbar-h);
  padding-bottom: 0;
  min-height: 40vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(
    125deg,
    #001235 0%,
    #002460 40%,
    #0b4a8c 100%
  );
}

.res-hero__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.res-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-block: var(--space-xl);
}

.res-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-family: var(--font-latin);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  width: fit-content;
  background: rgba(255,255,255,0.06);
}

.res-hero__title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.4em;
  color: #fff;
  line-height: 1;
  margin-top: var(--space-xs);
}

.res-hero__subtitle {
  font-family: var(--font-latin);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.res-hero__desc {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
  margin-top: var(--space-xs);
}

.res-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}
.res-hero__wave svg {
  display: block;
  width: 100%;
  height: 56px;
}


/* ── List section ── */
.res-list {
  position: relative;
  background: var(--color-bg-muted);
}

.res-list__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.res-loading {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
}

.res-error {
  text-align: center;
  padding: var(--space-xl);
  color: #c0392b;
  font-size: var(--fs-sm);
}


/* ── Group block (e.g. one conference edition) ── */
.res-group {
  margin-bottom: var(--space-xl);
}
.res-group:last-child {
  margin-bottom: 0;
}

.res-group__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.res-group__year {
  font-family: var(--font-latin);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--color-primary);
  padding: 3px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.res-group__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

.res-group__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(0,49,117,0.25), transparent);
}

.res-group__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ── Resource row card ── */
.rc {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,49,117,0.09);
  box-shadow: var(--shadow-card);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  cursor: pointer;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}
.rc:hover {
  box-shadow: var(--shadow-raised);
  transform: translateX(4px);
  border-color: rgba(0,49,117,0.22);
  background: #fafcff;
}

/* Left: PDF icon block */
.rc__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  /* Color set via data-type attribute on parent */
  background: var(--icon-bg, rgba(11,92,171,0.1));
  color: var(--icon-color, var(--color-accent));
  transition: background var(--transition-base);
}
.rc:hover .rc__icon {
  background: var(--icon-bg-hover, rgba(11,92,171,0.18));
}

/* Type-specific icon colors */
.rc[data-type="resolution"]   { --icon-bg: rgba(0,49,117,0.10); --icon-bg-hover: rgba(0,49,117,0.18); --icon-color: var(--color-primary); }
.rc[data-type="background"]   { --icon-bg: rgba(11,92,171,0.10); --icon-bg-hover: rgba(11,92,171,0.18); --icon-color: var(--color-accent); }
.rc[data-type="communique"]   { --icon-bg: rgba(17,138,203,0.10); --icon-bg-hover: rgba(17,138,203,0.18); --icon-color: var(--color-link); }
.rc[data-type="other"]        { --icon-bg: rgba(112,112,112,0.10); --icon-bg-hover: rgba(112,112,112,0.18); --icon-color: var(--color-text-muted); }

/* Middle: text content */
.rc__body {
  flex: 1;
  min-width: 0;
}

.rc__type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--icon-color, var(--color-accent));
  margin-bottom: 2px;
}

.rc__title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-base);
}
.rc:hover .rc__title {
  color: var(--color-link);
}

.rc__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 3px;
}

.rc__committee {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.rc__size {
  font-size: var(--fs-xs);
  color: rgba(112,112,112,0.6);
  font-family: var(--font-latin);
}

/* Right: open indicator */
.rc__action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  transition: color var(--transition-base);
}
.rc:hover .rc__action {
  color: var(--color-accent);
}

.rc__action svg {
  transition: transform var(--transition-base);
}
.rc:hover .rc__action svg {
  transform: translate(2px, -2px);
}


/* ── Responsive ── */
@media (max-width: 768px) {
  .res-hero {
    min-height: 32vh;
  }
  .res-hero__title {
    letter-spacing: 0.2em;
  }
  .res-group__title {
    font-size: var(--fs-md);
  }
  .rc__action span {
    display: none; /* hide label text, keep icon */
  }
  .rc__size {
    display: none;
  }
}

@media (max-width: 480px) {
  .rc {
    padding: var(--space-xs) var(--space-sm);
    gap: var(--space-sm);
  }
  .rc__icon {
    width: 38px;
    height: 38px;
  }
}
