/**
 * Section - Content Device Styles
 * Reusable section with text content and device/tablet with callout
 *
 * @package SeedDigital
 * @since 1.0.0
 */

/* ============================================
   Section Container
   ============================================ */
   .section-content-device {
	padding: 80px 0;
	background-color: #ffffff;
	box-sizing: border-box;
	position: relative;
}


/* ============================================
   Wrapper - Two Column Layout
   ============================================ */
.content-device__wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: start;
	max-width: 1384px;
	margin: 0 auto;
	box-sizing: border-box;
	position: relative;
}

/* Reversed layout - Image on left, Content on right */
.content-device__wrapper.is-reversed {
	grid-template-columns: 1fr 1fr;
}

.content-device__wrapper.is-reversed .content-device__content {
	order: 2;
	padding-left: 119px;
	position: relative;
}

.content-device__wrapper.is-reversed .content-device__device {
	order: 1;
	padding-left: 0;
	position: relative;
	z-index: 1;
}

/* ============================================
   Content Column (Left)
   ============================================ */
.content-device__content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-left: 119px;
	position: relative;
	box-sizing: border-box;
	align-self: stretch;
}

/* Title */
.content-device__title {
	font-size: 36px;
	font-weight: 700;
	line-height: 1.2;
	color: #000000;
	margin: 0;
	font-family: 'Be Vietnam Pro', sans-serif;
}

/* Subtitle */
.content-device__subtitle {
	font-size: 14px;
	font-weight: 600;
	color: #0086C9;
	margin: 0;
	line-height: 1.4;
}

/* Description */
.content-device__description {
	font-size: 10px;
	line-height: 16px;
	color: #333333;
	margin: 0;
}

.content-device__description p {
	margin: 0 0 16px 0;
}

.content-device__description p:last-child {
	margin-bottom: 0;
}

/* ============================================
   Features Accordion
   ============================================ */
.content-device__features {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 8px;
}

.feature-item {
	border: none;
	background: transparent;
	width: 100%;
}

.feature-item__toggle {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	background: transparent;
	border: none;
	border-left: 2px solid #98A2B3;
	padding-left: 31px;
	cursor: pointer;
	text-align: left;
	transition: all 0.3s ease;
	position: relative;
}

.feature-item__toggle:hover {
	border-left-color: #0066CC;
}

.feature-item.is-expanded .feature-item__toggle {
	border-left: 4px solid #0BA5EC;
}

.feature-item__title {
	font-size: 20px;
	font-weight: 600;
	color: #000000;
	margin: 0;
	flex: 1;
}

.feature-item__icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0066CC;
	font-size: 16px;
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 16px;
}

.feature-item__icon i {
	transition: transform 0.3s ease;
}

/* Expanded state */
.feature-item.is-expanded .feature-item__icon i {
	transform: rotate(45deg);
}

.feature-item.is-expanded .feature-item__icon i::before {
	content: "\f00d"; /* Font Awesome X icon */
}

.feature-item__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease;
	padding: 0;
}

.feature-item.is-expanded .feature-item__content {
	max-height: 500px;
	padding: 0;
	margin-top: 0;
	position: relative;
	padding-left: 35px;
}

.feature-item.is-expanded .feature-item__content::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 1.5px;
	height: 100%;
	border-left: 1.5px solid #0BA5EC;
}

.feature-item__content p {
	font-size: 14px;
	line-height: 18px;
	font-weight: 600;
	color: #000000;
	margin: 0 0 12px 0;
}

.feature-item__content p:last-child {
	margin-bottom: 0;
}

.feature-item__content * {
	margin-top: 0;
}

.feature-item__content *:last-child {
	margin-bottom: 0;
}

.feature-item__content p:last-child {
	margin-bottom: 0;
}

/* ============================================
   Device Column (Right)
   ============================================ */
.content-device__device {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}

.device-wrapper {
	position: relative;
	width: 100%;
}

.device-file {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
}

/* ============================================
   Rectangle 438 - Decorative Organic Shapes (Blobs)
   Upload de imagem via ACF
   ============================================ */
.device-rectangle {
	position: absolute;
	z-index: 5; /* Acima da imagem, abaixo do callout (z-index: 10) */
	pointer-events: none; /* Não interfere com interações */
	overflow: visible; /* Permite que a forma saia do container */
	width: auto;
	height: auto;
}

/* Imagem do rectangle */
.device-rectangle__image {
	width: auto;
	height: auto;
	max-width: 300px;
	max-height: 370px;
	display: block;
	/* Renderização suave */
	image-rendering: auto;
	/* Mantém proporção original */
	object-fit: contain;
}

/* Texto dentro do rectangle */
.device-rectangle__text {
	position: absolute;
	bottom: -40px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 4;
	margin: 0;
	padding: 0;
	color: #0F172A; /* Cor escura para o texto */
	font-size: 16px;
	font-weight: 500;
	text-align: center;
	white-space: nowrap;
	pointer-events: none;
}

