/* === 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: 95vh;
	width: 100%;
	position: relative;
}
#slide-1 {
	background-image: url("/webcontent/webimage/slide-1.jpg");
	background-position: center center;
}
#slide-2 {
	background-image: url("/webcontent/webimage/slide-2.jpg");
	background-position: center center;
}
#slide-3 {
	background-image: url("/webcontent/webimage/slide-3.jpg");
	background-position: center center;
}
#slide-4 {
	background-image: url("/webcontent/webimage/slide-4.jpg");
	background-position: center 50%;
}
#slide-5 {
	background-image: url("/webcontent/webimage/slide-5.jpg");
}
#slide-6 {
	background-image: url("/webcontent/webimage/slide-6.jpg");
	background-position: center 30%;
}
#slide-7 {
	background-image: url("/webcontent/webimage/slide-7.jpg");
}
#slide-8 {
	background-image: url("/webcontent/webimage/slide-8.jpg");
	background-position: center 50%;
}
.fill {
	width: 100%;
	height: 95vh;
	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: 100px;
	margin: 0 auto;
	padding-right: 50px;
	z-index: 5;
	background-color: rgba(5, 79, 0, 0.5);
}
.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 === */
#feature-boxes {
  padding: 40px 0; background: #fff; text-align: center;
}
.feature-box {
  background-size: cover; background-position: center;
  height: 220px; position: relative; overflow: hidden;
  transition: all 0.4s ease; margin-bottom: 20px;
}
.feature-box a {
  color: #fff; text-decoration: none;
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4em; font-weight: 600; text-transform: uppercase;
  transition: all 0.4s ease;
}
.feature-box:hover {
  filter: grayscale(100%);
  transform: scale(1.05);
}
.feature-box:hover a {
  background: rgba(0,0,0,0.55);
}

/* === SIDE PANEL === */
#side-panel {
  position: fixed;
  left: -365px;                   /* wider to match tab */
  bottom: 50%;
  transform: translateY(50%);     /* vertically centres panel */
  width: 365px;
  background: #054f00;
  color: #fff;
  z-index: 9999;
  transition: left 0.3s ease;
  padding: 10px 20px 10px 30px;   /* 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: #054f00;
  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: #fefc57;
}

/* Pulse animation */
@keyframes pulseTab {
  0%   { transform: translateY(-50%) scale(1); }
  50%  { transform: translateY(-50%) scale(1.06); }
  100% { transform: translateY(-50%) scale(1); }
}
/* Stop pulsing when panel is open */
#side-panel.open #panel-toggle {
    animation: none !important;
    transform: translateY(-50%) scale(1) !important;
}

/* Hide on mobile */
@media (max-width: 768px) {
  #side-panel { display: none; }
}

#side-panel a {
  color: #fff !important;
}


/* === RIGHT SLIDE-IN CONTACT PANEL === */
#contact-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  height: 100%;
  background: #021c41;
  color: #fff;
  z-index: 9999;
  transition: right .4s ease;
  padding: 30px 20px;
  box-shadow: -3px 0 10px rgba(0,0,0,.3);
}
#contact-panel.open { right: 0; }

#contact-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
}
#contact-panel h3 {
  margin-top: 40px;
  font-weight: 600;
  text-align: center;
}
#contact-panel .form-control {
  margin-bottom: 15px;
  border-radius: 4px;
  border: none;
  box-shadow: none;
}
#contact-panel .btn-primary {
  background: #fff;
  color: #0164ff;
  border: none;
  font-weight: 600;
  transition: background .3s ease;
}
#contact-panel .btn-primary:hover {
  background: #e9e9e9;
}

/* === SUCCESS OVERLAY === */
#success-overlay {
  position: fixed;
  top: -100px;
  left: 0;
  width: 100%;
  background: #28a745;
  color: #fff;
  text-align: center;
  padding: 20px;
  z-index: 10000;
  transition: top 0.6s ease;
}
#success-overlay.visible {
  top: 0;
}
#success-overlay .success-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#success-overlay i {
  font-size: 22px;
}

