/* Reset and base styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
   	font-family: "Nanum Gothic", sans-serif;
   	font-size: 16px;
   	min-height: 100vh;
   	opacity: 1;
	animation-name: fadeInOpacity;
	animation-iteration-count: 1;
	animation-timing-function: ease-in;
	animation-duration: .75s;
}
   
@keyframes fadeInOpacity {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

li a:link {
	text-decoration: none;
}

li a:visited {
	color: inherit;
	text-decoration: none;
}

#map {
      height: 100vh;
      width: 100%;
      margin: 0;
      padding: 0;
    }

/* Old modal styles removed - now using Leaflet popups */
    
 
.marker-label {
	background: rgba(255,255,255,0.8);
	padding: 2px 6px;
	font-size: 14px;
	font-weight: bold;
	white-space: nowrap;
	border: none;
}

.marker-label.leaflet-tooltip .leaflet-tooltip-tip {
  display: none;
}
#video-box {
	width: 100%;
	max-width: 100%;
	height: auto;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

#video-box iframe {
	width: 100%;
	height: 50vh;
	max-height: 400px;
	border: none;
	display: block;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

video {
	width: 100%;
	max-width: 100%;
	height: auto;
}

body.residentialSchools_bg {
	background-image: url(../assets/images/image_ResidentialSchool_bg.png);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	background-attachment: fixed;
	min-height: 100vh;
}

body.video-bg {
	background-image: url(../assets/images/gjoaHaven1956.png);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	background-attachment: fixed;
	min-height: 100vh;
}

.video-description {
	background-color: #847e74;
	padding: 12px 16px;
	color: #efeee9;
	max-height: calc(40vh - 120px);
	overflow-y: auto;
	box-sizing: border-box;
	margin: 0;
	/* Match the iframe's actual rendered width */
	width: calc(100% - 0px);
	max-width: calc(100% - 0px);
}

.video-description h2 {
	background-color: #847e74;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 1.4em;
	margin: 0 0 8px 0;
}

.video-description p {
	font-size: 1em;
	line-height: 1.3;
	margin: 0 0 8px 0;
}

.container {
	width: 95vw;
	max-width: 1400px;
	height: calc(85vh - 120px);
	display: flex;
	margin: 2% auto 0;
	gap: 20px;
	padding-bottom: 120px;
}

.container .left-col {
	width: 35%;
	display: flex;
	flex-direction: column;
}

.container .right-col {
	width: 65%;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.chapter-box {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.chapter-box ul {
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
	max-height: calc(100vh - 320px);
}

.chapter-box ul li {
	margin: 0 0 4px;
	list-style-type: none;
}

.chapter-box ul li a {
	display: block;
	border: 1px solid #efeee9;
	padding: 8px 12px;
	list-style-type: none;
	font-size: 1em;
	transition: all 0.2s ease;
}

.chapter-box ul li a:hover {
	background: #efeee9;
	color: #333;
}

li h3 {
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #e25f05;
	display: inline;
}

.chapter-box h2 {
	font-weight: bold;
	color: #e25f05;
	font-size: 1.8em;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin: 0 0 10px 0;
	flex-shrink: 0;
}

.chapter-time {
	color: #666;
	font-size: 0.8em;
	font-weight: normal;
	text-transform: none;
	letter-spacing: normal;
}

.chapter-box .loading {
	color: #666;
	font-style: italic;
	text-align: center;
	padding: 10px;
	border: none;
}




ul.elder-list li a {
	width: 33%;
	display: block;
	float: left;
	font-size: 2.1em;
	font-weight: bold;
	margin-bottom: 20px;
	border: none;
	padding: 0;

}

ul.elder-list li a:hover {

	border: none;
	background: none;
	color: #e25f05;
}



button {
	background-color: transparent;
	text-align: left;
	border: none;
	padding: 0;
	margin: 0;
	width: 100%;
}

body.home {
	background-image: url(../assets/images/home_bg.png);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	background-attachment: fixed;
	min-height: 100vh;
}

body.home #navigation-home {
	width: 80%;
	max-width: 1000px;
	margin: 0 auto; 
	padding: 0;
	position: absolute;
	bottom: 8%;
	left: 10%;
	right: 10%;
}

body.home #navigation-home ul {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.home #navigation-home li {
	background: transparent;
	padding: 0;
	height: auto;
	flex: 0 1 auto;
	min-width: 120px;
}

