
/* News Cards */
.news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.news-card {
    background-color: #e9f7f6;
    border-radius: 10px;
    padding: 10px;
    width: 300px;
    max-height: 270px; 
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 1024px) {
    .news-card {
        width: 250px;
    }
  }

.news-card:hover {
    cursor: pointer;
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.news-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 5px;
}

.news-card h3 {
    font-size: 18px;
    color: #064e45;
    margin: 10px 0 5px;
}

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

/* ✅ Expandable Card Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* ensures no scrollbar appears */
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px; /* ensures margin on mobile */
  box-sizing: border-box;
}



.expanded-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 800px;        /* Limit width */
  width: 90%;              /* Responsive size */
  max-height: 90vh;        /* Limit height */
  overflow-y: auto;        /* Allow scroll if content is tall */
  text-align: left;        /* Fix center alignment */
  position: relative;
  font-family: "Sylfaen", "Noto Sans Georgian", sans-serif;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1980px) {
    .expanded-card {
        max-width: 45%;
        max-height: 80%;
        height: auto;
    }
  }

@media (max-width: 1440px) {
    .expanded-card {
        max-width: 60%;
        max-height: 80%;
        height: auto;
    }
  }

  @media (max-width: 1024px) {
    .expanded-card {
        max-width: 60%;
        max-height: 80%;
        height: auto;
    }
  }

  @media (max-width: 430px) {
    .expanded-card {
        max-width: 80%;
        min-width: 80%;
        max-height: 80%;
        height: auto;
    }
  }


.expanded-card img {
    width: 100%;
    height: auto;
    max-height: 500px;
}

/* ✅ Close Button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

 .news-card p {
    white-space: pre-line; /* ✅ preserves line breaks like \n */
    line-height: 1.6;
    font-family: "Sylfaen", "Noto Sans Georgian", sans-serif;
    text-align: left;
    font-size: 16px;
    color: #222;
    margin-top: 15px;
  }

  .expanded-card p {
  white-space: pre-line;
  font-family: "Sylfaen", "Noto Sans Georgian", sans-serif;
  line-height: 1.6;
  text-align: left;
}
