/* Public site on Bootstrap 5.3 (RTL build). Bootstrap supplies layout and components; this file
   only supplies the brand (#1769E0, Vazirmatn), the two colour modes and the few components
   Bootstrap has no equivalent for. Every asset is served from /vendor — no CDN. */

@font-face {
    font-family: "Vazirmatn";
    src: url("../vendor/vazirmatn-33.0.3/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---- Brand and colour modes ---- */

:root,
[data-bs-theme="light"] {
    --brand: #1769e0;
    --brand-rgb: 23, 105, 224;
    --brand-hover: #1254b8;
    --brand-active: #0f469d;
    --brand-deep: #0d3f91;

    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-primary-text-emphasis: #0d3f91;
    --bs-primary-bg-subtle: #e8efff;
    --bs-primary-border-subtle: #b8cff5;
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-active);
    --bs-link-hover-color-rgb: 15, 70, 157;
    --bs-focus-ring-color: rgba(var(--brand-rgb), 0.3);

    --bs-body-font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    --bs-body-line-height: 1.85;
    --bs-body-bg: #f7f9fc;
    --bs-body-bg-rgb: 247, 249, 252;
    --bs-tertiary-bg: #f1f4f9;
    --bs-border-color: #e4e7ec;
    --bs-border-radius: 0.6rem;
    --bs-border-radius-lg: 0.9rem;
    --bs-border-radius-xl: 1.25rem;

    --site-surface: #ffffff;
    --site-header-bg: #ffffff;
    --site-hero-bg:
        radial-gradient(60rem 30rem at 85% -10%, rgba(var(--brand-rgb), 0.16), transparent 70%),
        radial-gradient(40rem 24rem at 0% 110%, rgba(196, 157, 72, 0.14), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f1f5fb 100%);
    --site-band-bg: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
    --site-footer-bg: #edf2f8;
    --site-shadow: 0 1px 2px rgba(23, 32, 51, 0.06), 0 8px 24px rgba(23, 32, 51, 0.06);
    --site-shadow-hover: 0 2px 4px rgba(23, 32, 51, 0.08), 0 14px 32px rgba(23, 32, 51, 0.12);
    --brand-plate: transparent;
}

[data-bs-theme="dark"] {
    --brand-light: #78a9ff;

    --bs-primary: #3b82f6;
    --bs-primary-rgb: 59, 130, 246;
    --bs-primary-text-emphasis: #a9c7ff;
    --bs-primary-bg-subtle: #172033;
    --bs-primary-border-subtle: #315dab;
    --bs-link-color: var(--brand-light);
    --bs-link-color-rgb: 120, 169, 255;
    --bs-link-hover-color: #a9c7ff;
    --bs-link-hover-color-rgb: 169, 199, 255;
    --bs-focus-ring-color: rgba(120, 169, 255, 0.35);

    --bs-body-bg: #172033;
    --bs-body-bg-rgb: 23, 32, 51;
    --bs-body-color: #f7f9fc;
    --bs-secondary-color: rgba(247, 249, 252, 0.72);
    --bs-tertiary-bg: #202a40;
    --bs-border-color: #344054;

    --site-surface: #1c263a;
    --site-header-bg: #172033;
    --site-hero-bg:
        radial-gradient(60rem 30rem at 85% -10%, rgba(120, 169, 255, 0.14), transparent 70%),
        radial-gradient(40rem 24rem at 0% 110%, rgba(196, 157, 72, 0.1), transparent 70%),
        linear-gradient(180deg, #172033 0%, #172033 100%);
    --site-band-bg: linear-gradient(180deg, #1b2539 0%, #172033 100%);
    --site-footer-bg: #111827;
    --site-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --site-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.4);

    /* The approved logo is its approved original colours and may not be recoloured (AGENTS.md); on a
       dark page it sits on a light plate instead, so it stays legible without being altered. */
    --brand-plate: #f7f9fc;
}

body {
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
}

h1, .h1 { font-size: clamp(1.875rem, 1.35rem + 2vw, 3rem); }
h2, .h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
h3, .h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }

::selection {
    background: rgba(var(--brand-rgb), 0.22);
}

/* ---- Bootstrap components in brand colours ----
   The compiled Bootstrap stylesheet hard-codes its default blue in these components rather than
   reading --bs-primary, so each is restated once here. */

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--brand-hover);
    --bs-btn-hover-border-color: var(--brand-hover);
    --bs-btn-active-bg: var(--brand-active);
    --bs-btn-active-border-color: var(--brand-active);
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-link-color);
    --bs-btn-border-color: var(--bs-primary-border-subtle);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-active);
    --bs-btn-active-border-color: var(--brand-active);
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.btn {
    --bs-btn-font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
}