body.home #navigation-home li  {
	display: inline-block;
	border: 1px solid #e25f05;
	color: #e25f05;
	font-weight: bold;
	font-size: 1.1em;
	text-transform: uppercase;
	text-align: center;
	padding: 10px 16px;
	margin-right: 0;
	transition: all 0.3s ease;
}

body.home #navigation-home li a {
	color: #e25f05;
	text-decoration: none;
}	


body.home #navigation-home li a:visited {
	color: #e25f05;
}	

body.home #navigation-home li a:hover {
	color: #262626;
}

body.home #navigation-home li:hover {
	background-color: rgba(226, 95, 5, 0.1);
	transform: translateY(-2px);
}



body.home #logo {
	width: 35%;
	max-width: 350px;
	height: auto;
	position: absolute;
	top: 20%;
	left: 50%;
	transform: translateX(-50%);
}

body.home #sub-navigation {
	position: absolute;
	bottom: 10%;
	margin: 0;
	padding: 0;
	left: -40px;
	display: none;
}

body.home #sub-navigation li {
	background: #e25f05;
	padding: 20px 40px 20px 60px;
	font-size: 1.8em;
	border-radius: 0 50px 50px 0;
	color: white;
	text-transform: uppercase;
	font-weight: bold;
	list-style-type: none;
	margin: 0 0 10px; 
}




ul.kiosk-nav {
	position: fixed;
	bottom: 2%;
	height: 112px;
	margin: 0 auto;
	padding: 0;
	width: 90%;
	max-width: 800px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999;
	display: flex;
	justify-content: center;
	align-items: center;
	list-style: none;
}

ul.kiosk-nav li {
	display: inline-block;
	padding: 0;
	margin: 0;
	flex-shrink: 0;
}

a.kiosk-home-link {
	width: 249px;
	background: #e25f05;
	height: 112px;
	display: block;
	padding: 0;
	margin: 0;
}

a.legends {
	display: block;
	width: 194px;
	height: 112px;
	padding: 0;
	margin: 0;	
}

a.history {
	display: block;
	width: 169px;
	height: 112px;
	padding: 0;
	margin: 0;	
}



.col-container {
	margin: 150px auto;
	width: 90vw;
	max-width: 1200px;
	height: 70vh;
	display: grid;
	gap: 15px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	justify-items: center;
}

.col {
	height: 50vh;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.col img {
	width: 100%;
	max-width: 100%;
	height: auto;
}


.page-description {
	color: white;
	width: 100%;
	height: 40vh;
}

.page-description p {
	font-size: 1.6em;
	line-height: 1.4em;
}

.video-link {
	position: absolute;
	display: block;
	right: 0;
	top: 20vh;
	width: 40%;
}

a.video-link-item {
	display: block;
	border: 1px solid #e25f05;
	width: 100%;
	float: right;
	height: auto;
	padding: 10px;
	border-radius: 50px 0 0 50px;
	border-right: none;
	font-size: 1.4em;
	padding-left: 30px;
	padding-right: 10%;
	background: rgba(206, 197, 179,0.85);
	margin-top: 20px;
	color: inherit;
	text-decoration: none;
}

a.video-link-item:hover {
	background: rgba(255,255,255,0.5)
}





#back-menu {
	display: block;
	border: 1px solid green;
	position: absolute;
	height: auto;
	width: 200px;
	top: 20px;
	left: 5%;
	z-index: 999;
	text-align: center;
	padding: 10px 0; 
}

.timeline {
	position: absolute;
	top: 30%;
	width: 90%;
	
}


.timeline-item {
	width: 9.5%;
	display: inline-block;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens (desktops) */
@media screen and (min-width: 1200px) {
    body {
        font-size: 18px;
    }
    
    body.home #navigation-home {
        bottom: 10%;
    }
    
    body.home #navigation-home li {
        font-size: 1.2em;
        padding: 12px 20px;
    }
    
}

