:root {
    --color-primary: #070439;
    --color-surface: #ffffff;
    --color-border: rgba(7, 4, 57, 0.14);
    --color-muted: rgba(7, 4, 57, 0.68);
    --shadow-soft: 0 18px 46px rgba(7, 4, 57, 0.10);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* RGB(17, 24, 39) - dark blue/black for all text */
    color: rgb(17, 24, 39) !important;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
}

[dir="ltr"] {
    direction: ltr;
}

/* Default RTL for Persian culture */
body:lang(fa) {
    direction: rtl;
}

/* LTR for English culture */
body:lang(en) {
    direction: ltr;
}

a, .btn-link {
    color: rgb(17, 24, 39);
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTU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zYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.appbar-image {
    height: 90%; 
    max-height: 64px; 
    width: auto;
}

.ui-skeleton,
.ui-skeleton-line,
.ui-skeleton-pill,
.ui-skeleton-card,
.ui-skeleton-circle,
.ui-skeleton-button,
.ui-skeleton-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #eef0f6 0%, #f8fafc 45%, #eef0f6 80%);
    background-size: 220% 100%;
    animation: ui-skeleton-shimmer 1.4s ease-in-out infinite;
}

.ui-skeleton-line {
    height: 0.875rem;
    border-radius: 999px;
}

.ui-skeleton-pill {
    height: 1.75rem;
    border-radius: 999px;
}

.ui-skeleton-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(7, 4, 57, 0.08);
}

.ui-skeleton-circle {
    border-radius: 999px;
}

.ui-skeleton-button {
    height: 2.75rem;
    border-radius: 999px;
}

.ui-skeleton-image {
    border-radius: 1.25rem;
}

@keyframes ui-skeleton-shimmer {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-skeleton,
    .ui-skeleton-line,
    .ui-skeleton-pill,
    .ui-skeleton-card,
    .ui-skeleton-circle,
    .ui-skeleton-button,
    .ui-skeleton-image {
        animation: none;
    }
}
.mud-navmenu{
    display: flex;
}

/* Utility class for primary text color - RGB(17, 24, 39) */
.text-primary {
    color: rgb(17, 24, 39) !important;
}

/* RTL Support Classes */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* RTL-specific adjustments */
[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ml-4 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .mr-4 { margin-right: 0 !important; margin-left: 1rem !important; }

[dir="rtl"] .pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
[dir="rtl"] .pl-4 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
[dir="rtl"] .pr-4 { padding-right: 0 !important; padding-left: 1rem !important; }

[dir="rtl"] .text-left { text-align: right !important; }
[dir="rtl"] .text-right { text-align: left !important; }

[dir="rtl"] .float-left { float: right !important; }
[dir="rtl"] .float-right { float: left !important; }

/* Navigation RTL adjustments */
[dir="rtl"] .desktop-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .burger-menu-btn {
    left: 0;
    right: auto;
}

[dir="rtl"] .fixed.top-0.right-0 {
    left: 0;
    right: auto;
}

[dir="rtl"] .transform.translate-x-full {
    transform: translateX(-100%);
}

[dir="rtl"] .transform.translate-x-0 {
    transform: translateX(0);
}

/* Form elements RTL */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
}

/* Button icons RTL */
[dir="rtl"] .btn i.fa-chevron-left::before {
    content: "\f054"; /* fa-chevron-right */
}

[dir="rtl"] .btn i.fa-chevron-right::before {
    content: "\f053"; /* fa-chevron-left */
}

/* Dropdown RTL */
[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
    text-align: right;
}

/* Grid RTL adjustments */
[dir="rtl"] .grid {
    direction: rtl;
}

/* Flex RTL adjustments */
[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse;
}

/* Space utilities RTL */
[dir="rtl"] .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .space-x-6 > * + * {
    margin-left: 0;
    margin-right: 1.5rem;
}

/* Blog post content (HTML from editor) */
.blog-post-content p {
    margin-bottom: 1rem;
}
.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}
.blog-post-content h2, .blog-post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Shared form input (used across pages) ─────────── */
.c-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(7, 4, 57, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    direction: rtl;
}
@media (min-width: 640px) {
    .c-modal-overlay {
        align-items: center;
        padding: 1.5rem;
    }
}

.c-modal {
    position: relative;
    width: 100%;
    max-width: 48rem;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 2rem 2rem 0 0;
    box-shadow: 0 25px 60px rgba(7, 4, 57, 0.25);
    direction: rtl;
    text-align: right;
}
@media (min-width: 640px) {
    .c-modal {
        border-radius: 2rem;
    }
}

.c-modal__header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
}

.c-modal__eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #070439;
    margin-bottom: 0.35rem;
}

.c-modal__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    color: #070439;
    line-height: 1.3;
}

.c-modal__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.c-modal__close:hover {
    background: #070439;
    color: #fff;
}

.c-modal__body {
    padding: 1.25rem 1.5rem 1.75rem;
}

