/* === 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: 75vh;
	width: 100%;
	position: relative;
}
#slide-1 {
	background-image: url("/webcontent/webimage/imgi_3_slider1.jpg");
	background-position: center bottom;
}
#slide-2 {
	background-image: url("/webcontent/webimage/imgi_4_slider2.jpg");
	background-position: center bottom;
}
.fill {
	width: 100%;
	height: 75vh;
	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: absolute;
	left:0;
	right: 0;
	bottom: 10px;
	margin: 0 auto;
	padding-right: 10px;
	z-index: 5;
	background-color: rgba(0, 44, 103, 0.6);
}
.welcome-message-home h2 span {
	color: #fff;
	font-size: 3.0vw;
	text-align: center;
	font-weight: 500;
}
.welcome-message-home h2 {
	color: #fff;
	font-size: 2.0vw;
	text-align: center;
	font-weight: 200!important;
}

/* === FEATURE BOXES === */
#feature-boxes {
  padding: 40px 0 0;
  background: #fff;
  text-align: center;
}

.feature-box {
  background-size: cover;
  background-position: center;
  height: 220px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  text-decoration: none;
  font-size: 1.4em;
  font-weight: 600;
  text-transform: uppercase;

  background-color: rgba(0,0,0,0.35);
  background-blend-mode: overlay;

  transition:
    transform .4s ease,
    filter .4s ease,
    background-color .4s ease;
}

.feature-box:hover,
.feature-box:focus {
  filter: grayscale(100%);
  transform: scale(1.05);
  background-color: rgba(0,0,0,0.55);
  color: #fff;
  text-decoration: none;
}

.feature-box:focus {
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

.feature-box span {
  z-index: 2;
}

/* === SIDE PANEL === */

#side-panel {
  position: fixed;
  left: -280px;
/* wider to match tab */

  bottom: 70%;
  transform: translateY(50%);
/* vertically centres panel */

  width: 280px;
  background: #F5B80B;
  color: #002C67;
  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.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: #F5B80B;
  border: none;
  color: #002C67;
  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: #002C67;
}

#panel-toggle:hover i {
  color: #002C67;
}
.fa {
  color: #002C67;
}

/* === 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="House 1"]::before,
[data-housename="House 2"]::before,
[data-housename="House 3"]::before,
[data-housename="House 4"]::before {
    content: "";
    display: inline-block;
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 5px auto;
}

[data-housename="House 1"]::before {
    background-image: url('/webcontent/webimage/yellow.png');
}
[data-housename="House 2"]::before {
    background-image: url('/webcontent/webimage/blue.png');
}
[data-housename="House 3"]::before {
    background-image: url('/webcontent/webimage/red.png');
}
[data-housename="House 4"]::before {
    background-image: url('/webcontent/webimage/green.png');
}


/* House-specific colours */
[data-housename="House 1"] .sl-hp-house { color: #e4ae01; }
[data-housename="House 2"] .sl-hp-house { color: #004c89; }
[data-housename="House 3"] .sl-hp-house { color: #c80901; }
[data-housename="House 4"] .sl-hp-house { color: #2bad28; }

.housepoints-row h2 {
	
  font-family: 'Beautiful Everytime', cursive;
	margin-bottom: -20px;
}
.housepoints-row a:hover {
	text-decoration: none!important;
}
/* Keep mobile contact toggle visible when closed,
   but move it inside the panel when open */
@media (max-width: 767px) {

  #side-panel {
    left: -300px;
    top: auto !important;
    width: 300px;
    transition: left 0.3s ease;
  }

  #side-panel.open {
    left: 0px !important;
  }

  #side-panel .panel-content {
    position: relative;
    width: 300px;
    max-width: calc(100vw - 40px);
    padding: 10px 10px 10px 0px;
  }

  #panel-toggle {
    position: absolute !important;
    right: -46px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  #side-panel.open #panel-toggle {
    right: 1px;
    top: 1px;
    transform: none;
    border-radius: 50% !important;
  }

}
@media (max-width: 767px) {

  /* Keep the mobile menu above the contact side panel */
  #main-navbar,
  .navbar-fixed-top {
    z-index: 99999 !important;
  }

  #main-menu,
  .navbar-collapse,
  #primary-nav {
    z-index: 99999 !important;
    position: relative;
  }

  /* Keep the side panel underneath the menu */
  #side-panel {
    z-index: 9999 !important;
  }

}
/* Mobile layout */
@media (max-width: 767px) {

    .slideshow-box {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-height: 0;
    }

    .slideshow-box .row {
        order: 1;
    }

    .welcome-message-home {
        order: 2;

        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        top: auto !important;

        width: 100%;
        padding: 0px 20px;
        margin: 0;
        text-align: center;

        background: #163d73; /* or transparent if preferred */
    }

    .welcome-message-home h1 {
        font-size: 2.4rem;
        margin-bottom: 15px;
		margin-left: 0;
    }

    .welcome-message-home p {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
}