/**
 * Text and Image Block Styles
 * Text and image block styles
 *
 * @package Experis_Academy
 */

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* ===================================
   Container & Layout
   =================================== */

.text-and-image {
	position: relative;
	width: 100%;
	padding: 72px 0;
	background-color: var(--color-bg-white);
	overflow: hidden;
	animation: fadeIn 0.6s ease-out;
}

.text-and-image__container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 40px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
	direction: ltr;
}

/* ===================================
   Background Colors
   =================================== */

.text-and-image--bg-white {
	background-color: var(--color-bg-white);
}

.text-and-image--bg-light {
	background-color: var(--color-bg-grey);
}

.text-and-image--bg-violet {
	background-color: var(--color-violet-primary);
}

.text-and-image--bg-violet .text-and-image__subtitle,
.text-and-image--bg-violet .text-and-image__title,
.text-and-image--bg-violet .text-and-image__description {
	color: var(--color-white);
}

/* ===================================
   Image Position Variants
   =================================== */

/* Image on Right (image on right side) */
.text-and-image--image-right .text-and-image__container {
	grid-template-areas: "content image";
}

.text-and-image--image-right .text-and-image__content {
	grid-area: content;
}

.text-and-image--image-right .text-and-image__image-wrapper {
	grid-area: image;
}

/* Image on Left (image on left side) */
.text-and-image--image-left .text-and-image__container {
	grid-template-areas: "image content";
}

.text-and-image--image-left .text-and-image__content {
	grid-area: content;
}

.text-and-image--image-left .text-and-image__image-wrapper {
	grid-area: image;
}

/* ===================================
   Content Section
   =================================== */

.text-and-image__content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	direction: rtl;
	text-align: right;
}

/* Header Container (Subtitle + Title) */
.text-and-image__header {
	display: flex;
	flex-direction: column;
	gap: 8px;
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Subtitle */
.text-and-image__subtitle {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-semibold);
	line-height: 1.3;
	color: var(--color-grey-1);
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Title */
.text-and-image__title {
	font-family: var(--font-family-hebrew);
	line-height: 1.2;
	color: var(--color-violet-primary);
	margin: 0;
}

/* Description */
.text-and-image__description {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-normal);
	line-height: 1.6;
	color: var(--color-grey-1);
	margin: 0;
	animation: fadeInUp 0.8s ease-out 0.3s both;
}

.text-and-image__description p {
	margin: 0 0 16px 0;
}

.text-and-image__description p:last-child {
	margin-bottom: 0;
}

/* ===================================
   Image Section
   =================================== */

.text-and-image__image-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 400px;
	animation: scaleIn 1s ease-out 0.4s both;
}

.text-and-image__image {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.text-and-image__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

/* Hover effect */
.text-and-image__image:hover img {
	transform: scale(1.05);
}

/* X Icon Decoration */
.text-and-image__icon {
	position: absolute;
	bottom: -40px;
	left: -40px;
	width: 180px;
	height: 180px;
	z-index: 2;
	pointer-events: none;
	animation: fadeIn 1.2s ease-out 0.8s both;
}

.text-and-image__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: none;
}

.text-and-image__image:hover .text-and-image__icon img {
	transform: none;
}

/* ===================================
   Features Grid
   =================================== */

.text-and-image__features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 24px;
	margin: 24px 0;
	animation: fadeInUp 0.8s ease-out 0.5s both;
}

.text-and-image__feature {
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.text-and-image__feature:hover {
	transform: translateY(-2px);
}

.text-and-image__feature-title {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
	color: var(--color-violet-primary);
	margin: 0;
	line-height: 1.3;
}

.text-and-image__feature-description {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-normal);
	color: var(--color-grey-1);
	margin: 0;
	line-height: 1.5;
}

/* Features on violet background */
.text-and-image--bg-violet .text-and-image__feature-title {
	color: var(--color-white);
}

.text-and-image--bg-violet .text-and-image__feature-description {
	color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Stats Section
   =================================== */

.text-and-image__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	margin: 24px 0;
	padding: 24px 0;
	border-top: 2px solid var(--color-border);
	border-bottom: 2px solid var(--color-border);
	animation: fadeInUp 0.8s ease-out 0.6s both;
}

.text-and-image__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 120px;
}

.text-and-image__stat-number {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-4xl);
	font-weight: var(--font-weight-bold);
	color: var(--color-violet-primary);
	margin: 0;
	line-height: 1;
}

.text-and-image__stat-label {
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-normal);
	color: var(--color-grey-1);
	margin: 0;
	line-height: 1.4;
}

/* Stats on violet background */
.text-and-image--bg-violet .text-and-image__stats {
	border-color: rgba(255, 255, 255, 0.2);
}

.text-and-image--bg-violet .text-and-image__stat-number {
	color: var(--color-white);
}

.text-and-image--bg-violet .text-and-image__stat-label {
	color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Buttons
   =================================== */

.text-and-image__buttons {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 24px;
	animation: fadeInUp 0.8s ease-out 0.7s both;
}

.text-and-image__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 32px;
	border-radius: 108px;
	font-family: var(--font-family-hebrew);
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-normal);
	line-height: 1.3;
	text-decoration: none;
	transition: all var(--transition-base);
	cursor: pointer;
	white-space: nowrap;
}

