/* Page fade animation - THIS IS THE USUAL CRIMINAL */



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #0c1b23 0%, #112e3a 100%);
  color: #d0ece7;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;

  opacity: 0;
  transition: opacity .6s ease;
  overflow: hidden;
  
}



body.fade-in {
  opacity: 1;
}


/* Main Layout */
main {
  padding: 40px 0;
  text-align: center;
}






.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Main Content */
main {
  padding: 40px 0;
  text-align: center;
}

.hero-text h1 {
  font-size: 42px;
  line-height: 1.3;
  margin-bottom: 15px;
}

.hero-text strong {
  color: #00bfa5;
}

.hero-text p {
  font-size: 18px;
  opacity: 0.9;
}

.search-bar {
  position: relative;
  max-width: 600px;
  margin: 30px auto;
}

.search-bar i {
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
}

.search-bar input {
  width: 100%;
  padding: 18px 20px 18px 60px;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 16px;
}

.search-bar input::placeholder {
  color: #aaa;
}

.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.filter-btn {
  background: rgba(0, 191, 165, 0.25);
  border: none;
  color: #c8fff4;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: #00bfa5;
  color: white;
}

#sortSelect {
  background: rgba(0, 191, 165, 0.25);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;

}

.create-post {
  background: #00bfa5;
  color: var(--bg-dark);
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
   display: inline-block;
  text-decoration: none; 

}

.create-post:hover {
  background-color: #00bfa6e4;
  
  text-decoration: none;   /* ensures underline never appears */
}

/* Posts Grid */
.posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, 400px);
  justify-content: center;
  gap: 30px 30px;
  /* This creates 30px between cards */
  padding: 20px 20px;
  /* Optional: keeps cards from touching screen edge */
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: #2B5159;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
  width: 400px;
  height: 500px;

  padding: 0;
  margin: 0;
}

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

.card img {
  width: 100%;
  height: 226px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-content {
  width: 100%;
  height: calc(500px - 226px);
  /* 500px card height - 226px image */
  padding: 20px;
  padding-top: 5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag {
  display: inline-block;
  background: #00bfa5;
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  margin-bottom: 8px;
}

.tag-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tag-date-row .date {
  font-size: 13px;
  color: #a0d8d2;
  opacity: 0.9;
  margin-bottom: 0;
  /* override any previous margin */
}



.card h3 {
  font-size: 18px;
  margin: 10px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  /* show only  lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}



.card p {
  font-size: 14px;
  line-height: 1.3;
  /* important for consistent 3-line height */
  display: -webkit-box;        /* Flexbox-like layout for multiline clamp */
  -webkit-box-orient: vertical; 
  -webkit-line-clamp: 3;       /* Show only 3 lines */
  overflow: hidden;             /* Hide extra text */
  text-overflow: ellipsis; 
  text-align: left;
  margin-bottom: -5px;
  color: #b8e6e0;
  opacity: 0.95;
}

.progress-container {
  position: relative;
  margin: 10px 0;


}

.progress {
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #00bfa5, #00e0c0);
  border-radius: 8px;
  transition: width 0.8s ease;
}

/* Goal amount - top right, exactly like your image */
.goal-amount {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #00bfa5;
  text-align: right;
  color: #b8e6e0;

}

/* Raised amount - bottom left */
.raised-amount {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #00bfa5;
  text-align: left;
}

.amounts {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: px;
  font-weight: bold;
}

.actions {
  display: flex;
  gap: 10px;
}

.actions button {
  flex: 1;
  padding: 12px;

  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  width: 175px;
}


/* =========================
   Base Styles
   ========================= */
.donate-btn {
  background: #00bfa5;
  color: white;
  border: none;
  flex: 1;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  width: 175px;
  

  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.view-btn {
  background: #2B5159;
  color: white;
  border: 1px solid #00bfa5;
  flex: 1;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  width: 175px;


  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.donate-btn:visited, 
.view-btn:visited {
    color: white;
}

.donate-btn:hover, 
.view-btn:hover {
    text-decoration: none;
    color: white;
    opacity: 0.9; 
}

.donate-btn:active, 
.view-btn:active {
    color: white;
    transform: translateY(1px);
}