/* ===========================
   CONTACT SECTION
   =========================== */

#contact-title {
	font-size: 4.5rem;
	text-align: center;
	margin-bottom: 50px;
}

#contact-description {
	margin-bottom: 70px;
	text-align: center;
}

.contact {
	background: var(--secondary-color);
}

.contact-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.contact-info h3 {
	font-size: 1.8rem;
	margin-bottom: 20px;
	text-align: center;
}

.contact-info p {
	opacity: 0.9;
	text-align: center;
}

.contact-details {
	margin-top: 30px;
}

.outlined-box {
	color: var(--font-color);
	padding: 40px;
	border-radius: 10px;
	backdrop-filter: blur(10px);
	border: var(--main-border);
}

.parent-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	/* <-- required for ellipsis inside flex */
}

.parent-container p {
	min-width: 0;
}


.form-group {
	margin-bottom: 20px;
}

.form-control {
	width: 100%;
	padding: 15px;
	border: none;
	border-radius: 5px;
	background: #dfeaf3;
	border: #afd4f1 2px solid;
	transition: var(--transition);
	font-family: 'Georgia', serif;
}

.form-control:focus {
	outline: none;
	border-color: var(--secondary-color);
	background: rgba(255, 255, 255, 0.6);
}

.form-control::placeholder {
	color: rgba(0, 0, 0, 0.7);
	font-family: 'Georgia', serif;
}

textarea.form-control {
	min-height: 150px;
	resize: vertical;
}

.contact-item {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
}

.contact-card {
	box-shadow: var(--card-shadow);
}

.contact-icon {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 15px;
	font-size: 20px;
	flex-shrink: 0;
}

/* File Upload Styles */
.file-upload-wrapper {
	position: relative;
	margin-bottom: 10px;
}

.file-upload-input {
	position: absolute;
	left: -9999px;
	opacity: 0;
	pointer-events: none;
}

.file-upload-area {
	display: block;
	padding: 20px;
	border: 2px dashed rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	text-align: center;
	cursor: pointer;
	color: var(--font-color);
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.05);
	user-select: none;
}

.file-upload-area:hover {
	border-color: rgba(0, 0, 0, 0.6);
	background: rgba(255, 255, 255, 0.1);
}

.file-upload-area.dragover {
	border-color: var(--secondary-color);
	background: rgba(52, 152, 219, 0.2);
}

.file-upload-text {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	color: var(--font-color);
}

.file-upload-hint {
	display: block;
	font-size: 0.85rem;
	opacity: 0.8;
	color: var(--font-color);
	line-height: 1.4;
}

.file-preview {
	display: none;
	margin-top: 24px;
	padding: 15px;
	border-radius: 6px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: all 0.6s ease-out;
}

.file-preview.active {
	max-height: 500px;
	opacity: 1;
	display: block;
}

.file-preview-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	border-radius: 6px;
	margin-bottom: 8px;
	transition: all 0.3s ease;
	opacity: 0;
	transform: translateY(10px);
	animation: slideInItem 0.5s ease forwards;
}

.file-preview-item:nth-child(1) {
	animation-delay: 0.1s;
}

.file-preview-item:nth-child(2) {
	animation-delay: 0.2s;
}

.file-preview-item:nth-child(3) {
	animation-delay: 0.3s;
}

.file-preview-item:nth-child(4) {
	animation-delay: 0.4s;
}

.file-preview-item:nth-child(5) {
	animation-delay: 0.5s;
}

