/* Services Section - Mobile First */

/* Base styles - Mobile */
.services-section {
	width: 100%;
	margin-top: 3rem;
	padding: var(--spacing-xl) 0;
	background: var(--primary-white);
	text-align: center;
}

.services-intro {
	margin-bottom: 1.5rem;
	justify-content: flex-start;
	flex-wrap: wrap;
}

.services-intro-text {
	width: 100%;
}

.services-intro-image {
	width: 100%;
	margin-top: 2rem;
	text-align: center;
}

.services-intro-img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
	margin: 0 auto;
}

.services-title {
	font-family: var(--font-family-primary);
	font-weight: 700;
	font-size: 20px;
	line-height: 130%;
	letter-spacing: -2%;
	color: var(--primary-violet-dark);
	margin-bottom: var(--spacing-md);
	text-wrap: wrap;
	padding: 0;
}

.services-description,
.services-description p {
	font-family: var(--font-family-primary);
	font-weight: 500;
	font-size: 0.75rem;
	line-height: 150%;
	letter-spacing: -2%;
	color: var(--primary-violet-dark);
	text-wrap: wrap;
	max-width: 600px;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.services-grid {
	width: 100%;
	flex-wrap: wrap;
	margin: 0;
	max-width: 1300px;
	gap: 0.5rem;
}

.services-grid [class*='col-'] {
	flex: 0 0 100%; /* Mobile: full width */
	max-width: 100%;
	padding: var(--spacing-md) 0; /* Równy padding na mobile, mniejszy boczny */
	display: flex;
}

/* Wrapper dla service-box - teraz jest linkiem */
.services-grid a[class*='col-'] {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Service Box Styles */
.service-box {
	width: 100%;
	background: #efecf1;
	padding: 16px;
	flex-direction: column;
	justify-content: flex-start;
	gap: 10px;
	height: 239px;
	margin: 0 auto;
	flex: 1;
	border-radius: 4px;
	transition: background 0.3s ease, color 0.3s ease;
}

/* Touch feedback dla urządzeń mobilnych */
.service-box:active,
.service-box.tapped {
	background: var(--service-hover-gradient);
	color: var(--white-primary);
}

.service-box:active .service-title,
.service-box:active .service-description,
.service-box.tapped .service-title,
.service-box.tapped .service-description {
	color: var(--white-primary);
}

.service-box:active .service-button,
.service-box.tapped .service-button {
	background: var(--white-primary);
	color: var(--primary-violet-dark);
	border: 1px solid var(--white-primary);
	gap: 0.5rem;
	padding-left: 1.75rem;
}

.service-box:active .service-button-arrow,
.service-box.tapped .service-button-arrow {
	width: 20px;
	opacity: 1;
}

/* Hover tylko dla urządzeń z myszką (desktop) */
@media (hover: hover) and (pointer: fine) {
	.service-box:hover {
		background: var(--service-hover-gradient);
		color: var(--white-primary);
	}

	.service-box:hover .service-title,
	.service-box:hover .service-description {
		color: var(--white-primary);
	}

	.service-box:hover .service-button {
		background: var(--white-primary);
		color: var(--primary-violet-dark);
		border: 1px solid var(--white-primary);
		gap: 0.5rem;
		padding-left: 1.75rem;
	}

	.service-box:hover .service-button-arrow {
		width: 20px;
		opacity: 1;
	}
}

.service-title {
	max-width: 100%;
	font-family: var(--font-family-primary);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -2%;
	color: var(--primary-violet-dark);
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-wrap: nowrap;
}

.service-description {
	font-family: var(--font-family-primary);
	font-weight: 500;
	font-size: 0.75rem; /* Mobile: 12px */
	line-height: 1.5;
	letter-spacing: -3%;
	color: var(--primary-violet-dark);
	margin: 0;
	flex-grow: 1;
	text-align: justify;
}

.services-description p {
	font-family: var(--font-family-primary);
	font-weight: 500;
	font-size: 0.75rem;
	line-height: 150%;
	letter-spacing: -2%;
	color: var(--primary-violet-dark);
	text-wrap: wrap;
	max-width: 600px;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* Service Button Wrapper */
.service-button-wrapper {
	display: inline-block;
	width: fit-content;
	height: fit-content;
	margin-top: auto;
	align-self: flex-end;
}

.service-button {
	display: inline-flex;
	align-items: center;
	gap: 0;
	background: white;
	color: var(--primary-violet-dark);
	padding: 0.75rem 1.5rem;
	text-decoration: none;
	font-family: var(--font-family-primary);
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.3s ease, gap 0.3s ease-in-out;
	border: 1px solid var(--primary-violet-dark);
	overflow: hidden;
	pointer-events: none; /* Wyłącz klikanie - cały box jest linkiem */
}

/* Service Button Arrow */
.service-button-arrow {
	width: 0;
	height: 20px;
	opacity: 0;
	transition: all 0.3s ease-in-out;
	filter: brightness(0) saturate(100%) invert(15%) sepia(85%) saturate(2000%) hue-rotate(260deg) brightness(0.8) contrast(1.2);
	flex-shrink: 0;
}

/* Hover dla przycisku tylko na desktop - na mobile cały box jest klikalny */
@media (hover: hover) and (pointer: fine) {
	.service-button:hover {
		background: #f8f9fa;
		transform: translateY(-1px);
		box-shadow: var(--shadow-md);
	}
}

/* Technologies Slider Styles */
.technologies-slider-container {
	display: none;
	height: fit-content;
	width: 100%;
	overflow: hidden;
	position: relative;
	background: var(--white-primary);
	align-items: center;
	margin-bottom: 2rem;
	padding: 2rem 0 1.5rem 0;
}

.technologies-slider {
	height: 100%;
	align-items: center;
	white-space: nowrap;
	width: max-content;
	animation: slideTechnologiesLeft 15s linear infinite;
	animation-play-state: paused;
	animation-delay: -5s;
	will-change: transform;
}

.tech-slider-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 75%;
	width: auto;
	margin-right: 4.5rem;
	flex-shrink: 0;
}

.technology-logo {
	height: 40px; /* Rozmiar dla urządzeń mobilnych */
	width: 40px;
	object-fit: contain;
}

/* Technologies Slider Animation */
@keyframes slideTechnologiesLeft {
	0% {
		transform: translateX(-50%);
	}
	100% {
		transform: translateX(0);
	}
}

/* Text Slider Styles */
.slider-section {
	margin-top: var(--spacing-md);
	width: 100%;
	padding: 0;
	position: relative;
}

.slider-box {
	width: 100%;
	background: var(--white-primary);
	position: relative;
	width: 100vw;
	padding: 0;
}

.text-slider-container {
	height: 60px; /* Mobile: 60px */
	width: 100%;
	max-width: 100vw;
	overflow: hidden;
	position: relative;
	background: var(--light-to-dark-violet-gradient);
	padding: 0;
	align-items: center;
	-webkit-overflow-scrolling: touch;
}

.text-slider {
	height: 100%;
	animation: slideLeft 200s linear infinite;
	white-space: nowrap;
	width: max-content;
	align-items: center;
	animation-play-state: running;
	will-change: transform;
}

.slider-text {
	font-family: var(--font-family-primary);
	font-weight: 700;
	font-size: 24px; /* Mobile: 24px */
	color: var(--white-primary);
	display: inline-block;
	flex-shrink: 0;
	margin-right: 4rem;
}

/* Animation for sliding text from right to left - continuous loop */
@keyframes slideLeft {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
	/* Services Section */
	.services-title {
		font-size: 1.5rem; /* 24px */
	}

	.services-description {
		font-size: 14px;
	}

	/* Service Box */
	.service-box {
		max-width: 85vw;
	}

	.service-title {
		font-size: 1.75rem; /* 28px */
	}

	.service-description {
		font-size: 0.875rem; /* 14px */
	}

	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 0.875rem;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 600px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.service-button {
		padding: 0.875rem 1.5rem;
		font-size: 0.95rem;
	}

	.service-button-arrow {
		height: 22px;
	}

	.service-box:hover .service-button-arrow {
		width: 22px;
	}

	.service-box:hover .service-button {
		padding-left: 1.75rem;
	}

	/* Text Slider */
	.text-slider-container {
		height: 100px;
	}

	.slider-text {
		font-size: 24px;
	}

	/* Technologies Slider */
	.technologies-slider-container {
		height: 100px;
	}

	.technology-logo {
		height: 60px;
		width: auto;
	}
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
	/* Services Section */
	.services-section {
		padding-top: 5rem;
		margin-top: 0;
	}

	.services-intro {
		margin-bottom: 4rem;
	}

	.services-intro-image {
		margin-top: 3rem;
	}

	.services-title {
		font-size: 2rem; /* 32px */
		line-height: 150%;
		text-wrap: nowrap;
		background: linear-gradient(90deg, var(--primary-violet-dark) 0%, #680cae 100%);
		-webkit-text-fill-color: transparent;
		background-clip: text;
		padding: 0;
		text-align: left;
	}

	.services-description {
		max-width: 800px;
		font-size: 20px;
		line-height: 1.5;
		letter-spacing: -2%;
		padding: 0;
		font-weight: 500;
		text-align: left;
	}

	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 20px;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 695px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	/* Service Box */
	.service-box {
		max-width: 80vw;
		padding: 24px;
		height: auto;
		min-height: 300px;
	}

	.service-title {
		font-size: 1.875rem; /* 30px */
		line-height: 120%;
		letter-spacing: -3%;
	}

	.service-description {
		font-size: 1rem; /* 16px */
		line-height: 1.6;
		letter-spacing: -2%;
		margin: 0;
		text-align: left;
	}

	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 1rem;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 695px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.service-button {
		padding: 0.875rem 1.5rem;
		font-size: 0.95rem;
	}

	.service-button-arrow {
		height: 24px;
	}

	.service-box:hover .service-button-arrow {
		width: 24px;
	}

	.service-box:hover .service-button {
		padding-left: 1.875rem;
	}

	/* Text Slider */
	.slider-section {
		position: relative;
		width: 100vw;
		left: 50%;
		transform: translateX(-50%);
		margin-left: 0;
		margin-right: 0;
	}

	.text-slider-container {
		height: 120px;
	}

	.slider-text {
		font-size: 1.25rem;
		margin-right: 4rem;
	}

	/* Technologies Slider */
	.technologies-slider-container {
		height: 120px;
	}

	.technology-logo {
		height: 70px;
		width: auto;
	}
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
	/* Services Section */
	.services-description {
		margin: 0;
	}

	.services-intro {
		flex-direction: row;
		justify-content: space-between;
		align-items: stretch;
	}

	.services-intro-text {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.services-intro-image {
		width: 40%;
		margin-top: 0;
		display: flex;
		justify-content: flex-end;
		align-items: stretch;
	}

	.services-intro-img {
		max-width: 100%;
		width: 100%;
		height: 100%;
		object-fit: cover;
		margin: 0;
	}

	.services-grid [class*='col-'] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0; /* Remove bottom margin on desktop */
	}

	.services-grid {
		max-width: 1600px;
		margin: 0 auto;
	}

	/* Service Box */
	.service-box {
		height: 300px;
		padding: 34px;
	}

	.service-title {
		font-size: 1.875rem; /* 30px */
		text-wrap: nowrap;
	}

	.service-description {
		font-size: 1rem; /* 16px */
		text-align: left;
	}

	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 1rem;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 600px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.service-button {
		padding: 0.875rem 1.5rem;
		font-size: 0.95rem;
	}

	.service-button-arrow {
		height: 24px;
	}

	.service-box:hover .service-button-arrow {
		width: 24px;
	}

	.service-box:hover .service-button {
		padding-left: 2.25rem;
		gap: 0.75rem;
	}

	/* Text Slider */
	.slider-section {
		margin-top: var(--spacing-xxl);
	}

	.slider-text {
		font-size: 64px;
		margin-right: 5rem;
	}

	/* Technologies Slider */
	.technologies-slider-container {
		background-color: var(--grey-primary);
		margin-bottom: 0;
	}
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
	/* Services Section */
	.services-section {
		padding: 100px 2rem 0 2rem;
	}

	.services-intro {
		max-width: 1600px;
		margin-left: auto;
		margin-right: auto;
	}

	.services-intro-text {
		width: 50%;
	}

	.services-title {
		font-size: 25px;
	}

	.services-intro-image {
		width: 40%;
		display: flex;
		justify-content: flex-end;
	}

	.services-description {
		font-size: 20px;
		max-width: 950px;
		line-height: 1.6;
		text-align: left;
	}

	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 20px;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 600px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.services-grid {
		width: 100%;
		gap: 0;
		margin: 0 auto;
	}

	.text-slider-container {
		height: fit-content;
		padding: 1rem 0;
	}

	.services-grid [class*='col-'] {
		flex: 0 0 32%;
		max-width: 32%;
	}

	/* Service Box */
	.service-box {
		width: 100%;
		max-width: 100%;
		height: 400px;
		padding: 32px;
	}

	/* Text Slider */
	.slider-text {
		font-size: 45px;
		margin-right: 6rem;
	}

	.technologies-slider-container {
		height: fit-content;
		padding: 3rem 0 5rem 0;
	}

	.technology-logo {
		height: 4rem;
		width: auto;
	}
}

@media (min-width: 1400px) {
	.services-section {
		padding: 100px 2rem 0 1.95rem;
	}
	
	.services-description p {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-size: 20px;
		line-height: 150%;
		letter-spacing: -2%;
		color: var(--primary-violet-dark);
		text-wrap: wrap;
		max-width: 695px;
		margin: 0 auto;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}
}

@media (min-width: 1800px) {
	.slider-text {
		font-size: 64px;
	}
	.services-section {
		margin-bottom: 0;
	}

	.services-title {
		font-size: 28px;
	}
	
	.services-description p {
		max-width: 750px;
	}
}