/* Medium screens (tablets) */
@media screen and (max-width: 1199px) and (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    body.home #navigation-home {
        width: 85%;
        bottom: 6%;
    }
    
    body.home #navigation-home li {
        font-size: 1em;
        padding: 8px 14px;
        min-width: 100px;
    }
    
    body.home #logo {
        width: 45%;
        top: 18%;
    }
    
    .container {
        width: 95vw;
        height: calc(80vh - 100px);
        padding-bottom: 100px;
    }
    
    #video-box iframe {
        height: 40vh;
        max-height: 350px;
    }
    
    .video-description {
        max-height: calc(35vh - 100px);
        width: 100%;
        max-width: 100%;
    }
    
    
    ul.kiosk-nav {
        width: 95%;
        bottom: 1%;
    }
    
    a.kiosk-home-link {
        width: 200px;
        height: 90px;
    }
    
    a.legends, a.history {
        width: 160px;
        height: 90px;
    }
}

/* Small screens (mobile phones) */
@media screen and (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    body.home #navigation-home {
        width: 90%;
        bottom: 5%;
        left: 5%;
        right: 5%;
    }
    
    body.home #navigation-home ul {
        flex-direction: column;
        gap: 8px;
    }
    
    body.home #navigation-home li {
        font-size: 0.9em;
        padding: 8px 12px;
        min-width: auto;
        width: 100%;
    }
    
    body.home #logo {
        width: 60%;
        top: 15%;
    }
    
    .container {
        width: 98vw;
        height: calc(85vh - 90px);
        margin: 2% auto 0;
        flex-direction: column;
        gap: 15px;
        padding-bottom: 90px;
    }
    
    .container .left-col,
    .container .right-col {
        width: 100%;
    }
    
    .container .left-col {
        height: 40vh;
    }
    
    .container .right-col {
        height: 45vh;
    }
    
    .chapter-box {
        width: 100%;
        height: 100%;
    }
    
    .chapter-box ul {
        max-height: calc(35vh - 100px);
    }
    
    #video-box iframe {
        height: 25vh;
        max-height: 250px;
    }
    
    .video-description {
        max-height: calc(15vh - 90px);
        padding: 8px 12px;
        width: 100%;
        max-width: 100%;
    }
    
    .video-description h2 {
        font-size: 1.2em;
    }
    
    .video-description p {
        font-size: 0.9em;
    }
    
    
    ul.kiosk-nav {
        width: 98%;
        height: 80px;
        bottom: 1%;
    }
    
    a.kiosk-home-link {
        width: 150px;
        height: 70px;
    }
    
    a.legends, a.history {
        width: 120px;
        height: 70px;
    }
    
    ul.elder-list li a {
        width: 100%;
        font-size: 1.6em;
        margin-bottom: 15px;
    }
    
    .col-container {
        width: 95vw;
        grid-template-columns: auto auto;
        gap: 5px;
    }
    
    .col {
        height: 40vh;
    }
    
    .video-link {
        position: relative;
        width: 100%;
        top: auto;
        right: auto;
        margin-top: 20px;
    }
    
    a.video-link-item {
        border-radius: 25px;
        padding: 15px 20px;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    body.home #navigation-home {
        bottom: 4%;
    }
    
    body.home #navigation-home li {
        font-size: 0.8em;
        padding: 6px 10px;
    }
    
    
    ul.kiosk-nav {
        height: 60px;
    }
    
    a.kiosk-home-link {
        width: 120px;
        height: 50px;
    }
    
    a.legends, a.history {
        width: 100px;
        height: 50px;
    }
    
    ul.elder-list li a {
        font-size: 1.4em;
    }
    
    .col-container {
        grid-template-columns: auto;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    body.home #navigation-home {
        bottom: 2%;
        width: 90%;
    }
    
    body.home #logo {
        top: 10%;
        width: 25%;
    }
    
    ul.kiosk-nav {
        bottom: 1%;
        height: 60px;
    }
    
    a.kiosk-home-link {
        height: 50px;
    }
    
    a.legends, a.history {
        height: 50px;
    }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    /* Ensure crisp rendering on high DPI displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== CUSTOM SCROLLBARS ===== */
