/* Existing styles from previous examples */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

header {
    background-color: #f8f8f8;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-family: 'Lora', serif;
}

header h1 a {
    text-decoration: none;
    color: #333;
}

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

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #e9a50d;
}

#resources-hero {
    background: linear-gradient(135deg, #f0e6d2, #e0c8a1);
    padding: 40px 0;
    text-align: center;
}

#resources-hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-family: 'Lora', serif;
}

#resources-hero p {
    font-size: 1.1rem;
}

#resource-list {
    padding: 60px 0;
}

#resource-list h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    font-family: 'Lora', serif;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.resource-card {
   background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
     transition: transform 0.3s ease-in-out;
    padding: 15px; /*Added padding */
    display: flex;
     flex-direction: column; /*Stacking child items*/
    gap: 10px;  /* Add gap */
}

.resource-card:hover {
  transform: translateY(-5px);
}

.resource-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
   border-radius: 10px 10px 0 0;
   margin-bottom: 5px; /* Add margin bottom */
}

.resource-card h3 {
    margin: 0;
    font-family: 'Lora', serif;
}

.resource-card p {
      margin: 0;
    margin-bottom: auto; /* Allow the content to push against the button*/
}

.download-btn {
  display: inline-block;
  background-color: #272726;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
    align-self: center;
    margin-top: 10px;
}

.download-btn:hover {
    background-color: #d4940b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    box-sizing: border-box;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}


footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin: 0px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .container{
      padding: 0 10px;
    }
   header h1 {
    font-size: 2rem;
  }
    header nav ul li {
      margin-left: 10px;
    }
      header nav ul li a{
        font-size: 0.9rem;
      }
    #resources-hero h2 {
        font-size: 2.2rem;
    }
    #resources-hero p {
      font-size: 1rem;
    }
    #resource-list h2{
        font-size: 1.7rem;
        margin-bottom: 20px;
    }
    .resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .resource-card{
         padding: 10px;
    }
       .resource-card img {
          height: 150px;
        }
      .download-btn {
        padding: 8px 15px;
           font-size: 0.9rem;
        margin: 5px;
      }
    .modal-content {
        max-width: 90%;
        max-height: 90%;
    }
      .close-modal {
        top: 10px;
        right: 20px;
          font-size: 30px;
      }

    footer p{
         font-size: 0.9rem;
    }
}