.c-modal__hint {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    background: rgba(7, 4, 57, 0.05);
    border-radius: 0.875rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #070439;
}
.c-modal__hint i {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.c-modal__alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.c-modal__alert--success {
    background: #ecfdf5;
    color: #065f46;
}
.c-modal__alert--error {
    background: #fef2f2;
    color: #991b1b;
}

/* Form inside the modal */
.c-form__grid {
    display: grid;
    gap: 1rem;
}
@media (min-width: 640px) {
    .c-form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.c-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.c-form__group--full {
    grid-column: 1 / -1;
}

.c-form__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}

.c-form__input,
.home-form-input {
    width: 100%;
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.625rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}
.c-form__input:focus,
.home-form-input:focus {
    background: #fff;
    border-color: #070439;
    box-shadow: 0 0 0 3px rgba(7, 4, 57, 0.08);
}
.c-form__input::placeholder,
.home-form-input::placeholder {
    color: #9ca3af;
}

textarea.c-form__input,
textarea.home-form-input {
    min-height: 8rem;
    resize: vertical;
}

.c-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.7rem 2rem;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: #070439;
    border: 1.5px solid #070439;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.c-form__submit:hover:not(:disabled) {
    background: #fff;
    color: #070439;
}
.c-form__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (min-width: 640px) {
    .c-form__submit {
        width: auto;
    }
}

/* ─── NavMenu ─────────────────────────────────────────── */
.desktop-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link {
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #111827;
    border-bottom-color: #fbbf24;
}

.nav-mega-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-mega-trigger i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.nav-mega-item:hover .nav-mega-trigger i {
    transform: rotate(180deg);
}

.menu-mega-menu {
    position: absolute;
    top: calc(100% + 1rem);
    right: 50%;
    width: min(78vw, 860px);
    padding: 1rem;
    border: 1px solid rgba(231, 229, 228, 0.95);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(50%) translateY(8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    text-transform: none;
    letter-spacing: 0;
    z-index: 70;
}

.nav-mega-item:hover .menu-mega-menu,
.nav-mega-item:focus-within .menu-mega-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(50%) translateY(0);
}

.menu-mega-menu::before {
    content: "";
    position: absolute;
    top: -1.1rem;
    left: 0;
    right: 0;
    height: 1.2rem;
}

.menu-mega-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.menu-mega-heading span {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.menu-mega-heading a {
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
}

.menu-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
}

.menu-mega-column {
    min-width: 0;
}

.menu-mega-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 0.8rem;
    border-radius: 0.95rem;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 900;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-mega-link:hover {
    color: #111827;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    transform: translateX(-2px);
}

.menu-mega-link i {
    color: #d97706;
    font-size: 0.85rem;
}

.menu-mega-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: 0.6rem;
    flex-shrink: 0;
}

.menu-mega-children {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.2rem;
    padding-inline-start: 0.75rem;
}

.menu-mega-children a {
    color: #57534e;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-mega-children a:hover {
    color: #b45309;
}

.mobile-menu-children {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.95rem;
    background: #f8fafc;
}

.mobile-menu-children a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-menu-grandchildren {
    display: grid;
    gap: 0.25rem;
    padding-inline-start: 1rem;
}

.mobile-menu-grandchildren a {
    color: #78716c;
    font-size: 0.82rem;
    font-weight: 600;
}

@media (max-width: 1279px) {
    .desktop-nav {
        display: none;
    }
}

@media (min-width: 1280px) {
    .desktop-nav {
        display: flex;
    }
}

/* ─── StarRating ──────────────────────────────────────── */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.star-rating__value {
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 1.25;
    color: rgb(17, 24, 39);
}

.star-rating__stars {
    position: relative;
    display: inline-flex;
    width: 5em;
    min-width: 5em;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
}

.star-rating__star-svg {
    width: 1em;
    height: 1em;
    display: block;
}

.star-rating__stars-bg,
.star-rating__stars-fill {
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    position: absolute;
    top: 0;
    left: 0;
    height: 1em;
}

.star-rating__stars-bg {
    width: 5em;
    z-index: 0;
    color: #d1d5db;
}

.star-rating__stars-fill {
    z-index: 1;
    color: #eab308;
    width: var(--fill, 0%);
    overflow: hidden;
    white-space: nowrap;
}

[dir="rtl"] .star-rating__stars-fill {
    left: auto;
    right: 0;
}

.star-rating__stars--input .star-rating__star-svg {
    width: 1.25em;
    height: 1.25em;
}

.star-rating__count {
    font-size: 0.875rem;
    color: #6b7280;
}

.star-rating__stars--input {
    display: inline-flex;
    gap: 0.15rem;
    color: #d1d5db;
}

.star-rating__star-btn {
    padding: 0.15rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    transition: color 0.15s ease, transform 0.1s ease;
}

.star-rating__star-btn:hover {
    color: #fbbf24;
    transform: scale(1.05);
}

.star-rating__star-btn--active,
.star-rating__star-btn--active:hover {
    color: #eab308;
}

.star-rating__star-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.star-rating__star-btn:focus:not(:focus-visible) {
    outline: none;
}
