/* Interfranca Connect - Public Styles */

:root {
	--ic-primary: #D6194B; /* Vermelho Carmim */
	--ic-secondary: #F9CB1F; /* Amarelo-Ouro */
	--ic-accent: #F4791F; /* Laranja */
	--ic-font: 'Poppins', 'Fredoka', 'Baloo', sans-serif;
}

/* === BACK TO TOP === */
#ic-back-to-top {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 50px;
	height: 50px;
	background-color: var(--ic-secondary);
	color: var(--ic-primary);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
	opacity: 0;
	pointer-events: none;
}
#ic-back-to-top.ic-show {
	opacity: 1;
	pointer-events: auto;
}
#ic-back-to-top:hover {
	transform: translateY(-3px);
	background-color: #f7d54e;
}
#ic-back-to-top svg {
	width: 28px;
	height: 28px;
}

/* === CHAT WIDGET === */
#ic-chat-widget {
	position: fixed;
	bottom: 80px; /* Above back to top if it's there */
	right: 20px;
	z-index: 9999;
	font-family: var(--ic-font);
}

.ic-chat-toggle {
	width: 60px;
	height: 60px;
	background-color: var(--ic-primary);
	color: var(--ic-secondary);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(214, 25, 75, 0.4);
	transition: transform 0.3s ease;
}
.ic-chat-toggle:hover {
	transform: scale(1.05);
}

.ic-chat-panel {
	position: absolute;
	bottom: 75px;
	right: 0;
	width: 320px;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.15);
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.ic-chat-panel.ic-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.ic-chat-header {
	background-color: var(--ic-primary);
	color: #fff;
	padding: 20px;
	position: relative;
}

.ic-chat-header h4 {
	color: var(--ic-secondary);
	margin: 0 0 5px 0;
	font-size: 18px;
	font-weight: 700;
}

.ic-chat-header p {
	margin: 0;
	font-size: 13px;
	opacity: 0.9;
}

.ic-chat-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	line-height: 1;
}

.ic-chat-body {
	padding: 20px;
}

.ic-chat-message {
	background-color: #f5f5f5;
	padding: 15px;
	border-radius: 15px 15px 15px 0;
	font-size: 14px;
	color: #333;
	margin-bottom: 20px;
}

.ic-chat-btn-action {
	display: block;
	text-align: center;
	background-color: var(--ic-secondary);
	color: var(--ic-primary);
	text-decoration: none;
	padding: 12px;
	border-radius: 25px;
	font-weight: 700;
	transition: background-color 0.3s ease;
}
.ic-chat-btn-action:hover {
	background-color: #f7d54e;
	color: var(--ic-primary);
}

/* === SEARCH WIDGET === */
.ic-search-container {
	position: relative;
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
	font-family: var(--ic-font);
}

.ic-search-input-wrapper {
	position: relative;
}

.ic-search-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ic-accent);
}

.ic-search-input {
	width: 100%;
	padding: 12px 15px 12px 45px !important;
	border: 2px solid #ddd !important;
	border-radius: 30px !important;
	font-size: 16px !important;
	outline: none !important;
	transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
	background-color: #fff !important;
}

.ic-search-input:focus {
	border-color: var(--ic-secondary) !important;
	box-shadow: 0 0 0 3px rgba(249, 203, 31, 0.3) !important;
}

.ic-search-results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	width: 100%;
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
	z-index: 100;
	max-height: 400px;
	overflow-y: auto;
}

.ic-search-item {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	transition: background-color 0.2s ease;
}
.ic-search-item:last-child {
	border-bottom: none;
}
.ic-search-item:hover {
	background-color: #fffdf5; /* light yellow */
}

.ic-search-item-img {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: cover;
	margin-right: 15px;
	background-color: #f5f5f5;
}

.ic-search-item-info {
	flex: 1;
}
.ic-search-item-title {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 2px;
	color: var(--ic-primary);
}
.ic-search-item-excerpt {
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
}
.ic-search-item-type {
	font-size: 10px;
	background: var(--ic-secondary);
	color: var(--ic-primary);
	padding: 2px 6px;
	border-radius: 10px;
	font-weight: bold;
	display: inline-block;
}

.ic-search-no-results, .ic-search-loading {
	padding: 15px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

/* Responsiveness */
@media (max-width: 768px) {
	.ic-chat-panel {
		width: 300px;
		right: 0;
}

/* === CARDS WIDGET === */
.ic-cards-container {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	padding: 10px 0 20px 0;
	/* Removed overflow-x so it behaves as an expanding gallery filling the container width */
}

.ic-card-item {
	flex: 1;
	height: 300px;
	border-radius: 16px;
	background-size: cover;
	background-position: center;
	position: relative;
	overflow: hidden;
	text-decoration: none !important;
	color: #fff !important;
	transition: flex 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
	cursor: pointer;
}

.ic-card-item:hover {
	flex: 5;
	color: #fff !important;
}

.ic-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
	z-index: 1;
	pointer-events: none;
}

.ic-card-content {
	position: absolute;
	bottom: 15px;
	left: 15px;
	right: 15px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	/* Ensure text doesn't break into multiple lines or overflow */
	overflow: hidden;
	white-space: nowrap;
}

.ic-card-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 5px 0 !important;
	color: #fff !important;
	font-family: var(--ic-font);
	text-overflow: ellipsis;
	overflow: hidden;
}

.ic-card-desc {
	font-size: 12px;
	margin: 0 !important;
	color: rgba(255,255,255,0.85) !important;
	font-family: var(--ic-font);
	text-overflow: ellipsis;
	overflow: hidden;
	/* The description text can fade in or simply just stay hidden if the card is small */
	opacity: 0;
	transition: opacity 0.4s ease;
}

.ic-card-item:hover .ic-card-desc {
	opacity: 1;
	transition-delay: 0.2s; /* Delays appearance until card has expanded a bit */
}


