body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

header {
    background-color: #28a745;
    color: white;
    padding: 1rem;
    text-align: center;
}

#map {
    width: 100%;
    height: 400px;
}

/* This CSS is for button Animation */
.get-weather-btn {
  background-color: #343a40; /* Green background */
  border: none; /* No borders */
  color: white; /* White text */
  padding: 15px 32px; /* Padding */
  text-align: center; /* Center text */
  text-decoration: none; /* No underline */
  display: inline-block; /* Inline block element */
  font-size: 16px; /* Font size */
  margin: 4px 2px; /* Margin */
  border-radius: 8px; /* Rounded corners */
  animation: rotateScalePause 4s ease-in-out forwards; /* Apply the animation */
  transform-origin: center; /* Ensure the rotation pivots around the center */
}



/* Define the keyframes for the rotate and scale animation */
@keyframes rotateScalePause {
  0%, 100% {
    transform: scale(1) rotate(0deg); /* Button in normal state */
  }
  12.5%, 37.5% {
    transform: scale(1.1) rotate(-5deg); /* Button scales up and rotates left */
  }
  25% {
    transform: scale(1) rotate(5deg); /* Button rotates right */
  }
  50%, 75% {
    transform: scale(1.1) rotate(0deg); /* Button scales up */
  }
}


/* Define the keyframes for the rotate and scale animation with pause */
@keyframes rotateScalePause {
  0%, 100% {
    transform: scale(1) rotate(0deg); /* Button in normal state */
  }
  25% {
    transform: scale(1.1) rotate(-5deg); /* Button scales up and rotates left */
  }
  50% {
    transform: scale(1) rotate(5deg); /* Button rotates right */
  }
  75% {
    transform: scale(1.1) rotate(0deg); /* Button scales up */
  }
}


/* No additional hover effects in CSS since it will be handled by JS */

/* Hover effect for the button */
.get-weather-btn:hover {
  background-color: #45a049; /* Darker shade of green when hovering */
}


footer {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
}
.logo {
    border-radius: 50%; /* Adjust this value as needed */
    width: 100px; /* Adjust as needed */
    height: auto;
}
.mulimi {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 18px;
}


/* Base styles for mobile devices */
#weatherInfo,
#forecast {
    text-align: center;
}

.forecast-entry {
    display: inline-block;
    margin: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Tablet devices (width from 768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .forecast-entry {
        width: 45%; /* Two entries per row */
    }
}

/* Desktop and larger devices (width over 1024px) */
@media (min-width: 1024px) {
    .forecast-entry {
        width: 18%; /* Five entries per row for 5-day forecast */
    }
}

#malawi-agriculture-weather {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
}

#malawi-agriculture-weather h2 {
    color: #006400;
}

.crop {
    margin-bottom: 20px;
}

.crop img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.crop p {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-family: serif;
}

#agriculture-contacts {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    padding: 20px;
    border-radius: 15px;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#agriculture-contacts h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5em;
}

#agriculture-contacts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#agriculture-contacts li {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#agriculture-contacts li:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

#agriculture-contacts h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

#agriculture-contacts p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Base styles for the iframe container */
.youtube-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: auto; /* Center align the video */
}

/* Styles for the iframe */
.youtube-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* Base styles for the iframe container */
.youtube-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  width: 100%; /* Full width on smaller screens */
  max-width: 1280px; /* Maximum width on larger screens, can be adjusted */
  margin: auto; /* Center align the video */
}

.youtube-video-container {
  position: relative;
  width: 100%; /* Video will take up 100% of the container's width */
  height: 0; /* Height is initially 0, but will be set by padding */
  padding-bottom: 56.25%; /* This percentage gives us a 16:9 aspect ratio */
  margin: auto; /* Optional: for centering the video */
}

.youtube-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* iframe will fill the width of the .youtube-video-container */
  height: 100%; /* iframe will fill the height of the .youtube-video-container */
}
