/* ---------------------------------------------------------------------------
   Develogist — component CSS that is NOT a Tailwind utility.

   Tailwind utilities come from dist.css (compiled by the CLI). This file
   carries the keyframes, the marquee, form field styling and the small
   pieces WordPress core needs.
--------------------------------------------------------------------------- */

/* Typing cursor blink (hero typing widget) */
.typing::after { content: "|"; animation: blink 0.7s infinite; color: #666; }
@keyframes blink { 50% { opacity: 0; } }

/* Page base — mirrors the static pages' <style> block */
body {
	font-family: "Vazirmatn", system-ui, sans-serif;
	background: #f3f5f8;
	text-align: right;
	direction: rtl;
	color: #093a3e;
	overflow-x: hidden;
}
html { scroll-behavior: smooth; }

/* ---- Client logo marquee (DESIGN-SYSTEM.md §4.10) ---- */
@keyframes dgscroll { to { transform: translateX(50%); } }
.scroller-x { position: relative; overflow: hidden; }
.scroller-x__list {
	width: max-content;
	animation: dgscroll 40s linear infinite;
}
.scroller-x__list:hover { animation-play-state: paused; }

/* ---- Float animations ---- */
@keyframes dgfloat {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-14px); }
}
.float-anim { animation: dgfloat 6s ease-in-out infinite; }

/* ---- Scroll reveal ---- */
.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .6s ease, transform .6s ease;
}
.reveal.done { opacity: 1; transform: translateY(0); }

