* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* Radio inputs: hidden but functional for CSS :checked */
#tab-tutti,
#tab-concorsi,
#tab-pen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ─── Page ─── */
.concorsi-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f7f4ee;
  color: #1a2a40;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─── Hero ─── */
.concorsi-hero {
  position: relative;
  overflow: hidden;
  background: #0f1e38;
  padding: 40px 24px 36px;
  text-align: center;
}

.concorsi-hero::before,
.concorsi-hero::after {
  position: absolute;
  left: 50%;
  border-radius: 999px;
  pointer-events: none;
  content: "";
  transform: translateX(-50%);
}

.concorsi-hero::before {
  top: -60px;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(201, 168, 76, 0.12);
}

.concorsi-hero::after {
  top: -30px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(201, 168, 76, 0.08);
}

.concorsi-hero h1 {
  position: relative;
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.concorsi-hero h1 span {
  color: #c9a84c;
}

.concorsi-hero-subtitle {
  position: relative;
  margin: 18px 0 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.45;
}

.concorsi-hero-desc {
  position: relative;
  margin: 0 auto 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
}

/* ─── Tab nav ─── */
.concorsi-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 6px;
  background: #f7f4ee;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(15, 30, 56, 0.07);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.concorsi-tabs::-webkit-scrollbar {
  display: none;
}

.concorsi-tabs label {
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(15, 30, 56, 0.14);
  border-radius: 999px;
  padding: 6px 14px;
  color: #5a6a80;
  font-size: 13px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.concorsi-tabs label:hover {
  border-color: rgba(15, 30, 56, 0.25);
  color: #1a2a40;
}

#tab-tutti:checked ~ .concorsi-tabs label[for="tab-tutti"],
#tab-concorsi:checked ~ .concorsi-tabs label[for="tab-concorsi"],
#tab-pen:checked ~ .concorsi-tabs label[for="tab-pen"] {
  background: #0f1e38;
  border-color: #0f1e38;
  color: #ffffff;
}

/* ─── Tab filtering ─── */
#tab-concorsi:checked ~ .concorsi-groups [data-group="pen"] {
  display: none;
}

#tab-pen:checked ~ .concorsi-groups [data-group="concorsi"] {
  display: none;
}

/* ─── Groups ─── */
.concorsi-groups {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.concorsi-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.concorsi-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.concorsi-group-label-text {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a6a80;
}

.concorsi-group-desc {
  margin: 0;
  color: #8a99b0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.55;
}

.concorsi-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15, 30, 56, 0.08);
}

/* ─── Cards grid ─── */
.concorsi-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .concorsi-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Card ─── */
.concorsi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(15, 30, 56, 0.08);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.concorsi-card:hover {
  border-color: rgba(15, 30, 56, 0.16);
  box-shadow: 0 8px 24px rgba(15, 30, 56, 0.1);
  transform: translateY(-2px);
}

.concorsi-card:active {
  transform: translateY(0);
}

.concorsi-card:focus-visible {
  outline: 3px solid rgba(34, 158, 217, 0.35);
  outline-offset: 3px;
}

.concorsi-card-emoji {
  display: flex;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
}

.concorsi-card-img {
  display: block;
  width: 24px;
  height: 24px;
  font-size: 24px;
  object-fit: contain;
}

.concorsi-card-img--rounded {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.concorsi-bg-tg  { background: rgba(34, 158, 217, 0.08); }
.concorsi-bg-fb  { background: rgba(24, 119, 242, 0.08); }
.concorsi-bg-wa  { background: rgba(37, 211, 102, 0.08); }
.concorsi-bg-app { background: rgba(201, 168, 76, 0.10); }

.concorsi-card-body {
  min-width: 0;
  flex: 1;
}

.concorsi-card-title,
.concorsi-card-desc {
  display: block;
}

.concorsi-card-title {
  overflow: hidden;
  margin-bottom: 3px;
  color: #0f1e38;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.concorsi-card-desc {
  color: #5a6a80;
  font-size: 12px;
  font-weight: 300;
}

.concorsi-card-tag {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.concorsi-tag-canale  { background: rgba(201, 168, 76, 0.12); color: #8a6a1a; }
.concorsi-tag-gruppo  { background: rgba(26, 49, 87, 0.08);   color: #1a3157; }
.concorsi-tag-risorsa { background: rgba(201, 168, 76, 0.14); color: #8a6a1a; }
.concorsi-tag-wa      { background: rgba(37, 211, 102, 0.12); color: #1a7a3a; }
.concorsi-tag-fb      { background: rgba(24, 119, 242, 0.10); color: #1155bb; }

.concorsi-card-arrow {
  flex-shrink: 0;
  color: #5a6a80;
  font-size: 16px;
}

/* ─── FAQ ─── */
.concorsi-faq {
  background: #ffffff;
  border-top: 1px solid rgba(15, 30, 56, 0.06);
}

.concorsi-faq-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 52px 24px 56px;
}

.concorsi-faq-header {
  margin-bottom: 36px;
  text-align: center;
}

.concorsi-faq-title {
  margin: 0 0 8px;
  color: #0f1e38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.concorsi-faq-subtitle {
  margin: 0;
  color: #5a6a80;
  font-size: 13px;
}

.concorsi-faq-item {
  border-bottom: 1px solid rgba(15, 30, 56, 0.07);
}

.concorsi-faq-item:first-child {
  border-top: 1px solid rgba(15, 30, 56, 0.07);
}

.concorsi-faq-item summary {
  list-style: none;
}

.concorsi-faq-item summary::-webkit-details-marker {
  display: none;
}

.concorsi-faq-q {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
}

.concorsi-faq-q:hover .concorsi-faq-question {
  color: #0f1e38;
}

.concorsi-faq-num {
  flex-shrink: 0;
  min-width: 20px;
  color: #c9a84c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.concorsi-faq-question {
  flex: 1;
  color: #1a2a40;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.15s;
}

.concorsi-faq-icon {
  flex-shrink: 0;
  color: #5a6a80;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

details[open] .concorsi-faq-icon {
  transform: rotate(90deg);
}

.concorsi-faq-a {
  margin: 0;
  padding: 0 0 22px 34px;
  color: #5a6a80;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
}

/* ─── Footer ─── */
.concorsi-footer {
  padding: 32px 24px 48px;
  color: #5a6a80;
  font-size: 12px;
  font-weight: 300;
  text-align: center;
}

.concorsi-footer p {
  margin: 0;
}

.concorsi-footer p + p {
  margin-top: 8px;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .concorsi-hero {
    padding: 32px 20px 28px;
  }

  .concorsi-tabs {
    padding: 10px 16px;
  }

  .concorsi-groups {
    padding: 24px 16px 16px;
    gap: 24px;
  }

  .concorsi-card {
    gap: 10px;
    padding: 14px;
  }

  .concorsi-card-emoji {
    width: 38px;
    height: 38px;
  }

  .concorsi-card-arrow {
    display: none;
  }

  .concorsi-card-title {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .concorsi-card-desc {
    line-height: 1.35;
  }

  .concorsi-faq-inner {
    padding: 36px 16px 40px;
  }
}
