
/* 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-wrapper) var(--spacing-wrapper) var(--section-padding-y) var(--spacing-wrapper);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
	gap: var(--grid-gap-y) var(--grid-gap-x);
}
    
.ecossistemas .h2 {
	color: var(--color-sand);
}
.ecossistemas .h2.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: center;
}

.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 p {
	margin: 0;
	align-self: stretch;
	color: var(--color-sand);
	font-size: var(--font-size-text-xl);
	font-style: normal;
	font-weight: 400;
	line-height: var(--line-height-text-xl);
	letter-spacing: var(--letter-spacing-text-xl);
}

.eco6 p {
	width: 93%;
	margin: 0;
	align-self: stretch;
	color: var(--color-sand);
	font-size: var(--font-size-text-md);
	font-style: normal;
	font-weight: 400;
	line-height: var(--line-height-text-md);
	letter-spacing: var(--letter-spacing-text-md);
}


/* CARDS CONTAINER */

.cards-container.swiper {
	padding: 0 var(--spacing-wrapper) var(--spacing-wrapper) var(--spacing-wrapper);
	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;
}

.ecosystem-card.swiper-slide {
	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) {
	.card-title {
		font-size: clamp(30px, 2.5vw, 44px);
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.footer-text-right, .footer-text-left {
		max-width: 15.72vw;
	}
	.eco3 p {
		font-size: var(--font-size-text-md);
		line-height: var(--line-height-text-md);
		letter-spacing: var(--letter-spacing-text-md);
	}
	.eco6 p {
		font-size: var(--font-size-text-sm);
		line-height: var(--line-height-text-sm);
		letter-spacing: var(--letter-spacing-text-sm);
	}
}

@media (max-width: 1024px) {
	.cards-wrapper {
		padding-left: 0;
	}
}

@media (max-width: 768px) {
	.ecossistemas .grid {
    	padding: var(--section-padding-y-md) var(--spacing-wrapper); 
	}
	.cards-container.swiper {
		padding: var(--section-padding-y-sm) 0 var(--section-padding-y-lg) 0;
	} 
	.mobile-title {
		grid-column: span 4 / span 4;
		grid-row-start: 2;
	}
	.eco1 {
		grid-row-start: 1;
		grid-column-start: 1;
		grid-column: span 4 / span 4;
	}
	.eco3 {
		grid-row-start: 3;
		grid-column-start: 1;
		grid-column: span 4 / span 4;
	}
	.eco6 {
		grid-row-start: 4;
		grid-column-start: 1;
		grid-column: span 4 / span 4;
	}
	.cards-container {
		padding: 0 var(--spacing-wrapper);
	}
	.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%;
	}
	.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: 500px) {
	.card-body {
		height: calc(var(--ecosystem-card-width) * 1.25);
	}
}