:root { --dk-blue: #055E72; --lt-blue: #499B9A; --off-white: #E2E3C7; --orange: #E4AC32; --red: #CB5439; --font-color: #222; --max-width: 1280px; } body { margin: 0; font-family: 'Raleway', Arial, sans-serif; font-size: 1rem; color: var(--font-color); background-color: var(--off-white); } img { max-width: 100%; height: auto; display: block; } .container, main { max-width: var(--max-width); margin: 0 auto; padding: 1rem; background-color: var(--off-white); } header { background-image: url("images/swiss-valley.jpg"); background-size: cover; background-position: center; height: 400px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--dk-blue); position: relative; font-weight: bold; } header::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.4); z-index: 1; } header h1, header nav { position: relative; z-index: 2; } header h1 { margin: 0; font-size: 2.5rem; } /* Nav */ nav ul { list-style: none; display: flex; justify-content: center; gap: 3rem; padding: 0; margin: 1rem 0 0; } nav a { text-decoration: none; color: var(--dk-blue); font-weight: 700; } nav a:hover, nav a:focus { color: var(--orange); } #top { max-width: 700px; margin: 2rem auto; text-align: center; } #top h2 { font-size: 2rem; margin-bottom: 1rem; } #top p { line-height: 1.6; } .image-section-wrapper { display: flex; gap: 2rem; justify-content: center; max-width: var(--max-width); margin: 2rem auto; padding: 0 1rem; } .image-section { flex: 1; max-width: 600px; text-align: center; } .image-section img { margin-bottom: 1rem; } .image-section h3 { margin: 0.5rem 0; } .image-section p { line-height: 1.5; } main h2, main p { text-align: center; } main img { width: 100%; max-width: 600px; margin: 2rem auto; } form { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr 1fr 1fr ; column-gap: 2rem; align-items: start; max-width: 900px; margin: 0 auto 2rem; } form .full-name { grid-column: 1; grid-row: 1; } form .email { grid-column: 1; grid-row: 2; } form .phone { grid-column: 1; grid-row: 3; } form .contact-method { grid-column: 2; grid-row: 1; } form .comments { grid-column: 2; grid-row: 2; } form .submit { grid-column: 2; grid-row: 3; justify-self: normal; } form div, form fieldset { display: flex; flex-direction: column; gap: 0; margin: 0; } form fieldset { border: 1px solid var(--orange); padding: 1rem; } input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; padding: 0.5rem; border: 1px solid var(--red); border-radius: 4px; font-family: inherit; } form textarea { min-height: 100px; } input:focus, textarea:focus { border-color: var(--lt-blue); outline: none; } input:invalid, textarea:invalid { border-color: var(--red); } form .submit button { background-color: var(--dk-blue); color: white; padding: 0.75rem 1.5rem; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; } form .submit button:hover, form .submit button:focus { background-color: var(--lt-blue); } footer { background-color: var(--lt-blue); text-align: center; padding: 2rem; font-size: 0.9rem; font-weight: bold; } @media (max-width: 800px) { .image-section-wrapper { flex-direction: column; align-items: center; } } @media (max-width: 700px) { form { grid-template-columns: 1fr; } form .full-name, form .email, form .phone, form .contact-method, form .comments, form .submit { grid-column: 1; } form .submit { justify-self: stretch; } }