body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f5f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.top-bar {
  background: white;
  padding: 10px 30px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}
.logo {
  height: 50px;
  width: auto;
}

/* Responsive Banner */
.title-banner {
  position: relative;
  width: 100%;
  height: 250px;
  background-image: url('assets/banner.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 4px solid #ffd700;
}

.banner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 11, 69, 0.7);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.banner-content h1 {
  margin: 0;
  color: #ffd700;
  font-size: 36px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
  margin: 10px 0 0 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Container & Cards */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 15px;
  flex: 1; /* Pushes the CSS footer to the very bottom */
}
.form-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 5px solid #2d0b45;
}
.card-title {
  color: #2d0b45;
  font-size: 22px;
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

/* Inputs */
.req { color: #cc0000; }
.input-group { margin-bottom: 15px; }
.input-group label {
  display: block;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
  color: #2d0b45;
}
input[type="text"], input[type="number"], input[type="date"], 
input[type="time"], input[type="tel"], input[type="email"], 
select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  transition: 0.3s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2d0b45;
  box-shadow: 0 0 5px rgba(45, 11, 69, 0.2);
}
#wordCount {
  text-align: right;
  font-size: 12px;
  color: #666;
  font-weight: bold;
  margin-top: 5px;
}

/* Grids */
.input-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.input-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Interactive Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.service-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  border-color: #2d0b45;
}
.service-card.selected {
  border: 3px solid #ffd700;
  background-color: #fdfaf0;
  transform: scale(1.02);
}
.service-card h3 { margin: 0 0 10px 0; color: #2d0b45; font-size: 16px; }
.service-card .price { color: #b30000; font-weight: bold; font-size: 18px; margin: 0 0 10px 0; }
.service-card .desc { font-size: 13px; color: #666; margin: 0; line-height: 1.4; }

/* Dynamic Details Container */
.dynamic-details {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px dashed #ccc;
  margin-top: 20px;
}
.card-subtitle {
  color: #2d0b45;
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Payment Instructions */
.payment-instructions {
  background-color: #fffbe6;
  border-left: 5px solid #ffd700;
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 25px;
}
.payment-instructions h4 { margin: 0 0 10px 0; color: #333; }
.payment-instructions .upi { font-size: 18px; margin: 0 0 10px 0; }
.payment-instructions .upi span { color: #2d0b45; font-weight: bold; }
.payment-instructions p { margin: 0; font-size: 14px; color: #555; line-height: 1.5; }
#uploadStatus { color: #28a745; font-weight: bold; font-size: 13px; margin-top: 5px; }

/* Declaration & Submit */
.declaration-group { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.declaration-group input { margin-top: 4px; transform: scale(1.2); cursor: pointer; }
.declaration-group label { font-weight: bold; color: #333; font-size: 15px; cursor: pointer; }

#submitBtn {
  width: 100%; padding: 15px; background-color: #c4c4c4; color: white;
  border: none; border-radius: 6px; font-size: 18px; font-weight: bold;
  cursor: not-allowed; transition: 0.3s;
}
#submitBtn.active { background-color: #2d0b45; cursor: pointer; }
#submitBtn.active:hover { background-color: #421466; }

.error-highlight { border: 2px solid #cc0000 !important; box-shadow: 0 0 5px rgba(204, 0, 0, 0.3) !important; }
#formError { color: #cc0000; font-weight: bold; text-align: center; display: none; }

/* Mobile Responsive Breakpoints */
@media(max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .title-banner h1 { font-size: 32px; }
}

@media(max-width: 768px) {
  .top-bar { 
    justify-content: flex-start;
    padding: 10px 15px; 
  } 
  .title-banner { 
    height: 160px; /* Adjusted height so it doesn't leave gaps */
    background-size: 100% 100%; /* Forces the image to completely fill the space */
    background-position: center;
    background-repeat: no-repeat;
  }
  .title-banner h1 { font-size: 24px; }
  .title-banner p { font-size: 16px; }
  .form-card { padding: 20px 15px; }
  .input-grid-3, .input-grid-2, .services-grid { grid-template-columns: 1fr; }
}

/* Footer Implementation purely through CSS */
body::after {
  content: "For any issue contact: +91 8617827552 | Email: tsastrologgy@gmail.com | Website: https://ts-astrologgy.netlify.app/ \A \A © 2026 TS Astrologgy. All Rights Reserved.";
  white-space: pre-wrap;
  display: block;
  background-color: #2d0b45;
  color: #ffffff;
  text-align: center;
  padding: 25px 20px;
  font-size: 14px;
  line-height: 1.8;
  border-top: 4px solid #ffd700;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}