/* Page background (added) */
body {
	margin: 0;
	font-family: Georgia, serif;
	background-color: #2F4F4F;
	background-image: linear-gradient(135deg, #1f3a3a 0%, #2F4F4F 45%, #4f7f7f 100%);
	background-attachment: fixed;
}

#all {
	border: 3px solid #8B4513; /* CHANGE 1: border is now 3px and brown (was 1px black) */
	border-radius: 25px;
	position: relative; /* CHANGE 2: relative so the gallery centers on the page (was absolute) */
	margin: 30px auto; /* CHANGE 3: centers the gallery with space above and below (new) */
	width: 1000px;
	height: 800px; /* CHANGE 4: shorter box to fit the content (was 1100px) */
	background-color: antiquewhite; /* CHANGE 5: antique white background color (new) */
	box-shadow: 8px 8px 20px #111111; /* CHANGE 6: darker, larger shadow (was 5px 5px 10px #999999) */
}

#headline {
	font-size: 3em;
	font-family: "Brush Script MT", "Lucida Handwriting", cursive; /* CHANGE 7: cursive font family (was Trebuchet MS) */
	color: #2F4F4F; /* CHANGE 8: dark slate font color (new) */
	text-align: center;
	position: absolute;
	top: 30px;
	left: 0; /* CHANGE 9: headline spans the full box so it is centered (was left: 350px) */
	width: 100%;
	text-decoration: none; /* CHANGE 10: removed the underline (was underline) */
}

#thumbnails {
	position: absolute;
	top: 150px; /* CHANGE 11: thumbnails moved up (was 175px) */
	left: 50px;
	width: 150px;
	height: auto;
	margin: 0; /* CHANGE 12: removed default list spacing (new) */
	padding: 0;
	/* opacity now controlled by jQuery, so the 0.5 opacity on the list was removed (CHANGE 13) */
}
#thumbnails li {
	list-style: none;
}
#thumbnails:hover {
	cursor: pointer;
}

.smallimg {
	width: 100px;
	margin: 8px 10px; /* CHANGE 14: tighter vertical margin (was 10px) */
	float: left;
	border: 2px solid transparent; /* space reserved so the active border does not shift the layout (new) */
	border-radius: 6px; /* CHANGE 15: rounded thumbnail corners (new) */
}

/* active thumbnail: 2px solid border as a way-finding cue (CHANGE 16) */
.smallimg.active {
	border: 2px solid #8B4513;
}

#largearea {
	position: absolute;
	top: 138px;
	left: 300px;
	width: 650px;
}

#mainphoto {
	width: 650px;
	float: left;
	margin: 50px 15px 20px 0px; /* CHANGE 17: smaller bottom margin (was 50px) */
	border: 4px solid #2F4F4F; /* CHANGE 18: slate frame around the main photo (new) */
	border-radius: 10px;
	box-sizing: border-box;
}

#caption {
	font-size: 22px; /* CHANGE 19: larger caption text (was 18px) */
	font-family: Georgia, serif; /* CHANGE 20: Georgia font family (was Verdana) */
	font-style: italic;
	color: #8B4513; /* CHANGE 21: brown caption color (new) */
	text-align: center;
	position: absolute;
	top: 135px;
	left: 300px;
	width: 650px;
}

/* ===== Extra polish ===== */
/* headline gets a soft shadow (CHANGE 22) */
#headline { text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.35); }

/* thumbnails grow slightly when hovered (CHANGE 23) */
.smallimg { transition: transform 0.2s; }
.smallimg:hover { transform: scale(1.08); }

/* main photo gets a soft shadow (CHANGE 24) */
#mainphoto { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }

/* previous / next buttons and counter under the photo (CHANGE 25) */
#controls {
	position: absolute;
	top: 642px;
	left: 300px;
	width: 650px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#controls button {
	padding: 10px 22px;
	font: bold 16px Georgia, serif;
	color: #ffffff;
	background: linear-gradient(135deg, #a8561f, #8B4513);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 4px 0 #5e2d0b;
	transition: transform 0.1s, box-shadow 0.1s;
}
#controls button:hover { filter: brightness(1.1); }
#controls button:active { transform: translateY(3px); box-shadow: 0 1px 0 #5e2d0b; }
#counter { font: bold 18px Georgia, serif; color: #2F4F4F; }

/* subtitle line under the headline (CHANGE 26) */
#subtitle {
	position: absolute;
	top: 90px;
	left: 0;
	width: 100%;
	text-align: center;
	font: italic 16px Georgia, serif;
	color: #6b5646;
}

/* longer description under the buttons (CHANGE 27) */
#description {
	position: absolute;
	top: 695px;
	left: 300px;
	width: 650px;
	font: 16px/1.5 Georgia, serif;
	color: #4a3a2e;
	text-align: center;
}

/* On phones: stack everything instead of using fixed positions */
@media (max-width: 1040px) {
	#all { width: 94%; height: auto; padding-bottom: 20px; }
	#headline { position: static; font-size: 2.2em; padding-top: 20px; }
	#thumbnails { position: static; width: 100%; padding: 10px; display: flex; flex-wrap: wrap; justify-content: center; }
	#thumbnails li { display: block; }
	.smallimg { float: none; width: 80px; margin: 5px; }
	#largearea { position: static; width: 100%; padding: 0 10px; box-sizing: border-box; }
	#subtitle { position: static; padding: 4px 16px 0; }
	#caption { position: static; width: 100%; margin-top: 10px; }
	#mainphoto { float: none; width: 100%; margin: 10px 0; }
	#controls { position: static; width: 100%; padding: 0 10px; box-sizing: border-box; }
	#description { position: static; width: 100%; padding: 10px 16px 0; box-sizing: border-box; }
}
