/* === HOMEPAGE CAROUSEL � TRUE CROSSFADE === */
/* == Homepage Slideshow == */
.slideshow-box:before {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 300px;
    background: url(/webcontent/webimage/menu-overlay.png) repeat-x top left;
    top: 0;
    left: 0;
	z-index: 1;
	transform: scale(1);
    transition: transform 0.8s ease;
}
.slideshow-box:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(/webcontent/webimage/home-slider-mask-new1.png) repeat-x bottom left;
    bottom: 0;
    left: 0;
	z-index: 1;
}
.slideshow-box {
	height: 55vh;
	width: 100%;
	position: relative;
}
#slide-1 {
	background-image: url("/webcontent/webimage/imgi_26_5f89af52-ad97-41ff-82d2-69a4c0f7a00d.jpg");
}
#slide-2 {
	background-image: url("/webcontent/webimage/imgi_27_470e5c8c-6c97-4f81-b5be-0a3eacae7adf.jpg");
}
#slide-3 {
	background-image: url("/webcontent/webimage/imgi_28_286cae88-d725-415e-e048-0de1c6451848.jpg");
}
#slide-4 {
	background-image: url("/webcontent/webimage/imgi_29_64ec7f14-3853-4016-e716-459798488e6c.jpg");
}
#slide-5 {
	background-image: url("/webcontent/webimage/imgi_30_94e96333-ae6c-444a-f65e-da2c7e8b43b4.jpg");
}
.fill {
	width: 100%;
	height: 55vh;
	background-position: center top;
	background-size: cover;
	background-repeat: no-repeat;
}
#myCarousel {
	position: relative;
	width: 100%;
	z-index:0;
}
.carousel-inner {
	height: 100%;
}
.carousel-fade .carousel-inner .item {
	opacity: 0;
	transition-property: opacity;
}
.carousel-fade .carousel-inner .active {
	opacity: 1;
}
.carousel-fade .carousel-inner .active.left,
.carousel-fade .carousel-inner .active.right {
	left: 0;
	opacity: 0;
	z-index: 1;
}
.carousel-fade .carousel-inner .next.left,
.carousel-fade .carousel-inner .prev.right {
	opacity: 1;
}
.carousel-fade .carousel-control {
	z-index: 2;
}
@media all and (transform-3d), (-webkit-transform-3d) {
	.carousel-fade .carousel-inner > .item.next,
	.carousel-fade .carousel-inner > .item.active.right {
		opacity: 0;
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
	.carousel-fade .carousel-inner > .item.prev,
	.carousel-fade .carousel-inner > .item.active.left {
		opacity: 0;
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
	.carousel-fade .carousel-inner > .item.next.left,
	.carousel-fade .carousel-inner > .item.prev.right,
	.carousel-fade .carousel-inner > .item.active {
		opacity: 1;
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
}
.carousel-caption {
	bottom: 25vh;
}
.carousel-caption h1 {
	text-transform: uppercase;
}
.carousel-caption h1 small {
	color: #fff;
	text-transform: lowercase;
}
/* === welcome message on carousel === */
.welcome-message-home {
	position: relative;
	left:0;
	right: 0;
	margin: 0 auto;
	padding-right: 50px;
	z-index: 5;
	background-color: rgba(102, 36, 130, 1);
}
.welcome-message-home h2 span {
	color: #fff;
	font-size: 3.0vw;
	text-align: right;
	font-weight: 500;
}
.welcome-message-home h2 {
	color: #fff;
	font-size: 2.0vw;
	text-align: right;
	font-weight: 200!important;
}

#feature-boxes .row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 20px;
}

#feature-boxes .feature-box {
  float: none;
  width: 18%;
  margin: 0;
  padding: 0;
}

@media (max-width: 991px) {
  #feature-boxes .row {
    flex-wrap: wrap;
  }

  #feature-boxes .feature-box {
    width: calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  #feature-boxes .feature-box {
    width: 100%;
  }
}
/* === FEATURE BOX TEXT + HOVER FIX === */

#feature-boxes {
  padding: 30px 15px;
}

