/* Universal selector creates consistent sizing across the website. */
* {
    box-sizing: border-box;
}


/* Main page styling */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f2;
    color: #333333;
    line-height: 1.6;
}


/* Keeps the navbar logo small and proportional. */
.logo {
    width: 60px;
    height: auto;
    display: block;
}


/* Styles the main content area. */
main {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
}


/* Styles main page headings. */
.main-heading {
    text-align: center;
    color: #31572c;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 25px;
}


/* Styles secondary headings with strong color contrast. */
h2 {
    color: #3f6239;
}


/* Adds paragraph spacing. */
p {
    margin-bottom: 18px;
}


/* Styles biography text with accessible contrast. */
.bio {
    font-size: 1.05rem;
    color: #3d5739;
    line-height: 1.8;
}


/* Keeps plant images responsive. */
.plant-image {
    display: block;
    width: 500px;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border: 5px double #6c8565;
    border-radius: 12px;
}


/* Styles the example plant record. */
.plant-card {
    background-color: #eef4ea;
    border-left: 6px solid #587451;
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
}


/* Adds spacing to Plant Care sections. */
section {
    margin: 25px 0;
    padding: 18px;
}


/* Prevents the contact form from becoming too wide. */
form {
    max-width: 600px;
    margin: 25px auto;
}


/* Styles form labels. */
.form-label {
    font-weight: bold;
    color: #31572c;
}


/* Allows the message field to resize vertically. */
textarea {
    resize: vertical;
}


/* Adds a visible focus indicator for keyboard users. */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #31572c;
    outline-offset: 3px;
}


/* Makes links easier to identify when using a keyboard. */
a:focus-visible {
    outline: 3px solid #31572c;
    outline-offset: 3px;
}


/* Styles the footer. */
#site-footer {
    text-align: center;
    background-color: #31572c;
    color: #ffffff;
    font-size: 0.9rem;
    font-style: italic;
    padding: 20px;
    margin-top: 40px;
}


/* Removes extra margin from the footer paragraph. */
#site-footer p {
    margin-bottom: 0;
}


/* Adjusts the layout on smaller screens. */
@media (max-width: 700px) {

    main {
        padding: 20px;
    }

    .main-heading {
        font-size: 1.6rem;
    }

    .logo {
        width: 50px;
    }
}

/* Makes all navbar links bright white for better accessibility contrast. */
.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
}


/* Keeps navbar links white when hovered or focused. */
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff !important;
    text-decoration: underline;
}


/* Keeps the current page link white and makes it stand out. */
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: bold;
}