/* Lympne Castle — History Slider. Shared by demo + WordPress plugin. */

.hs {
  --hs-gold: #CFAF58;
  --hs-gold-soft: rgba(180, 154, 71, 0.45);
  --hs-ink: #2e3b33;
  --hs-body: #666666;
  --hs-white: #ffffff;
  --hs-ease: cubic-bezier(0.25, 1, 0.35, 1);
  --hs-speed: 650ms;
  --hs-font-display: "Cormorant Garamond", "Times New Roman", serif;
  --hs-font-heading: "ivypresto-display", Sans-serif;
  --hs-font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: transparent;
  font-family: var(--hs-font-body);
  color: var(--hs-body);
}

/* --- Slides ----------------------------------------------------------- */

.hs__viewport { overflow: hidden; }

.hs__slide {
  display: grid;
  grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: 0.5rem; /* keeps focus rings inside the clipped track */
}

.hs__media { margin: 0; height:100%; }

.hs__media img {
  display: block;
  width: 100%;
/*   aspect-ratio: 4 / 3; */
	height:100%!important;
  object-fit: cover;
  background: #e6e1d6; /* placeholder tone while lazy images load */
}

.hs__content .hs__year {
  display: block;
  font-family: var(--hs-font-display);
  font-weight: 500;
  font-size: clamp(3.5rem, 7.5vw, 125px);
  line-height: 0.9;
  color: var(--hs-gold);
}

button.hs__year:hover{
	color:#fff;
	background-color:var(--hs-gold);
}




.hs__heading {
  margin: clamp(1rem, 2vw, 1.75rem) 0 clamp(1rem, 2vw, 1.5rem);
  font-family: var(--hs-font-heading);
  font-weight: 300;
  font-size: 54px;
  line-height: 1.15;
  color: var(--hs-ink);
}

.hs__text {
  max-width: 54ch;
font: 15px/23px Work Sans;
letter-spacing: 0.23px;
font-weight:400;
	color: #2F3528;
}

/* --- Navigation bar ---------------------------------------------------- */

.hs__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

/* Splide requires arrows inside a .splide__arrows container; display:contents
   keeps our flex layout, order places arrows at the ends around the timeline. */
.hs__arrows { display: contents; }
.splide__arrow--prev { order: 0; }
.hs__timeline { order: 1; }
.splide__arrow--next { order: 2; }

button.hs__arrow {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--hs-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--hs-ease);
  --hs-arrow-src: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='6.59%2016.61%2082.91%2062.59'%3E%3Cpath%20d='M89.5,47.9c0-.7-.5-1.4-1.3-1.5-26.6-9.9-53.2-19.8-79.7-29.7-1.2-.5-2.4,1.1-1.7,2.2,6.5,9.7,13.1,19.3,19.6,29,0,0-.1.2-.2.3-.7,1.1-1.5,2.2-2.2,3.3-2.4,3.5-4.7,7-7.1,10.5-3.4,5-6.7,9.9-10.1,14.9-.7,1.1.5,2.7,1.7,2.2,26.6-9.9,53.2-19.8,79.7-29.7.8,0,1.2-.7,1.3-1.5,0,0,0,0,0,0s0,0,0,0Z'/%3E%3C/svg%3E");
	  --hs-arrow-fill: #CFAF58;
  --hs-arrow-size: 1em;
--hs-arrow-flip: 1;
	
}


button.hs__arrow::before {
  content: "";
  width: var(--hs-arrow-size);
  height: var(--hs-arrow-size);
  flex: none;
  transform: scaleX(var(--hs-arrow-flip));

  background-color: var(--hs-arrow-fill);
	transition:0.3s; 

  -webkit-mask-image: var(--hs-arrow-src);
          mask-image: var(--hs-arrow-src);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}

button.hs__arrow.splide__arrow--prev {   transform: translateX(-1px) scaleX(-1);
 }




button.hs__arrow:hover, button.hs__arrow:focus { background-color:#fff; --hs-arrow-fill:#74825F; transition:0.3s; }
button.hs__arrow:disabled { opacity: 0.4; cursor: default; transform: none; }

button.hs__arrow:focus-visible,
.hs__year:focus-visible {
  outline: 2px solid var(--hs-gold);
  outline-offset: 3px;
}

/* --- Proportional year timeline ---------------------------------------- */

.hs__timeline { position: relative; flex: 1; height: 60px; }

.hs__timeline__track {
  position: absolute;
  inset: 0;
  opacity: 0; /* hidden until JS positions the boxes (Splide sets .is-initialized) */
  transition: transform var(--hs-speed) var(--hs-ease), opacity 0.2s ease;
}

.hs.is-initialized .hs__timeline__track { opacity: 1; }

/* the horizontal rule; year boxes mask it with their background.
   JS insets both ends (--hs-rule-l/r) so the stubs beyond the outer
   boxes read as short tails, not full-width lines */
.hs__timeline::before {
  content: "";
  position: absolute;
  left: var(--hs-rule-l, 0px);
  right: var(--hs-rule-r, 0px);
  top: 50%;
  height: 1px;
  background: var(--hs-gold-soft);
}

/* timeline year buttons (scoped: .hs__year alone is the giant year in slides) */
.hs__timeline .hs__year {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(var(--hs-x, 0px), -50%);
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--hs-gold);
  background: var(--hs-white);
  color: var(--hs-gold);
  font-family: var(--hs-font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.15em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.4s var(--hs-ease),
    color 0.4s var(--hs-ease),
    transform 0.4s var(--hs-ease),
    box-shadow 0.4s var(--hs-ease);
}

.hs__timeline .hs__year[aria-current="true"] {
  z-index: 1;
  background: var(--hs-white);
  color: var(--hs-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  transform: translate(var(--hs-x, 0px), -50%) scale(1.08);
}

/* --- Utilities ---------------------------------------------------------- */

/* degraded mode: too many eras to fit — row becomes scrollable */
.hs__timeline.is-overflow {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hs__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Responsive ---------------------------------------------------------- */


@media (max-width: 1024px) {

	.hs__heading {
  font-size: 42px;
}
	
}

@media (max-width: 899.98px) {
	
	[data-history-slider]{
		display:flex;
		flex-direction:column;
	}
	
	.hs__heading {
  font-size: 32px;
}
	.hs{
		padding:40px 0;
	}
	
	.hs__content .hs__text{
		width:100%;
		max-width:unset;
	}
	
	button.hs__arrow.splide__arrow--prev{
  left: -10px;
		right:auto;
		transform: translateX(-1px) scaleX(-1) scale(0.7);
	}
	
	button.hs__arrow{
		position: absolute;
		right:-10px;
  transform: scale(.7);
		z-index: 1;
    box-shadow: 0 0 0px 10px #F8F5ED;
	}
	
  .hs__slide { grid-template-columns: 1fr; gap: 1.75rem; }
  .hs__media img { aspect-ratio: 16 / 10; }
  .hs__heading { max-width: none; }
  /* stack the nav: arrows share the first row, timeline gets full width below */
  .hs__nav { flex-wrap: wrap; row-gap: 1.25rem; margin-top:0; order:-1; }
  .splide__arrow--next { order: 0; margin-left: auto; }
  .hs__timeline { order: 1; flex-basis: 100%; height: 48px; }
  .hs__timeline .hs__year { padding: 0.55rem 0.7rem; font-size: 0.58rem; letter-spacing: 0.15em; }
  .hs__arrow { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs__timeline__track,
  .hs__timeline .hs__year,
  .hs__arrow { transition: none; }
}