.video-description::-webkit-scrollbar,
.chapter-box ul::-webkit-scrollbar {
    width: 8px;
}

.video-description::-webkit-scrollbar-track,
.chapter-box ul::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.video-description::-webkit-scrollbar-thumb,
.chapter-box ul::-webkit-scrollbar-thumb {
    background: rgba(226, 95, 5, 0.6);
    border-radius: 4px;
}

.video-description::-webkit-scrollbar-thumb:hover,
.chapter-box ul::-webkit-scrollbar-thumb:hover {
    background: rgba(226, 95, 5, 0.8);
}

/* Firefox scrollbar styling */
.video-description,
.chapter-box ul {
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 95, 5, 0.6) rgba(255, 255, 255, 0.1);
}

/* ===== VIDEO WIDTH ALIGNMENT FIX ===== */
/* Match description box width to Vimeo player's actual width */
.video-description {
    /* Remove any padding that might affect visual width alignment */
    margin-left: 0;
    margin-right: 0;
    /* Ensure it matches the iframe's rendered width exactly */
    width: 100%;
    max-width: 100%;
}

/* ===== MAP POPUP STYLES ===== */
.custom-popup .leaflet-popup-content-wrapper {
    background: #847e74;
    color: #efeee9;
    border-radius: 10px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    padding: 0;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 100% !important;
}

.custom-popup .leaflet-popup-tip {
    background: #847e74;
}

.popup-container {
    width: 100%;
    max-width: 400px;
    min-width: 300px;
}

.popup-header {
    background: #e25f05;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}


.popup-content {
    padding: 20px;
}

.popup-video {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.popup-video iframe {
    width: 100%;
    height: 200px;
    border: none;
    display: block;
}

.popup-description {
    margin-bottom: 15px;
}

.popup-description p {
    margin: 0;
    line-height: 1.4;
    font-size: 1em;
}

.popup-actions {
    text-align: center;
}

.view-more-btn {
    display: inline-block;
    background: #e25f05;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background: #c54f04;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* ===== AUTHENTICATION PAGE STYLES ===== */
body.auth-page {
    background-image: url(../assets/images/home_bg.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: rgba(132, 126, 116, 0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: #efeee9;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
}

.auth-container h1 {
    font-size: 2.5em;
    color: #e25f05;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-container p {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.4;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form input {
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #e25f05;
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    color: #333;
    text-align: center;
}

.auth-form input:focus {
    outline: none;
    border-color: #e25f05;
    box-shadow: 0 0 10px rgba(226, 95, 5, 0.3);
}

.auth-form button {
    padding: 15px 30px;
    font-size: 1.3em;
    background: #e25f05;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.auth-form button:hover {
    background: #c54f04;
    transform: translateY(-2px);
}

.auth-container .error-message {
    color: #ff6b6b;
    font-size: 1.1em;
    margin-top: 10px;
    display: none;
}

.auth-container .logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

/* Responsive design for auth page */
@media screen and (max-width: 767px) {
    .auth-container {
        padding: 30px 20px;
        max-width: 350px;
    }
    
    .auth-container h1 {
        font-size: 2em;
    }
    
    .auth-container p {
        font-size: 1.1em;
    }
    
    .auth-form input {
        padding: 12px;
        font-size: 1.1em;
    }
    
    .auth-form button {
        padding: 12px 25px;
        font-size: 1.2em;
    }
}

@media screen and (max-width: 480px) {
    .auth-container {
        padding: 25px 15px;
        max-width: 300px;
    }
    
    .auth-container h1 {
        font-size: 1.8em;
    }
    
    .auth-container p {
        font-size: 1em;
    }
    
    .auth-form input {
        padding: 10px;
        font-size: 1em;
    }
    
    .auth-form button {
        padding: 10px 20px;
        font-size: 1.1em;
    }
    
    .auth-container .logo {
        width: 60px;
    }
}
