/**
 * استایل ریسپانسیو viraving
 *
 * @package Viraving
 */

/* ============================================================
   لپ‌تاپ بزرگ: <= 1280px
   ============================================================ */
@media (max-width: 1280px) {
	:root {
		--container-max: var(--container-lg);
	}
}

/* ============================================================
   پنهان کردن top-bar در تبلت و موبایل
   ============================================================ */
@media (max-width: 1024px) {
	.top-bar-info {
		gap: var(--space-3);
	}

	.top-bar-info .top-bar-item span {
		display: none;
	}

	.header-cta span {
		display: none;
	}

	.header-cta {
		width: 42px;
		height: 42px;
		padding: 0;
		border-radius: 12px;
	}
}

@media (max-width: 768px) {
	.top-bar {
		display: none;
	}
}

/* ============================================================
   تبلت بزرگ: <= 1024px
   ============================================================ */
@media (max-width: 1024px) {
	:root {
		--text-7xl: 3.5rem;
		--text-6xl: 3rem;
		--text-5xl: 2.5rem;
	}

	/* هدر: پنهان کردن منوی دسکتاپ */
	.main-navigation {
		display: none;
	}

	.menu-toggle {
		display: flex;
	}

	/* چیدمان‌های ۲ ستونی به ۱ ستونی */
	.about-grid,
	.contact-grid {
		grid-template-columns: 1fr;
		gap: var(--space-8);
	}

	.blog-layout {
		grid-template-columns: 1fr;
	}

	.blog-sidebar {
		position: static;
	}

	/* گرید فوتر */
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-8);
	}

	.footer-brand {
		grid-column: 1 / -1;
	}

	/* portfolio */
	.portfolio-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ============================================================
   تبلت: <= 768px
   ============================================================ */
@media (max-width: 768px) {
	:root {
		--container-padding: 1.25rem;
	}

	h1 { font-size: var(--text-4xl); }
	h2 { font-size: var(--text-3xl); }
	h3 { font-size: var(--text-2xl); }

	/* کاهش padding بخش‌ها */
	.section {
		padding: clamp(3rem, 8vw, 5rem) 0;
	}

	/* هیرو */
	.hero {
		min-height: auto;
		padding: var(--space-20) 0 var(--space-16);
	}

	.hero-actions {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		width: 100%;
		max-width: 100%;
		margin-inline: auto;
		gap: 0.625rem;
	}

	.hero-actions .btn {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		justify-content: center;
		padding: 0.75rem 0.625rem;
		font-size: 0.8125rem;
	}

	.hero-stats {
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: space-between;
		align-items: center;
		gap: 0;
		padding: 1rem 0.75rem;
	}

	.hero-stat {
		flex: 1 1 0;
		min-width: 0;
		position: relative;
		padding: 0 0.375rem;
	}

	.hero-stat:not(:last-child)::after {
		content: '';
		position: absolute;
		top: 50%;
		inset-inline-end: 0;
		transform: translateY(-50%);
		width: 1px;
		height: 28px;
		background: var(--border-color);
		opacity: 0.55;
	}

	.hero-stat-number {
		font-size: 1.25rem;
	}

	.hero-stat-label {
		font-size: 0.6875rem;
		line-height: 1.35;
	}

	.hero-scroll {
		display: none;
	}

	/* فرم تماس */
	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	/* گرید‌های ۳ و ۴ ستونی به ۱ ستونی */
	.services-grid,
	.blog-grid,
	.stats-grid {
		grid-template-columns: 1fr;
	}

	/* تیم — دو ستونه در موبایل */
	.team-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
	}

	.team-card {
		padding: 1rem 0.75rem;
	}

	.team-avatar {
		width: 80px;
		height: 80px;
		margin-bottom: 0.75rem;
		border-width: 3px;
	}

	.team-name {
		font-size: 0.875rem;
	}

	.team-position {
		font-size: 0.75rem;
		margin-bottom: 0.75rem;
	}

	.portfolio-grid {
		grid-template-columns: 1fr;
	}

	/* درباره ما */
	.about-features {
		grid-template-columns: 1fr;
	}

	/* فرآیند کار */
	.process-timeline {
		--process-dot: 56px;
	}

	.process-step {
		padding-inline-start: calc(var(--process-dot) + var(--space-6));
		padding-inline-end: 0;
	}

	.process-number {
		font-size: var(--text-xl);
	}

	/* نظرات */
	.testimonial-card {
		padding: var(--space-6);
	}

	.testimonial-text {
		font-size: var(--text-lg);
	}

	/* فوتر */
	.footer-grid {
		grid-template-columns: 1fr;
		gap: var(--space-6);
	}

	.footer-bottom-inner {
		flex-direction: row;
		justify-content: space-between;
		text-align: inherit;
	}

	/* breadcrumbs */
	.breadcrumbs {
		font-size: var(--text-xs);
	}

	/* single post */
	.single-post-meta {
		gap: var(--space-3);
		flex-wrap: wrap;
	}

	/* پیجینیشن */
	.pagination-list a,
	.pagination-list span {
		min-width: 38px;
		height: 38px;
		font-size: var(--text-sm);
	}

	/* هدر */
	.header-inner {
		padding: var(--space-2) var(--space-4);
	}

	.site-logo-text {
		font-size: var(--text-lg);
	}

	.site-logo-text .logo-mark {
		width: 34px;
		height: 34px;
	}

	/* CTA */
	.cta-card {
		padding: var(--space-8) var(--space-5);
	}

	/* فرم تماس wrap */
	.contact-form-wrap {
		padding: var(--space-5);
	}
}

