/*
Theme Name: Ehsan Starter
Theme URI: https://example.com/ehsan-starter
Author: Ehsan Tech
Author URI: https://example.com
Description: Clean, minimal, mobile-first light theme for appliance service booking.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ehsan-starter
*/

:root {
	--bg: #ffffff;
	--surface: #f8fafc;
	--text: #0f172a;
	--muted: #64748b;
	--border: #e2e8f0;
	--accent: #2563eb;
	--accent-hover: #1d4ed8;
	--accent-soft: #eff6ff;
	--accent-text: #ffffff;
	--radius: 16px;
	--max-width: 720px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--text);
	background-color: var(--bg);
	-webkit-font-smoothing: antialiased;
}

select,
input,
textarea,
button {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

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

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

/* Smooth Website-Wide Animations */
@keyframes ehsan-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ehsan-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes ehsan-modal-up {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	animation: ehsan-fade-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	position: relative;
}

.header-left {
	display: flex;
	align-items: center;
}

.brand-logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.brand-logo {
	height: 38px;
	width: auto;
	object-fit: contain;
}

.main-navigation {
	display: none;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.main-navigation a {
	display: block;
	padding: 6px 4px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	transition: color 0.15s ease;
}

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

.header-right {
	display: flex;
	align-items: center;
}

.header-book-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 20px;
	border-radius: 9999px;
	background: var(--accent);
	color: var(--accent-text);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.header-book-btn:hover {
	background: var(--accent-hover);
}

/* Hero / Appliance Selector */
.hero-section {
	padding: 32px 0 28px;
	animation: ehsan-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.hero-intro {
	text-align: center;
	margin-bottom: 24px;
}

.hero-title {
	margin: 0 0 10px;
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	letter-spacing: -0.025em;
	color: var(--text);
}

.hero-subtitle {
	margin: 0 auto;
	max-width: 540px;
	font-size: 0.98rem;
	font-weight: 500;
	line-height: 1.55;
	color: var(--muted);
	text-align: center;
}

.hero-card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 20px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

/* Dedicated Booking Page */
.booking-page-section {
	padding: 28px 0 48px;
	animation: ehsan-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.booking-page-card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 24px 20px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.booking-back-link {
	display: inline-block;
	margin-bottom: 12px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--accent);
	text-decoration: none;
}

.booking-page-title {
	margin-bottom: 8px;
}

.booking-page-form {
	margin-top: 20px;
}

/* PCB Repairing Section & Page */
.pcb-section {
	padding: 8px 0 28px;
	animation: ehsan-fade-up 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.pcb-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 24px 20px;
	text-align: center;
}

.pcb-title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--text);
}

.pcb-desc {
	margin: 0 auto 18px;
	max-width: 460px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--muted);
}

.pcb-cta-btn {
	margin-top: 0;
	max-width: 280px;
}

.pcb-info-box {
	margin-top: 22px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
}

.pcb-info-heading {
	margin: 0 0 8px;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--muted);
}

.pcb-address {
	margin: 0 0 20px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.65;
	color: var(--text);
}

.pcb-contacts {
	margin: 0 0 18px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.8;
}

.pcb-contacts a {
	color: var(--accent);
	text-decoration: none;
}

.pcb-contacts a:hover {
	text-decoration: underline;
}

.pcb-whatsapp-btn {
	margin-top: 0;
}

.section-label {
	display: block;
	margin: 0 0 8px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--muted);
}

.appliance-select {
	width: 100%;
	appearance: none;
	background-color: var(--surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 48px 16px 18px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--text);
	cursor: pointer;
}

.appliance-select:focus {
	outline: none;
	border-color: var(--border);
}

.appliance-select.is-invalid {
	border-color: #dc2626;
}

.appliance-error {
	margin: 8px 0 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #dc2626;
}

.service-details {
	margin-top: 22px;
}

.service-details.is-animating {
	animation: ehsan-fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.service-details[hidden] {
	display: none;
}

/* Horizontal Price Card Slider */
.price-slider {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 4px 2px 10px;
	scrollbar-width: none;
}

.price-slider::-webkit-scrollbar {
	display: none;
}

.price-card {
	flex: 0 0 185px;
	width: 185px;
	min-width: 185px;
	scroll-snap-align: start;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	padding: 18px 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	text-align: left;
	gap: 10px;
	cursor: pointer;
	transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

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

.price-card.is-selected {
	border-color: var(--accent);
	background: var(--accent-soft);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
}

.price-card.is-selected .price-label,
.price-card.is-selected .price-value {
	color: var(--accent-hover);
}

.price-label {
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	overflow-wrap: break-word;
	width: 100%;
}

.price-value {
	font-size: 1.08rem;
	font-weight: 800;
	color: var(--text);
	line-height: 1.1;
}

.price-value--big {
	font-size: 1.53rem;
}

/* Book Button */
.book-btn,
.submit-btn {
	margin-top: 18px;
	width: 100%;
	padding: 16px 24px;
	border: none;
	border-radius: var(--radius);
	background: var(--accent);
	color: var(--accent-text);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.submit-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

.btn-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 9999px;
	animation: ehsan-spin 0.7s linear infinite;
}

.btn-spinner[hidden] {
	display: none;
}

@keyframes ehsan-spin {
	to {
		transform: rotate(360deg);
	}
}

.booking-error {
	margin: 4px 0 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #dc2626;
	text-align: center;
}

.book-btn:hover,
.submit-btn:hover {
	background: var(--accent-hover);
}

.service-note {
	margin: 12px 0 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
	text-align: center;
}

/* Team Ehsan Section */
.team-section {
	padding: 28px 0 52px;
	animation: ehsan-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

.team-title {
	margin: 0 0 24px;
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -0.02em;
	text-align: center;
	color: var(--text);
}

.team-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.team-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
}

.team-avatar {
	width: 100%;
	max-width: 120px;
	aspect-ratio: 1 / 1;
	border-radius: 9999px;
	object-fit: cover;
	border: 2px solid var(--border);
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.team-card:hover .team-avatar {
	transform: scale(1.03);
	border-color: var(--accent);
}

.team-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	color: var(--text);
}

/* Footer */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 22px 0;
	background: var(--bg);
}

.footer-inner {
	text-align: center;
}

.footer-copy {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--muted);
}

