/* Membership page styles */
.membership-header {
  position: relative;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/assests/contact.png');
  background-size: cover;
  background-position: center;
  padding: 80px 0;
  color: white;
  text-align: center;
}

/* Form styles */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-row .form-field {
  flex: 1;
}

.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.membership-header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.membership-breadcrumb {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.membership-breadcrumb a {
  color: white;
  opacity: 0.8;
}

.membership-breadcrumb a:hover {
  opacity: 1;
}

/* Main content styles */
.membership-container {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.membership-section {
  margin-bottom: 80px;
}

.section-tag {
  background: linear-gradient(180deg, #ED8A29 0%, #C32D2E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* For Firefox */
  color: #ED8A29;
  /* fallback */
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 15px;
  display: block;
  position: relative;
  padding-left: 30px;
}

.section-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  width: 20px;
  background: linear-gradient(180deg, #ED8A29 0%, #C32D2E 100%);
  -webkit-text-fill-color: transparent;
  background-color: #ED8A29;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  line-height: 1.2;
}

.join-cultural-family {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 30px;
}

.join-cultural-text {
  max-width: 500px;
}

.join-cultural-text p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
}

.image-single {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    align-self: start;
    margin-top: -80px; /* Move image slightly up */
}

.image-single img {
    max-width: 450px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Benefits section */
.benefits-section {
  background: linear-gradient(180deg, rgba(237, 138, 41, 0.1) 0%, rgba(195, 45, 46, 0.1) 100%);
  padding: 60px 0;
  margin: 80px 0;
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.benefits-title {
  text-align: center;
  margin-bottom: 50px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  /* No gap between cards */
}

.benefit-card {
  /* background: linear-gradient(180deg, rgba(237, 138, 41, 0.1) 0%, rgba(195, 45, 46, 0.1) 100%); */
  /* border-radius: 10px; */
  padding: 30px;
  text-align: center;
  /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: none;
  transition: transform 0.3s ease;
}

/* Vertical separator line with gradient */
.benefit-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  height: 60%;
  width: 1px;
  background: linear-gradient(180deg, #ED8A29 0%, #C32D2E 100%);
  opacity: 0.8;
}

/* Add hover effect */
.benefit-card:hover {
  transform: translateY(-5px);
}

.benefit-icon {
  color: #ED8A29;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.benefit-card h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.benefit-card p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Join form section */
.join-form-section {
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.join-form-title {
  text-align: center;
  margin-bottom: 40px;
}

.join-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field input,
.textarea-container textarea {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
  background-color: #fff;
}

.form-field input:focus,
.textarea-container textarea:focus {
  border-color: #ED8A29;
  box-shadow: 0 0 0 2px rgba(237, 138, 41, 0.1);
}

.form-field input::placeholder,
.textarea-container textarea::placeholder {
  color: #999;
}

/* Bottom container for textarea, checkbox and submit button */
.form-bottom-container {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.textarea-container {
  width: 100%;
}

.textarea-container textarea {
  resize: vertical;
  min-height: 120px;
  border-radius: 25px;
  width: 100%;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-checkbox {
  display: flex;
  align-items: center;
}

.form-checkbox input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #ED8A29;
}

.form-checkbox label {
  color: #666;
  font-size: 0.9rem;
}

.submit-button {
  background: linear-gradient(135deg, #ED8A29, #C32D2E);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  box-shadow: 0 4px 10px rgba(237, 138, 41, 0.3);
}

.submit-button i {
  margin-left: 10px;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(237, 138, 41, 0.4);
}

.submit-button:disabled {
  background: linear-gradient(135deg, #cccccc, #999999);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

.reset-button {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.reset-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
  text-decoration: none;
  color: white;
}

/* Media query for large screens - layout from the image */
@media (min-width: 768px) {
  .form-bottom-container {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .textarea-container {
    grid-column: 1;
    grid-row: 1;
  }

  .form-actions {
    grid-column: 2;
    grid-row: 1;
    padding-left: 20px;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 10px;
  }

  .form-checkbox {
    margin-bottom: 20px;
  }

  .submit-button {
    margin-top: auto;
  }

  /* Ensure grid layout for the form is two columns on larger screens */
  .join-form {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .image-single {
    flex-direction: column-reverse;
    align-items: center;
  }
}

/* Responsive styles */
@media (max-width: 992px) {
  .join-cultural-family {
    display: flex;
    flex-direction: column-reverse; /* Image first, then text */
    gap: 30px;
  }

  .image-single {
    margin-top: 0; /* Reset margin on mobile */
  }

  .join-cultural-text {
    max-width: 100%;
    /* Text appears after images on tablet/mobile */
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  /* Adjust benefit cards for tablet */
  .benefit-card {
    padding: 25px;
  }

  /* Update separators for 2-column layout */
  .benefit-card:nth-child(2n)::after {
    display: none;
    /* Remove separator after every 2nd item */
  }

  /* Add bottom separator for top row */
  .benefit-card:nth-child(1)::before,
  .benefit-card:nth-child(2)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, #ED8A29 0%, #C32D2E 100%);
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .join-cultural-family {
    display: block;
  }

  .form-field {
    grid-column: 1 / -1;
    margin-bottom: 16px;
  }

  .form-field.full-width {
    grid-column: span 1;
  }

  /* Bottom container for form goes to single column */
  .form-bottom-container {
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
  }

  /* Actions also stack vertically */
  .form-actions {
    padding-left: 0;
    margin-top: 16px;
  }

  .form-checkbox {
    margin-top: 0;
    margin-bottom: 16px;
  }

  .submit-button {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .membership-header {
    padding: 60px 0;
  }

  .membership-header h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 0;
    /* No gap between cards */
  }

  /* Adjust benefit cards for mobile */
  .benefit-card {
    padding: 20px 25px;
  }

  /* Update separators for single column layout */
  .benefit-card::after {
    display: none;
    /* Remove vertical separators */
  }

  /* Add horizontal separator below each card except the last one */
  .benefit-card:not(:last-child)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, #ED8A29 0%, #C32D2E 100%);
  }

  /* Further refine form on small screens */
  .join-form {
    gap: 12px;
  }

  .form-field {
    margin-bottom: 12px;
  }

  .form-field input,
  .textarea-container textarea {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .form-bottom-container {
    gap: 12px;
  }

  .textarea-container textarea {
    min-height: 100px;
  }

  .join-form-section {
    padding: 0 15px;
    margin-bottom: 50px;
  }

  .form-actions {
    margin-top: 12px;
  }

  .submit-button {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  /* Grid rows are already defined above */

  .membership-section {
    margin-bottom: 50px;
  }

  .benefits-section {
    padding: 40px 0;
    margin: 50px 0;
  }
}

/* Extra small devices */
@media (max-width: 360px) {

  .form-field input,
  .textarea-container textarea {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .textarea-container textarea {
    min-height: 80px;
  }

  .form-checkbox label {
    font-size: 0.85rem;
  }

  .submit-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .join-form-section {
    padding: 0 10px;
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .benefit-card {
    padding: 20px;
  }
}