/* ============================================================
   Straulix Auto Transport - Main Stylesheet
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
	--color-primary: #1a365d;
	--color-primary-light: #2a4a7f;
	--color-accent: #3182ce;
	--color-accent-hover: #2b6cb0;
	--color-accent-light: #ebf4ff;
	--color-white: #ffffff;
	--color-bg-alt: #f7fafc;
	--color-text: #2d3748;
	--color-text-light: #718096;
	--color-border: #e2e8f0;
	--color-footer-bg: #1a2332;
	--color-footer-text: #a0aec0;
	--color-shadow: rgba(0, 0, 0, 0.08);
	--color-shadow-heavy: rgba(0, 0, 0, 0.15);

	--font-family:
		'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
		Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;

	--header-height: 72px;
	--container-width: 1200px;
	--radius: 8px;
	--radius-lg: 12px;
	--transition: 0.3s ease;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-family);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background-color: var(--color-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color var(--transition);
}

a:hover {
	color: var(--color-accent-hover);
}

ul,
ol {
	list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	font-weight: 700;
	color: var(--color-primary);
}

/* ----- Utility Classes ----- */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

.section {
	padding: 80px 0;
}

.section--alt {
	background-color: var(--color-bg-alt);
}

.section__title {
	font-size: 2rem;
	text-align: center;
	margin-bottom: 16px;
}

.section__subtitle {
	font-size: 1.125rem;
	text-align: center;
	color: var(--color-text-light);
	max-width: 640px;
	margin: 0 auto 48px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	font-family: var(--font-family);
	font-size: 1rem;
	font-weight: 600;
	border: 2px solid transparent;
	border-radius: var(--radius);
	cursor: pointer;
	transition:
		background-color var(--transition),
		color var(--transition),
		border-color var(--transition),
		transform var(--transition),
		box-shadow var(--transition);
	background-color: var(--color-accent);
	color: var(--color-white);
	line-height: 1;
}

.btn:hover {
	background-color: var(--color-accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(49, 130, 206, 0.35);
}

.btn:active {
	transform: translateY(0);
}

.btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	font-family: var(--font-family);
	font-size: 1rem;
	font-weight: 600;
	border: 2px solid var(--color-accent);
	border-radius: var(--radius);
	cursor: pointer;
	transition:
		background-color var(--transition),
		color var(--transition),
		border-color var(--transition),
		transform var(--transition);
	background-color: transparent;
	color: var(--color-accent);
	line-height: 1;
}

.btn-outline:hover {
	background-color: var(--color-accent);
	color: var(--color-white);
	transform: translateY(-1px);
}

.btn-outline:active {
	transform: translateY(0);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   1. Header / Navigation
   ============================================================ */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	background-color: var(--color-white);
	box-shadow: 0 1px 4px var(--color-shadow);
	z-index: 1000;
}

.header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.header__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.375rem;
	font-weight: 800;
	color: var(--color-primary);
	text-decoration: none;
	flex-shrink: 0;
}

.header__logo img {
	height: 40px;
	width: auto;
}

.header__nav {
	display: flex;
	align-items: center;
	gap: 32px;
}

.header__nav-link {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-text);
	text-decoration: none;
	position: relative;
	padding: 4px 0;
}

.header__nav-link::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-accent);
	transition: width var(--transition);
}

.header__nav-link:hover {
	color: var(--color-accent);
}

.header__nav-link:hover::after {
	width: 100%;
}

.header__phone {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--color-accent);
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--transition);
}

.header__phone:hover {
	color: var(--color-accent-hover);
}

.header__phone svg {
	flex-shrink: 0;
}

.header__cta {
	flex-shrink: 0;
}

/* Hamburger Menu */
.header__hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.header__hamburger span {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--color-primary);
	border-radius: 2px;
	transition:
		transform var(--transition),
		opacity var(--transition);
}

.header__hamburger.active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.header__hamburger.active span:nth-child(2) {
	opacity: 0;
}

.header__hamburger.active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   2. Hero
   ============================================================ */
