/* Modern Form Styles for IPAC Registration */

/* Performance optimizations */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Prevent horizontal scrolling and white gaps */
html, body {
	width: 100% !important;
	max-width: 100% !important;
	overflow-x: hidden !important;
}

html {
	scroll-behavior: smooth;
	width: 100%;
	height: 100%;
}

/* Modern Gradient Background with Floating Circles */
html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	min-height: 100vh;
	overflow-x: hidden;
}

body {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #667eea 50%, #764ba2 75%, #667eea 100%);
	background-size: 400% 400%;
	background-attachment: fixed;
	background-repeat: no-repeat;
	animation: gradientShift 20s ease infinite;
	position: relative;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	/* Enable hardware acceleration for better performance */
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
}


/* Animated gradient background with smoother transitions */
@keyframes gradientShift {
	0% { 
		background-position: 0% 50%;
		filter: hue-rotate(0deg);
	}
	25% { 
		background-position: 100% 0%;
		filter: hue-rotate(5deg);
	}
	50% { 
		background-position: 100% 100%;
		filter: hue-rotate(0deg);
	}
	75% { 
		background-position: 0% 100%;
		filter: hue-rotate(-5deg);
	}
	100% { 
		background-position: 0% 50%;
		filter: hue-rotate(0deg);
	}
}

/* Enhanced Animated Floating Circles with Better Effects - No Overflow */
body::before, body::after {
	content: '';
	position: fixed;
	border-radius: 50%;
	z-index: -1;
	animation: float 8s ease-in-out infinite;
	backdrop-filter: blur(2px);
	box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
	/* Prevent overflow */
	max-width: 100vw;
	max-height: 100vh;
}

body::before {
	width: 250px;
	height: 250px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 70%);
	top: 5%;
	left: -100px; /* Move further left to prevent right overflow */
	animation-delay: 0s;
	animation-duration: 10s;
}

body::after {
	width: 350px;
	height: 350px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 70%);
	bottom: 5%;
	right: -150px; /* Move further right - but it's negative so it won't cause overflow */
	animation-delay: 5s;
	animation-duration: 12s;
}

/* Additional floating circles for better effect - No Overflow */
.floating-circle {
	position: fixed;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 70%);
	z-index: -1;
	animation: float 9s ease-in-out infinite;
	backdrop-filter: blur(1px);
	box-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
	/* Prevent overflow */
	max-width: 100vw;
	max-height: 100vh;
}

.circle-1 {
	width: 120px;
	height: 120px;
	top: 15%;
	right: 10%; /* Moved away from edge */
	animation-delay: 1s;
	animation-duration: 11s;
}

.circle-2 {
	width: 180px;
	height: 180px;
	top: 65%;
	left: 2%; /* Moved away from edge */
	animation-delay: 6s;
	animation-duration: 13s;
}

.circle-3 {
	width: 90px;
	height: 90px;
	top: 85%;
	right: 30%; /* Moved away from edge */
	animation-delay: 3s;
	animation-duration: 9s;
}

.circle-4 {
	width: 60px;
	height: 60px;
	top: 40%;
	left: 85%; /* Moved away from right edge */
	animation-delay: 7s;
	animation-duration: 14s;
}

.circle-5 {
	width: 130px;
	height: 130px;
	top: 25%;
	left: 45%; /* Centered more */
	animation-delay: 2s;
	animation-duration: 10s;
}

/* Enhanced float animation with more complex movement */
@keyframes float {
	0% { 
		transform: translateY(0px) translateX(0px) rotate(0deg) scale(1); 
		opacity: 0.6;
	}
	25% { 
		transform: translateY(-15px) translateX(10px) rotate(90deg) scale(1.1); 
		opacity: 0.8;
	}
	50% { 
		transform: translateY(-25px) translateX(-5px) rotate(180deg) scale(0.9); 
		opacity: 1;
	}
	75% { 
		transform: translateY(-10px) translateX(-15px) rotate(270deg) scale(1.05); 
		opacity: 0.7;
	}
	100% { 
		transform: translateY(0px) translateX(0px) rotate(360deg) scale(1); 
		opacity: 0.6;
	}
}

