/* Fonts */
@font-face {
  font-family: 'Montserrat-Regular';
  src: url('fonts/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat-ExtraLight';
  src: url('fonts/Montserrat/Montserrat-ExtraLight.woff') format('woff'),
}


/*@font-face {
  font-family: 'AvenirNextProRegular';
  src: url('fonts/AvenirNextProRegular/font.woff2') format('woff2'),
       url('fonts/AvenirNextProRegular/font.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'BodoniStdBookRegular';
  src: url('fonts/BodoniStdBookRegular/font.woff2') format('woff2'),
       url('../fonts/BodoniStdBookRegular/font.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'BatrisyiaScriptAlternates';
  src: url('fonts/BatrisyiaScriptAlternates/font.woff2') format('woff2'),
       url('fonts/BatrisyiaScriptAlternates/font.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  
}
*/



/* Target only scrollable elements (not global) */
::-webkit-scrollbar {
  width: 4px;  /* Very thin scrollbar */
  overflow-y:scroll;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3); /* Light gray */
  border-radius: 4px;
}



html, body {
  margin: 0;
  padding: 0;
}

body {
	overflow-y: scroll;
}

body * {
	font-family: 'Montserrat-Regular', sans-serif;
	 
}


body p, li {
	font-size: 16px;
	line-height: 22px;
}
	

main {
	min-width:230px;
}
.subtitle {
  display: block; /* forces it to break to the next line */
  font-weight: normal;
  font-size: 0.8em; /* optional: reduce subtitle size */
}

.swiper {
  width: 100%;          /* Responsive width */
  max-width: 500px;    /* Absolute max width*/
  margin: 0 auto;  /* Center horizontally */
  padding: 1px;
}

@media (max-width: 500px) {
  .swiper {
    max-width: 100%;
  }
}


.swiper-slide {
  flex-shrink: 0;       /* prevents shrinking and stacking */
  width: 100%;
  height: auto;
}

.swiper-wrapper {
  display: flex;        /* ensures horizontal layout */
  transition-property: transform;
  box-sizing: content-box;
}

.swiper-slide figure {
	margin: 0px 0px 10px 0px;
	position: relative;
	
}



h1,h2 {
	margin-bottom: 20px;
	font-family: "Times New Roman", Times, serif;
	text-align: center;
}


.swiper-slide figcaption {
	position: relative;
	color: black;
	font-size: 17px;
	/*font-family: var(--secondary-ff);*/
	line-height: 29px;
	background-color: var(--black);
	display: flex; /*so text and icon sit next to each other*/
	justify-content: center;
	/*gap: .5rem;
	border-radius: .5rem .5rem 0 0;*/
	/*padding: 1rem 2rem;*/
	/*left: 50%; this puts left edge at middle point, thus the next line*/
	transform: translate3d(0,0,0); /*moves it down 100% of its height so we can see it below */
	/*opacity: 0; so we hide it completely*/
	/*transition: all .3s ease-in-out;*/
}

.swiper-slide img {  /*THIS AFFECTS ALL IMAGES*/
	display: block;
	width:100%; /* THIS IS KEY */
	height:auto;
	object-fit: cover;
	box-shadow: 0 -1px 48px -24px rgba(0,0,0,.3);
	border-left: 1px solid rgba(211, 211, 211, 1);
	margin-top: 1px;
	padding-top: 1px;
}

.swiper-slide figcaption img {
	width:auto;
	height: auto;
	object-fit: contain;
}

.swiper-custom-nav {
  position: absolute;
  /* top is set dynamically via JS */
  left: 50%;                      /* center horizontally */
  transform: translateX(-50%);    /* center horizontally */
  height: 48px;
  width: 100%; /*javascript will override this on small screens */
  min-width: 200px;
  max-width: 650px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none; /* Optional: allows image interaction under nav */
}

.swiper-custom-nav svg {
	cursor: pointer;
	pointer-events: auto; /* Make sure buttons remain clickable */
	opacity: .6;
	transition: all .3s ease-in-out;
	
}


.swiper-custom-nav svg:hover {
	opacity: 1;
}
@media (max-width: 670px) {
  .swiper-custom-nav svg circle {
	opacity: 1;
  }
  .swiper-custom-nav svg:hover path {
	  stroke: red;
  }
}