.hero {
	min-height: calc(100vh - var(--header-height));
	margin-top: var(--header-height);
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(
		135deg,
		var(--color-primary) 0%,
		var(--color-primary-light) 50%,
		var(--color-accent) 100%
	);
	color: var(--color-white);
	text-align: center;
	padding: 60px 20px;
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	pointer-events: none;
}

.hero__content {
	position: relative;
	z-index: 1;
	max-width: 720px;
}

.hero__title {
	font-size: 3rem;
	font-weight: 800;
	color: var(--color-white);
	margin-bottom: 20px;
	letter-spacing: -0.02em;
}

.hero__subtitle {
	font-size: 1.25rem;
	opacity: 0.9;
	margin-bottom: 36px;
	line-height: 1.7;
}

.hero__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 40px;
	font-family: var(--font-family);
	font-size: 1.125rem;
	font-weight: 700;
	background-color: var(--color-white);
	color: var(--color-primary);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition:
		transform var(--transition),
		box-shadow var(--transition);
	text-decoration: none;
	line-height: 1;
}

.hero__cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	color: var(--color-primary);
}

.hero__cta:active {
	transform: translateY(0);
}

/* ============================================================
   3. Services
   ============================================================ */
.services__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.services__card {
	background-color: var(--color-white);
	border-radius: var(--radius-lg);
	padding: 36px 28px;
	box-shadow: 0 2px 8px var(--color-shadow);
	transition:
		transform var(--transition),
		box-shadow var(--transition);
	border: 1px solid var(--color-border);
}

.services__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px var(--color-shadow-heavy);
}

.services__icon {
	width: 56px;
	height: 56px;
	border-radius: var(--radius);
	background-color: var(--color-accent-light);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	font-size: 1.5rem;
	color: var(--color-accent);
}

.services__card-title {
	font-size: 1.25rem;
	margin-bottom: 12px;
}

.services__card-desc {
	font-size: 0.9375rem;
	color: var(--color-text-light);
	line-height: 1.7;
}

/* ============================================================
   4. How It Works
   ============================================================ */
.how-it-works__steps {
	display: flex;
	flex-direction: column;
	gap: 48px;
	position: relative;
	max-width: 800px;
	margin: 0 auto;
}

.how-it-works__step {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	position: relative;
}

.how-it-works__number {
	width: 52px;
	height: 52px;
	min-width: 52px;
	border-radius: 50%;
	background-color: var(--color-accent);
	color: var(--color-white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 700;
	position: relative;
	z-index: 1;
}

.how-it-works__step-content {
	flex: 1;
	padding-top: 4px;
}

.how-it-works__step-title {
	font-size: 1.25rem;
	margin-bottom: 8px;
}

.how-it-works__step-desc {
	font-size: 0.9375rem;
	color: var(--color-text-light);
	line-height: 1.7;
}

/* Connecting line between steps */
.how-it-works__step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 52px;
	left: 26px;
	width: 2px;
	height: calc(100% + 48px - 52px);
	background: linear-gradient(
		to bottom,
		var(--color-accent),
		var(--color-border)
	);
	z-index: 0;
}

/* ============================================================
   5. Why Choose Us
   ============================================================ */
.why-choose__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

.why-choose__item {
	text-align: center;
	padding: 24px 16px;
}

.why-choose__icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--color-accent-light);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	font-size: 1.5rem;
	color: var(--color-accent);
}

.why-choose__title {
	font-size: 1.125rem;
	margin-bottom: 10px;
}

.why-choose__desc {
	font-size: 0.9375rem;
	color: var(--color-text-light);
	line-height: 1.7;
	max-width: 280px;
	margin: 0 auto;
}

/* ============================================================
   6. FAQ
   ============================================================ */
.faq__list {
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.faq__item {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color var(--transition);
}

.faq__item:hover {
	border-color: var(--color-accent);
}

.faq__item[open] {
	border-color: var(--color-accent);
}

.faq__question {
	padding: 20px 24px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-primary);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	transition: background-color var(--transition);
	user-select: none;
}

