/* element selectors */

body {
    margin: 0;
    padding: 0;
    background-color: hsl(120, 20%, 95%);
    font-family: 'Lato', Arial, Helvetica, sans-serif;
}

.container {
    max-width: 1200px;
    width: 100%;
    border: 2px solid black;
    padding: 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

h1 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    padding: 16px;
    margin: 0;
    color: white;
    background-color: #3a5a40;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    font-size: 1.8em;
}

h2 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    text-align: left;
    font-weight: bold;
    text-transform: capitalize;
    color: rgb(46, 80, 46);
    letter-spacing: 1px;
}

h3 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #3a5a40;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    font-size: 1.1em;
    margin: 24px 0 10px;
    padding: 8px 0 4px;
    border-top: 2px solid #a8c5a0;
}

h4 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #3a5a40;
    font-weight: 700;
    font-size: 1em;
    margin: 20px 0 8px;
    padding: 6px 0 4px;
    border-top: 1px solid #a8c5a0;
}

p {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-size: 1em;
    text-align: left;
    color: #424242;
    word-spacing: 1px;
}

img {
    display: block;
    margin: 16px auto;
    padding: 4px;
    border: 3px solid #a8c5a0;
    max-width: 100%;
    height: auto;
}

header {
    background-color: #3a5a40;
    margin: 0;
    padding: 0;
    color: white;
}

section {
    background-color: white;
    padding: 20px 24px;
    margin: 16px 0 24px;
}

footer {
    border-top: 1px solid #ccc;
    margin-top: 30px;
    padding: 10px 0 16px;
    color: #555;
}

/* grouped selector */

h1, h2, h3 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
}

/* descendant selectors */

main p {
    line-height: 1.7;
}

footer p {
    font-size: 0.85em;
    color: #666;
}

/* independent class */

.highlight {
    background-color: #fffde7;
    border-left: 3px solid #f9a825;
    padding: 6px 10px;
}

/* dependent class */

p.first-para {
    font-size: 1.05em;
}

/* first-letter pseudo-element */

p.first-para::first-letter {
    font-size: 2.2em;
    font-weight: bold;
    color: #2e7d32;
    float: left;
    margin-right: 4px;
    line-height: 1;
}

/* list styling */

ol {
    list-style-type: upper-roman;
    list-style-position: inside;
}

ul {
    list-style-type: square;
    list-style-position: outside;
}

main ul {
    list-style-type: none;
    padding-left: 20px;
}

main ul li {
    background-image: url('../images/leaf-1-24.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 18px 18px;
    padding-left: 28px;
    margin-bottom: 6px;
}

main {
    margin: 20px 0;
    padding: 0 8px;
}

/* hyperlink pseudo-classes */

a:link {
    color: #1565c0;
}

a:visited {
    color: #6a1b9a;
}

a:hover {
    color: #e65100;
    text-decoration: underline;
}

a:active {
    color: #b71c1c;
}

/* nav bar */

nav {
    background-color: #333333;
    padding: 0 16px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav li {
    display: inline;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 12px 16px;
    display: inline-block;
}

nav a:link,
nav a:visited {
    color: white;
}

nav a:hover,
nav a:focus {
    background-color: #555555;
    color: #7cb87a;
}

nav a:active {
    color: #7cb87a;
}

/* float utility classes */

.float-right {
    float: right;
    margin: 0 0 16px 20px;
    width: 280px;
}

.float-left {
    float: left;
    margin: 0 36px 16px 0;
    width: 280px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* faq columns section */

.columns-section {
    columns: 3;
    column-gap: 2.5em;
    column-rule: 1px solid #a8c5a0;
}

.columns-section h2 {
    column-span: all;
    text-align: center;
    margin-bottom: 1em;
}

/* bullet list - standard disc bullets, no leaf icon */

main ul.bullet-list {
    list-style-type: disc;
    padding-left: 36px;
}

main ul.bullet-list li {
    background-image: none;
    padding-left: 0;
}

/* gallery flexbox layout */

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
}

.gallery figure {
    flex: 1 1 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
    margin: 0;
    text-align: center;
    background-color: #f5f5f5;
    border: 2px solid #a8c5a0;
    padding: 8px;
    box-sizing: border-box;
}

.gallery figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 8px;
    border: none;
    padding: 0;
}

.gallery figcaption {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    color: #3a5a40;
    font-weight: bold;
    padding: 4px 0;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        box-sizing: border-box;
    }

    body {
        background-color: hsl(200, 30%, 88%);
    }

    .gallery {
        flex-direction: column;
    }

    .gallery figure {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* contact form */

.contact-form {
    max-width: 640px;
    margin: 24px auto 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #3a5a40;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-size: 1em;
    color: #424242;
    padding: 10px 12px;
    border: 2px solid #a8c5a0;
    border-radius: 4px;
    background-color: #f9fdf9;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3a5a40;
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
}

.form-fieldset {
    border: 2px solid #a8c5a0;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 18px;
    background-color: #f9fdf9;
}

.form-fieldset legend {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #3a5a40;
    padding: 0 6px;
    font-size: 0.95em;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.radio-group label {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    color: #424242;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    accent-color: #3a5a40;
}

.form-checkbox label {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    color: #424242;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.form-checkbox input[type="checkbox"] {
    accent-color: #3a5a40;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.required {
    color: #c62828;
}

.btn-submit,
.btn-reset {
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-size: 1em;
    font-weight: bold;
    padding: 10px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 12px;
    transition: background-color 0.2s;
}

.btn-submit {
    background-color: #3a5a40;
    color: white;
}

.btn-submit:hover {
    background-color: #2e7d32;
}

.btn-reset {
    background-color: #e0e0e0;
    color: #424242;
}

.btn-reset:hover {
    background-color: #bdbdbd;
}

/* adopt form - two-column row layout */

.adopt-form {
    max-width: 680px;
    margin: 24px auto 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

/* faq list - no bullet, bold green questions */

main ul.faq-list li {
    background-image: none;
    padding-left: 0;
}

main ul.faq-list li p em {
    font-style: normal;
    font-weight: bold;
    color: #3a5a40;
    font-size: 1.02em;
}