#mainbody {
	margin-top: 400px;
}
.header-background {
	position: absolute;
	width: 100%;
	height: 400px;
	top: 0;
	left: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	z-index: -1;
}
/* ==============================
   HOUSEPOINTS
================================ */
.housepoints { margin: 60px 0 40px; }
.housepoints a { text-decoration: none; }
.housepoints h2 {
  color: var(--pink);
  font-weight: 900;
}

.sl-housepoints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 10px;
}

.sl-hp-entry {
  flex: 1 1 calc(25% - 20px);
  max-width: 25%;
  min-width: 220px;
  padding: 20px;
  text-align: center;
}
.sl-hp-house {
  font-weight: bold;
  font-size: 1.5em;
  margin-top: 10px;
}
.sl-hp-points {
  font-size: 2em;
  margin-top: 10px;
}
/* Housepoints: place markers (1st/2nd/3rd/4th) */
.sl-hp-entry { 
  position: relative; 
  overflow: visible; /* ensure the badge can sit above the box */
	background-color: #fff;
	padding-top: 20px;
}

.place-label {
  position: absolute;
  top: 35px;                 /* anchor at top edge of the box */
  left: 50%;
  transform: translate(-50%, -110%); /* sit above and centred */
  background: #ffd700;    /* gold badge */
  color: #000;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
  line-height: 1;
  z-index: 10;            /* above winner pulse and content */
  display: none;          /* toggled by .show */
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* little pointer under the badge */
.place-label::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: #ffd700;
}

/* show state (set by JS) */
.place-label.show { 
  display: inline-block;
  animation: fadeInLabel 0.5s ease-in forwards;
}

/* keep it tidy on small screens */
@media (max-width: 575px) {
  .place-label {
    font-size: 0.8em;
    transform: translate(-50%, -115%);
  }
}

/* Winner highlight */
.sl-hp-entry.winner::before { animation: pulse-winner 1.5s infinite; }
@keyframes pulse-winner {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Housepoint images */
[data-housename="Livingstone"]::before,
[data-housename="Nightingale"]::before,
[data-housename="Scott"]::before {
    content: "";
    display: inline-block;
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 20px auto;
}

[data-housename="Livingstone"]::before {
    background-image: url('/webcontent/webimage/livingstone.png');
}
[data-housename="Nightingale"]::before {
    background-image: url('/webcontent/webimage/nightingale.png');
}
[data-housename="Scott"]::before {
    background-image: url('/webcontent/webimage/scott.png');
}


/* House-specific colours */
[data-housename="Livingstone"] .sl-hp-house { color: #a92122; }
[data-housename="Nightingale"] .sl-hp-house { color: #f0aa3b; }
[data-housename="Scott"] .sl-hp-house { color: #589a51; }

.housepoints-row h2 {
	
  font-family: "Quicksand", sans-serif;
	margin-bottom: -20px;
	color: #fff!important;
}
.housepoints-row a:hover {
	text-decoration: none!important;
}
.housepoints-row {
	background-color: #4e7296;
}