/* ===== Layout Base ===== */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f6f6fb;
  color: #333;
  margin: 0;
  padding: 0;
}
.title {

	margin-left: auto;
	margin-right: auto;
	margin-top: 25px;
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
}
.title h2{

	font-size: 2vw;
	text-align: center
	
}
.card-title h1{
	
	text-align: center;
	font-size: 1.2vw;
}
/* ===== Two Column Page ===== */
.raffle-page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== Left Side (Title + Gallery) ===== */
.raffle-content h1 {
  color: #4b0082;
  margin-top: 0;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.raffle-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ===== Gallery ===== */
.raffle-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
  justify-items: center;
}

.raffle-gallery a {
  display: block;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
	line-height: 0;  /* critical: kills baseline spacing */
}

.raffle-gallery a:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.raffle-gallery img.raffle-thumb {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

/* ===== Video (optional) ===== */
.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-top: 1.5rem;
}

/* ===== Right Sidebar (Buy Tickets Form) ===== */
.raffle-sidebar {
  background: #CDDDF1;
  border-left: 4px solid #104C84;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
  height: fit-content;
  align-self: start;
  position: sticky;
  top: 2rem; /* stays visible while scrolling */
}

.raffle-sidebar h2 {
  color: #001D82;
  text-align: center;
  margin-top: 0;
  font-size: 1.4rem;
}

.raffle-sidebar form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.raffle-sidebar label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #333;
}

.raffle-sidebar input {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-top: 4px;
}

.raffle-sidebar button {
  margin-top: 1rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, #104C84, #007acc);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
}

.raffle-sidebar button:hover {
  background: linear-gradient(135deg, #007acc, #104C84);
  transform: scale(1.02);
}
/* === Ticket Info Box === */
.ticket-info {
  background: #fff;
  border: 2px solid #e2d7f7;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ticket-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #104C84;
  margin: 0;
}

.ticket-remaining {
  font-size: 1rem;
  font-weight: 600;
  color: #b30000;
  margin-top: 0.4rem;
}

.ticket-soldout {
  font-size: 1.1rem;
  font-weight: 700;
  color: #b30000;
  background: #ffe5e5;
  border-radius: 8px;
  padding: 0.6rem;
  margin-top: 0.6rem;
}

/* ===== Responsive Layout ===== */
@media (max-width: 900px) {
  .raffle-page {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }

  .raffle-sidebar {
    position: static;
    border-left: none;
    border-top: 3px solid #4b0082;
    margin-top: 2rem;
  }
}
.success-message, .error-message {
  max-width: 600px;
  margin: 3rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.success-message h2 { color: #4b0082; }
.error-message h2 { color: #b30000; }

.raffle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* auto-fit fixes empty space */
  gap: 30px;
  justify-content: center;        /* centers grid items when there's extra space */
  align-items: start;
  max-width: 1200px;              /* contain it neatly */
  margin: 50px auto;              /* center horizontally */
  padding: 0 20px;                /* prevent side cutoff on mobile */
  box-sizing: border-box;
}

/* Card styling (refined for alignment and consistent sizing) */
.raffle-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 485px;
	max-width: 365px;
}

.raffle-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.raffle-thumb {
  width: 100%;
  height: 220px; /* Adjust this height to taste */
  object-fit: contain; /* ⬅️ shows full image without cutting */
  object-position: center center;
  background-color: #f4f4f8; /* neutral bg behind transparent or smaller images */
  display: block;
}

.raffle-card h2 {
  font-size: 1.3rem;
  color: #333;
  margin: 10px 0 5px;
}

.raffle-card p {
  padding: 0 15px;
  color: #666;
  font-size: 0.95rem;
  flex-grow: 1;
}

.raffle-info {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #4a148c;
}

.raffle-card a {
  display: block;
  background: #104C84;
  color: #fff;
  text-decoration: none;
  padding: 12px 0;
  border-radius: 0 0 12px 12px;
  transition: background 0.2s;
}

.raffle-card a:hover {
  background: #007acc;
}

.raffle-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}
.raffle-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a148c;
}

.raffle-info .price {
  background: #ede7f6;
  padding: 5px 10px;
  border-radius: 6px;
	margin-left: 5px;
	
}

.raffle-info .remaining {
  background: #f3e5f5;
  padding: 5px 10px;
  border-radius: 6px;
	margin-right: 5px;
}
/* --- Fix portrait thumbnails cutting off --- */
.raffle-thumb {
  width: 100% !important;
  height: auto !important;
  max-height: 280px !important;
  object-fit: contain !important;  /* ensure full image visible */
  object-position: center center !important;
  display: block;
  background-color: #f4f4f8 !important;
  border-bottom: 1px solid #ddd;
}
/* --- Fix portrait thumbnails cutting off --- */
.raffle-thumb {
  width: 100% !important;
  height: auto !important;
  max-height: 280px !important;
  object-fit: contain !important;  /* ensure full image visible */
  object-position: center center !important;
  display: block;
  background-color: #f4f4f8 !important;
  border-bottom: 1px solid #ddd;
}
/* --- Fix bottom white line / alignment gap --- */
.raffle-thumb {
  display: block;              /* removes inline baseline gap */
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background-color: #f4f4f8;
  border: none;
  margin: 0;
  padding: 0;
  vertical-align: middle;      /* ensures no descender gap */
}
.raffle-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.raffle-gallery img {
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  background-color: #fafafa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.raffle-gallery img:hover {
  transform: scale(1.05);
}

.raffle-description {
  text-align: center;
  max-width: 800px;
  margin: 20px auto 40px;
  font-size: 1.05rem;
  color: #444;
  line-height: 1.6;
}
/* === Fundraiser description card === */
.raffle-description-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 30px 40px;
  max-width: 850px;
  margin: 30px auto 50px;
  text-align: left;
  line-height: 1.7;
  color: #333;
  border-top: 4px solid #104C84;
}

.raffle-description-card h2 {
  text-align: center;
  font-size: 1.5rem;
  color: #4a148c;
  margin-bottom: 15px;
  font-weight: 600;
}

.raffle-description-card p {
  font-size: 1.05rem;
  margin-bottom: 0;
  white-space: pre-line;
}
.raffle-description-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.raffle-description-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
/* Footer */
footer {
  background: #104C84;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  transition: background 0.5s;
}
footer a { color: #aad4ff; text-decoration: none; }
footer a:hover { text-decoration: underline; }
