
/* ECOSSISTEMAS  SECTION */

.ecossistemas {
	width: 100%;
	overflow-x: hidden;
}

.notch.ecoss-notch{
	background: var(--color-orange);
}

.ecossistemas .content, .notch.ecoss-notch .notch-left, .notch.ecoss-notch .notch-right {
	background: var(--color-title-primary);
}

.notch.ecoss-notch .notch-center svg path {
	fill: var(--color-title-primary);
}

.ecossistemas .grid {
	padding: var(--spacing-section-top) var(--spacing-wrapper) var(--spacing-gap-large-vertical) var(--spacing-wrapper);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
	gap: var(--spacing-gap-y-small) var(--spacing-gap-large);
}
    
.ecossistemas .h2 {
	color: var(--color-sand);
}
.ecossistemas .marked {
	color: var(--color-orange);
}

.eco1 {
	display: flex;
    flex-direction: column;
    justify-content: space-between;
	gap: var(--gap-fixed);
}

.eco3 {
    grid-column-start: 2;
    grid-row-start: 2;
}

.eco4 {
    grid-column: span 2 / span 2;
    grid-column-start: 3;
    grid-row-start: 2;
	text-align: right;
}

.eco5 {
    grid-column: span 3 / span 3;
    grid-row-start: 3;
}

.eco6 {
    grid-column-start: 4;
    grid-row-start: 3;
	align-content: end;
}

.ecossistemas .logo-badge span {
	color: var(--color-orange);
	border-color: var(--color-orange);
}

.ecossistemas .logo-badge span.badge-text {
	color: var(--color-sand);
	background-color: var(--color-orange);
	border-color: var(--color-orange);
}

.eco3 {
	color: var(--color-sand);
}

.eco6 {
	color: var(--color-sand);
}


/* CARDS CONTAINER */

.cards-container {
	padding: 0 0 var(--spacing-section-top) 0;
	width: 100%;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	overflow-x: hidden;
    cursor: grab;
}

.cards-container::-webkit-scrollbar {
	display: none;
}

.cards-wrapper {
	display: flex;
	align-items: stretch;
	width: max-content;
    padding-left: 28vw;
    gap: 40px;
}