.faq__question::-webkit-details-marker {
	display: none;
}

.faq__question::marker {
	content: '';
}

.faq__question::after {
	content: '+';
	font-size: 1.5rem;
	font-weight: 300;
	color: var(--color-accent);
	flex-shrink: 0;
	transition: transform var(--transition);
}

.faq__item[open] .faq__question::after {
	content: '\2212';
	transform: rotate(180deg);
}

.faq__question:hover {
	background-color: var(--color-bg-alt);
}

.faq__answer {
	padding: 0 24px 20px;
	font-size: 0.9375rem;
	color: var(--color-text-light);
	line-height: 1.8;
}

/* ============================================================
   7. Contact
   ============================================================ */
.contact {
	text-align: center;
}

.contact__info {
	max-width: 600px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.contact__item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-size: 1.0625rem;
	color: var(--color-text);
}

.contact__item-icon {
	font-size: 1.25rem;
	color: var(--color-accent);
	flex-shrink: 0;
}

.contact__item a {
	color: var(--color-text);
}

.contact__item a:hover {
	color: var(--color-accent);
}

/* ============================================================
   8. Footer
   ============================================================ */
.footer {
	background-color: var(--color-footer-bg);
	color: var(--color-footer-text);
	padding: 48px 0 24px;
}

.footer .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

.footer__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.footer__link {
	color: var(--color-footer-text);
	font-size: 0.875rem;
	transition: color var(--transition);
}

.footer__link:hover {
	color: var(--color-white);
}

.footer__copy {
	font-size: 0.8125rem;
	color: var(--color-footer-text);
	text-align: center;
	opacity: 0.7;
}

/* ============================================================
   9. Chat Widget
   ============================================================ */

/* --- Floating Toggle Button --- */
.chat-widget-toggle {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--color-accent);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	z-index: 9999;
	box-shadow: 0 4px 16px rgba(49, 130, 206, 0.4);
	transition:
		transform var(--transition),
		box-shadow var(--transition);
}

.chat-widget-toggle:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 24px rgba(49, 130, 206, 0.5);
}

/* Pulse animation */
.chat-widget-toggle::before {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: var(--color-accent);
	animation: chat-pulse 2s ease-in-out infinite;
	z-index: -1;
}

@keyframes chat-pulse {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}
	50% {
		transform: scale(1.3);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

/* --- Chat Window --- */
.chat-widget-window {
	position: fixed;
	bottom: 92px;
	right: 20px;
	width: 400px;
	max-height: 600px;
	height: 600px;
	background-color: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.95);
	pointer-events: none;
	transition:
		opacity 0.25s ease,
		transform 0.25s ease;
}

.chat-widget-window.open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Chat Header */
.chat-widget-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background-color: var(--color-primary);
	color: var(--color-white);
	flex-shrink: 0;
}

.chat-widget-header-title {
	font-size: 1rem;
	font-weight: 600;
}

.chat-widget-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.chat-widget-reset {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--transition);
	line-height: 1;
}

.chat-widget-reset:hover {
	background: rgba(255, 255, 255, 0.3);
}

.chat-widget-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	transition: background-color var(--transition);
	line-height: 1;
}

.chat-widget-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Messages Area */
.chat-widget-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
}

.chat-widget-messages::-webkit-scrollbar {
	width: 4px;
}

.chat-widget-messages::-webkit-scrollbar-track {
	background: transparent;
}

.chat-widget-messages::-webkit-scrollbar-thumb {
	background-color: var(--color-border);
	border-radius: 4px;
}

/* Message Bubbles */
.chat-widget-message {
	max-width: 80%;
	padding: 10px 16px;
	border-radius: 16px;
	font-size: 0.875rem;
	line-height: 1.5;
	word-wrap: break-word;
}

.chat-widget-message--bot {
	align-self: flex-start;
	background-color: var(--color-bg-alt);
	color: var(--color-text);
	border-bottom-left-radius: 4px;
}