/* ============================================================
   موبایل بزرگ: <= 640px
   ============================================================ */
@media (max-width: 640px) {
	:root {
		--text-7xl: 3rem;
		--text-6xl: 2.5rem;
		--text-5xl: 2.25rem;
		--text-4xl: 1.875rem;
	}

	.hero-title {
		font-size: clamp(1.875rem, 8vw, 2.5rem);
	}

	.section-title {
		font-size: clamp(1.625rem, 6vw, 2.25rem);
	}

	/* کارت‌های شیشه‌ای کم padding */
	.glass-card,
	.service-card,
	.faq-question {
		padding: var(--space-5);
	}

	.portfolio-filters {
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		justify-content: flex-start;
		flex-wrap: nowrap;
	}

	.filter-btn {
		white-space: nowrap;
	}

	/* hero stats — فشرده در یک ردیف */
	.hero-stat-number {
		font-size: 1.125rem;
	}

	/* تیم — فشرده‌تر در گوشی کوچک */
	.team-avatar {
		width: 72px;
		height: 72px;
	}

	.team-card {
		padding: 0.875rem 0.5rem;
	}

	.team-name {
		font-size: 0.8125rem;
	}

	.team-position {
		font-size: 0.6875rem;
	}

	/* نظرات مشتری */
	.testimonial-author {
		flex-direction: column;
		text-align: center;
	}

	.testimonial-info {
		text-align: center;
	}

	/* FAQ */
	.faq-question {
		font-size: var(--text-base);
		padding: var(--space-4);
	}

	/* author box */
	.author-box {
		flex-direction: column;
		text-align: center;
	}

	/* درباره ما image badge */
	.about-image-badge {
		inset-inline-start: var(--space-3);
		bottom: var(--space-3);
		padding: var(--space-3);
	}

	/* single post */
	.single-post-content {
		font-size: var(--text-base);
	}
}

/* ============================================================
   موبایل کوچک: <= 480px
   ============================================================ */
@media (max-width: 480px) {
	.section {
		padding: var(--space-12) 0;
	}

	.glass-card,
	.service-card {
		padding: var(--space-4);
	}

	.btn-lg {
		padding: var(--space-3) var(--space-6);
		font-size: var(--text-base);
	}

	.hero-actions .btn {
		padding: 0.625rem 0.5rem;
		font-size: 0.75rem;
		gap: 0.375rem;
	}

	.hero-actions .btn svg {
		width: 16px;
		height: 16px;
		flex-shrink: 0;
	}

	.hero-stats {
		padding: 0.875rem 0.5rem;
	}

	.hero-stat {
		padding: 0 0.25rem;
	}

	.hero-stat:not(:last-child)::after {
		height: 24px;
	}

	.hero-stat-number {
		font-size: 1.125rem;
	}

	.hero-stat-label {
		font-size: 0.625rem;
	}

	.section-header {
		margin-bottom: var(--space-8);
	}

	.contact-info-item {
		padding: var(--space-4);
	}

	.process-timeline {
		--process-dot: 48px;
	}

	.process-step {
		padding-inline-start: calc(var(--process-dot) + var(--space-4));
	}

	.process-number {
		font-size: var(--text-lg);
	}
}

/* ============================================================
   حالت پرینت
   ============================================================ */
@media print {
	.site-header,
	.site-footer,
	.scroll-top,
	.menu-toggle,
	.mobile-menu-overlay,
	.mobile-menu-panel,
	.hero-scroll,
	.theme-toggle,
	.section-eyebrow {
		display: none !important;
	}

	body {
		background: white;
		color: black;
	}

	body::before {
		display: none;
	}

	.glass-card,
	.glass,
	.card,
	.service-card,
	.blog-card {
		background: white;
		box-shadow: none;
		border: 1px solid #ccc;
	}
}

/* ============================================================
   کاهش انیمیشن برای کاربرانی که درخواست داده‌اند
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	[data-animate] {
		opacity: 1;
		transform: none;
	}

	.float,
	.pulse-glow,
	.spin-slow {
		animation: none;
	}
}

/* ============================================================
   hover فقط برای دستگاه‌های دارای hover
   ============================================================ */
@media (hover: none) {
	.service-card:hover,
	.portfolio-item:hover,
	.blog-card:hover,
	.team-card:hover,
	.card:hover,
	.hover-lift:hover,
	.hover-scale:hover {
		transform: none;
	}

	.portfolio-overlay {
		opacity: 1;
		background: linear-gradient(to top, rgba(13, 22, 20, 0.85) 0%, rgba(13, 22, 20, 0.2) 50%, transparent 100%);
	}

	.portfolio-thumbnail img {
		transform: scale(1);
	}
}
