/* Catálogo de cursos: presencial (elétrica) e EAD, lado a lado */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
a[aria-current="page"] {
  color: var(--navy);
  font-weight: 700;
}
.section-heading .page-title {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  border-top: 3px solid var(--navy);
  padding-top: 17px;
}
.catalogs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.catalog {
  background: #fff;
  border-top: 4px solid var(--navy);
  padding: 28px 26px 24px;
  min-width: 0;
  scroll-margin-top: 110px;
}
.catalog-ead {
  border-top-color: var(--green);
}
.catalog-head .eyebrow {
  margin: 0 0 8px;
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.catalog-head h3 {
  font-size: 23px;
  line-height: 1.25;
  margin: 0;
  color: var(--deep);
}
.catalog-head > p:last-child {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.catalog-tools {
  display: grid;
  gap: 10px;
  margin: 16px 0 6px;
}
.catalog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  min-height: 44px;
  background: var(--light);
}
.catalog-search:focus-within {
  border-color: var(--navy);
  background: #fff;
}
.catalog-search svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}
.catalog-search input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
  min-height: 42px;
  outline: none;
}
.catalog-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.catalog-filters::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  min-height: 34px;
}
.chip:hover {
  border-color: #8799ae;
  color: var(--navy);
}
.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.catalog-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.catalog-list.is-expanded {
  max-height: 640px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  border-bottom: 1px solid var(--line);
}
.catalog-list li + li {
  border-top: 1px solid var(--line);
}
.catalog-item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 14px 6px;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  transition: background 0.15s;
}
.catalog-item:hover {
  background: var(--light);
}
.catalog-thumb {
  display: grid;
  place-items: center;
  width: 104px;
  height: 72px;
  background: var(--navy);
  border-radius: 2px;
  overflow: hidden;
}
.catalog-ead .catalog-thumb {
  background: var(--deep);
}
.catalog-thumb svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.catalog-meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.catalog-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--deep);
}
.catalog-summary {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--navy);
  font-weight: 700;
}
.catalog-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.15s;
}
.catalog-item:hover .catalog-cta svg {
  transform: translateX(3px);
}
.catalog-empty {
  color: var(--muted);
  padding: 24px 0;
  margin: 0;
  text-align: center;
}
.catalog-more {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 46px;
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  border-radius: 2px;
}
.catalog-more span {
  font-weight: 400;
  color: var(--muted);
}
.catalog-more:hover {
  background: var(--navy);
  color: #fff;
}
.catalog-more:hover span {
  color: #c9d3e0;
}

/* Diálogo de detalhes */
#details {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.detail-image {
  display: block;
  width: calc(100% + 70px);
  max-width: none;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  margin: -35px -35px 22px;
  background: var(--light);
}
#details .close {
  position: absolute;
  top: 10px;
  right: 10px;
  float: none;
  margin: 0;
  z-index: 1;
  background: #ffffffe6;
  border-radius: 50%;
  line-height: 1;
}
#details h2 {
  margin: 0 0 14px;
  line-height: 1.2;
  color: var(--deep);
}
.detail-meta {
  list-style: none;
  padding: 12px 0;
  margin: 0 0 16px;
  border-block: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 14px;
}
.detail-meta b {
  color: var(--ink);
}
.detail-body p {
  margin: 0 0 12px;
}
.detail-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.detail-body li + li {
  margin-top: 4px;
}
.detail-note {
  font-size: 14px;
  background: var(--light);
  border-left: 3px solid var(--green);
  padding: 10px 14px;
  margin: 18px 0 20px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.detail-secondary {
  font-size: 14px;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1000px) {
  .catalogs {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .catalog {
    padding: 22px 16px 18px;
  }
  .catalog-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 12px 2px;
  }
  .catalog-thumb {
    width: 80px;
    height: 60px;
  }
  .catalog-cta {
    display: none;
  }
  .catalog-list.is-expanded {
    max-height: 70vh;
  }
  #details {
    padding: 28px 20px;
  }
  .detail-image {
    width: calc(100% + 40px);
    margin: -28px -20px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-item,
  .catalog-cta svg {
    transition: none;
  }
}