#feature-boxes .feature-box {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease, filter 0.35s ease;
}

#feature-boxes .feature-box:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

#feature-boxes .feature-box a {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#feature-boxes .feature-box span {
  background: rgba(102, 36, 130, 0.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 1.2em;
  font-weight: 700;
  text-align: center;
  transition: all 0.35s ease;
}

#feature-boxes .feature-box:hover span {
  background: #f8b133;
  color: #662482;
  transform: scale(1.08);
}

/* === SIDE PANEL === */
#side-panel {
  position: fixed;
  left: -250px;                   /* wider to match tab */
  bottom: 70%;
  transform: translateY(50%);     /* vertically centres panel */
  width: 250px;
  background: #662482;
  color: #fff;
  z-index: 9999;
  transition: left 0.3s ease;
  padding: 10px 10px 10px 10px;   /* space from tab */
  border-radius: 0 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;        /* vertically centres content */
}
#side-panel a {
	color: #fff;
}
#side-panel.open {
  left: 0;
}

/* Semicircle toggle button */
#panel-toggle {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);    /* aligns perfectly with panel */
  width: 50px;
  height: 80px;
  background: #662482;
  border: none;
  color: #fff;
  border-radius: 0 40px 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: pulseTab 2s ease-in-out infinite;
  z-index: 10000;
}

#panel-toggle i {
  font-size: 22px;
  color: #fff;
}

#panel-toggle:hover i {
  color: #f6d500;
}


/* === FEATURE BOX FIX === */
#feature-boxes a { cursor: pointer; }

/* Mobile */
@media (max-width: 768px){
  #contact-panel { width: 100%; right: -100%; }
}

/* ==============================
   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 */
}

.place-label {
  position: absolute;
  top: 0;                 /* 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="St Andrew's"]::before,
[data-housename="St David's"]::before,
[data-housename="St George's"]::before,
[data-housename="St Patrick's"]::before {
    content: "";
    display: inline-block;
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 5px auto;
}

[data-housename="St Andrew's"]::before {
    background-image: url('/webcontent/webimage/st-andrew.jpg');
}
[data-housename="St David's"]::before {
    background-image: url('/webcontent/webimage/st-david.jpg');
}
[data-housename="St George's"]::before {
    background-image: url('/webcontent/webimage/st-george.jpg');
}
[data-housename="St Patrick's"]::before {
    background-image: url('/webcontent/webimage/st-patrick.jpg');
}


/* House-specific colours */
[data-housename="St Andrew's"] .sl-hp-house { color: #013a9b; }
[data-housename="St David's"] .sl-hp-house { color: #fcdc27; }
[data-housename="St George's"] .sl-hp-house { color: #ae0001; }
[data-housename="St Patrick's"] .sl-hp-house { color: #0f681d; }

.housepoints-row h2 {
	
  font-family: 'Beautiful Everytime', cursive;
	margin-bottom: -20px;
}
.housepoints-row a:hover {
	text-decoration: none!important;
}
/* Remove the gap above the welcome block */
.welcome-message-home {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

/* Remove heading space pushing it down */
.welcome-message-home h2 {
  margin-top: 0 !important;
  padding: 20px 0 !important;
}

/* Make sure the slider itself has no bottom space */
.slideshow-box,
.slideshow-box .carousel,
.slideshow-box .carousel-inner,
.slideshow-box .item,
.slideshow-box .fill {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.masked-image {
	position: relative;
            width: 100%;
            aspect-ratio: 1 / 1; /* Ensures square */
            background-size: cover;
            background-position: center;
            -webkit-mask-image: url('/webcontent/webimage/squoval-img-mask.png');
            -webkit-mask-size: cover;
            -webkit-mask-repeat: no-repeat;
            -webkit-mask-position: center;
            mask-image: url('/webcontent/webimage/squoval-img-mask.png');
            mask-size: contain;
            mask-repeat: no-repeat;
            mask-position: center;
            background-color: #fff; /* fallback color while loading */
	transform: scale(1);
    transition: transform 0.8s ease;
        }