/* Set html and body to 100% height */
html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Flex container to fill the screen height */
body {
  display: flex;
  flex-direction: column;
}

/* Header, main, and footer setup */
header {
  padding: 1em;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

header h1 {
  font-size: 2em;
  color: #333;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-top: 0.5em;
}

nav ul li a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

/* Main content takes available space */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2em;
}

.profile {
  text-align: center;
  margin-top: 2em;
}

.profile-image {
  border-radius: 50%;
  width: 200px;
  height: 200px;
}

.profile h2 {
  font-size: 1.5em;
  margin-top: 0.5em;
}

.featured-posts {
  margin: 2em auto;
  max-width: 800px;
  text-align: center;
}

.featured-posts h3 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 1em;
}

.post-grid {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.post {
  border: 1px solid #ddd;
  padding: 1em;
  width: 30%;
  border-radius: 8px;
}

.post h4 {
  font-size: 1.2em;
  color: #333;
}

.post p {
  font-size: 0.9em;
  color: #555;
}

.post span {
  display: block;
  margin-top: 0.5em;
  color: #888;
  font-size: 0.8em;
}

/* Footer stays at the bottom */
footer {
  text-align: center;
  padding: 1em;
  border-top: 1px solid #ddd;
  color: #888;
  font-size: 0.8em;
}

.text-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 60vw; 
  margin: 45px 0 0 0; 
  text-align: center; 
  font-size: 1.2em;
  line-height: 1.5;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 1em;
  place-self: center;
}

.gallery img {
  width: 200px;
  height: 200px;
  object-fit: cover; /* Crop the image to fill the area */
  border-radius: 5px;
  cursor: pointer;
}

.pagination {
  text-align: center;
  margin-top: 1em;
}

.pagination button {
  padding: 0.5em 1em;
  margin: 0 5px;
  cursor: pointer;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
}

.pagination button:hover {
  background-color: #555;
}

.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal img {
  max-width: 90%;
  max-height: 90%;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #fff;
  font-size: 2em;
  cursor: pointer;
}