@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap");

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

body {
  font-family: "Inter", sans-serif;
  background-image: url("/assets/images/redfort.png");
  background-size: cover;
  background-position: center;
  /* background-attachment: fixed; */
  background-repeat: no-repeat;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Light background overlay for better form readability - you can adjust opacity or remove this if not needed */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(0, 0, 0, 0.1); */
  z-index: -1;
}

.navbarhover:hover {
  color: rgb(241, 150, 14) !important;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Enhanced focus styles for keyboard navigation */
input:focus,
select:focus,
textarea:focus,
.submit-btn:focus {
  outline: 3px solid #ff7f00;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255, 127, 0, 0.2);
  border-color: #ff7f00;
  transition: all 0.2s ease;
}

/* Radio button focus enhancement */
input[type="radio"]:focus {
  outline: 3px solid #ff7f00;
  outline-offset: 3px;
}

input[type="radio"]:focus + label {
  background-color: rgba(255, 127, 0, 0.1);
  border-color: #ff7f00;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Main Container */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}

/* Form Card */
.form-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(139, 69, 19, 0.25),
    0 15px 35px rgba(160, 82, 45, 0.15), 0 5px 15px rgba(205, 133, 63, 0.1);
  border: 2px solid rgba(222, 184, 135, 0.4);
  /* border: #d8636f 2px solid; */
  width: 100%;
  max-width: 550px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #8b4513,
    #a0522d,
    #cd853f,
    #deb887,
    #f5deb3,
  );
}

.form-card h1 {
  font-family: "Cinzel", serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.3;
  background: linear-gradient(
    135deg,
    #8b4513 0%,
    #a0522d 25%,
    #cd853f 50%,
    #deb887 75%,
    #8b4513 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-card p {
  text-align: center;
  font-size: 1.2rem;
  color: #654321;
  margin-bottom: 35px;
  font-weight: 500;
}

/* Form Styling */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #654321;
  font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(160, 82, 45, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #a0522d;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(160, 82, 45, 0.15);
  transform: translateY(-1px);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Radio Group Styling */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 0; /* Navbar spacing handled by navbar.css */
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 18px;
  border: 2px solid rgba(160, 82, 45, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  min-height: 60px;
  color: #654321;
}

.radio-option input[type="radio"]:checked + label {
  border-color: #a0522d;
  background: rgba(160, 82, 45, 0.1);
  color: #8b4513;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(160, 82, 45, 0.2);
}

.radio-option label:hover {
  border-color: #a0522d;
  transform: translateY(-1px);
}

/* Conditional Fields */
.conditional-field {
  display: none;
  margin-top: 0; /* Navbar spacing handled by navbar.css */
  padding: 20px;
  background: rgba(160, 82, 45, 0.05);
  border-radius: 12px;
  border-left: 5px solid #a0522d;
}

.conditional-field.show {
  display: block;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.conditional-field .form-group {
  margin-bottom: 15px;
}

.conditional-field .form-group:last-child {
  margin-bottom: 0;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #e68a00, #e0a66c, #e68a00);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0; /* Navbar spacing handled by navbar.css */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(255, 153, 51, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  transform: scaleX(1.09);
  box-shadow: 0 12px 25px rgba(255, 153, 51, 0.4);
  background: linear-gradient(135deg, #e68a00 0%, #cc7a00 100%);
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* Popup Styling */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: white;
  padding: 50px;
  border-radius: 25px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  transform: scale(0.7);
  transition: all 0.4s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.popup-overlay.show .popup {
  transform: scale(1);
}

.popup-message {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #654321;
  margin-bottom: 30px;
}

.popup-close {
  background: #ff9933;
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.popup-close:hover {
  background: #e68a00;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 153, 51, 0.3);
}

/* Error Styling */
.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

.error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0; /* Navbar spacing handled by navbar.css */
  display: none;
  font-weight: 500;
}

.error-message.show {
  display: block;
}

/* Fieldset styling for accessibility */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 600;
  color: #654321;
  font-size: 1rem;
  margin-bottom: 12px;
}

/* Footer Styles */
#footer {
  margin-top: 4rem;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 4rem 0 0;
  position: relative;
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  margin-bottom: 2rem;
}

.footer-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ff9933;
  font-family: "Cinzel", serif;
  position: relative;
  padding-bottom: 10px;
}

.footer-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: #ff9933;
}

.footer-logo {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff9933;
  margin-top: 1rem;
}

.footer-section p {
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-link {
  color: #bbb;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-link:hover {
  color: #ff9933;
  transform: translateX(5px);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  color: #bbb;
}

.footer-contact-item i {
  color: #ff9933;
  width: 20px;
  text-align: center;
}

.social-icons-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #ff9933;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 153, 51, 0.3);
}

.newsletter {
  margin-top: 1.5rem;
}

.newsletter h4 {
  color: #bbb;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.newsletter-form {
  display: flex;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.newsletter-form input::placeholder {
  color: #ccc;
}

.newsletter-form button {
  background: #ff9933;
  color: white;
  border: none;
  padding: 0 1.2rem;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  background: #e67e00;
}

.copyright-section {
  text-align: center;
  padding: 1.5rem 0;
  background: rgba(0, 0, 0, 0.3);
  color: #bbb;
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-card {
    padding: 35px 25px;
    margin: 15px;
  }

  .form-card h1 {
    font-size: 1.7rem;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .popup {
    padding: 35px 25px;
  }

  .form-card {
    padding: 25px 20px;
  }

  .form-card h1 {
    font-size: 1.5rem;
  }
}