/* ---- Line clamp (blog cards) ---- */
.srclamp {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---- Form fields (DESIGN-SYSTEM.md §4.13 equivalent) ---- */
.field {
	width: 100%;
	border: 1px solid var(--color-border);
	background: #fff;
	border-radius: 12px;
	padding: .9rem 1rem;
	font-size: .9rem;
	font-family: inherit;
	transition: border-color .2s, box-shadow .2s;
}
.field:focus {
	outline: none;
	border-color: var(--color-brand-end);
	box-shadow: 0 0 0 3px rgba(81, 35, 142, .12);
}
.field::placeholder { color: #9aa3ab; }
textarea.field { resize: vertical; min-height: 140px; }
input[type="submit"],
input[type="button"] { font-family: inherit; }

/* Validation */
.field.dg-invalid { border-color: #c0392b; }
.dg-error {
	color: #c0392b;
	font-size: .78rem;
	margin-top: .35rem;
	display: none;
}
.field.dg-invalid + .dg-error { display: block; }

/* ---- Back to top (DESIGN-SYSTEM.md §6) ---- */
#back-top {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(96deg, #03436a -4.72%, #51238e 96.59%);
	color: #fff;
	display: none;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 40;
	transition: transform .2s;
}
#back-top:hover { transform: translateY(-4px); }

/* ---- Off-canvas drawer ---- */
#mobile-drawer { touch-action: none; }
#mobile-drawer.translate-x-full { pointer-events: none; }

/* ---- WordPress content (keeps posts consistent with token colours) ---- */
.prose { max-width: none; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
	color: var(--color-heading);
	font-weight: 600;
}
.prose h2 { font-size: 28px; margin: 24px 0 12px; }
.prose h3 { font-size: 22px; margin: 20px 0 10px; }
.prose p  { margin-bottom: 12px; line-height: 1.8; color: #093a3e; }
.prose a  { color: var(--color-brand-start); text-decoration: underline; }
.prose a:hover { color: var(--color-brand-end); }
.prose ul, .prose ol { margin: 0 0 16px; padding-right: 20px; padding-left: 0; }
.prose ul li { list-style: disc; margin-bottom: 6px; }
.prose ol li { list-style: decimal; margin-bottom: 6px; }
.prose blockquote {
	border-right: 3px solid var(--color-brand-end);
	padding: 8px 16px;
	margin: 16px 0;
	background: #f3f5f8;
	border-radius: 8px;
	color: #093a3e;
}
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 8px 12px; text-align: right; }
.prose th { background: #f3f5f8; color: var(--color-heading); font-weight: 600; }

/* ---- WordPress core alignment classes ---- */
.alignleft  { float: left; margin: 0 0 16px 16px; }
.alignright { float: right; margin: 0 16px 16px 0; }
.aligncenter { display: block; margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: #666; margin-top: 6px; text-align: center; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute; width: 1px;
	word-wrap: normal !important;
}

/* ---- Elementor canvas polish ---- */
.elementor-widget-container { font-family: inherit; }

/*
 * Elementor pages are already wrapped in the theme's 1320px boxed container
 * (page.php adds `.dg-elementor-boxed`). Neutralise Elementor's own 1140px
 * boxed container and its 10px column gutters so panels align with the static
 * pages, then restore the 24px rhythm between panels (`space-y-6` only sees
 * the single `.elementor` wrapper, not the sections inside it).
 */
main.dg-elementor-boxed .elementor-section.elementor-section-boxed > .elementor-container {
	max-width: 100%;
}
.dg-elementor-boxed .elementor-column-gap-default > .elementor-column.elementor-col-100 > .elementor-widget-wrap {
	padding-inline: 0;
}
.dg-elementor-boxed .elementor > * + .elementor-top-section,
.dg-elementor-boxed .elementor > * + .e-con {
	margin-top: 1.5rem;
}
.dg-elementor-boxed .e-con-boxed {
	--content-width: 100%;
	padding-inline: 0;
}

/* Hide scrollbar utility used by the process carousel */
.no-sb::-webkit-scrollbar { display: none; }
.no-sb { -ms-overflow-style: none; scrollbar-width: none; }

/* Print the marquee only if it is actually in the DOM */
@media (prefers-reduced-motion: reduce) {
	.scroller-x__list, .float-anim, .reveal { animation: none !important; transition: none !important; }
	.reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Websima header (header_style = websima)
   ========================================================================== */
:root {
	--ws-ink: #050033;
	--ws-ink-hover: #0f0099;
	--ws-accent: #cd6c58;
	--ws-soft: #f6f5fa;
	--ws-line: #e7e6ef;
}

#develogist-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 104px;
	background: #fff;
	box-sizing: border-box;
	transition: height .22s ease, box-shadow .22s ease;
}
#develogist-site-header.is-scrolled {
	height: 72px;
	box-shadow: 0 6px 18px rgba(5,0,51,.06);
}
.ws-header { z-index: 1; }

.ws-header {
	position: relative;
	max-width: 1320px;
	height: 100%;
	margin-inline: auto;
	padding-inline: 1.25rem;
	display: grid;
	grid-template-columns: minmax(0,1fr) 14rem minmax(0,1fr);
	gap: 2rem;
	align-items: center;
}
.header--right { display: flex; align-items: center; justify-self: start; grid-column: 1; animation: hdrIn .55s cubic-bezier(.16,1,.3,1) .05s both; }
.header--left { display: flex; align-items: center; gap: 1.1rem; justify-self: end; grid-column: 3; animation: hdrIn .55s cubic-bezier(.16,1,.3,1) .15s both; }
.hdr-nav { display: flex; align-items: center; gap: .15rem; }
.hdr-link, .hdr-dd-btn {
	display: inline-flex; align-items: center; gap: .45rem;
	padding: .6rem .7rem; border-radius: .75rem;
	font-size: .9rem; font-weight: 600; color: var(--ws-ink);
	transition: color .18s ease, background-color .18s ease;
	white-space: nowrap;
	background: transparent; border: 0; font-family: inherit; cursor: pointer; text-decoration: none;
}
.hdr-link svg, .hdr-dd-btn svg { width: 1rem; height: 1rem; flex: none; opacity: .6; transition: opacity .18s ease; }
.hdr-link:hover, .hdr-dd-btn:hover { color: var(--ws-ink-hover); background: var(--ws-soft); }
.hdr-link:hover svg, .hdr-dd-btn:hover svg { opacity: 1; }
.caret { font-size: .6rem; opacity: .7; line-height: 1; }
.hdr-link:focus-visible, .hdr-dd-btn:focus-visible, .hdr-cta:focus-visible,
.hdr-burger:focus-visible, .header--logo:focus-visible { outline: 2px solid var(--color-brand-end, #51238e); outline-offset: 2px; border-radius: .6rem; }

/* services dropdown */
.hdr-dd { position: relative; }
.hdr-dd-panel {
	position: absolute; top: 100%; right: 0; padding-top: .65rem; width: 360px;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
	z-index: 20;
}
.hdr-dd:hover .hdr-dd-panel,
.hdr-dd:focus-within .hdr-dd-panel,
.hdr-dd.open .hdr-dd-panel {
	opacity: 1; visibility: visible; transform: none;
	transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
.dd-card {
	background: #fff; border: 1px solid var(--ws-line); border-radius: 18px;
	box-shadow: 0 24px 48px rgba(5,0,51,.14);
	padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem;
}
.dd-card h6 { grid-column: 1 / -1; font-size: .7rem; font-weight: 700; color: var(--color-brand-end, #51238e); margin: .35rem .6rem .15rem; }
.dd-card a, .dd-link {
	display: block; font-size: .82rem; padding: .45rem .6rem; border-radius: .6rem; color: #093a3e;
	transition: background-color .15s, color .15s; text-decoration: none;
}
.dd-card a:hover, .dd-link:hover { background: #f3f5f8; color: var(--color-brand-start, #03436a); }

/* centered brand */
.header--logo {
	position: absolute; left: 50%; top: 0; transform: translateX(-50%);
	height: 100%; width: 176px; z-index: 4;
	text-decoration: none;
	animation: logoFade .5s ease .1s both;
}
.brand-mark {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 104px; height: 104px; max-width: none; max-height: none;
	object-fit: contain; display: block;
	filter: drop-shadow(0 6px 8px rgba(7,0,76,.10));
	transition: opacity .22s ease;
	animation: logoPop .7s cubic-bezier(.34,1.56,.64,1) .12s both;
}
.brand-type {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	height: 55px; width: auto; max-width: none; max-height: none;
	object-fit: contain; display: block;
	opacity: 0; transition: opacity .22s ease, height .22s ease;
}
#develogist-site-header.is-scrolled .brand-mark { opacity: 0; }
#develogist-site-header.is-scrolled .brand-type { opacity: 1; height: 32px; }

/* CTA — two gradient buttons side by side */
.hdr-cta-group { display: inline-flex; align-items: center; gap: .45rem; }
.hdr-cta {
	display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
	padding: .55rem .95rem; border-radius: 1.05rem;
	font-size: .83rem; font-weight: 700; text-decoration: none; color: #fff;
	transition: filter .18s ease, transform .18s ease;
}
.hdr-cta--primary { background: linear-gradient(96deg, #03436a 0%, #51238e 100%); }
.hdr-cta--secondary { background: linear-gradient(96deg, #51238e 0%, #7c4fb0 100%); }
.hdr-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* mobile menu button */
.hdr-burger { display: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
	border: 0; font-family: inherit; cursor: pointer;
	border-radius: .8rem; background: var(--ws-soft); color: var(--ws-ink); font-size: 1.05rem; line-height: 1; }

#why { scroll-margin-top: 120px; }

@keyframes hdrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes logoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes logoPop { from { transform: translate(-50%, -50%) scale(.82); } to { transform: translate(-50%, -50%) scale(1); } }

@media (max-width: 1319.98px) {
	.header--left .hdr-nav { display: none; }
}
@media (max-width: 1023.98px) {
	#develogist-site-header { height: 72px; background: #fff; box-shadow: 0 1px 0 rgba(5,0,51,.08); }
	#develogist-site-header::before { display: none; }
	.ws-header { grid-template-columns: 1fr 1fr; gap: 1rem; padding-inline: 1rem; }
	.header--right { grid-column: 1; }
	.header--left { grid-column: 2; }
	.header--right .hdr-nav { display: none; }
	.header--left .hdr-nav { display: none; }
	.hdr-burger { display: inline-flex; }
	.header--logo { width: 120px; }
	.brand-mark { top: 50%; width: 56px; height: 56px; }
	.brand-type { top: 50%; height: 28px; }
	.hdr-cta { padding: .45rem .8rem; font-size: .76rem; border-radius: .9rem; }
	.hdr-cta--secondary { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.header--right, .header--left, .header--logo, #develogist-site-header, #develogist-site-header::before, .brand-mark, .brand-type {
		animation: none !important; transition: none !important;
	}
}