@keyframes slideInItem {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.file-preview-item:last-child {
	margin-bottom: 0;
}

.file-preview-item:hover {
	background: rgba(255, 255, 255, 0.15);
}

.file-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.file-icon {
	font-size: 1.2rem;
	flex-shrink: 0;
}

.file-details {
	min-width: 0;
	flex: 1;
}

.file-name {
	font-weight: 500;
	color: var(--font-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 2px;
}

.file-size {
	font-size: 0.8rem;
	opacity: 0.7;
	color: var(--font-color);
}

.remove-file {
	background: none;
	border: none;
	color: rgba(0, 0, 0, 0.7);
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 4px;
	transition: all 0.3s ease;
	flex-shrink: 0;
	margin-left: 10px;
}

.remove-file:hover {
	color: var(--accent);
}

.file-count {
	margin-top: 10px;
	font-size: 0.9rem;
	color: rgba(0, 0, 0, 0.8);
	text-align: center;
	opacity: 0;
	animation: fadeIn 0.5s ease 0.6s forwards;
}

@keyframes fadeIn {
	to {
		opacity: 1;
	}
}

/* Message Container - Fixed height to prevent layout shifts */
.form-messages-container {
	display: none;
	margin-top: 20px;
	min-height: 0;
	transition: min-height 0.3s ease;
	overflow: hidden;
}

.message {
	padding: 15px 20px;
	border-radius: 7px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 12px;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: all 0.8s ease-out;
	transform: translateY(-10px);
}

.message.show {
	opacity: 1;
	max-height: 100px;
	transform: translateY(0);
}

.message.success {
	background: linear-gradient(135deg, #27ae60, #229954);
	color: white;
	border-left: 4px solid #1e8449;
}

.message.error {
	background: linear-gradient(135deg, #e74c3c, #c0392b);
	color: white;
	border-left: 4px solid #a93226;
}

.message i {
	font-size: 1.2rem;
}

/* Loading state */
#submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.btn-loading .fa-spin {
	animation: spin 1s linear infinite;
}

.btn-loading {
	display: none;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.file-upload-area {
		padding: 15px;
	}

	.file-upload-text {
		font-size: 0.95rem;
	}

	.file-upload-hint {
		font-size: 0.8rem;
	}

	.file-preview {
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		padding: 0;
		display: block;
		background: rgba(255, 255, 255, 0.08);
		border-radius: 8px;
		margin-top: 15px;
	}

	.file-preview.active {
		max-height: min(60vh, 400px);
		/* Flexible height with maximum */
		opacity: 1;
		padding: 15px;
		overflow-y: auto;
		/* Scroll if content overflows */
		-webkit-overflow-scrolling: touch;
		/* Smooth scrolling on iOS */
	}

	.file-preview-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 12px;
		background: rgba(255, 255, 255, 0.1);
		border-radius: 6px;
		margin-bottom: 8px;
		transition: all 0.3s ease;
		animation: slideInItemMobile 0.4s ease forwards;
		opacity: 0;
		transform: translateY(8px);
	}

	@keyframes slideInItemMobile {
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.file-preview-item:last-child {
		margin-bottom: 0;
	}

	.file-info {
		display: flex;
		align-items: center;
		gap: 10px;
		flex: 1;
		min-width: 0;
		/* Important for text truncation */
	}

	.file-icon {
		font-size: 1.1rem;
		flex-shrink: 0;
	}

	.file-details {
		min-width: 0;
		flex: 1;
	}

	.file-name {
		font-weight: 500;
		color: white;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		margin-bottom: 2px;
		font-size: 0.9rem;
		max-width: 180px;
		/* Adjust based on your needs */
	}

	.file-size {
		font-size: 0.75rem;
		opacity: 0.8;
		color: rgba(255, 255, 255, 0.8);
	}

	.remove-file {
		background: none;
		border: none;
		color: rgba(255, 255, 255, 0.7);
		cursor: pointer;
		padding: 6px;
		border-radius: 4px;
		transition: all 0.3s ease;
		flex-shrink: 0;
		margin-left: 8px;
	}

	.remove-file:hover {
		background: rgba(255, 255, 255, 0.1);
		color: #ff6b6b;
	}

	.file-count {
		margin-top: 12px;
		padding-top: 12px;
		border-top: 1px solid rgba(255, 255, 255, 0.2);
		font-size: 0.85rem;
		color: rgba(255, 255, 255, 0.8);
		text-align: center;
		animation: fadeIn 0.5s ease 0.6s forwards;
		opacity: 0;
	}

	.message {
		padding: 12px 15px;
		font-size: 0.9rem;
		margin-top: 15px;
	}

	/* Stagger animations for file items */
	.file-preview-item:nth-child(1) {
		animation-delay: 0.1s;
	}

	.file-preview-item:nth-child(2) {
		animation-delay: 0.15s;
	}

	.file-preview-item:nth-child(3) {
		animation-delay: 0.2s;
	}

	.file-preview-item:nth-child(4) {
		animation-delay: 0.25s;
	}

	.file-preview-item:nth-child(5) {
		animation-delay: 0.3s;
	}

	.file-preview-item:nth-child(6) {
		animation-delay: 0.35s;
	}
}

/* Extra small devices */
@media (max-width: 480px) {
	.custom-link {
		font-size: 0.95rem;
		max-width: 100%;
	}

	.file-preview.active {
		max-height: min(50vh, 350px);
		padding: 12px;
	}

	.file-preview-item {
		padding: 10px;
	}

	.file-name {
		max-width: 140px;
		font-size: 0.85rem;
	}

	.file-icon {
		font-size: 1rem;
	}

	.file-upload-area {
		padding: 12px;
	}
}

.form-group-second-last {
	margin-bottom: 14px;
}