/* Top Left Position */
.device-rectangle--top-left {
	top: -30px;
	left: -30px;
}

/* Top Right Position */
.device-rectangle--top-right {
	top: -170px;
	right: -30px;
}

/* Bottom Right Position */
.device-rectangle--bottom-right {
	bottom: -100px;
	right: -30px;
}

/* Bottom Left Position */
.device-rectangle--bottom-left {
	bottom: -30px;
	left: -30px;
}

/* Responsive - esconde em mobile */
@media (max-width: 768px) {
	.device-rectangle {
		display: none;
	}

	.content-device__wrapper.is-reversed .content-device__content {
		padding-left: 8px;
	}
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1400px) {
	.content-device__wrapper {
		gap: 50px;
	}
}

@media (max-width: 1200px) {
	.content-device__wrapper {
		gap: 45px;
	}

	.content-device__title {
		font-size: 40px;
	}
}

@media (max-width: 1024px) {
	.content-device__wrapper {
		gap: 40px;
	}

	.content-device__title {
		font-size: 36px;
	}
}

@media (max-width: 900px) {
	.content-device__wrapper {
		gap: 36px;
	}

	.content-device__title {
		font-size: 34px;
	}

	.content-device__wrapper.is-reversed .content-device__content {
		padding-left: 8px;
	}
}

@media (max-width: 768px) {
	.section-content-device {
		padding: 60px 0;
	}

	.content-device__wrapper {
		grid-template-columns: 1fr !important;
		gap: 40px;
		display: flex !important;
		flex-direction: column;
		padding: 0 20px;
	}

	.content-device__wrapper::before {
		left: 44px; /* 20px (wrapper padding) + 24px (content padding) */
	}

	.content-device__content {
		padding-left: 24px;
	}

	.content-device__wrapper.is-reversed .content-device__device {
		padding-left: 0;
	}

	/* Reset order for mobile - device sempre primeiro */
	.content-device__wrapper .content-device__content {
		order: 3 !important;
		width: 100%;
		flex: 0 0 auto;
	}

	.content-device__wrapper .content-device__device {
		order: 1 !important; /* Device aparece primeiro no mobile */
		width: 100%;
		margin-bottom: 0;
		flex: 0 0 auto;
	}

	/* Layout invertido no mobile - força mesma ordem */
	.content-device__wrapper.is-reversed {
		grid-template-columns: 1fr !important;
		display: flex !important;
		flex-direction: column;
	}

	.content-device__wrapper.is-reversed .content-device__content {
		order: 3 !important;
		width: 100%;
		flex: 0 0 auto;
	}

	.content-device__wrapper.is-reversed .content-device__device {
		order: 1 !important; /* Device sempre primeiro no mobile */
		width: 100%;
		margin-bottom: 0;
		margin-left: 0;
		flex: 0 0 auto;
	}

	.device-wrapper {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 auto;
		display: flex;
		flex-direction: column;
		gap: 20px;
		position: relative;
	}

	.device-file {
		width: 100% !important;
		height: auto;
		max-width: 100% !important;
		display: block;
		order: 1;
		flex-shrink: 0;
	}

	.content-device__title {
		font-size: 36px;
	}

	.content-device__subtitle {
		font-size: 16px;
	}

	.content-device__description {
		font-size: 15px;
	}
}

@media (max-width: 640px) {
	.section-content-device {
		padding: 50px 0;
	}

	.content-device__wrapper {
		gap: 32px;
		padding: 0 18px;
	}

	.content-device__title {
		font-size: 32px;
	}
}

@media (max-width: 480px) {
	.section-content-device {
		padding: 40px 0;
	}

	.content-device__wrapper {
		gap: 30px;
		padding: 0 16px;
	}

	.content-device__wrapper::before {
		left: 32px; /* 16px (wrapper padding) + 16px (content padding) */
	}

	.content-device__content {
		padding-left: 16px;
	}

	.content-device__wrapper.is-reversed .content-device__device {
		padding-left: 0;
	}

	.content-device__device {
		width: 100%;
	}

	.content-device__content {
		width: 100%;
	}

	.device-wrapper {
		width: 100%;
		max-width: 100%;
	}

	.device-file {
		width: 100%;
		height: auto;
	}

	.content-device__title {
		font-size: 28px;
	}

	.content-device__subtitle {
		font-size: 15px;
	}

	.feature-item__title {
		font-size: 16px;
	}

	.feature-item__content p {
		font-size: 14px;
	}

	/* Rectangle 438 - Hide on mobile ou ajustar tamanho */
	.device-rectangle {
		display: none; /* Esconde os retângulos no mobile para não quebrar o layout */
	}
}