/* === 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="Dragon"]::before,
[data-housename="Griffin"]::before,
[data-housename="Pegasus"]::before,
[data-housename="Phoenix"]::before {
    content: "";
    display: inline-block;
    width: 180px;
    height: 180px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 5px auto;
}

[data-housename="Dragon"]::before {
    background-image: url('/webcontent/webimage/dragon-new.png');
}
[data-housename="Griffin"]::before {
    background-image: url('/webcontent/webimage/griffin-new.png');
}
[data-housename="Pegasus"]::before {
    background-image: url('/webcontent/webimage/pegasus-new.png');
}
[data-housename="Phoenix"]::before {
    background-image: url('/webcontent/webimage/phoenix-new.png');
}


/* House-specific colours */
[data-housename="Dragon"] .sl-hp-house { color: #4a7b29; }
[data-housename="Griffin"] .sl-hp-house { color: #ffc000; }
[data-housename="Pegasus"] .sl-hp-house { color: #00b0f0; }
[data-housename="Phoenix"] .sl-hp-house { color: #ff0000; }

.housepoints-row h2 {
	
  font-family: "Quicksand", sans-serif;
	margin-bottom: -20px;
}
.housepoints-row a:hover {
	text-decoration: none!important;
}

/* === Floating Side Buttons (Translate, Search, Login, Socials) === */
#gtranslate, #sitesearch, #sitelogin, #facebook-link, #insta-link, #twitter-link {
  position: fixed;
  left: 0;
  z-index: 9999;
}
#gtranslate-tab, #sitesearch-tab, #sitelogin-tab, #facebook-link-tab, #insta-link-tab, #twitter-link-tab {
  position: fixed;
  right: 15px;
  cursor: pointer;
  text-align: center;
  width: 60px;
  height: 60px;
  background-color: #fff;
  border-radius: 50%;
  border: solid 4px #054f00;
  transition: all 0.3s ease;
}
#gtranslate-tab:hover, #sitesearch-tab:hover, #sitelogin-tab:hover, #facebook-link-tab:hover, #insta-link-tab:hover, #twitter-link-tab:hover {
  background-color: #054f00;
  border: solid 4px #054f00;
}
.fa-language, .fa-search, .fa-user, .fa-facebook-f, .fa-instagram, .fa-envelope-open-text { color: #054f00; }
#gtranslate-tab:hover .fa-language,
#sitesearch-tab:hover .fa-search,
#sitelogin-tab:hover .fa-user,
#facebook-link-tab:hover .fa-facebook-f,
#insta-link-tab:hover .fa-instagram,
#twitter-link-tab:hover .fa-envelope-open-text { color: #fff; }
#gtranslate-tab { top: 235px; }
#sitesearch-tab { top: 305px; }
#sitelogin-tab { top: 375px; }
#twitter-link-tab { top: 445px; }
#facebook-link-tab { top: 515px; }
#insta-link-tab { top: 585px; }

/* === FIX: Center icons inside floating circle buttons === */
#gtranslate-tab,
#sitesearch-tab,
#sitelogin-tab,
#facebook-link-tab,
#insta-link-tab,
#twitter-link-tab {
  display: flex !important;
  justify-content: center;
  align-items: center;
  line-height: 1;          /* removes vertical misalignment */
  font-size: 14px;         /* ensures even scaling for all icons */
  text-align: center;
}

#gtranslate-tab i,
#sitesearch-tab i,
#sitelogin-tab i,
#facebook-link-tab i,
#insta-link-tab i,
#twitter-link-tab {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* === Floating side popout boxes (aligned to the right-side icons) === */
#sitesearch-form,
#sitelogin-form {
  position: fixed;
  right: 90px; /* 60px icon width + 15px gap + 15px button margin */
  width: 260px; /* consistent width for all */
  background: #fff;
  border: 2px solid #054f00;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 10000;
  display: none;
  transform: translateX(10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#gtranslate-form {
  position: fixed;
  right: 90px; /* 60px icon width + 15px gap + 15px button margin */
  width: 260px; /* consistent width for all */
  background: #fff;
  border: 2px solid #054f00;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 10000;
  display: none;
  transform: translateX(10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
/* Position vertically aligned with each button */
#gtranslate-form { top: 235px; }   /* aligns with Translate */
#sitesearch-form { top: 305px; }   /* aligns with Search */

/* When active (visible) */
#gtranslate-form.active,
#sitesearch-form.active,
#sitelogin-form.active {
  display: block;
  transform: translateX(0);
  opacity: 1;
}


/* === VALUE BOX GRID === */
.values-text-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

@media (max-width: 991px) {
    .values-text-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .values-text-grid { grid-template-columns: repeat(1, 1fr); }
}

/* === VALUE BOX BASE === */
.value-box {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
	font-size: 25px;
    text-align: center;
	max-height: 300px;
	width: 100%;
    border-radius: 50% / 50%;
    padding: 20px;
    overflow: hidden;
    cursor: pointer;

    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;

    /* subtle shadow */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform .3s ease, box-shadow .3s ease;
}

/* Default category background colours */
.value-box[data-type="achieve"]      { background: #4f81bc; }
.value-box[data-type="believe"]       { background: #c0504e; }
.value-box[data-type="care"]  { background: #4aacc5; }

/* === GRADIENT OVERLAY ANIMATION === */
.value-box::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #fefc57, #054f00);
    transition: width .45s ease-out;
    z-index: 1;
}
.value-box:hover::before {
    width: 100%;
}

/* === TEXT LAYERS === */
.value-main,
.value-desc {
    position: absolute;
    z-index: 2;
    transition: opacity .35s ease;
    padding: 0 15px;
}

.value-main { opacity: 1; }
.value-desc {
    opacity: 0;
    font-size: 25px;
    line-height: 1.4;
    text-transform: none;
}

/* Swap the text on hover */
.value-box:hover .value-main { opacity: 0; }
.value-box:hover .value-desc { opacity: 1; }

/* === LIFT EFFECT ON HOVER === */
.value-box:hover {
    transform: translateY(-6px);
    box-shadow: 0px 8px 25px rgba(0,0,0,0.25);
}



/* ================================================
   VALUES STRIP (PURPLE → RED GRADIENT BAR)
   ================================================= */
.values-strip {
    width: 100%;
	height: 180px;
    padding: 35px 15px;
    text-align: center;

    /* Gradient sampled from your chain logo */
    background: linear-gradient(90deg, #43289b 0%, #7a2390 35%, #c21f52 70%, #e4243c 100%);



    position: relative;
    z-index: 5;
}
.values-strip::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -50px;
    width: 100%;
    height: 120px;
    background: #fff;

    clip-path: path("M -0.838676 88.4999 H 2315 V 44.4999 C 1889.36 29.1082 1896.31 -4.6488 1348.64 13.2494 C 800.965 31.1477 622.46 83.9149 -0.838676 43.9999 V 88.4999 Z");
}
.values-inner {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    word-spacing: 12px;
}

/* Mobile font sizing */
@media(max-width: 768px){
    .values-inner {
        font-size: 18px;
        line-height: 1.4;
        display: block;
        padding: 0 10px;
    }
}


/* ============================================
   PERRYFIELDS - HOMEPAGE VIDEO
   CLEAN RESPONSIVE VERSION
   ============================================ */

.homepage-video-box {
    position: relative;
    width: 100%;
    height: 95vh;
    min-height: 500px;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    background: #054f00;
    isolation: isolate;
}

/* Remove Bootstrap row spacing */
.homepage-video-box .homepage-video-row {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Video wrapper */
.homepage-video-box .homepage-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Maintain 16:9 proportions while covering */
.homepage-video-box .homepage-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;

    width: max(100%, 168.89vh);
    height: max(100%, 56.25vw);

    max-width: none;
    border: 0;

    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Keep original decorative overlays */
.homepage-video-box::before,
.homepage-video-box::after {
    pointer-events: none;
}

/* Welcome message */
.homepage-video-box .welcome-message-home {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100px;
    z-index: 5;
}

/* ============================================
   MOBILE VIDEO
   ============================================ */

@media (max-width: 767px) {

    .slideshow-box.homepage-video-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 70vh !important;
        min-height: 450px;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .homepage-video-box .homepage-video-row,
    .homepage-video-box .homepage-video {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .homepage-video-box .homepage-video iframe {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;

        width: max(100%, 124.45vh) !important;
        height: max(100%, 56.25vw) !important;

        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;

        transform: translate(-50%, -50%) !important;
        border: 0 !important;
    }

    .homepage-video-box .welcome-message-home {
        width: 100%;
        left: 0;
        right: 0;
        bottom: 65px;
        padding: 18px 20px;
        margin: 0;
        text-align: center;
        box-sizing: border-box;
    }

    .homepage-video-box .welcome-message-home h2,
    .homepage-video-box .welcome-message-home h2 span {
        font-size: 24px;
        line-height: 1.3;
        text-align: center;
    }
}

/* ============================================
   PERRYFIELDS - MOBILE OVERFLOW CORRECTION
   ============================================ */

@media (max-width: 767px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    /* Remove unwanted horizontal row margins */
    .housepoints-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Full-width homepage sections */
    #feature-boxes,
    .homepage-video-box,
    .housepoints-row {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure responsive embedded content */
    #feature-boxes img,
    .housepoints-row img {
        max-width: 100%;
        height: auto;
    }
}

/* ==========================================
   PERRYFIELDS - CROP YOUTUBE VIDEO
   ========================================== */

/* Keep video inside the hero */
.homepage-video-box .homepage-video {
    position: absolute;
    inset: 0;
    overflow: hidden !important;
}

/* Desktop - zoom slightly */
.homepage-video-box .homepage-video iframe {
    transform: translate(-50%, -50%) scale(1.20) !important;
    transform-origin: center center;
}

/* Mobile - zoom further to hide captions */
@media (max-width: 767px) {

    .homepage-video-box .homepage-video iframe {
        transform: translate(-50%, -50%) scale(1.45) !important;
        transform-origin: center center;
    }

}

/* ==========================================
   PERRYFIELDS MOBILE UTILITIES
   ========================================== */

/* Hidden on desktop */
#mobile-utilities-toggle,
#mobile-utilities-panel {
    display: none;
}

@media (max-width: 767px) {

    /* Hide original fixed wrappers until moved */
    #gtranslate,
    #sitesearch,
    #sitelogin,
    #twitter-link,
    #facebook-link,
    #insta-link {
        display: none;
    }

    /* Main floating toggle */
    #mobile-utilities-toggle {
        position: fixed;
        display: flex;
        align-items: center;
        justify-content: center;

        right: 15px;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));

        width: 62px;
        height: 62px;

        background: #054f00;
        color: #ffffff;
        border: 4px solid #ffffff;
        border-radius: 50%;

        box-shadow: 0 5px 20px rgba(0,0,0,.25);

        z-index: 10020;
        cursor: pointer;
        transition: transform .3s ease;
    }

    #mobile-utilities-toggle i {
        font-size: 25px;
        color: #ffffff;
        transition: transform .3s ease;
    }

    /* Turn plus into a cross */
    #mobile-utilities-toggle.active i {
        transform: rotate(45deg);
    }

    /* Container for expanded buttons */
    #mobile-utilities-panel {
        position: fixed;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 10px;

        right: 15px;
        bottom: calc(142px + env(safe-area-inset-bottom, 0px));

        width: 62px;
        z-index: 10019;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(15px);

        transition: opacity .25s ease,
                    transform .25s ease,
                    visibility .25s;
    }

    #mobile-utilities-panel.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* Move original utilities into the panel */
    #mobile-utilities-panel > div {
        display: block !important;
        position: static !important;
        width: 62px !important;
        height: 62px !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* Circular utility buttons */
    #mobile-utilities-panel
    #gtranslate-tab,
    #mobile-utilities-panel
    #sitesearch-tab,
    #mobile-utilities-panel
    #sitelogin-tab,
    #mobile-utilities-panel
    #twitter-link-tab,
    #mobile-utilities-panel
    #facebook-link-tab,
    #mobile-utilities-panel
    #insta-link-tab {

        position: static !important;
        inset: auto !important;

        display: flex !important;
        align-items: center;
        justify-content: center;

        width: 58px !important;
        height: 58px !important;

        background: #ffffff;
        border: 4px solid #054f00;
        border-radius: 50%;

        box-shadow: 0 3px 12px rgba(0,0,0,.15);

        margin: 0 auto !important;
        cursor: pointer;
    }

    #mobile-utilities-panel i {
        font-size: 22px;
        color: #054f00;
    }

    /* Search and translate popup forms */
    #mobile-utilities-panel
    #gtranslate-form,
    #mobile-utilities-panel
    #sitesearch-form {
        position: fixed !important;
        top: auto !important;
        right: 85px !important;
        bottom: calc(180px + env(safe-area-inset-bottom, 0px));
        left: auto !important;

        width: min(260px, calc(100vw - 105px)) !important;
        max-width: calc(100vw - 105px);

        background: #ffffff;
        border: 2px solid #054f00;
        border-radius: 12px;
        padding: 15px;
        z-index: 10030;
    }

    /* No horizontal overflow */
    #mobile-utilities-panel,
    #mobile-utilities-toggle {
        box-sizing: border-box;
    }

    /* Smaller phones */
    @media (max-height: 650px) {
        #mobile-utilities-panel {
            gap: 5px;
        }

        #mobile-utilities-panel > div {
            height: 48px !important;
        }

        #mobile-utilities-panel
        #gtranslate-tab,
        #mobile-utilities-panel
        #sitesearch-tab,
        #mobile-utilities-panel
        #sitelogin-tab,
        #mobile-utilities-panel
        #twitter-link-tab,
        #mobile-utilities-panel
        #facebook-link-tab,
        #mobile-utilities-panel
        #insta-link-tab {
            width: 46px !important;
            height: 46px !important;
        }
    }
}