.chat-widget-message--user {
	align-self: flex-end;
	background-color: var(--color-accent);
	color: var(--color-white);
	border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.chat-widget-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 16px;
	align-self: flex-start;
}

.chat-widget-typing-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--color-text-light);
	opacity: 0.4;
	animation: chat-typing 1.4s ease-in-out infinite;
}

.chat-widget-typing-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.chat-widget-typing-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes chat-typing {
	0%,
	60%,
	100% {
		opacity: 0.4;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-4px);
	}
}

/* Input Area */
.chat-widget-input {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--color-border);
	flex-shrink: 0;
}

.chat-widget-input-field {
	flex: 1;
	padding: 10px 16px;
	border: 1px solid var(--color-border);
	border-radius: 24px;
	font-family: var(--font-family);
	font-size: 0.875rem;
	outline: none;
	transition: border-color var(--transition);
	color: var(--color-text);
}

.chat-widget-input-field::placeholder {
	color: var(--color-text-light);
}

.chat-widget-input-field:focus {
	border-color: var(--color-accent);
}

.chat-widget-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--color-accent);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	flex-shrink: 0;
	transition: background-color var(--transition);
}

.chat-widget-send:hover {
	background-color: var(--color-accent-hover);
}

/* Price Display */
.chat-widget-price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary);
	margin-top: 8px;
}



/* Error Message */
.chat-widget-message--error {
	background-color: #fff5f5;
	color: #c53030;
	border-bottom-left-radius: 4px;
}

/* ============================================================
   10. Responsive — Tablet (768px)
   ============================================================ */
@media (min-width: 768px) {
	.services__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.why-choose__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.how-it-works__steps {
		flex-direction: row;
		gap: 0;
		justify-content: space-between;
		align-items: flex-start;
	}

	.how-it-works__step {
		flex-direction: column;
		align-items: center;
		text-align: center;
		flex: 1;
		gap: 16px;
	}

	/* Horizontal connector on desktop */
	.how-it-works__step:not(:last-child)::after {
		top: 26px;
		left: calc(50% + 32px);
		width: calc(100% - 64px);
		height: 2px;
	}

	.how-it-works__step-content {
		padding-top: 0;
	}

	.contact__info {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 40px;
	}
}

/* ============================================================
   Responsive — Desktop (1024px)
   ============================================================ */
@media (min-width: 1024px) {
	.hero__title {
		font-size: 3.75rem;
	}

	.hero__subtitle {
		font-size: 1.375rem;
	}

	.section__title {
		font-size: 2.5rem;
	}

	.why-choose__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ============================================================
   Responsive — Mobile (max 767px)
   ============================================================ */
@media (max-width: 767px) {
	:root {
		--header-height: 60px;
	}

	.header__nav {
		position: fixed;
		top: var(--header-height);
		left: 0;
		right: 0;
		background-color: var(--color-white);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 0;
		box-shadow: 0 4px 12px var(--color-shadow);
		transform: translateY(-100%);
		opacity: 0;
		pointer-events: none;
		transition:
			transform var(--transition),
			opacity var(--transition);
	}

	.header__nav.open {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	.header__nav-link {
		padding: 14px 24px;
		display: block;
	}

	.header__nav-link::after {
		display: none;
	}

	.header__phone {
		font-size: 0.8125rem;
	}

	.header__cta {
		display: none;
	}

	.header__hamburger {
		display: flex;
	}

	.hero__title {
		font-size: 2rem;
	}

	.hero__subtitle {
		font-size: 1rem;
	}

	.hero__cta {
		padding: 14px 32px;
		font-size: 1rem;
	}

	.section {
		padding: 56px 0;
	}

	.section__title {
		font-size: 1.625rem;
	}

	.section__subtitle {
		font-size: 1rem;
		margin-bottom: 36px;
	}

	/* Chat Widget — Full Screen on Mobile */
	.chat-widget-window {
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	.chat-widget-window.open {
		transform: translateY(0) scale(1);
	}
}
