* {
  box-sizing: border-box;
}

:root {
  --azul-950: #03182c;
  --azul-900: #04233f;
  --azul-800: #063b66;
  --azul-700: #005a9e;
  --azul-500: #008bd2;
  --azul-100: #e6f5ff;
  --branco: #ffffff;
  --texto: #132033;
  --muted: #5d6b7c;
  --sombra: 0 18px 50px rgba(0, 42, 82, .18);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texto);
  background: linear-gradient(180deg, #f4fbff 0%, #ffffff 55%, #eef8ff 100%);
}

.hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.25), transparent 28%),
    linear-gradient(135deg, var(--azul-950), var(--azul-700) 55%, var(--azul-500));
  color: var(--branco);
  padding: 28px 24px 42px;
}

.hero__content {
  max-width: 1500px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 34px;
}

.logo {
  width: min(260px, 58vw);
  height: auto;
  display: block;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 800;
  color: #bfeaff;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
}

.hero__intro {
  max-width: 860px;
  font-size: 18px;
  line-height: 1.6;
  color: #e5f6ff;
}

.rules {
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 24px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.rules summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 900;
  font-size: 22px;
}

.rules summary::-webkit-details-marker {
  display: none;
}

.rules summary::after {
  content: "+";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  font-size: 30px;
  line-height: 1;
  flex: 0 0 auto;
}

.rules[open] summary::after {
  content: "−";
}

.rules summary small {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #dbeafe;
  margin-top: 4px;
}

.rules__content {
  border-top: 1px solid rgba(255,255,255,.18);
  padding: 4px 28px 26px;
}

.rules__content p,
.rules__content li {
  line-height: 1.65;
}

.rules__content ul {
  margin-top: -6px;
  margin-bottom: 18px;
}

.container {
  width: min(1500px, calc(100% - 32px));
  margin: 42px auto;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 28px;
}

.toolbar h2 {
  margin: 0 0 6px;
  font-size: 32px;
  color: var(--azul-900);
}

.toolbar p {
  margin: 0;
  color: var(--muted);
}

#busca {
  width: min(420px, 100%);
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid #c7dcec;
  outline: none;
  font-size: 15px;
  background: white;
}

#busca:focus {
  border-color: var(--azul-500);
  box-shadow: 0 0 0 4px rgba(0,139,210,.14);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(4, 35, 63, .14);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(4, 35, 63, .22);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.card__body {
  padding: 20px 20px 22px;
}

.card__body strong {
  display: block;
  color: var(--azul-900);
  font-size: 19px;
  line-height: 1.25;
}

.card__body span {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--azul-700);
  font-weight: 800;
}

footer {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}

.detail-page {
  min-height: 100vh;
}

.detail-header {
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, var(--azul-950), var(--azul-700));
  color: white;
  padding: 28px max(16px, calc((100vw - 1500px) / 2)) 34px;
  margin-bottom: 34px;
}

.topbar--detail {
  margin-bottom: 28px;
}

.logo--detail {
  width: min(230px, 56vw);
}

.back-link {
  display: inline-block;
  color: var(--azul-700);
  font-weight: 800;
  text-decoration: none;
  background: white;
  border: 1px solid #d5e7f5;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(4, 35, 63, .08);
  margin-bottom: 24px;
}

.detail-header h1 {
  color: white;
  font-size: clamp(32px, 4vw, 58px);
}

.detail-header p {
  color: #dbeafe;
  font-size: 18px;
}

.detail-container {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.detail-image {
  width: 100%;
  display: block;
  border-radius: 30px;
  box-shadow: var(--sombra);
  background: #eaf6ff;
}

.hint {
  color: var(--muted);
  text-align: center;
  margin-top: 18px;
}

.empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  border-radius: 22px;
  background: white;
  color: var(--muted);
}

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

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 24px 18px 34px;
  }

  .rules summary {
    align-items: flex-start;
    padding: 18px 20px;
    font-size: 18px;
  }

  .rules__content {
    padding: 2px 20px 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
