/* ============================================
   Tamarind Grove Zoo - my stylesheet
   Made by Rishabh Aryan
   ============================================ */

/* reset some default spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Verdana, Arial, sans-serif;
  background-color: #f4f1e8;
  color: #333333;
  line-height: 1.6;
}

/* the box that holds everything in the middle */
.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ---------- HEADER ---------- */
header {
  background-color: #2f5d3a;
  color: white;
  padding: 15px 0;
}

.logo {
  float: left;
  font-size: 26px;
  font-weight: bold;
  color: #ffd166;
  text-decoration: none;
}

/* the menu */
nav {
  float: right;
}

nav ul {
  list-style: none;
}

nav li {
  display: inline-block;
  margin-left: 12px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
}

nav a:hover {
  background-color: #4a8a57;
}

/* this class is added by JavaScript to the page you are on */
nav a.active {
  background-color: #ffd166;
  color: #2f5d3a;
}

/* clearfix so the header wraps around the floats */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* ---------- BANNER ON HOME PAGE ---------- */
.banner {
  /* dark layer on top of the photo so the white text is easy to read */
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/hero.jpg");
  background-size: cover;
  background-position: center;
  height: 380px;
  text-align: center;
  color: white;
  padding-top: 120px;
}

.banner h1 {
  font-size: 44px;
  color: white;
  text-shadow: 2px 2px 6px #000000;
}

.banner p {
  font-size: 20px;
  text-shadow: 1px 1px 4px #000000;
}

/* ---------- MAIN CONTENT ---------- */
main {
  padding: 30px 0;
}

h1, h2, h3 {
  color: #2f5d3a;
  margin-bottom: 10px;
}

p {
  margin-bottom: 12px;
}

.button {
  display: inline-block;
  background-color: #b35a1a;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background-color: #8f4512;
}

/* yellow box for the fun fact */
.fact-box {
  background-color: #fff3c4;
  border-left: 6px solid #e07a2f;
  padding: 15px;
  margin: 20px 0;
}

/* ---------- CARDS (animals, events) ---------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  background-color: white;
  width: 300px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.card-text {
  padding: 12px;
}

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  margin-bottom: 20px;
}

th, td {
  border: 1px solid #cccccc;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #2f5d3a;
  color: white;
}

/* ---------- FORMS ---------- */
form {
  background-color: white;
  padding: 20px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  max-width: 500px;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input, select, textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #aaaaaa;
  border-radius: 4px;
  font-size: 15px;
}

form .button {
  margin-top: 15px;
}

.message {
  margin-top: 12px;
  font-weight: bold;
}

.error {
  color: #c0392b;
}

.success {
  color: #2f7d32;
}

/* ---------- GALLERY ---------- */
.gallery img {
  width: 180px;
  height: 130px;
  object-fit: cover;
  margin: 5px;
  border: 3px solid white;
  cursor: pointer;
}

.gallery img:hover {
  border-color: #e07a2f;
}

/* the big picture popup (hidden at first) */
#bigView {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  text-align: center;
  padding-top: 40px;
}

#bigView img {
  max-width: 85%;
  max-height: 75vh;
  border: 4px solid white;
}

#bigView p {
  color: white;
  margin: 10px 0;
}

/* ---------- FOOTER ---------- */
footer {
  background-color: #2f5d3a;
  color: white;
  text-align: center;
  padding: 18px 0;
  margin-top: 30px;
}

/* ---------- SMALL SCREENS ---------- */
@media (max-width: 700px) {
  .logo, nav {
    float: none;
    display: block;
    text-align: center;
  }

  nav li {
    margin: 4px;
  }

  .banner h1 {
    font-size: 30px;
  }

  .card {
    width: 100%;
  }
}
