html {
    font-size: clamp(14px, 1.2svw, 18px); /* Example: Min 14px, scales with 1.2% of viewport width, max 18px */
	scroll-behavior: smooth;
}

body { /* Main Body style for the web page */
	margin: 0;
	background: #213241;
	color: #ccc;
	letter-spacing: 0.3rem; /* Allows for scaling of letter spacing */
	font-size: 0.9rem;      /* Font will scalle with viewport screensize */
	font-family: Helvetica, Arial, sans-serif;
	width: 100vw;
}

body::-webkit-scrollbar {
	display: none;
}

a, a:active, a:visited {
	color: inherit;
	text-decoration: none;
}

section#homePage {
	background: url('images/fantasy2.png');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	display: flex;
	flex-direction: column;
	flex-flow: column;
}

section {
	height: 100vh;
}
section:nth-child(even){
	background: #2a4352;
}

nav#main{ /* Main Navigation Bar */
	display: flex;
	justify-content: space-between;
	background: linear-gradient(to right, rgba(95, 44, 130, 0.3), rgba(73, 160, 157, .3));
	/*background-color: rgba(255, 255, 255, 0.1);  Semi-transparent white background */
	box-shadow: 0px 3px 13px #131313;
	user-select: none;
	-moz-user-select: none;
    flex-wrap: wrap; /* Allow Flex containers to wrap to next line */
	font-weight: bold;
	backdrop-filter: blur(6px); /* Adds a blur effect to the background */
    -webkit-backdrop-filter: blur(6px); /* For Safari */
	color: #eee;
}

nav#main ul { /* Main Navigation containers */
	display: flex;
	list-style-type: none;
	margin: 0;
	padding: 0;
    flex-grow: 1;
    flex-wrap: wrap; /* Important: allow the list items within to wrap */
    justify-content: center; /* Center the links if they wrap */
}

nav#main ul li, li { /* Each item in the containers of the main nav */
	list-style-type: none;
	margin: 0;
	padding: 1rem 1.2rem; /* Slightly reduced padding to give more room for flexing */
	transition: background 0.3s ease-in-out;
	cursor: pointer;
	transition: color 0.3s ease;
	
    /* --- Styles for the underline effect --- */
    position: relative; /* Essential for positioning the ::after pseudo-element */
    white-space: nowrap; /* Prevent text from wrapping inside a nav item */
}

nav#main ul:first-child {
	justify-content: flex-start;
}

/* Style for the underline itself */
nav#main ul li::after, li::after {
    content: '';
    position: absolute;
    bottom: 0.7rem; /* How far underline is below text */
    left: 50%;
    width: 0;						 /* Default - not showing - set to 0 */
    height: 2px;                     /* Underline thickness */
    background-color: #22d5ae;       /* A nice bright color, or currentColor for text color */
    transition: all 0.3s ease-out;   /* Smooth transition - underline only */
    transform: translateX(-50%);     /* Centers the starting point */
}

nav#main ul:last-child {
	margin: 0 1rem 0 0; /* Margin for last element in nav */
    justify-content: flex-end;
}

@media (hover: hover) and (pointer: fine) {
    nav#main ul:not(:first-of-type) li:hover::after,
    li:hover::after {
        width: 100%;
    }

    nav#main ul li:hover,
    li:hover {
        color: #22d5ae;
		text-shadow: 3px 3px 6px #000000
    }
}

/* --- Media query for smaller screens for better readability, i.e. Tablet --- */
@media (max-width: 713px) {
    nav#main {
        flex-direction: column; /* Stack the nav containers vertically */
        align-items: center;    /* Center the stacked containers */
        padding: 0.5rem 0;
    }

    nav#main ul {
        flex-direction: column; /* Stack individual nav items vertically */
        align-items: center;    /* Center individual nav items */
        width: 100%;            /* Make them take full width */
        margin-bottom: 0.5rem;  /* Add space between sections */
    }
	
	nav#main ul a {
		width:100%;
	}

    nav#main ul li {
        width: 100%;            /* Ensure each item takes full width for stacking */
        text-align: center;     /* Center the text within the stacked items */
        padding: 0.8rem 0;      /* Adjust padding for vertical stacking */
    }

    nav#main ul:last-child {
        margin: 0; /* Remove specific right margin when stacked */
    }
	
	nav#main ul:not(:first-of-type) li:hover::after {
    width: 30%; /* takes of 30% of the full width of the viewport */
	}
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: auto;
  }
}

.sectionBox{
	display: flex;
	flex: 1;
	justify-content: center;
	align-items:center;
}
.sectionBox div{
	background: rgba(77,77,77, .5);
	color: #ccc;
	padding: 8px;
	border-radius: 5px;
	width: 65%;
	height: 40%;
	backdrop-filter: blur(4px); /* Adds a blur effect to the background */
    -webkit-backdrop-filter: blur(4px); /* For Safari */
	display:flex;
	align-items:center;
	justify-content: center;
	font-size: 2rem;
	text-align: center;
	color: #fff;
	font-weight: bold;
}