/* Modern Form Container */
.container-contact100 {
	padding: 40px 20px;
	background: transparent;
	width: 100%;
	max-width: 100%;
	margin: 0;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

.wrap-contact100 {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 25px;
	box-shadow: 
		0 25px 45px rgba(0, 0, 0, 0.1),
		0 0 0 1px rgba(255, 255, 255, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	width: 85%;
	max-width: 800px;
	margin: 0 auto;
	/* padding: 25px 40px 40px 40px; */
	position: relative;
	/* Add smooth entrance animation */
	animation: formSlideIn 1s ease-out;
}
/**-- Floating Label--*/
.floating-label {
  position: relative;
  margin-bottom: 20px;
}

.floating-label input {
  width: 100%;
  padding: 12px 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}

/* Label default (inside input) */
.floating-label label {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #8d8d8d !important;
  font-size: 0.9rem;
  transition: 0.3s ease all;
  pointer-events: none;
}

/* When input is focused OR has text */
.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
  top: -15px;
  left: 8px;
  font-size: 12px;
  color: #007bff;
  background: #fff;
  padding: 0 4px;
}


/* Form entrance animation */
@keyframes formSlideIn {
	0% {
		opacity: 0;
		transform: translateY(30px) scale(0.95);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* IPAC Logo Styling */
.logo-container {
	text-align: center;
	margin-bottom: 10px;
}

.form-logo {
	max-width: 150px;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
	transition: all 0.3s ease;
	object-fit: contain;
}

.form-logo:hover {
	transform: scale(1.05);
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Modern Form Title */
.form-title {
	/* 
	font-size: 2.5rem;
	font-weight: 700;
	font-family: 'Poppins', sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	
	margin-top: 10px; */
	font-size: 2rem;
    letter-spacing: .125rem;
    font-weight: 600;
    text-transform: uppercase;
	text-align: center;
	margin-bottom:10px;

}

/* Form Groups */
.form-group {
	margin-bottom: 25px;
	position: relative;
}

.form-row {
	display: flex;
	gap: 20px;
}

.form-row .form-group {
	flex: 1;
}

/* Modern Input Styling */
.form-control {
	background: rgba(255, 255, 255, 0.9);
	border: 2px solid rgba(102, 126, 234, 0.2);
	border-radius: 12px;
	padding: 15px 20px;
	font-size: 16px;
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	color: #333;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	width: 100%;
}

.form-control:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	outline: none;
	background: rgba(255, 255, 255, 1);
	transform: translateY(-2px);
}

/* Labels */
.form-label {
	font-family: 'Poppins', sans-serif;
	font-weight: 600;
	color: #4a5568;
	margin-bottom: 8px;
	display: block;
}

.required {
	color: #e53e3e;
}

/* Submit Button */
.btn-submit {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 50px;
	padding: 15px 40px;
	color: white;
	font-family: 'Poppins', sans-serif;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
	width: 100%;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.btn-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
	transform: translateY(0);
}

.btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none !important;
}

/* Add More Button */
.btn-add-more {
	background: linear-gradient(45deg, #48bb78, #38a169);
	border: none;
	border-radius: 25px;
	padding: 8px 20px;
	color: white;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-top: 10px;
}

.btn-add-more:hover {
	background: linear-gradient(45deg, #38a169, #2f855a);
}

.btn-remove {
	background: linear-gradient(45deg, #f56565, #e53e3e);
	border: none;
	border-radius: 25px;
	padding: 8px 15px;
	color: white;
	font-size: 12px;
	cursor: pointer;
	margin-top: 10px;
	margin-left: 10px;
}

/* File Upload Styling */
.file-upload-wrapper {
	position: relative;
	background: rgba(102, 126, 234, 0.05);
	border: 2px dashed rgba(102, 126, 234, 0.3);
	border-radius: 12px;
	padding: 30px;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
}

.file-upload-wrapper:hover {
	border-color: #667eea;
	background: rgba(102, 126, 234, 0.1);
}

.file-upload-wrapper.drag-over {
	border-color: #667eea;
	background: rgba(102, 126, 234, 0.15);
	transform: scale(1.02);
}

.file-upload-text {
	color: #667eea;
	font-weight: 600;
	margin-bottom: 10px;
}

/* Error Styling */
.error {
	color: #e53e3e;
	font-size: 14px;
	margin-top: 5px;
	display: none;
}

.form-control.error-input {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-control.success {
	border-color: #48bb78;
	background: rgba(72, 187, 120, 0.05);
}

/* Dynamic Organisation Fields */
.organisation-group {
	background: rgba(102, 126, 234, 0.05);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 15px;
	position: relative;
	animation: slideIn 0.3s ease-out;
}

.organisation-title {
	font-weight: 600;
	color: #4a5568;
	margin-bottom: 15px;
}

/* Progress Bar */
.progress {
	height: 6px;
	border-radius: 3px;
	background: rgba(102, 126, 234, 0.2);
	margin-top: 20px;
}

.progress-bar {
	background: linear-gradient(90deg, #667eea, #764ba2);
	height: 100%;
	border-radius: 3px;
	transition: width 0.3s ease;
}

/* Improved select styling */
select.form-control {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 16px 12px;
	padding-right: 40px;
}

/* Multi-select dropdown styling */
select[multiple].form-control {
	background-image: none;
	padding-right: 20px;
	height: auto !important;
	min-height: 120px;
}

select[multiple].form-control option {
	padding: 8px 12px;
	margin: 2px 0;
	border-radius: 4px;
}

select[multiple].form-control option:checked {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

/* Animation for form elements */
.form-control {
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Additional animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Better focus indicators for accessibility */
.form-control:focus,
.btn-submit:focus,
.btn-add-more:focus {
	outline: 2px solid rgba(102, 126, 234, 0.5);
	outline-offset: 2px;
}

/* Footer */
footer {
	text-align: center;
	color: rgba(255, 255, 255, 0.8);
	margin: 20px 0;
	font-size: 14px;
}

/* Enhanced Responsive Design with Better Mobile Experience */
@media (max-width: 992px) {
	.floating-circle {
		animation-duration: 15s;
	}
	
	body::before {
		width: 200px;
		height: 200px;
		left: -60px;
	}
	
	body::after {
		width: 280px;
		height: 280px;
		right: -100px;
	}
}

@media (max-width: 768px) {
	.container-contact100 {
		padding: 30px 15px;
		min-height: 100vh;
	}
	
	.form-row {
		flex-direction: column;
		gap: 0;
	}
	
	.wrap-contact100 {
		margin: 0;
		padding: 30px 25px;
		border-radius: 20px;
		max-width: 90%;
	}
	
	.form-title {
		font-size: 2rem;
		margin-bottom: 25px;
	}
	
	.form-logo {
		max-width: 45px;
	}
	
	/* Adjust floating circles for tablets */
	body::before {
		width: 150px;
		height: 150px;
		top: 8%;
		left: -40px;
	}
	
	body::after {
		width: 200px;
		height: 200px;
		bottom: 8%;
		right: -60px;
	}
	
	.circle-1, .circle-2, .circle-3, .circle-4, .circle-5 {
		display: none; /* Hide additional circles on tablets for better performance */
	}
}

@media (max-width: 480px) {
	body {
		background-size: 300% 300%;
	}
	
	.container-contact100 {
		padding: 20px 0px;
		min-height: 100vh;
	}
	
	.wrap-contact100 {
		margin: 0;
		padding: 25px 20px;
		border-radius: 18px;
		box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
		max-width: 95%;
	}
	
	.form-title {
		font-size: 1.6rem;
		margin-bottom: 20px;
		line-height: 1.2;
	}
	
	.form-logo {
		max-width: 40px;
	}
	
	.form-control {
		padding: 14px 16px;
		font-size: 14px;
		border-radius: 10px;
	}
	
	.btn-submit {
		padding: 14px 25px;
		font-size: 15px;
		border-radius: 25px;
	}
	
	/* Mobile optimized floating circles */
	body::before {
		width: 100px;
		height: 100px;
		top: 5%;
		left: -30px;
		animation-duration: 12s;
	}
	
	body::after {
		width: 120px;
		height: 120px;
		bottom: 5%;
		right: -40px;
		animation-duration: 14s;
	}
	
	.file-upload-wrapper {
		padding: 20px;
	}
	
	.organisation-group {
		padding: 15px;
	}
}

@media (max-width: 320px) {
	.container-contact100 {
		padding: 15px 8px;
	}
	
	.wrap-contact100 {
		margin: 0;
		padding: 20px 15px;
		border-radius: 15px;
		max-width: 98%;
	}
	
	.form-title {
		font-size: 1.4rem;
		margin-bottom: 15px;
	}
	
	.form-logo {
		max-width: 35px;
	}
	
	.form-control {
		padding: 12px 14px;
		font-size: 13px;
	}
	
	.btn-submit {
		padding: 12px 20px;
		font-size: 14px;
	}
}

/* Dark mode friendly adjustments */
@media (prefers-color-scheme: dark) {
	.wrap-contact100 {
		background: rgba(30, 30, 30, 0.95);
	}
	
	.form-label {
		color: #e2e8f0;
	}
	
	.form-control {
		background: rgba(45, 45, 45, 0.9);
		color: #e2e8f0;
		border-color: rgba(102, 126, 234, 0.3);
	}
}

/* jQuery Filer overrides for better styling */
.jFiler-theme-default .jFiler-input {
	width: 100% !important;
}

/* SweetAlert overrides */
.sweet-alert fieldset {
	display: none !important;
}

.swal-title {
	font-size: 16px;
}

.swal-text {
	font-size: 14px;
}

/* Select2 Multi-Select Styling */
.select2-container {
	width: 100% !important;
	position: relative;
}

.select2-container--default .select2-selection--multiple {
	background: rgba(255, 255, 255, 0.9);
	border: 2px solid rgba(102, 126, 234, 0.2);
	/* border-radius: 12px; */
	padding: 8px 12px;
	min-height: 50px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.select2-container--default.select2-container--open .select2-selection--multiple {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom: none;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	outline: none;
	background: rgba(255, 255, 255, 1);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 20px;
	color: white;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 12px;
	margin: 3px 5px 3px 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: inline-flex;
	align-items: center;
	line-height: 1;
	height: auto;
	min-height: 24px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	display: none !important;
}



.select2-dropdown {
	background: rgba(255, 255, 255, 0.98);
	border: 1px solid rgba(102, 126, 234, 0.2);
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
	margin-top: 2px;
	z-index: 9999 !important;
}

.select2-container--default.select2-container--open .select2-dropdown {
	border-top: none;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	margin-top: -1px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(102, 126, 234, 0.2);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 14px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
	outline: none;
}

.select2-container--default .select2-results__option {
	padding: 10px 15px;
	font-size: 14px;
	transition: all 0.2s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
	font-weight: 500;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
	background: transparent;
	border: none;
	outline: none;
	font-size: 14px;
	color: #333;
	min-width: 100px;
}

/* Error state for Select2 */
.select2-container--default.error .select2-selection--multiple {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Responsive adjustments for Select2 */
@media (max-width: 768px) {
	.select2-container--default .select2-selection--multiple {
		min-height: 45px;
		padding: 6px 10px;
	}
	
	.select2-container--default .select2-selection--multiple .select2-selection__choice {
		font-size: 12px;
		padding: 4px 10px;
		margin: 2px 3px 2px 0;
	}
	
	.select2-container--default .select2-results__option {
		padding: 8px 12px;
		font-size: 13px;
	}
}

/* Additional positioning fixes for perfect alignment */
.select2-container--default.select2-container--below .select2-selection--multiple {
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 12px;
}

.select2-container--default.select2-container--above .select2-selection--multiple {
	/* border-top-left-radius: 12px;
	border-top-right-radius: 12px; */
}

.select2-dropdown--below {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	margin-top: -1px;
}

.select2-dropdown--above {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: -1px;
}

/* Ensure dropdown appears on top of other elements */
.select2-dropdown {
	position: absolute !important;
}