.main-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("../images/bg2.png");
  background-position: center;
  background-size: cover;
  padding: 9rem 0 6rem;
}

.form-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 2rem 3rem;
  width: 800px;
  border-radius: 20px;
  background-color: white;
  transition: width 0.4s cubic-bezier(.4,1.4,.6,1), min-height 0.4s cubic-bezier(.4,1.4,.6,1);
  hr {
    color: black;
    opacity: 100%;
    margin: 0;
  }
}

.form-row {
  display: flex;  
  width: 100%;
  gap: 1.5rem;
  label {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-highlight {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200px;
  z-index: 0;
  border-bottom: 4px solid white;
  transition: left 0.35s cubic-bezier(.4,1.4,.6,1), width 0.35s, background 0.2s;
  pointer-events: none;
}

.sidebar-btn {
  font-size: 30px;
  font-weight: lighter;
  font-family: figtree;
  position: relative;
  width: 200px;
  border: none;
  background: none;
  color: white;
  cursor: pointer;
  transition: background 0.2s, color 0.1s;
  z-index: 1;
}

.sidebar-btn.active {
  font-weight: bold;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-control {
  font-size: 1rem;
  color: #333;
  width: 100%;
  height: 3rem;
  background: none;
  border: none;
  border-bottom: 1px solid black;
  border-radius: 0;
  box-sizing: border-box;
  padding: 0;
}

.form-control::placeholder{
  font-size: 1rem;
  font-weight: lighter;
  font-family: figtree;
}

.form-control:focus {
  outline: none;
}

::placeholder {
  color: #888888;
  opacity: 1;
  font-weight: 400;
}

.submit-btn {
  font-size: 1rem;
  font-family: figtree;
  padding: 0.5rem;
  background: var(--green);
  color: white;
  border-radius: 24px;
  border: none;
  box-shadow: 0 2px 8px rgba(8, 37, 103, 0.08);
  transition: background 0.2s;
  margin-top: 1rem;
  cursor: pointer;
}

.submit-btn:hover, .submit-btn:focus {
  color: var(--green);
  background-color: white;
}

.popup-overlay {
  display: none; 
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 80vw;
  overflow: hidden;
  text-align: center;
  box-shadow: 0px 8px 25px rgba(0,0,0,0.2);
  animation: fadeInScale 0.3s ease-in-out;
}

.popup-details {
	display:flex;
	flex-direction:column;
	text-align: left;
    gap: 1rem;
    padding: 1rem 0;
}

.scrollable-message {
  max-height: 200px;
  width: auto;
  overflow: auto; 
}

.popup-close {
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
}

.popup-close:hover {
  color: #000;
}

#popupOk {
  margin-top: 15px;
  padding: 8px 16px;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#popupOk:hover {
  background: #0056b3;
}

.custom-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.custom-popup.success .popup-content { border-left: 6px solid #4CAF50; }
.custom-popup.error .popup-content { border-left: 6px solid var(--orange); }
.custom-popup.info .popup-content { border-left: 6px solid var(--blue); }

.popup-content button {
  margin-top: 15px;
  padding: 8px 16px;
  border: 1px solid transparent;
  background: #0F766E;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: figtree;
}

.popup-content button:hover {
  background: white;
  color:#0F766E;
  border: 1px solid #0F766E;
}

@keyframes fadeInScale {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.form-row input.form-control[type="file"] {
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  color: #333;
}

.form-row input.form-control[type="file"]::-webkit-file-upload-button {
  background: #eaeaea;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  color: #333;
  font-weight: 500;
  cursor: pointer;
}

.form-row input.form-control[type="file"]::file-selector-button {
  background: #eaeaea;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  color: #333;
  font-weight: 500;
  cursor: pointer;
}

.form-row input.form-control {
  flex: 1 1 0;
}

.form-row:last-child {
  flex-direction: column;
  gap: 0;
}

@media (max-width: 950px) {
  .main-wrapper {
    padding: 4rem 1rem 2rem;
  }

  .contactus-container {
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
  }

  .sidebar {
    flex-direction: row;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 1rem;
  }

  .sidebar-highlight {
    width: 150px;
  }

  .sidebar-btn {
    font-size: 20px;
    width: 150px;
  }

  .form-card {
    padding: 2rem;
    width: 75vw;
  }

  form { 
    gap: 1.5rem; 
  }
}

@media (max-width: 546px) {
  .sidebar-btn {
    font-size: 18px;
  }

  .sidebar-highlight {
    width: 120px;
  }

  .sidebar-btn {
    font-size: 18px;
    width: 120px;
  }

  .form-row {
    flex-direction: column;
    gap: 1.5rem;
  }
}