html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(0, 0%, 95%);
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  overflow-x: hidden;
}

/* ================= HEADER ================= */

.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: white;
  position: sticky; 
  top: 0; 
  z-index: 1000;
}

.top-button {
  display: none;
}

/* Hamburger */
.menu-btn {
  width: 40px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2000;
}

.menu-btn span {
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================= MOBILE MENU ================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 99;
}

.mobile-menu ul {
  background: white;
  list-style: none;
  padding: 20px 60px;
  width: 80%;
  border-radius: 6px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.mobile-menu li {
  margin: 20px 0;
}

.mobile-menu a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  font-weight: 500;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu.active ul {
  transform: scale(1);
}

.blog-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  margin: 20px;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-title {
  font-size: 1.2rem;
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 5px;
}
.blog-excerpt {
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1;
}

.blog-author {
  font-size: 0.85rem;
  color: #888;
}
.blog-authors{
  font-size: 13px;
  text-decoration: none !important;
  cursor: pointer;
  color: inherit !important;
}
.blog-date {
  font-size: 0.85rem;
  color: #888;
  text-align: right;
}
/* ================= BLOG HEADER ================= */

.blog-hero {
  text-align: left;
  padding: 60px 20px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.blog-hero h1 {
  font-size: 2.4rem;
  color: hsl(233, 26%, 24%);
  margin-bottom: 15px;
}

.blog-hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  background: linear-gradient(
    135deg,
    hsl(136, 40%, 22%),
    hsl(192, 69%, 51%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= BLOG FILTERS ================= */

.blog-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid hsl(231, 8%, 69%);
  background: transparent;
  color: hsl(233, 26%, 24%);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 5px;
}

.filter-btn:hover {
  background: hsl(233, 26%, 24%);
  color: white;
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  color: white;
  border: none;
}
.filter-btn.active:hover {
  filter: brightness(0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.footer {
  background-color: hsl(233, 26%, 24%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 40px 20px;
  align-items: center;
}
.footer .logos{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-direction: row;
  align-items: center;
}
.footer p{
  color: hsl(0, 0%, 69%);
}
.footer button {
  padding: 10px 24px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* ================= INVITE MODAL ================= */

.invite-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.invite-modal.active {
  display: flex;
}

/* Dark background */
.invite-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* Modal box */
.invite-content {
  position: relative;
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  z-index: 1;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Close button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Form */
.invite-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.invite-form input {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.invite-form button,.top-button {
  padding: 12px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* Slightly darken and lift the Request Invite button on hover */
.top-button:hover,
.invite-form button:hover{
  transform: translateY(-2px);
  filter: brightness(0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* ================= PAGE LOAD ANIMATIONS ================= */

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= BLOG HERO ================= */
.blog-hero h1 {
  opacity: 0;
  animation: slideInUp 0.8s forwards;
  animation-delay: 0.3s;
}

.blog-hero p {
  opacity: 0;
  animation: slideInUp 0.8s forwards;
  animation-delay: 0.6s;
}

/* ================= BLOG CARDS ================= */
.blog-card {
  opacity: 0;
  animation: slideInUp 0.6s forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.2s; }
.blog-card:nth-child(2) { animation-delay: 0.4s; }
.blog-card:nth-child(3) { animation-delay: 0.6s; }
.blog-card:nth-child(4) { animation-delay: 0.8s; }
.blog-card:nth-child(5) { animation-delay: 1s; }
.blog-card:nth-child(6) { animation-delay: 1.2s; }

/* ================= FILTER BUTTONS ================= */
.filter-btn {
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}

.filter-btn:nth-child(1) { animation-delay: 0.2s; }
.filter-btn:nth-child(2) { animation-delay: 0.3s; }
.filter-btn:nth-child(3) { animation-delay: 0.4s; }
.filter-btn:nth-child(4) { animation-delay: 0.5s; }

/* ================= FOOTER ================= */
.footer {
  opacity: 0;
  animation: slideInUp 0.8s forwards;
  animation-delay: 0.5s;
}

/* ================= HOVER MICRO ANIMATIONS ================= */
.blog-card:hover {
  transform: translateY(-5px) scale(1.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer button:hover {
  transform: translateY(-3px) scale(1.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}



@media (min-width: 904px) {
  .menu-btn {
    display: none;
  }

  .top-button {
    display: block;
  }

  .mobile-menu {
    position: static;
    background: none;
    opacity: 1;
    pointer-events: auto;
    padding: 0;
  }

  .mobile-menu ul {
    display: flex;
    gap: 30px;
    padding: 0;
    width: auto;
    transform: none;
  }

  .mobile-menu li {
    margin: 0;
  }

  .mobile-menu a {
    color: hsl(231, 8%, 69%);
    font-size: 16px;
  }

  .mobile-menu a:hover {
    color: hsl(233, 26%, 24%);
  }
  
  /* Desktop: use CSS Grid to limit cards to max 3 per row */
  #blog-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
  }

  /* Remove individual card margins on desktop so grid gap controls spacing */
  .blog-card {
    margin: 0;
  }

}