.btn-sm {
    min-height: 2.25rem;
}

.form-control,
.form-select {
    min-height: 2.75rem;
    font-size: 1rem;
    background-color: var(--site-surface);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.55);
    box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.pagination {
    --bs-pagination-color: var(--bs-link-color);
    --bs-pagination-hover-color: var(--bs-link-hover-color);
    --bs-pagination-focus-color: var(--bs-link-hover-color);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
    --bs-pagination-active-bg: var(--bs-primary);
    --bs-pagination-active-border-color: var(--bs-primary);
    --bs-pagination-padding-x: 0.9rem;
    --bs-pagination-padding-y: 0.55rem;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bs-primary);
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--bs-primary);
    --bs-dropdown-border-color: var(--bs-border-color);
    --bs-dropdown-box-shadow: var(--site-shadow-hover);
    box-shadow: var(--bs-dropdown-box-shadow);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
}

.card {
    --bs-card-bg: var(--site-surface);
    --bs-card-border-color: var(--bs-border-color);
    --bs-card-border-radius: var(--bs-border-radius-lg);
}

.breadcrumb {
    --bs-breadcrumb-divider: "‹";
    --bs-breadcrumb-margin-bottom: 0.75rem;
    font-size: 0.925rem;
}

.badge {
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid rgba(var(--bs-primary-rgb), 0.6);
    outline-offset: 2px;
}

/* ---- Page frame: full width, with gutters that grow with the screen ---- */

.px-site {
    padding-inline: 1rem;
}

@media (min-width: 768px) {
    .px-site { padding-inline: 1.75rem; }
}

@media (min-width: 1200px) {
    .px-site { padding-inline: 3rem; }
}

@media (min-width: 1600px) {
    .px-site { padding-inline: 5rem; }
}

/* Long running text stays readable on wide screens even though the page itself is full width. */
.measure {
    max-width: 72ch;
}

.skip-link:focus {
    position: fixed !important;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 2000;
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-primary);
    color: #fff;
}

/* ---- Header ---- */

/* Solid on purpose: backdrop-filter (or a transform) here would make the header the containing
   block of the fixed-position mobile menu, which then shrinks to the header's own height. */
.site-header {
    background: var(--site-header-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.site-header .navbar {
    min-height: 4.5rem;
    padding-block: 0.5rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    margin-inline-end: 1rem;
    border-radius: var(--bs-border-radius);
    background: var(--brand-plate);
}

.site-brand img {
    display: block;
    width: auto;
}

.site-brand .brand-full {
    height: 2.75rem;
}

.site-brand .brand-mark {
    height: 2.5rem;
}

.site-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding-inline: 0.85rem !important;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    font-weight: 600;
    white-space: nowrap;
}

.site-nav .nav-link:hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-link-color);
}

