/* Site sections — Shared presentation.
 * Styles the language switcher and Persian reading direction.
 * Preserves the shared layout while mirroring directional controls.
 * Depends on the IWUT theme and WordPress language attributes.
 */
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.univ-language-switcher { display: flex; gap: .65rem; align-items: center; font-size: .8rem; white-space: nowrap; }
.univ-language-switcher a[aria-current="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }
html[lang^="fa"] body { --wp--preset--font-family--body: "Vazirmatn", Tahoma, Arial, sans-serif; --wp--preset--font-family--display: "Vazirmatn", Tahoma, Arial, sans-serif; }
html[lang^="fa"] .hero-card .motto { max-width: 100%; }
html[lang^="fa"] .hero-card, html[lang^="fa"] .page-hero, html[lang^="fa"] .univ-application,
html[lang^="fa"] .univ-admission-email, html[lang^="fa"] .univ-adm-card { text-align: start; }
html[lang^="fa"] input[type="email"], html[lang^="fa"] input[type="tel"],
html[lang^="fa"] input[autocomplete="one-time-code"], html[lang^="fa"] input[type="password"] { direction: ltr; text-align: left; }
html[lang^="fa"] .nav .sub-menu { text-align: right; }
html[lang^="fa"] .stage .hero-card { left: auto; right: auto; border-left: 0; border-right: 4px solid var(--wp--preset--color--gold, #b8964a); }
html[lang^="fa"] .stage .pg-next { transform: scaleX(-1); }
html[lang^="fa"] .univ-language-switcher { direction: ltr; }
@media (max-width: 640px) {
  .univ-language-switcher { font-size: .7rem; gap: .4rem; }
}

html[lang^="fa"] :is(input, select, textarea, button, .um, .um-field-label label, .um-button) { font-family: "Vazirmatn", Tahoma, Arial, sans-serif; }
html[lang^="fa"] :is(p, li, label, input, select, textarea) { line-height: 1.85; }
html[lang^="fa"] :is(h1, h2, h3, h4, .nav, button) { letter-spacing: normal; }

/* Theme hero selectors have higher specificity than ordinary heading styles. */
html[lang^="fa"] body :is(h1, h2, h3, h4, .page-hero__title, .motto) { font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important; }
html[lang^="fa"] body { font-family: "Vazirmatn", Tahoma, Arial, sans-serif; }

/* Compact header language disclosure; the mobile dialog retains its full labels. */
.univ-language-dropdown{--language-size:38px;position:relative;display:block;flex:0 0 auto;line-height:1}
.univ-language-trigger{display:grid;place-items:center;width:var(--language-size);height:var(--language-size);padding:0;border:1.5px solid #b49661;border-radius:50%;background:transparent;color:inherit;font:600 12px/1 Arial,sans-serif;cursor:pointer}
.univ-language-trigger:hover,.univ-language-trigger[aria-expanded="true"]{background:#b4966118}
.univ-language-options{position:absolute;z-index:90;top:calc(100% + 8px);left:50%;transform:translateX(-50%);width:var(--language-size);display:flex;flex-direction:column;align-items:center;gap:8px;padding:0;background:transparent;border:0}
.univ-language-options[hidden]{display:none!important}
.univ-language-options a{display:grid;place-items:center;width:var(--language-size);height:var(--language-size);min-height:var(--language-size);box-sizing:border-box;padding:0;border:1.5px solid #b49661;border-radius:50%;background:#fff;color:#12394d;text-decoration:none;font:600 12px/1 Arial,sans-serif;box-shadow:0 4px 12px #001b3026;animation:univ-language-bubble-in .18s ease-out both}
.univ-language-options a:nth-child(2){animation-delay:40ms}
.univ-language-options a[aria-current="true"]{background:#eef5f6;text-decoration:none;color:#00656b}
.univ-language-options a:hover{background:#e4eef1}
@keyframes univ-language-bubble-in{from{opacity:0;transform:translateY(-6px) scale(.85)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.univ-language-options a{animation:none}}
.univ-language-dropdown :is(button,a):focus-visible{outline:2px solid #008285;outline-offset:3px}
@media(max-width:960px){.univ-language-dropdown{--language-size:44px}}


/* WordPress may insert an empty paragraph after this shortcode's button. */
.univ-language-dropdown>p:empty{display:none}
@media(max-width:960px){.mainbar-tools .circle-btn{width:44px;height:44px}}

/* Rounded bubbles share a continuous outline with narrow curved connections. */
.univ-language-dropdown:has(.univ-language-trigger[aria-expanded="true"])::before{content:"";position:absolute;z-index:0;inset-inline:0;top:0;height:calc(3 * var(--language-size) + 16px);box-sizing:border-box;border:0;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%20136%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M20%20.75%20A19.25%2019.25%200%200%201%2030%2036.45%20C28%2041%2028%2047%2030%2051.55%20A19.25%2019.25%200%200%201%2030%2084.45%20C28%2089%2028%2095%2030%2099.55%20A19.25%2019.25%200%201%201%2010%2099.55%20C12%2095%2012%2089%2010%2084.45%20A19.25%2019.25%200%200%201%2010%2051.55%20C12%2047%2012%2041%2010%2036.45%20A19.25%2019.25%200%200%201%2020%20.75%20Z%22%20fill%3D%22white%22%20stroke%3D%22%23b49661%22%20stroke-width%3D%221.4%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") center/100% 100% no-repeat;filter:drop-shadow(0 5px 8px #001b3026)}
.univ-language-dropdown .univ-language-trigger{position:relative;z-index:1}
.univ-language-trigger[aria-expanded="true"]{border-color:transparent;background:transparent;color:#12394d}
.univ-language-dropdown:has(.univ-language-trigger[aria-expanded="true"]) .univ-language-options a{border-color:transparent;box-shadow:none;background:transparent}
.univ-language-dropdown:has(.univ-language-trigger[aria-expanded="true"]) .univ-language-options a[aria-current="true"]{background:#e6f1f1}
.univ-language-dropdown:has(.univ-language-trigger[aria-expanded="true"]) .univ-language-options a:hover{background:#e4eef1}
/* Fit the entire image into the homepage slide frame. */
body.home .stage .panel .bg {
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

@media (min-width: 768px) {
	body.home .stage .stage-pages {
		padding: 0;
		border: 0;
		background: transparent;
	}

	body.home .stage .stage-pages [role="tab"] {
		border-radius: 50%;
	}

	body.home .stage .stage-pages [role="tab"]:not([aria-selected="true"]) {
		background: rgba(5, 20, 38, .6);
	}

	body.home .stage .hero-card {
		box-sizing: border-box;
		width: min(390px, 38vw);
		padding: 22px 26px;
		background: rgba(5, 20, 38, .62);
		box-shadow: none;
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
	}

	body.home .stage .hero-card .motto {
		max-width: 22ch;
		font-size: clamp(24px, 2.4vw, 32px);
		line-height: 1.22;
		text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
	}

	body.home .stage .hero-card .motto span {
		font-size: inherit;
		line-height: inherit;
	}
}

@media (max-width: 767px) {
	body.home .stage {
		height: auto;
		min-height: 0;
	}

	body.home .stage .panel {
		justify-content: flex-start;
		padding: calc(76px + 56vw) 0 78px;
	}

	body.home .stage .panel.is-active {
		position: relative;
	}

	body.home .stage .hero-card {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin-bottom: 0;
		padding: 24px 22px 14px;
		border: 0;
		background: #071f39;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	body.home .stage .hero-card .motto {
		max-width: 21ch;
		margin: 0 0 14px;
		font-size: clamp(22px, 6vw, 27px);
		line-height: 1.2;
	}

	body.home .stage .hero-card .motto span {
		font-size: inherit;
		line-height: inherit;
	}

	body.home .stage .sublinks {
		gap: 0 18px;
	}

	body.home .stage .sublinks a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		font-size: 13px;
		text-decoration-thickness: 1px;
		text-underline-offset: 4px;
	}

	body.home .stage .stage-pages {
		inset-inline: 22px auto;
		bottom: 18px;
		gap: 5px;
		padding: 0;
		border: 0;
		background: transparent;
	}

	body.home .stage .stage-pages [role="tab"],
	body.home .stage .stage-pages .pg-next {
		width: 44px;
		height: 44px;
		border-radius: 50%;
	}

	body.home .stage .panel .bg {
		top: 76px;
		bottom: auto;
		height: 56vw;
		background-size: contain;
		background-position: center;
	}
}