/* === PERRYFIELDS EXPANDING RIGHT UTILITIES === */

#sl-quick-utilities {
  position: fixed;
  right: 16px;
  bottom: 85px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Main toggle */
#sl-quick-toggle {
  width: 58px;
  height: 58px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #07570b;
  color: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 25px;
  padding: 0;
  transition: transform .25s ease;
}

#sl-quick-toggle:hover {
  transform: scale(1.07);
}

#sl-quick-toggle:focus-visible {
  outline: 3px solid #222;
  outline-offset: 3px;
}

/* Expandable utility stack */
#sl-quick-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-height: min(65vh, 500px);
  overflow-y: auto;
  overflow-x: visible;
  opacity: 1;
  transition: opacity .2s ease;
}

#sl-quick-items[hidden] {
  display: none !important;
}

/* Override old fixed button positions */
#sl-quick-items > div {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Override Bootstrap hidden-xs */
#sl-quick-items .hidden-xs {
  display: block !important;
}

/* Existing icon circles */
#sl-quick-items > div > [id$="-tab"] {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 3px solid #07570b !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #07570b !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Icon links */
#sl-quick-items > div > [id$="-tab"] a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #07570b !important;
  text-decoration: none;
}

#sl-quick-items > div > [id$="-tab"] i {
  color: #07570b !important;
  font-size: 21px !important;
  line-height: 1 !important;
}

