/* Global */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;700&display=swap'); /* Added font weights */

:root {
    --primary-color: #00A67C; /* Green for accents/hover */
    --secondary-color: #10275e; /* Dark blue for borders/dividers */
    --background-hero: #2196F3; /* Hero background blue */
    --text-color: #000;
    --light-text-color: #fff;
    --page-bg-color: #fff;
    --font-size-base: 16px;
}

body {
	margin: 0;
	font-family: 'Source Serif Pro', serif;
	font-size: 1rem; /* Base font size */
	line-height: 1.6; /* Improved readability */
	color: var(--text-color);
}

hr {
	background-color: var(--secondary-color);
	height: 2px;
	border: none;
	margin: 1.5rem 0; /* Consistent vertical margin */
}

/* Hero Section */
.hero {
	min-height: 100vh; /* Full viewport height for hero */
	color: var(--light-text-color);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 20px; /* Padding for content inside hero */
	box-sizing: border-box; /* Include padding in element's total width and height */
}

.hero .background-image {
	position: fixed; /* Changed to absolute to allow content to flow naturally */
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center; /* Center the background image */
	background-color: var(--background-hero);
	z-index: -1;
}

.hero .background-image:after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #000;
	opacity: 0.6;
}

.hero-content { /* New wrapper for hero content */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px; /* Limit content width */
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for readability */
    border-radius: 10px;
}

.hero-content .img_page {
    width: 100%; /* Ensure image scales down */
    max-width: 400px; /* Increased image size in hero */
    height: auto;
    margin-bottom: 20px;
}

.hero-content .chapter {
    font-size: 2em; /* Larger chapter title in hero */
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Layout for quiz pages */
.block_page {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.block_page_button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: 30px; /* Space above buttons */
}

.block_page_button2 {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-top: 30px; /* Space above buttons */
}

/* Page content */
.page, .page2 {
	background-color: var(--page-bg-color);
	padding: 20px; /* Consistent padding for mobile */
	color: var(--text-color);
	line-height: 1.6;
	text-align: left;
	font-size: 1rem;
	width: 90%; /* Mobile first */
	margin: 20px auto; /* Consistent vertical margin for mobile */
	box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Subtle shadow for card effect */
	border-radius: 8px; /* Rounded corners */
}

/* Images */
.img_page, .img_page_intxt {
	width: 100%;
	height: auto; /* Maintain aspect ratio */
	margin: 15px 0; /* Consistent vertical margin */
	border-radius: 5px; /* Slightly rounded images */
}

/* Text styles */
.small_txt {
	font-size: 0.9em; /* Slightly larger small text */
}

.chapter {
	font-size: 1.5em; /* Larger chapter titles */
	font-weight: 700; /* Use bolder weight from font import */
	padding: 0; /* Reset padding, use margins instead */
	margin-bottom: 1rem; /* Consistent spacing */
	text-align: center; /* Center chapter titles */
}

.color_mark {
	color: var(--primary-color);
	text-decoration: underline;
}

/* Buttons */
.button_start, .button, .button2 {
	color: var(--text-color);
	text-align: center;
	border: 2px solid var(--primary-color); /* Border color matching accent */
	padding: 12px 25px; /* Slightly more padding */
	cursor: pointer;
	font-size: 1.1rem; /* Slightly larger font size for buttons */
	background-color: transparent;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; /* Smooth transitions */
	display: block;
	max-width: 300px; /* Limit button width */
	margin: 15px auto; /* Consistent margin for single buttons */
	text-decoration: none;
	border-radius: 5px; /* Rounded button corners */
}

.hero-content .button_start { /* Specific style for button on dark hero background */
    color: var(--light-text-color);
    border-color: var(--light-text-color); /* Also change border color for contrast */
}

.button_start:hover, .button:hover, .button2:hover {
	background-color: var(--primary-color);
	color: var(--light-text-color);
	border-color: var(--primary-color);
}

/* Tablet Styles */
@media (min-width: 768px) {
	.hero {
		padding: 40px;
	}

    .hero-content {
        padding: 40px;
    }

	.page, .page2 {
		width: 75%; /* Adjust width for tablets */
		margin: 40px auto;
		padding: 30px;
	}

	.block_page_button {
		flex-direction: row;
		gap: 20px; /* Adjust gap for tablets */
	}

	.button, .button2 {
		margin: 0; /* Remove individual button margin when using gap */
		width: auto; /* Allow button to size based on content */
	}

	.block_page_button2 {
		flex-direction: row;
		justify-content: center;
		gap: 20px; /* Adjust gap for tablets */
	}
    
    .chapter {
        font-size: 1.8em;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
	.hero {
		padding: 60px;
	}

    .hero-content {
        padding: 60px;
    }

	.page {
		width: 70%; /* Original desktop width for .page */
		font-size: 1.1rem;
		padding: 40px;
	}

	.page2 {
		width: 50%; /* Original desktop width for .page2 */
		font-size: 1.1rem;
		padding: 40px;
	}

	.text_img {
		width: 60%;
	}

	.button_start, .button, .button2 {
		padding: 15px 30px; /* Larger padding for desktop buttons */
		font-size: 1.2rem;
		max-width: 350px;
	}

	.img_page {
		width: 60%;
		margin: 20px 30px;
	}

    .hero-content .img_page { /* Explicitly target image in hero for desktop */
        width: 100%;
        max-width: 600px; /* Even larger image size for desktop hero */
    }

    .chapter {
        font-size: 2em;
    }
    
    .hero-content p { /* Increase font size for descriptive text on desktop */
        font-size: 1.2em;
    }
}