/* Booking Modal */
.booking-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.booking-modal[hidden] {
	display: none;
}

.booking-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 9, 11, 0.45);
	animation: ehsan-fade-in 0.22s ease both;
}

.booking-dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: var(--bg);
	border-radius: 20px 20px 0 0;
	padding: 24px 20px 28px;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
	animation: ehsan-modal-up 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.booking-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.booking-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 800;
}

.booking-close {
	background: transparent;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--muted);
	cursor: pointer;
	padding: 4px 8px;
}

.booking-appliance {
	margin: 0 0 18px;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--muted);
}

.booking-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-field label {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--text);
}

.form-field textarea,
.phone-input-group input {
	width: 100%;
	border: 1.5px solid var(--border);
	border-radius: 12px;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: var(--text);
	background: var(--surface);
}

.form-field textarea:focus,
.phone-input-group input:focus {
	outline: none;
	border-color: var(--text);
	background: var(--bg);
}

.phone-input-group {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.phone-prefix {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 800;
	color: var(--text);
	user-select: none;
}

.booking-success {
	text-align: center;
	padding: 12px 0 4px;
}

.booking-success-title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--text);
}

.booking-success-summary {
	margin: 0 0 16px;
	font-size: 0.95rem;
	color: var(--muted);
	font-weight: 600;
}

/* Team Member Details Modal */
.team-modal-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding-bottom: 8px;
}

.team-modal-photo {
	width: 112px;
	height: 112px;
	border-radius: 9999px;
	object-fit: cover;
	border: 2px solid var(--border);
}

.team-modal-name {
	margin: 4px 0 0;
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--text);
}

.team-modal-joined {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--accent);
}

.team-modal-experience {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--text);
}

.team-modal-description {
	margin: 4px 0 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--muted);
	line-height: 1.6;
}

/* Price Details Popup */
.charge-modal-body {
	text-align: center;
	padding: 4px 0 6px;
}

.charge-modal-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.charge-modal-amount {
	margin: 8px 0 14px;
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--accent);
}

.charge-modal-description {
	margin: 0 0 8px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--muted);
	line-height: 1.6;
}

/* Thank You Page */
.thank-you-section {
	padding: 56px 0;
}

.thank-you-card {
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	padding: 36px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.thank-you-icon {
	width: 60px;
	height: 60px;
	border-radius: 9999px;
	background: var(--accent);
	color: var(--accent-text);
	font-size: 1.8rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.thank-you-title {
	margin: 4px 0 0;
	font-size: 1.9rem;
	font-weight: 800;
	color: var(--text);
}

.thank-you-message {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: var(--muted);
	max-width: 420px;
}

.thank-you-summary {
	width: 100%;
	max-width: 440px;
	margin-top: 8px;
	padding: 14px 16px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 12px;
	font-size: 0.92rem;
	color: var(--text);
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

.thank-you-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
}

.thank-you-row:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.thank-you-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
	flex-shrink: 0;
}

.thank-you-value {
	font-weight: 700;
	color: var(--text);
	text-align: right;
	word-break: break-word;
}

.thank-you-home-btn {
	max-width: 260px;
}

@media (min-width: 720px) {
	.main-navigation {
		display: block;
	}

	.main-navigation ul {
		flex-direction: row;
		align-items: center;
		gap: 24px;
	}

	.brand-logo {
		height: 44px;
	}

	.hero-title {
		font-size: 2.35rem;
	}

	.hero-card,
	.booking-page-card {
		padding: 28px;
	}

	.price-card {
		flex: 0 0 195px;
		width: 195px;
		min-width: 195px;
	}

	.team-title {
		font-size: 2.35rem;
	}

	.team-avatar {
		max-width: 150px;
	}

	.booking-modal {
		align-items: center;
		padding: 20px;
	}

	.booking-dialog {
		border-radius: 20px;
		padding: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
