/* Insta Feed Custom — as cores/medidas vêm de variáveis CSS geradas por instância */

.ifc-feed { width: 100%; box-sizing: border-box; color: var(--ifc-text, #262626); }
.ifc-feed *, .ifc-feed *::before, .ifc-feed *::after { box-sizing: border-box; }

.ifc-notice { padding: 12px 16px; background: #fff3cd; border: 1px solid #ffe69c; border-radius: 6px; font-size: 14px; }

/* ---------- Layouts ---------- */
.ifc-layout-grid .ifc-items {
	display: grid;
	grid-template-columns: repeat(var(--ifc-cols, 3), minmax(0, 1fr));
	gap: var(--ifc-gap, 12px);
}

.ifc-layout-masonry .ifc-items {
	column-count: var(--ifc-cols, 3);
	column-gap: var(--ifc-gap, 12px);
}
.ifc-layout-masonry .ifc-item {
	break-inside: avoid;
	margin-bottom: var(--ifc-gap, 12px);
}

.ifc-layout-carousel .ifc-items {
	display: flex;
	gap: var(--ifc-gap, 12px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 8px;
}
.ifc-layout-carousel .ifc-item {
	flex: 0 0 calc((100% - (var(--ifc-cols, 3) - 1) * var(--ifc-gap, 12px)) / var(--ifc-cols, 3));
	scroll-snap-align: start;
}

.ifc-layout-list .ifc-items { display: flex; flex-direction: column; gap: var(--ifc-gap, 12px); }
.ifc-layout-list .ifc-item { display: flex; align-items: center; gap: 16px; }
.ifc-layout-list .ifc-media { flex: 0 0 min(220px, 40%); }
.ifc-layout-list .ifc-info { flex: 1; padding: 0; }

/* ---------- Card ---------- */
.ifc-item {
	background: var(--ifc-card-bg, #fff);
	min-width: 0;
	transition: transform .25s ease;
}

.ifc-media {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
	border: var(--ifc-border-w, 3px) var(--ifc-border-style, solid) var(--ifc-border-color, #e1306c);
	border-radius: var(--ifc-radius, 8px);
	transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
	text-decoration: none;
}
.ifc-item:hover .ifc-media { border-color: var(--ifc-border-color-hover, #833ab4); }

.ifc-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .35s ease;
}

/* ---------- Formatos da foto ---------- */
.ifc-shape-square .ifc-media,
.ifc-shape-circle .ifc-media { aspect-ratio: 1 / 1; }
.ifc-shape-portrait .ifc-media { aspect-ratio: 4 / 5; }
.ifc-shape-landscape .ifc-media { aspect-ratio: 16 / 9; }
.ifc-shape-original .ifc-media { aspect-ratio: auto; }
.ifc-shape-original .ifc-media img { height: auto; }

/* ---------- Efeitos de hover ---------- */
.ifc-hover-zoom .ifc-item:hover .ifc-media img { transform: scale(1.08); }
.ifc-hover-lift .ifc-item:hover { transform: translateY(-4px); }
.ifc-hover-lift .ifc-item:hover .ifc-media { box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }

.ifc-overlay {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	line-height: 1;
	color: #fff;
	background: var(--ifc-overlay, #000);
	opacity: 0;
	transition: opacity .25s ease;
}
.ifc-hover-overlay .ifc-overlay { display: flex; }
.ifc-hover-overlay .ifc-item:hover .ifc-overlay { opacity: .55; }

/* ---------- Ícone de tipo ---------- */
.ifc-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	border-radius: 13px;
}
.ifc-shape-circle .ifc-badge { top: 10%; right: 10%; }

/* ---------- Informações ---------- */
.ifc-info { padding: 10px 2px 2px; font-size: var(--ifc-text-size, 14px); line-height: 1.45; }
.ifc-username { display: block; font-weight: 600; margin-bottom: 4px; }
.ifc-caption { margin: 0 0 6px; word-break: break-word; }
.ifc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9em; opacity: .75; }
.ifc-shape-circle .ifc-info { text-align: center; }
.ifc-shape-circle .ifc-meta { justify-content: center; }

/* ---------- Título, link e cabeçalho ---------- */
.ifc-feed .ifc-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--ifc-title-font, inherit);
	font-size: var(--ifc-title-size, 20px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--ifc-title, #0b3a24);
	word-break: break-word;
}
.ifc-uc .ifc-title,
.ifc-uc .ifc-section-title { text-transform: uppercase; }

/* Texto herda o tamanho definido no painel (o tema não deve sobrescrever) */
.ifc-feed .ifc-caption,
.ifc-feed .ifc-username { font-size: inherit; }

/* Limite de linhas do título (reticências) */
.ifc-clamp-title .ifc-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--ifc-title-lines, 2);
	line-clamp: var(--ifc-title-lines, 2);
	overflow: hidden;
}

.ifc-actions { margin-top: auto; padding-top: 6px; }

.ifc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}
.ifc-section-title {
	margin: 0;
	font-family: var(--ifc-title-font, inherit);
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	line-height: 1.1;
	color: var(--ifc-title, #0b3a24);
}

/* ---------- Estilo "caixinha" ---------- */
.ifc-style-card .ifc-item {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--ifc-card-border, #e5e5e5);
	border-radius: var(--ifc-card-radius, 12px);
	overflow: hidden;
}
.ifc-style-card .ifc-media { border-radius: 0; }
.ifc-style-card .ifc-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 14px 16px 16px;
}
.ifc-style-card .ifc-caption { margin: 0 0 12px; opacity: .8; }
.ifc-style-card.ifc-layout-list .ifc-item { flex-direction: row; align-items: stretch; }
.ifc-style-card.ifc-layout-list .ifc-media { align-self: flex-start; }

/* ---------- Botões ----------
   Cada botão recebe --b (cor principal) e --bt (cor do texto no estilo preenchido)
   direto no HTML; estilo, formato e tamanho vêm das classes ifc-btn--*. */
.ifc-follow { margin-top: 20px; }
.ifc-align-left { text-align: left; }
.ifc-align-center { text-align: center; }
.ifc-align-right { text-align: right; }

.ifc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	border: 2px solid var(--b, #e1306c);
	background: var(--b, #e1306c);
	color: var(--bt, #fff);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, filter .2s ease;
}
.ifc-btn .ifc-ico { flex: 0 0 auto; }

/* Estilos */
.ifc-btn--solid:hover { filter: brightness(1.1); transform: translateY(-1px); color: var(--bt, #fff); }
.ifc-btn--outline { background: transparent; color: var(--b, #e1306c); }
.ifc-btn--outline:hover { background: var(--b, #e1306c); color: var(--bt, #fff); }
.ifc-btn--soft {
	background: rgba(127, 127, 127, .14);
	background: color-mix(in srgb, var(--b, #e1306c) 14%, transparent);
	border-color: transparent;
	color: var(--b, #e1306c);
}
.ifc-btn--soft:hover { background: var(--b, #e1306c); border-color: var(--b, #e1306c); color: var(--bt, #fff); }
.ifc-btn--link {
	background: none;
	border-color: transparent;
	color: var(--b, #e1306c);
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.ifc-btn--link:hover { text-decoration: underline; color: var(--b, #e1306c); }

/* Formatos */
.ifc-btn--square { border-radius: 0; }
.ifc-btn--rounded { border-radius: 8px; }
.ifc-btn--pill { border-radius: 999px; }

/* Tamanhos */
.ifc-btn--small { padding: 6px 14px; font-size: 13px; }
.ifc-btn--medium { padding: 10px 24px; font-size: 15px; }
.ifc-btn--large { padding: 14px 34px; font-size: 17px; }

.ifc-btn--block { display: flex; width: 100%; }

/* ---------- YouTube: ícone de play, visualizações e player ---------- */
.ytf-playicon {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 2;
	width: 58px;
	height: 40px;
	margin: -20px 0 0 -29px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .68);
	border-radius: 12px;
	transition: background-color .2s ease, transform .2s ease;
	pointer-events: none;
}
.ytf-playicon::before {
	content: "";
	margin-left: 4px;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
}
.ifc-item:hover .ytf-playicon { background: #e00; transform: scale(1.06); }
.ifc-shape-circle .ytf-playicon { transform: none; }
.ifc-shape-circle .ifc-item:hover .ytf-playicon { transform: scale(1.06); }
.ytf-views::before { content: "\00b7"; margin-right: 12px; opacity: .6; }
.ifc-meta .ifc-date + .ytf-views::before { display: inline; }
.ifc-meta .ytf-views:first-child::before { display: none; }

/* Player tocando no lugar da miniatura */
.ytf-playing { background: #000; }
.ytf-playing .ytf-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ifc-shape-original .ytf-playing { aspect-ratio: 16 / 9; }

/* Janela do vídeo (lightbox) */
.ytf-noscroll { overflow: hidden; }
.ytf-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .85);
}
.ytf-modal-box {
	position: relative;
	width: min(980px, 100%);
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.ytf-modal-box .ytf-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytf-modal-close {
	position: absolute;
	top: 12px;
	right: 18px;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 34px;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.ytf-modal-close:hover,
.ytf-modal-close:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }

/* ---------- Só foto ---------- */
.ifc-photo-only .ifc-item { background: transparent; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
	.ifc-layout-grid .ifc-items { grid-template-columns: repeat(var(--ifc-cols-tablet, 2), minmax(0, 1fr)); }
	.ifc-layout-masonry .ifc-items { column-count: var(--ifc-cols-tablet, 2); }
	.ifc-layout-carousel .ifc-item {
		flex-basis: calc((100% - (var(--ifc-cols-tablet, 2) - 1) * var(--ifc-gap, 12px)) / var(--ifc-cols-tablet, 2));
	}
}
@media (max-width: 640px) {
	.ifc-layout-grid .ifc-items { grid-template-columns: repeat(var(--ifc-cols-mobile, 1), minmax(0, 1fr)); }
	.ifc-layout-masonry .ifc-items { column-count: var(--ifc-cols-mobile, 1); }
	.ifc-layout-carousel .ifc-item {
		flex-basis: calc((100% - (var(--ifc-cols-mobile, 1) - 1) * var(--ifc-gap, 12px)) / var(--ifc-cols-mobile, 1));
	}
	.ifc-layout-list .ifc-item { flex-direction: column; align-items: stretch; }
	.ifc-layout-list .ifc-media { flex-basis: auto; }
}