@media (max-width: 1024px) {
    .cards-wrapper {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .cards-wrapper {
        padding-left: 15vw;
    }
}

@media (max-width: 768px) {
    .cards-wrapper {
        padding-left: 16px;
    }
}

.ecosystem-card {
	cursor: pointer;
	position: relative;
	width: var(--ecosystem-card-width);
	min-width: var(--ecosystem-card-width);
	flex-shrink: 0;
	height: 100%;
	transition: width 0.3s ease-out, min-width 0.3s ease-out;
	will-change: width, min-width;
	display: flex;
	flex-direction: column;
}

.ecosystem-card.expanded {
	z-index: 10;
	width: calc(var(--ecosystem-card-width) * 2);
	min-width: calc(var(--ecosystem-card-width) * 2);
}

.card-content {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.card-title {
	margin: 0;
	color: var(--color-title-primary);
	font-size: clamp(30px, 2.75vw, 54px);
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	letter-spacing: clamp(0, 0.02vw, 0.6px);
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 0;
}

.card-title::before {
	content: '';
	display: inline-block;
	vertical-align: middle;
	width: auto;
	height: 0;
	margin-right: 0;
	aspect-ratio: 1 / 1;
	background-image: url('../../images/circle.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	transition: height 0.3s ease-out, opacity 0.3s ease-out, margin-right 0.3s ease-out;
	opacity: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.ecosystem-card:not(.expanded):hover .card-title::before,
.ecosystem-card.expanded .card-title::before {
	height: 80%;
	opacity: 1;
	margin-right: clamp(10px, 1vw, 12px);
}

.card-title::after {
	content: '';
	display: inline-block;
	vertical-align: middle;
	width: auto;
	height: 80%;
	aspect-ratio: 1 / 1;
	margin-left: clamp(10px, 1vw, 12px);
	background-image: url('../../images/circle.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	transition: height 0.3s ease-out, opacity 0.3s ease-out, margin-left 0.3s ease-out;
	opacity: 1;
	overflow: hidden;
	flex-shrink: 0;
}

.ecosystem-card.expanded .card-title::after {
	height: 0;
	opacity: 0;
	margin-left: 0;
}

.ecosystem-card:not(.expanded):hover .card-title::after {
	height: 0;
	opacity: 0;
	margin-left: 0;
}

.ecosystem-card:nth-child(4n+3) .card-title {
	color: var(--color-title-primary);
}

.card-body {
	display: flex;
	flex-direction: row;
	flex: 0 0 auto;
	position: relative;
	padding: clamp(16px, 1.5vw, 25px);
	overflow: hidden;
	background-color: #232323;
	border-radius: var(--border-radius-md);
	border: 10px solid #232323;
	gap: 0;
	width: 100%;
	height: calc(var(--ecosystem-card-width) * (23 / 24));
	flex-shrink: 0;
}

.card-cover {
	position: relative;
	flex: 1 1 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	transition: flex-basis 0.3s ease-out;
	height: 100%;
}

.ecossistemas-cta {
	color: var(--color-sand);
	position: absolute;
	bottom: -20%;
	right: 0;
	transition: bottom 0.3s ease-out;
}

.ecossistemas-cta .cta-button-text {
	background-color: #232323
}

.ecossistemas-cta .cta-button-arrow svg path {
	fill: var(--color-sand);
}

.ecossistemas-cta .cta-button-patch svg path {
	fill: #232323;
}

.ecosystem-card.expanded .ecossistemas-cta, .ecosystem-card:not(.expanded):hover .ecossistemas-cta {
	bottom: 0;
}

.ecosystem-card.expanded .card-cover {
	flex-basis: 50%;
	flex-grow: 0;
	flex-shrink: 0;
}

.card-expanded-content {
	flex: 0 0 0;
	min-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: flex-basis 0.3s ease-out, opacity 0.3s ease-out 0.15s, width 0.3s ease-out;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	white-space: nowrap;
	height: 100%;
	width: 0;
}

.ecosystem-card.expanded .card-expanded-content {
	flex-basis: 50%;
	flex-grow: 0;
	flex-shrink: 0;
	opacity: 1;
	white-space: normal;
	width: 50%;
}

.ecosystem-card:nth-child(4n+2) .card-body {
	background-color: var(--color-orange);
}

.ecosystem-card:nth-child(4n+3) .card-body {
	background-color: var(--color-sand);
}

.ecosystem-card:nth-child(4n) .card-body {
	background-color: #8B7355;
}

.ecosystem-card:nth-child(4n+1) .card-body {
	background-color: #151515;
}

.ecosystem-card:nth-child(4n+1) .card-title {
	color: var(--color-sand);
}
.ecosystem-card:nth-child(4n+1) .tag-head > div:first-child,
.ecosystem-card:nth-child(4n+3) .tag-head > div:first-child {
	color: #151515;
	background: var(--color-orange);
}

.ecosystem-card:nth-child(4n+1) .tag-head h3 {
	color: var(--color-sand);
}

.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	padding: clamp(16px, 1.5vw, 25px);
	background-color: #232323;
	gap: 6%;
	border-radius: var(--border-radius-md);
	border: 10px solid #232323;
	min-height: calc(4vw + (clamp(16px, 1.5vw, 25px) * 2));
	flex-shrink: 0;
}

.footer-text-left {
	color: var(--color-dark-sand);
	font-size: clamp(12px, 0.9vw, 16px);
	font-weight: 500;
	line-height: clamp(14px, 1vw, 19px);
	flex: 1;
	max-width: 10.72vw;
	letter-spacing: clamp(-0.16px, -0.016vw, 0px);
	text-transform: uppercase;
	display: flex;
	align-items: flex-start;
}


.footer-text-right {
	color: var(--color-sand);
	font-size: clamp(12px, 0.9vw, 18px);
	font-weight: 400;
	line-height: clamp(14px, 1vw, 20px);
	flex: 1;
	max-width: 10.72vw;
	letter-spacing: clamp(-0.18px, -0.018vw, 0px);
	/* Safari & Firefox */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	
	/* Chromium */
	line-clamp: 3;
}

/* ECOSYSTEM TAGS ACCORDION */
.ecosystem-tags {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	padding-left: clamp(16px, 1.5vw, 25px);
	overflow-y: auto;
	overflow-x: hidden;
	max-height: 100%;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.ecosystem-tags::-webkit-scrollbar {
	display: none;
}

.tag-box {
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid rgba(0, 0, 0, 0.15);
	overflow: hidden;
	flex-shrink: 0; 
}

.ecosystem-card:nth-child(4n+1) .tag-box {
	border-color: #232323;
}

.tag-head {
	display: flex;
	align-items: center;
	gap: clamp(8px, 0.5vw, 10px);
	padding: clamp(14px, 1.1vw, 20px) 0;
	cursor: pointer;
	user-select: none;
	position: relative;
}

.tag-head > div:first-child {
	display: flex;
	padding: clamp(3px, 0.4vw, 5px) clamp(5px, 0.6vw, 7px);
	justify-content: center;
	align-items: center;
	border-radius: 7.361px;
	background: var(--color-sand);
	font-size: clamp(8px, 0.6vw, 10px);
	line-height: 1;
	font-weight: 500;
	color: #151515;
	text-align: center;
}

.tag-head h3 {
	margin: 0;
	font-size: clamp(16px, 1.4vw, 25px);
	font-weight: 400;
	color: #151515;
	line-height: 1;
	flex: 1;
}

.tag-list {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.15s ease-out, padding 0.15s ease-out;
	padding: 0;
	display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 0.6vw, 10px);
}

.tag-box.active .tag-list {
	max-height: 1000px;
	padding: 0 0 clamp(16px, 1.5vw, 24px) 0;
	opacity: 1;
	transition: max-height 0.15s ease-out, padding 0.15s ease-out;
}

.tag-item {
	display: flex;
	padding: clamp(8px, 0.6vw, 10px) clamp(10px, 0.8vw, 12px);
	justify-content: center;
	align-items: center;
	gap: 10px;
	border-radius: 200px;
	background: #232323;
	color: var(--Primrias-Light-Sand, var(--color-sand));
	font-size: clamp(10px, 0.8vw, 12px);
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
}

@media (max-width: 1500px) {
	.ecossistemas .grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.eco1 {
		grid-column: span 1 / span 1;
	}

	.eco2 {
		grid-column: span 2 / span 2;
		grid-column-start: 2;
		grid-row-start: 1;
		display: block;
	}

	.eco3 {
		grid-column: span 1 / span 1;
		grid-column-start: 1;
		grid-row-start: 2;
	}

	.eco4 {
		grid-column: span 2 / span 2;
		grid-column-start: 2;
		grid-row-start: 2;
	}

	.eco5 {
		grid-column: 1 / -1;
		grid-row-start: 3;
	}

	.eco6 {
		grid-column: span 1 / span 1;
		grid-column-start: 1;
		grid-row-start: 4;
	}

	.card-title {
		font-size: clamp(30px, 2.5vw, 44px);
	}
}

@media (max-width: 1024px) {
	.ecossistemas .grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.eco1 {
		grid-row: 1;
		grid-column: span 2;
		gap: var(--spacing-gap-y-small);
	}

	.eco2 {
		display: block;
		grid-row: 2;
		grid-column: span 2;
	}

	.eco3 {
		grid-row: 5;
		grid-column: span 1;
	}

	.eco4 {
		grid-row: 3;
		grid-column: span 2;
		text-align:right;
	}

	.eco5 {
		grid-row: 4;
		grid-column: span 2;
	}

	.eco6 {
		grid-row: 6;
		grid-column: span 1;
		margin-top:-20px;
	}

	.footer-text-right, .footer-text-left {
		max-width: 15.72vw;
	}
}

@media (max-width: 768px) {
	.ecossistemas .grid {
		display: flex;
		flex-direction: column;
	}

	.ecossistemas .mobile-title {
		order: 2;
		overflow:hidden;
	}
	.eco1 {
		order: 1;
		width: 50%;
	}
	.eco2, .eco4, .eco5 { display:none; }
	.eco3 {
		order: 3;
	}
	.eco6 {
		order: 6;
		margin-top:-10px;
	}
	.card-body {
		flex-direction: column;
		gap: 12px;
	}
	.ecossistemas-cta {
		display: none;
	}
	.ecosystem-card.expanded {
		width: calc(100vw - 38px);
		min-width: calc(100vw - 38px);
	}
	.ecosystem-card.expanded .card-expanded-content {
		flex-basis: 100%;
    	width: 100%;
		padding-bottom: 24px;
	}
	.ecosystem-card.expanded .card-cover {
		flex-basis: fit-content;
	}
	.ecosystem-tags {
		padding: 0;
	}

	.footer-text-left, .footer-text-right {
		max-width: 120px;
	}
}

@media (max-width: 499px) {
	.ecossistemas {
		overflow: visible;
	}
	.cards-container {
		overflow: visible;
	}
	.cards-wrapper {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}
	.ecosystem-card {
		position: -webkit-sticky;
		position: sticky;
		top: var(--spacing-section-top);
		padding-top: 0;
		padding-bottom: calc(var(--spacing-section-top)*3);
		width: calc(100% - var(--spacing-wrapper));
	}
	.ecosystem-card.expanded {
		width: calc(100% - var(--spacing-wrapper));
		min-width: calc(100% - var(--spacing-wrapper));
	}
	.ecosystem-card:nth-child(2) {
		top: calc(var(--spacing-section-top)*2);
		padding-bottom: calc(var(--spacing-section-top)*2);
	}
	.ecosystem-card:nth-child(3) {
		top: calc(var(--spacing-section-top)*3);
		padding-bottom: calc(var(--spacing-section-top));
	}
	.ecosystem-card:nth-child(4) {
		top: calc(var(--spacing-section-top)*4);
		padding-bottom: 0;
	}
	.card-body {
		height: calc(var(--ecosystem-card-width) * 1.25);
	}
}


/* PRODUCTS VIEW */

.ecossistemas-archive .produtos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--spacing-gap-large);
	padding-bottom: var(--spacing-section-top);
}

.produto-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.produto-card-image {
	display: block;
	overflow: hidden;
	border-radius: 8px;
}

.produto-card-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease-out;
}

.produto-card:hover .produto-card-image img {
	transform: scale(1.03);
}

.produto-card-body h2 {
	font-size: clamp(18px, 1.5vw, 22px);
	font-weight: 500;
	line-height: 1.2;
	margin: 0;
}

.produto-card-body h2 a {
	color: inherit;
	text-decoration: none;
}

.produto-card-body h2 a:hover {
	text-decoration: underline;
}

.produto-card-excerpt {
	font-size: clamp(14px, 1vw, 16px);
	line-height: 1.4;
	margin: 8px 0 0;
	opacity: 0.7;
}

@media (max-width: 768px) {
	.ecossistemas-archive .produtos-grid {
		grid-template-columns: 1fr;
		gap: var(--spacing-gap-y-small);
	}
}