.text-and-image__button svg {
	display: none;
}

/* Primary Button – gradient from .btn-violet (global) */
.text-and-image__button--primary {
	border: none;
}

.text-and-image__button--primary:hover {
	transform: translateY(-2px);
}

.text-and-image__button--primary:focus {
	outline: 2px solid var(--color-violet-primary);
	outline-offset: 2px;
}

.text-and-image__button--primary:active {
	transform: translateY(0);
}

/* Secondary Button */
.text-and-image__button--secondary {
	background: transparent;
	border: 1px solid var(--color-violet-primary);
	color: var(--color-violet-primary);
}

.text-and-image__button--secondary:hover {
	background: var(--color-violet-primary);
	color: var(--color-white);
}

.text-and-image__button--secondary:focus {
	outline: 2px solid var(--color-violet-primary);
	outline-offset: 2px;
}

.text-and-image__button--secondary:active {
	transform: translateY(0);
}

/* Buttons on violet background */
.text-and-image--bg-violet .text-and-image__button--primary {
	background: var(--color-white);
	color: var(--color-violet-primary);
	border: none;
}

.text-and-image--bg-violet .text-and-image__button--primary:hover {
	background: var(--color-bg-grey);
	box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.text-and-image--bg-violet .text-and-image__button--secondary {
	background: transparent;
	color: var(--color-white);
	border: 1px solid var(--color-white);
}

.text-and-image--bg-violet .text-and-image__button--secondary:hover {
	background: var(--color-white);
	color: var(--color-violet-primary);
}

/* ===================================
   Tablet Responsive (max-width: 1024px)
   =================================== */

@media (max-width: 1024px) {
	.text-and-image {
		padding: 60px 0;
	}
	
	.text-and-image__container {
		gap: 40px;
		padding: 0 32px;
	}
	
	.text-and-image__subtitle {
		font-size: var(--font-size-sm);
	}
	
}

/* ===================================
   Mobile Responsive (max-width: 768px)
   =================================== */

@media (max-width: 768px) {
	.text-and-image {
		padding: 56px 0;
	}
	
	/* Always stack image on top on mobile */
	.text-and-image__container,
	.text-and-image--image-right .text-and-image__container,
	.text-and-image--image-left .text-and-image__container {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 0 16px;
		grid-template-areas: 
			"image"
			"content";
	}
	
	.text-and-image__subtitle {
		font-size: var(--font-size-xs);
	}
		
	.text-and-image__description {
		font-size: var(--font-size-base);
	}
	
	.text-and-image__image-wrapper {
		min-height: 300px;
	}
	
	/* X Icon mobile */
	.text-and-image__icon {
		width: 120px;
		height: 120px;
		bottom: -30px;
		left: -30px;
	}
	
	/* Features mobile */
	.text-and-image__features {
		grid-template-columns: 1fr;
		gap: 16px;
		margin: 16px 0;
	}
	
	.text-and-image__feature-title {
		font-size: var(--font-size-base);
	}
	
	.text-and-image__feature-description {
		font-size: var(--font-size-sm);
	}
	
	/* Stats mobile */
	.text-and-image__stats {
		gap: 24px;
		margin: 16px 0;
		padding: 16px 0;
	}
	
	.text-and-image__stat {
		flex: 1;
		min-width: 100px;
	}
	
	.text-and-image__stat-number {
		font-size: var(--font-size-3xl);
	}
	
	.text-and-image__stat-label {
		font-size: var(--font-size-sm);
	}
	
	/* Buttons mobile */
	.text-and-image__buttons {
		gap: 12px;
		margin-top: 16px;
	}
	
	.text-and-image__button {
		flex: 1;
		padding: 14px 28px;
		font-size: var(--font-size-base);
	}
}

/* ===================================
   Accessibility Enhancements
   =================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
	.text-and-image__button {
		border-width: 3px;
	}
	
	.text-and-image__image {
		border: 2px solid currentColor;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.text-and-image,
	.text-and-image__header,
	.text-and-image__description,
	.text-and-image__image-wrapper,
	.text-and-image__features,
	.text-and-image__stats,
	.text-and-image__buttons,
	.text-and-image__icon,
	.text-and-image__feature,
	.text-and-image__image img,
	.text-and-image__button {
		animation: none;
		transition: none;
	}
	
	.text-and-image__image:hover img {
		transform: none;
	}
	
	.text-and-image__button:hover {
		transform: none;
	}
	
	.text-and-image__feature:hover {
		transform: none;
	}
}

/* Print styles */
@media print {
	.text-and-image {
		padding: 20px 0;
		page-break-inside: avoid;
	}
	
	.text-and-image__button {
		border: 1px solid #000;
		text-decoration: underline;
	}
}

/* ===================================
   Performance Optimizations
   =================================== */

/* GPU acceleration for animations */
.text-and-image__image img,
.text-and-image__button {
	will-change: transform;
}

/* Content visibility for below-fold content */
.text-and-image {
	content-visibility: auto;
	contain-intrinsic-size: auto 600px;
}
