/* Free resources page */

.page--free-resources {
  background: #f8fafc;
  overflow-x: clip;
}

.page--free-resources main {
  padding-top: 0;
}

.fr-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 1rem) 0 clamp(3.5rem, 10vw, 5.2rem);
  color: var(--white);
  background: linear-gradient(135deg, #052d73 0%, #073a95 55%, #0b63f6 100%);
}

.fr-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(90deg, rgb(255 255 255 / 0.12) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
}

.fr-hero__inner {
  position: relative;
  z-index: 1;
}

.fr-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgb(255 255 255 / 0.76);
}

.fr-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.fr-breadcrumb a:hover {
  color: var(--white);
}

.fr-hero__copy h1 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
}

.fr-hero__copy p {
  margin: 0;
  max-width: 34rem;
  color: rgb(255 255 255 / 0.84);
  line-height: 1.55;
}

.fr-hero__doc {
  position: absolute;
  right: clamp(1rem, 9vw, 7rem);
  top: 1.6rem;
  width: clamp(7rem, 14vw, 11rem);
  color: rgb(255 255 255 / 0.16);
}

.fr-content {
  position: relative;
  z-index: 2;
  margin-top: clamp(-1.5rem, -4vw, -2.35rem);
  padding-bottom: clamp(2rem, 6vw, 3rem);
}

.fr-filters {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: clamp(0.65rem, 2vw, 0.85rem);
  background: var(--white);
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.07);
}

.fr-filters__tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  padding: clamp(0.75rem, 2.5vw, 0.85rem);
  border-bottom: 1px solid var(--gray-100);
  background: #fafbfd;
}

.fr-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-500);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fr-search:focus-within {
  border-color: rgb(37 99 235 / 0.45);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.fr-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-800);
  font: inherit;
  font-size: 1rem;
  touch-action: manipulation;
}

.fr-filter-field {
  display: grid;
  gap: 0.35rem;
}

.fr-filter-field__label {
  color: var(--gray-500);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fr-filter-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.fr-filter-field__control select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 2.35rem 0 0.95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-800);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fr-filter-field__control select:focus {
  border-color: rgb(37 99 235 / 0.45);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
  outline: 0;
}

.fr-filter-field__chevron {
  position: absolute;
  right: 0.95rem;
  color: var(--gray-500);
  pointer-events: none;
}

.fr-filter-field--category,
.fr-filter-field--exam-mobile {
  display: none;
}

.fr-exam-filter--desktop {
  display: none;
  gap: 0.55rem;
  padding: 0.8rem clamp(0.75rem, 2.5vw, 0.85rem);
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
}

.fr-exam-filter__label {
  color: var(--gray-500);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fr-exam-filter__track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fr-exam-chip {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-700);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.fr-exam-chip:hover {
  border-color: var(--blue-400);
  color: var(--blue-500);
}

.fr-exam-chip.is-active {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgb(37 99 235 / 0.28);
}

.fr-exam-chip.is-active:hover {
  color: var(--white);
}

.fr-filters__tabs {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fr-filters__tabs::-webkit-scrollbar {
  display: none;
}

.fr-filters__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 0 auto;
  min-width: max(7.5rem, 16%);
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  color: var(--gray-600);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  scroll-snap-align: start;
  transition: color 0.15s ease, background 0.15s ease;
}

.fr-filters__tab + .fr-filters__tab {
  box-shadow: inset 1px 0 0 var(--gray-100);
}

.fr-filters__tab:hover {
  color: var(--blue-500);
  background: rgb(37 99 235 / 0.03);
}

.fr-filters__tab.is-active {
  color: var(--blue-500);
  background: rgb(37 99 235 / 0.05);
}

.fr-filters__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--blue-500);
}

.fr-filters__tab .icon {
  flex-shrink: 0;
  opacity: 0.72;
}

.fr-filters__tab.is-active .icon {
  opacity: 1;
}

.fr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: clamp(0.75rem, 2.5vw, 1rem);
}

.fr-card {
  display: grid;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.fr-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.06);
}

.fr-card[hidden] {
  display: none;
}

.fr-card__body {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1rem 0.95rem;
}

.fr-card__title {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.fr-card__description {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.fr-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.fr-card__meta-sep {
  color: #94a3b8;
}

.fr-card__meta-size {
  color: #64748b;
  font-weight: 600;
}

.fr-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.35rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fr-card__tag--category,
.fr-card__tag--exam {
  color: #5c6370;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.fr-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
}

.fr-card__file {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.fr-card__file .icon {
  flex: 0 0 auto;
  color: #94a3b8;
}

.fr-card__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  color: #64748b;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.fr-card__download:hover {
  background: rgb(15 23 42 / 0.06);
  color: #0f172a;
}

.fr-empty {
  margin-top: clamp(0.75rem, 2.5vw, 1rem);
  padding: 1rem;
  border: 1px dashed var(--gray-300);
  border-radius: clamp(0.65rem, 2vw, 0.7rem);
  background: var(--white);
  color: var(--gray-600);
  font-size: 0.9375rem;
  text-align: center;
}

.fr-pagination {
  margin-top: clamp(1rem, 3vw, 1.5rem);
  padding-top: clamp(0.85rem, 2.5vw, 1rem);
  border-top: 1px solid var(--gray-200);
}

.fr-pagination__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
}

.fr-pagination__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.fr-pagination__summary {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.fr-pagination__range {
  color: var(--navy-900);
  font-weight: 700;
}

.fr-pagination__of {
  margin-left: 0.2rem;
}

.fr-pagination__per-page {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gray-600);
  font-size: 0.8125rem;
}

.fr-pagination__per-page-label {
  white-space: nowrap;
}

.fr-pagination__per-page-select {
  appearance: none;
  min-width: 3.75rem;
  padding: 0.4rem 1.85rem 0.4rem 0.7rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.55rem;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.55rem center / 0.75rem;
  color: var(--navy-900);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.fr-pagination__per-page-select:hover {
  border-color: #cbd5e1;
}

.fr-pagination__per-page-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgb(124 58 237 / 0.16);
}

.fr-pagination__controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  background: var(--white);
}

.fr-pagination__pages {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.fr-pagination__nav,
.fr-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--navy-900);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.fr-pagination__nav:hover,
.fr-pagination__page:hover {
  background: rgb(124 58 237 / 0.08);
  color: #6d28d9;
}

.fr-pagination__page.is-active {
  background: #7c3aed;
  color: var(--white);
  box-shadow: 0 8px 18px rgb(124 58 237 / 0.28);
}

.fr-pagination__page.is-active:hover {
  background: #6d28d9;
  color: var(--white);
}

.fr-pagination__nav.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.fr-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .fr-pagination__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-pagination__meta {
    width: 100%;
    justify-content: space-between;
  }

  .fr-pagination__controls {
    width: 100%;
    justify-content: space-between;
  }
}

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

  .fr-filter-field--category,
  .fr-filter-field--exam-mobile {
    display: none;
  }

  .fr-exam-filter--desktop {
    display: grid;
  }

  .fr-filters__tabs--desktop {
    display: flex;
  }
}

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

@media (max-width: 900px) {
  .fr-filter-field--category,
  .fr-filter-field--exam-mobile {
    display: grid;
  }

  .fr-exam-filter--desktop {
    display: none;
  }

  .fr-filters__tabs--desktop {
    display: none;
  }
}

@media (max-width: 560px) {
  .fr-hero {
    padding-bottom: 3.5rem;
  }

  .fr-hero__doc {
    right: -1.25rem;
    top: 2rem;
    width: 7.5rem;
  }
}