/* -----------------------------------------------  hamburger menu



/* This aligns header to the left edge of the Swiper */
.aligned-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 60px;
  margin: 0 auto;
  width: 100%;           /* Must match Swiper's width */
  max-width: 500px;     /* Must match Swiper's max-width */
  position: relative;
  z-index: 1000;
  background-color: transparent; /* Or use a semi-transparent bg if needed */
}


#menuToggle {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  z-index: 1000;
 /* transform: translateY(-50%);*/
  cursor: pointer;
  /*background: rgba(255, 0, 0, 0.2);  TEMP for testing */
}

#hamburger {
	display: flex;
	align-items: center;
	
}

.header-title {
  font-size: clamp(.7rem, 4vw, 1.8rem); /* ðŸ‘ˆ scales with screen size */
  font-weight: 600;
  text-align: center;
  color: #000;
}



.side-nav {
  position: absolute;
  top: 40px;
  left: 0;
  width: 300px;
  background: #fff;
  z-index: 1001;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  visibility: hidden;
}

.side-nav.visible {
  visibility: visible;
  pointer-events: auto;
}

.side-nav.open {
  opacity: 1;
  transform: translateY(0);
}

.side-nav nav {
  display: flex;
  flex-direction: column;
}

.side-nav a {
  color: #7c7c7c;
  text-decoration: none;
  font-size: 1rem;
  margin: 1rem 0;
}

.chapter-list {
	padding: 0px 20px 20px 20px;
}

#closeBtn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #000; /* Optional: set your preferred icon color */
  padding: 1rem; /* Optional: tweak spacing around the ✕ */
}


/* -------------------------------- audio */

#audioToggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
#audioToggle:focus {
  outline: 2px solid #000;
}

.audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* or use margin-left on #audio-autoplay */
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: black;
}

@media (max-width: 480px) {
	.audio-toggle {
		gap:3px;
	}
	
}

#audio-icon {
  display: inline-block;
}

#enable-autoplay {
  margin-left: 4px; /* Optional if you're using gap */
}

audio {
  display: block;
  margin: 1rem auto;
}

/*------------------------------- instructions expander  -----------------*/

.expander-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  text-align: left;
  cursor: pointer;
  color: #0077cc;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expander-toggle:focus {
  outline: 2px solid #005fa3;
}

.expander-content {
  margin-top: 0.5rem;
  padding-left: 1rem;
}

.expander-toggle svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}





/* ------------------------ toggle SHOW/HIDE TEXT -------------------- */
#toggleText:hover {
  cursor: pointer;
}

.text-icon {
  font-size: 1rem;
  color: gray;
  transition: color 0.2s ease;
}

.text-icon.active {
  color: black;
  text-decoration: underline solid red;
}

.text-icon:focus {
  outline: 2px solid #000;
}


/* -------------------------- Go to Page ----------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.go-to-page {
  display: flex;
  align-items: center;

}


#gotoInput {
  width: 6ch; /* enough for 2 digits plus a bit of space */
  padding: 4px;
  font-size: 1rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  appearance: textfield;
}

#gotoInput::placeholder {
  color: #aaa;
  font-style: italic;
 
}




/* Remove spinners in Chrome, Safari, Edge */
#gotoInput::-webkit-outer-spin-button,
#gotoInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#gotoButton {
  padding: 4px 10px;
  font-size: 1rem;
  cursor: pointer;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
}



/*  Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between; /* or space-between or space-around */
  align-items: center;
  width: 100%; /* match swiper width */
  max-width: 500px;
  margin: 0 auto;
  padding: 0.5rem 0.3rem;
  gap: 1rem;
}

.pagetext {
   padding: 0 1rem;
  box-sizing: border-box; /* enables vertical scroll only if needed */
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 1;	
   font-family: 'Montserrat-ExtraLight';
}

.pagetext.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
	
@media (max-width:800px) {
	#toolbar {
		padding:0;
	}
	
}
@media (max-width: 500px) {
    
		  #toolbar {
			  width: 100%;
			  gap:0rem;
			  padding: 3px;
		  }
		  #gotoInput::placeholder {
		  font-size: 0.8rem;
		  width: 6.5ch;
		}
		.pagetext {
			padding-left:2px;
			padding-right: 2px;
		}
}
.toolbar button,
.toolbar input {
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  border: none;
  background: none;
}

.goto-wrapper {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
