/*
Communication Graphice lessons website style sheet (CSS3)
v2024 - A. Bolyn
*/

/* Reset some default styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --main-color: rgba(8, 138, 88, .4);
    --big-border-color: rgba(8, 138, 88, .3);
    --text-color: #333; /* Darker text color for better readability */
    --link-color: #3498db; /* Standardized link color */
    --bg-color: #f4f4f4; /* Light background color */
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 20px;
    line-height: 1.3;
}

header {
    text-align: center;
    margin-bottom: 10px; /* Original spacing restored */
    color: white;
    background-color: var(--main-color);
    border-radius: 20px;
    padding: 20px;
}

nav {
	text-align: center;
	background-color: white;
	border-radius: 10px;
	margin-bottom: 10px;
	font-size: 18px;
}

nav a {
	text-decoration: none;
    color: var(--link-color);
	padding: 3px 10px;
	border: 1px solid transparent;
}

nav a:hover {
	border: 1px solid var(--link-color);
	border-radius: 7px;
}

h1 {
    font-size: 2.1rem;
    font-variant: small-caps;
    text-shadow: 0 0 3px #000000;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

h3 {
    margin-bottom: 5px; /* Original spacing restored */
    margin-top: 15px; /* Original spacing restored */
    font-size: 1.3rem;
    color: var(--text-color);
}

.main-section {
    background-color: white;
    border: 2px solid var(--big-border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.main-section h2 {
    font-variant: small-caps;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--big-border-color);
    padding-bottom: 5px; /* Original spacing restored */
    margin-bottom: 15px; /* Original spacing restored */
}

.main-section p, 
.main-section ul {
    margin-left: 20px;
    padding-top: 10px;
    color: var(--text-color);
}

.main-section .bullets {
    list-style-type: disc;
    padding-left: 20px;
}

/* List style inside the main sections */
.main-section ul {
    list-style-type: none;
    padding-left: 0;
}

.main-section ul li {
    margin-bottom: 5px;
}

/* Link styling */
.main-section a {
    text-decoration: none;
    color: var(--link-color);
}

.main-section a:hover {
    text-decoration: underline;
}

#slides_div dl {
    margin: 15px;
    padding: 5px;
}

#slides_div dt {
    margin-top: 15px;
    display: list-item;
    list-style-type: disc;
}

.chapters-container {
    display: grid;
    grid-template-columns: 1fr; /* Stack chapters vertically */
    row-gap: 0px; /* Adds spacing between the chapters */
	grid-auto-rows: 1fr;
}

/* Chapter bubble styles */
.chapter {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px; /* Added space above the chapter box */
	width: 80%;
	display: grid;
}

/*
.chapters-container .chapter {
     min-height: 20px;
}
*/

.chapter h4 {
    font-variant: normal;
    background-color: var(--main-color);
    color: white;
    padding: 3px 3px 3px 10px;
    border-radius: 10px 10px 0 0;
    font-size: 1.2rem;
    margin: -20px -20px 10px -20px;
    text-align: left;
	height: 35px;
}

.chapter-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
	align-items: stretch;
}

.chapter-info {
    padding-right: 10px;
}

.chapter ul li {
	margin-bottom: 0px;
}

.chapter-summary {
    padding-left: 10px;
    text-align: justify;
}

/* Footer styling (restored original styles) */
footer {
    padding-top: 10px; /* Original spacing restored */
    padding-bottom: 5px; /* Original spacing restored */
    text-align: center;
    font-size: 0.7rem;
    color: var(--main-color);
}

/* Media query for responsiveness */
@media (max-width: 900px) {

    h1 {
        font-size: 1.9rem;
    }
    .main-section h2 {
        font-size: 1.4rem;
    }

    .main-section p, .main-section ul{
        margin-left: 0px;
    }

    .chapter h4 {
        font-size: 15px;
        height: 45px;
        padding-top: 5px;
    }

    .chapter-content {
        grid-template-columns: 1fr; /* Stacks content in one column on small screens */
    }
}

@media (max-width: 1400px) {
    .chapter {
        width: 100%; /* Full width on smaller screens */
        margin-left: 0; /* Remove centering for full width */
        margin-right: 0; /* Remove centering for full width */
    }
}
