/* ==============================
   Base Styles
   ============================== */
body {
  font-family: Georgia, serif;           /* Elegant serif for readability */
  max-width: 800px;                      /* Constrain width for comfortable reading */
  margin: 2rem auto;                     /* Center content */
  padding: 1rem;                         /* Inner padding */
  line-height: 1.6;                      /* Comfortable line height */
  background: #fdfcf7;                   /* Soft parchment-like background */
  color: #333;                           /* Dark grey text for contrast */
}

header {
  text-align: center;                    /* Center blog title & description */
  margin-bottom: 2rem;                   /* Space between header and content */
}

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

header h1 a:hover {
    color: inherit;
    text-decoration: none;
}

h1 {
  font-size: 2.5rem;                     /* Large blog title */
  margin-bottom: 0.2rem;                 /* Small gap before subtitle */
}

/* ==============================
   Hyperlinks
   ============================== */
a {
  text-decoration: none;
  color: #333;
  transition: color 0.25s ease, text-decoration 0.25s ease;
}

a:hover {
  color: #5f6db3;                        /* Accent hover color */
  text-decoration: underline;
}

/* ==============================
   Navigation Links
   ============================== */
nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #333;
}

nav a:hover {
  color: #5f6db3;
  text-decoration: underline;
}

/* ==============================
   Footer Styles
   ============================== */
footer {
  text-align: center;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: #777;
}

footer a {
  text-decoration: none;
  color: #333;
  margin: 0 0.3rem;
}

footer a:hover {
  color: #5f6db3;
  text-decoration: underline;
}

/* Optional: spacing for first footer link */
footer p a:first-child {
  margin-right: 0.6rem;
}

/* ==============================
   Social Icon Styling
   ============================== */
.social-icons a {
  text-decoration: none;
  margin: 0 8px;
  color: #333;
  font-size: 1.2rem;
  transition: color 0.2s ease-in-out;
}

.social-icons a:hover {
  color: #5f6db3;
  text-decoration: none; /* icons never underlined */
}

.social-icons i {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: normal;
  vertical-align: middle;
}

/* ==============================
   Articles / Blog Posts
   ============================== */
/* ❌ Disabled old article block so it doesn't interfere with card layout
   (kept here in comments for reference)
*/
/*
article {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

article h2, article h3 {
  margin: 0;
}

article h2 {
  font-size: 1.8rem;
}

article h3 {
  font-size: 1.5rem;
}

article p {
  margin: 0.5rem 0;
}
*/

/* Links inside post previews */
#post-list a {
  color: #333;
  text-decoration: none;
}

#post-list a:hover {
  color: #5f6db3;
  text-decoration: underline;
}

/* ==============================
   Featured Images
   ============================== */
#post-list .post-featured img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Full post page images */
.post-featured-post img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==============================
   Pagination Styles
   ============================== */
#pagination {
  text-align: center;
  margin-top: 2rem;
}

#pagination button {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  color: #333;
  padding: 0.4rem 0.8rem;
  margin: 0 0.3rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s;
}

#pagination button:hover:not(:disabled) {
  background-color: #5f6db3;
  color: #fff;
}

#pagination button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ==============================
   Back to Page Link Styling
   ============================== */
/* ✅ Kept only one version of .back-link (removed duplicate) */
.back-link {
  display: inline-block;
  margin: 1rem 0;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s, text-decoration 0.2s;
}

.back-link:hover {
  color: #5f6db3;
  text-decoration: underline;
}

/* ==============================
   Post Cards Grid
   ============================== */
#post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* cards stretch evenly */
}

.post-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

/* Featured image at top */
.post-card .post-featured img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Text spacing */
.post-card h3,
.post-card p {
  padding: 0 1rem;
}

.post-card h3 {
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  flex-shrink: 0;
}

/* Excerpt clamped to 3 lines */
.post-card p {
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;            /* pushes "Read more" down */
}

/* Keep Read More link pinned */
.post-card p:last-child {
  flex-grow: 0;
}

/* About page team members */

.team {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem auto;
  text-align: center;
}

.team-member {
  flex: 1;
  max-width: 300px;
}

.profile-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem;
}

.team-member h3 {
  margin: 0.5rem 0;
}

.team-member p {
  text-align: left;
}

/* Mobile */
@media (max-width: 600px) {
  .team {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .team-member {
    max-width: 100%;
  }
}
