/* Foundations Section */
.foundations-section {
	background-color: #F8F9FA;
	padding: 80px 0;
}

.foundations-title {
	font-size: 32px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 32px 0;
	line-height: 1.2;
}

/* Form */
.foundations-form {
	background-color: #FFFFFF;
	border-radius: 8px;
	padding: 32px;
	margin-bottom: 40px;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-bottom: 20px;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-label {
	font-size: 14px;
	font-weight: 500;
	color: #1A1A1A;
}

.form-select {
	padding: 12px 16px;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	font-size: 14px;
	color: #1A1A1A;
	background-color: #FFFFFF;
	cursor: pointer;
	transition: border-color 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.form-select:hover {
	border-color: #0070C1;
}

.form-select:focus {
	outline: none;
	border-color: #0070C1;
	box-shadow: 0 0 0 3px rgba(0, 112, 193, 0.1);
}

/* Input de texto para nombre de fundación */
.form-input {
	padding: 12px 16px;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	font-size: 14px;
	color: #1A1A1A;
	background-color: #FFFFFF;
	transition: border-color 0.2s ease;
	width: 100%;
}

.form-input:hover {
	border-color: #0070C1;
}

.form-input:focus {
	outline: none;
	border-color: #0070C1;
	box-shadow: 0 0 0 3px rgba(0, 112, 193, 0.1);
}

.foundation-name-field {
	position: relative;
}

.foundation-name-wrapper {
	position: relative;
}

.foundation-name-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: #FFFFFF;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	max-height: 300px;
	overflow-y: auto;
	z-index: 1000;
	margin-top: 4px;
}

.suggestion-item {
	padding: 12px 16px;
	cursor: pointer;
	border-bottom: 1px solid #F3F4F6;
	transition: background-color 0.2s ease;
	font-size: 14px;
	color: #1A1A1A;
}

.suggestion-item:last-child {
	border-bottom: none;
}

.suggestion-item:hover {
	background-color: #F8F9FA;
}

.suggestion-item mark {
	background-color: #FFF4CD;
	color: #1A1A1A;
	font-weight: 600;
	padding: 0;
}

.suggestion-empty {
	color: #666666;
	cursor: default;
	font-style: italic;
}

.suggestion-empty:hover {
	background-color: transparent;
}

.form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.form-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
}

.toggle-label {
	font-size: 14px;
	font-weight: 500;
	color: #1A1A1A;
}

.toggle-switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 24px;
	cursor: pointer;
}

.toggle-input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #D1D5DB;
	border-radius: 24px;
	transition: background-color 0.3s ease;
}

.toggle-slider:before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #FFFFFF;
	border-radius: 50%;
	transition: transform 0.3s ease;
}

.toggle-input:checked+.toggle-slider {
	background-color: #0070C1;
}

.toggle-input:checked+.toggle-slider:before {
	transform: translateX(24px);
}

.btn-search {
	padding: 12px 32px;
	background-color: #0070C1;
	color: #FFFFFF;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.btn-search:hover {
	background-color: #005A9C;
}

/* Results */
.foundations-results {
	background-color: #FFFFFF;
	border-radius: 8px;
	padding: 32px;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid #E5E5E5;
	min-height: 60px;
}

.results-title {
	font-size: 18px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0;
}

.results-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background-color: #FFFFFF;
	border: 1px solid #E0E0E0;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #666666;
	cursor: pointer;
	transition: all 0.2s ease;
}

.filter-chip:hover {
	border-color: #0070C1;
	color: #0070C1;
}

.filter-chip.active {
	border-color: #0070C1;
	color: #0070C1;
	background-color: #F0F7FF;
}

.filter-chip svg {
	width: 14px;
	height: 14px;
	color: #666666;
}

.filter-chip:hover svg,
.filter-chip.active svg {
	color: #0070C1;
}

.results-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 32px;
	min-height: 100px;
}

.foundations-results:not(.has-results) .results-list {
	display: none;
}

.result-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #F3F4F6;
	background-color: #FFFFFF;
	transition: background-color 0.2s ease;
}

.result-item:nth-child(even) {
	background-color: #FAFAFA;
}

.result-item:last-child {
	border-bottom: none;
}

.result-item:hover {
	background-color: #F8F9FA;
}

.result-link {
	font-size: 16px;
	font-weight: 500;
	color: #0070C1;
	text-decoration: none;
	transition: color 0.3s ease;
	flex: 1;
}

.result-link:hover {
	color: #005A9C;
	text-decoration: underline;
}

.result-info {
	display: flex;
	align-items: center;
	gap: 16px;
}

.result-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	color: #0070C1;
}

.result-badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.result-badge-icon svg {
	width: 24px;
	height: 24px;
	display: block;
}

.result-badge-text {
	line-height: 1.2;
}

.result-detail {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #666666;
}

.result-detail-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.result-detail-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

.result-detail-text {
	line-height: 1.2;
}

.results-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 20px;
	border-top: 1px solid #E5E5E5;
	margin-bottom: 32px;
	min-height: 60px;
}

.foundations-results:not(.has-results) .results-footer {
	display: none;
}

.results-count {
	font-size: 14px;
	color: #666666;
	margin: 0;
}

.btn-export {
	padding: 10px 24px;
	background-color: #FFFFFF;
	color: #0070C1;
	border: 2px solid #0070C1;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-export:hover {
	background-color: #0070C1;
	color: #FFFFFF;
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	min-height: 36px;
}

.foundations-results:not(.has-results) .pagination {
	display: none;
}

.pagination-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	background-color: #FFFFFF;
	color: #666666;
	cursor: pointer;
	transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
	border-color: #0070C1;
	color: #0070C1;
}

.pagination-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pagination-number {
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	background-color: #FFFFFF;
	color: #666666;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.pagination-number:hover {
	border-color: #0070C1;
	color: #0070C1;
}

.pagination-number.active {
	background-color: #0070C1;
	border-color: #0070C1;
	color: #FFFFFF;
}

.pagination-dots {
	color: #666666;
	font-size: 14px;
	padding: 0 4px;
}

/* Loading state */
.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
	.foundations-section {
		padding: 60px 0;
	}

	.form-row {
		grid-template-columns: repeat(2, 1fr);
	}

	.results-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
}

@media (max-width: 768px) {
	.foundations-section {
		padding: 40px 0;
	}

	.foundations-title {
		font-size: 28px;
	}

	.foundations-form {
		padding: 24px;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.form-actions {
		flex-direction: column;
		gap: 16px;
		align-items: stretch;
	}

	.btn-search {
		width: 100%;
	}

	.foundations-results {
		padding: 24px;
	}

	.result-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.result-info {
		flex-wrap: wrap;
	}

	.results-footer {
		flex-direction: column;
		gap: 16px;
		align-items: stretch;
	}

	.btn-export {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.foundations-section {
		padding: 32px 0;
	}

	.foundations-title {
		font-size: 24px;
	}

	.foundations-form {
		padding: 20px;
	}

	.foundations-results {
		padding: 20px;
	}

	.result-link {
		font-size: 15px;
	}

	.pagination {
		flex-wrap: wrap;
		gap: 6px;
	}

	.pagination-number,
	.pagination-btn {
		min-width: 32px;
		height: 32px;
	}
}