/* Translate and search dropdowns */
#sl-quick-items #gtranslate-form,
#sl-quick-items #sitesearch-form {
  position: fixed !important;
  top: auto !important;
  bottom: 165px !important;
  left: auto !important;
  right: 85px !important;
  width: min(340px, calc(100vw - 110px));
  height: auto !important;
  max-height: 65vh;
  overflow: auto;
  transform: none !important;
  z-index: 99995;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

/* Hide the old separate mobile control */
#mobile-utilities-toggle,
#mobile-utilities-panel {
  display: none !important;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  #sl-quick-utilities {
    right: 12px;
    bottom: 70px;
    gap: 8px;
  }

  #sl-quick-items {
    gap: 7px;
    max-height: 65vh;
  }

  #sl-quick-toggle {
    width: 54px;
    height: 54px;
  }

  #sl-quick-items > div,
  #sl-quick-items > div > [id$="-tab"] {
    width: 48px !important;
    height: 48px !important;
  }

  #sl-quick-items #gtranslate-form,
  #sl-quick-items #sitesearch-form {
    right: 75px !important;
    bottom: 125px !important;
  }
}

/* ======================================
   PERRYFIELDS - REMOVE VIDEO COLOUR MASK
   ====================================== */

/* Remove original carousel overlays */
.slideshow-box.homepage-video-box::before,
.slideshow-box.homepage-video-box::after {
    content: none !important;
    display: none !important;
}

/* Show video in original colours */
.homepage-video-box .homepage-video iframe {
    filter: none !important;
    opacity: 1 !important;
}

/* Keep welcome text above video */
.homepage-video-box .welcome-message-home {
    z-index: 5 !important;
}