.site-nav .nav-link[aria-current="page"] {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.btn-icon {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    color: var(--bs-body-color);
    font-size: 1.15rem;
}

.btn-icon:hover,
.btn-icon[aria-expanded="true"] {
    background: var(--bs-tertiary-bg);
    color: var(--bs-link-color);
}

.header-search {
    width: 22rem;
    padding: 1rem;
}

/* Bootstrap positions dropdowns inside a navbar with CSS alone (no Popper), so a menu anchored to
   a button near the screen edge can run off a phone screen. On small screens they open as a
   full-width panel under the header instead. */
@media (max-width: 575.98px) {
    .site-header .dropdown-menu {
        position: fixed !important;
        top: 4.75rem !important;
        inset-inline: 0.75rem !important;
        width: auto;
        transform: none !important;
    }
}

/* Icons in the menu help on a phone, where the links are a vertical list; in the desktop row
   they would only add width. */
@media (min-width: 992px) {
    .site-nav .nav-link .bi { display: none; }
}

@media (max-width: 991.98px) {
    .site-nav .nav-link { font-size: 1.05rem; }
    .site-nav .nav-link .bi { color: var(--bs-link-color); font-size: 1.2rem; }
}

/* ---- Bands and page heads ---- */

.page-head {
    background: var(--site-band-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.page-head .page-icon {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: 1.5rem;
    flex: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--bs-link-color);
    font-size: 0.9rem;
    font-weight: 700;
}

.section-gap {
    padding-block: 3rem;
}

@media (min-width: 992px) {
    .section-gap { padding-block: 4.5rem; }
}

/* ---- Home ---- */

.home-hero {
    background: var(--site-hero-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.home-hero h1 {
    font-size: clamp(1.875rem, 1.35rem + 2vw, 3rem);
    line-height: 1.35;
}

.hero-search {
    max-width: 40rem;
}

.min-w-0 {
    min-width: 0;
}

.home-hero .lead {
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
    color: var(--bs-secondary-color);
}

.icon-tile {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: 1.4rem;
    flex: none;
}

.icon-tile-lg {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 1.75rem;
}

.card-lift {
    box-shadow: var(--site-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-lift:hover {
    box-shadow: var(--site-shadow-hover);
    transform: translateY(-2px);
}

.step-number {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-weight: 800;
    flex: none;
}

/* ---- Directory and consultant ---- */

.avatar {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: 1.35rem;
    font-weight: 800;
    object-fit: cover;
    flex: none;
}

.avatar-xl {
    width: 7.5rem;
    height: 7.5rem;
    font-size: 2.4rem;
    border: 4px solid var(--site-surface);
    box-shadow: var(--site-shadow);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    font-size: 0.875rem;
    line-height: 1.6;
}

.tag-subtle {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.fact-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.fact-list > div {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.fact-list dt {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.fact-list dd {
    margin: 0;
    font-weight: 600;
}

.fact-list .bi {
    color: var(--bs-link-color);
    font-size: 1.2rem;
    line-height: 1.6;
}

.value-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ---- Content ---- */

.content-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Bodies are plain text typed by an editor; without this every line break would collapse. */
.content-body {
    white-space: pre-line;
    font-size: 1.075rem;
}

.rich-content {
    overflow-wrap: break-word;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius);
}

/* ---- Empty and status states ---- */

.empty-state {
    max-width: 38rem;
    margin-inline: auto;
    text-align: center;
}

.empty-state svg {
    width: 9rem;
    height: auto;
    margin-bottom: 1rem;
}

.empty-state .art-sheet { fill: var(--site-surface); stroke: var(--bs-border-color); stroke-width: 2; }
.empty-state .art-line { stroke: var(--bs-secondary-color); stroke-width: 4; stroke-linecap: round; }
.empty-state .art-search { stroke: var(--bs-link-color); stroke-width: 5; fill: none; }

/* ASP.NET renders the summary element even when there is nothing to report. */
.validation-summary-valid {
    display: none !important;
}

.input-validation-error {
    border-color: var(--bs-form-invalid-border-color);
}

.captcha-code {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    border: 1px dashed var(--bs-border-color);
    font-size: 1.35rem;
    letter-spacing: 0.35rem;
    direction: ltr;
}

/* ---- Footer ---- */

.site-footer {
    background: var(--site-footer-bg);
    border-top: 1px solid var(--bs-border-color);
}

.site-footer h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.site-footer .footer-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.5rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.site-footer .footer-link:hover {
    color: var(--bs-link-color);
}

.site-footer .footer-link .bi {
    color: var(--bs-link-color);
}

.site-footer .brand-full {
    height: 3rem;
    width: auto;
}

.footer-brand {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--bs-border-radius);
    background: var(--brand-plate);
}

/* ---- Imported (legacy) consultant pages ---- */

.legacy-photo {
    width: 100%;
    max-width: 16rem;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--bs-border-radius-xl);
}

.qr-image {
    width: 10rem;
    height: 10rem;
    image-rendering: pixelated;
    background: #fff;
    padding: 0.5rem;
    border-radius: var(--bs-border-radius);
}

@media (prefers-reduced-motion: reduce) {
    .card-lift { transition: none; }
    .card-lift:hover { transform: none; }
}

/* ==== Shared pieces of the public chrome (home page itself: home.css) ====
   Palette: primary #1769E0 / dark variant #1254B8, navy #172033, success #12B76A, warning #F79009.
   Photographs are optional (wwwroot/img/home/hero|about|join .webp/.jpg/.png); every section is
   finished without them. */

:root,
[data-bs-theme="light"] {
    --navy: #172033;
    --navy-rgb: 23, 32, 51;
    --tone-blue-bg: #eaf2ff;   --tone-blue-fg: #1769e0;
    --tone-amber-bg: #fff4e5;  --tone-amber-fg: #f79009;
    --tone-green-bg: #e7f8ef;  --tone-green-fg: #12b76a;
    --hero-fade: #f7f9fc;
}

[data-bs-theme="dark"] {
    --tone-blue-bg: rgba(59, 130, 246, 0.14);  --tone-blue-fg: #78a9ff;
    --tone-amber-bg: rgba(247, 144, 9, 0.14);  --tone-amber-fg: #fdb022;
    --tone-green-bg: rgba(18, 183, 106, 0.14); --tone-green-fg: #32d583;
    --hero-fade: #172033;
}

.text-brand {
    color: var(--bs-link-color) !important;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.chip {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: 0.8125rem;
    font-weight: 500;
}

.tone-blue { --tone-bg: var(--tone-blue-bg); --tone-fg: var(--tone-blue-fg); }
.tone-amber { --tone-bg: var(--tone-amber-bg); --tone-fg: var(--tone-amber-fg); }
.tone-green { --tone-bg: var(--tone-green-bg); --tone-fg: var(--tone-green-fg); }

/* -- Top strip -- */

.site-topbar {
    background: linear-gradient(90deg, #1254b8, #172033);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
}

.site-topbar > .container-fluid {
    min-height: 2.5rem;
}

.site-topbar a {
    color: inherit;
    text-decoration: none;
}

.site-topbar a:hover {
    color: #fff;
}

.site-topbar .bi {
    margin-inline-end: 0.25rem;
    opacity: 0.8;
}

.topbar-social {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
}

.topbar-social .bi {
    margin: 0;
}

.topbar-social:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* -- Footer: navy in both colour modes; the logo stays on its light plate -- */

.site-footer {
    --bs-secondary-color: rgba(255, 255, 255, 0.68);
    --bs-border-color: rgba(255, 255, 255, 0.12);
    background: #14263e;
    color: rgba(255, 255, 255, 0.86);
}

.site-footer h2 {
    color: #fff;
}

.site-footer .footer-link {
    color: rgba(255, 255, 255, 0.78);
}

.site-footer .footer-link:hover {
    color: #fff;
}

.site-footer .footer-link .bi {
    color: #78a9ff;
}

.site-footer .footer-brand {
    background: #f7f9fc;
}

.footer-muted {
    color: var(--bs-secondary-color);
}

.footer-social {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

.footer-social:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

