/* ============================================
   GLOBAL CSS - SDG 15: Life on Land
   Team: Terra
   Created by: Student 1 
   This file controls the styling for the entire website.
   DO NOT add page-specific styles here.
   ============================================ */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafff7;
}


header {
    background-color: #2d6a4f;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    max-width: 1200px;
    margin: 0 auto;
}


.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.site-logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

.site-logo span {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}


nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    display: block;
}


nav ul li a:hover {
    background-color: #40916c;
    color: #d8f3dc;
}

/* Active page indicator */
nav ul li a.active {
    background-color: #1b4332;
    color: #95d5b2;
    font-weight: bold;
}


main {
    min-height: 70vh;
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
}


h1 {
    font-size: 32px;
    color: #1b4332;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 26px;
    color: #2d6a4f;
    margin-bottom: 15px;
    border-bottom: 2px solid #95d5b2;
    padding-bottom: 8px;
}

h3 {
    font-size: 20px;
    color: #2d6a4f;
    margin-bottom: 10px;
}

h4 {
    font-size: 17px;
    color: #40916c;
    margin-bottom: 8px;
}


p {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.7;
}


a {
    color: #2d6a4f;
    text-decoration: underline;
}

a:hover {
    color: #1b4332;
}


.btn {
    display: inline-block;
    padding: 10px 22px;
    background-color: #40916c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #2d6a4f;
    color: white;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #95d5b2;
    color: #1b4332;
}

.btn-secondary:hover {
    background-color: #74c69d;
    color: #1b4332;
}


.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e8f5e1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: #555;
}


.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 25px 0;
}

.card-container .card {
    flex: 1 1 280px;
    max-width: 350px;
}


img {
    max-width: 100%;
    height: auto;
}

.img-styled {
    border-radius: 8px;
    border: 3px solid #95d5b2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin: 10px 0;
}


ul, ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
    font-size: 15px;
}


.section-light {
    background-color: #d8f3dc;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.section-white {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e8f5e1;
}


form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #1b4332;
    font-size: 14px;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 10px;
    border: 2px solid #95d5b2;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: #2d6a4f;
}

fieldset {
    border: 2px solid #95d5b2;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    color: #2d6a4f;
    padding: 0 10px;
    font-size: 16px;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

table th, table td {
    border: 1px solid #95d5b2;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

table th {
    background-color: #2d6a4f;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f0f7f0;
}

table tr:hover {
    background-color: #d8f3dc;
}


footer {
    background-color: #1b4332;
    color: white;
    padding: 25px 30px;
    text-align: center;
    margin-top: 40px;
}

footer p {
    font-size: 13px;
    margin-bottom: 5px;
    color: #d8f3dc;
}

footer a {
    color: #95d5b2;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


.go-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #2d6a4f;
    color: white;
    padding: 10px 14px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s;
    z-index: 999;
}


.go-top:hover {
    background-color: #1b4332;
    color: white;
}


.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.error-msg {
    color: #d32f2f;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 10px;
}

.success-msg {
    color: #2d6a4f;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    padding: 15px;
    background-color: #d8f3dc;
    border-radius: 5px;
    margin-top: 15px;
}
