:root {
    --primary-color: #4675EF;
    --primary-dark: #173470;
    --primary-light: #7DA2FF;
    --secondary-red: #F34A3F;
    --secondary-green: #55C574;
    --secondary-turquoise: #2EC5CE;
    --text-primary: #181818;
    --text-secondary: #201F1E;
    --text-gray: #333333;
    --white: #FFFFFF;
    --black: #000000;
    --gray-100: #F5F5F5;
    --gray-200: #E5E7EB;
    --gray-300: #D9DBE1;
    --gray-600: #767676;
    --gray-900: #18191F;
    --gradient-primary: linear-gradient(90deg, #0FAFFF 0%, #CC23D1 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.81) 100%);
    --font-primary: 'Tajawal', sans-serif;
    --font-secondary: 'IBM Plex Sans Arabic', sans-serif;
    --font-english: 'Inter', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-base-fluid: clamp(11px, 1rem, 16px);
    --font-size-lg: 18px;
    --font-size-lg-fluid: clamp(11px, 1rem + 2px, 18px);
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    --font-size-4xl: 32px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 1rem;
    --spacing-4: 1.5rem;
    --spacing-5: 3rem;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0px 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0px 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0px 2px 35px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0px 8px 10px -6px rgba(0, 0, 0, 0.1), 0px 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1060;
    --umb-block-grid--grid-columns: 12;
    --umb-block-grid--column-gap: 1.5rem;
    --umb-block-grid--row-gap: 1.5rem;
    --umb-block-grid--area-grid-columns: 12;
    --umb-block-grid--areas-column-gap: 1rem;
    --umb-block-grid--areas-row-gap: 1rem;
    --umb-block-grid--item-column-span: 1;
    --umb-block-grid--item-row-span: 1;
    --umb-block-grid--area-column-span: 1;
    --umb-block-grid--area-row-span: 1;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--white);
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, .main-content {
    flex: 1;
}

footer {
    margin-top: auto; 
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, dl,
figure, blockquote,
pre {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

header {
    border-bottom: 1px solid var(--gray-200);
}

.sticky-header-wrapper {
    background: var(--white);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-md);
}
.centered-outer-container {
    max-width: min(1326px, 90vw);
    margin: auto;
}
/* ===== RTL/LTR SUPPORT ===== */
[dir="rtl"] body,
body[dir="rtl"],
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] body,
body[dir="ltr"],
html[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

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

[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

[dir="rtl"] .list-group {
    padding-right: 0;
    padding-left: 0;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--font-size-4xl);
    line-height: 38px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: var(--font-size-3xl);
    line-height: 32px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h3 {
    font-size: var(--font-size-2xl);
    line-height: 30px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h4 {
    font-size: var(--font-size-xl);
    line-height: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h5 {
    font-size: var(--font-size-lg);
    line-height: 22px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h6 {
    font-size: var(--font-size-base);
    line-height: 20px;
    font-weight: var(--font-weight-medium);
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

small,
.small {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

strong, b {
    font-weight: var(--font-weight-bold);
}
a {
    text-decoration: none;
}
/* ===== UTILITY CLASSES ===== */
.text-primary-custom {
    color: var(--primary-color);
}

.bg-primary-custom {
    background-color: var(--primary-color);
    color: var(--white);
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.rounded-custom {
    border-radius: var(--radius-md);
}

.rounded-lg-custom {
    border-radius: var(--radius-lg);
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}

.transition-normal {
    transition: all var(--transition-normal);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===== ACCESSIBILITY ===== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


@media (max-width: 1280px) {
    .hide-mobile-tablet {
        display: none !important;
    }
}

.show-mobile-tablet {
    display: none !important;
}

@media (max-width: 1280px) {
    .show-mobile-tablet {
        display: flex !important;
    }
}

@media (min-width: 1281px) {
    .hide-desktop {
        display: none !important;
    }
}

.show-desktop {
    display: none !important;
}

@media (min-width: 1281px) {
    .show-desktop {
        display: flex !important;
    }
}


@media (max-width: 1280px) {
    .hide-mobile {
        display: none !important;
    }
}

.show-mobile {
    display: none !important;
}

@media (max-width: 1280px) {
    .show-mobile {
        display: flex !important;
    }
}

.nav-mobile-header {
    display: none;
}

@media (max-width: 1280px) {
    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}

.site-container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(150%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
}

/* Adjust for RTL */
[dir="rtl"] .toast-notification {
    right: auto;
    left: 20px;
}

.toast-notification.show {
    transform: translateY(0);
}

.toast-content i {
    color: #ff4d4d;
}

.toast-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 20px;
}
tbody, td, tfoot, th, thead, tr {
    border-width: 1px;
}
.com-title {
    color: var(--primary-color);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 12px;
}
.com-subtitle {
    color: var(--text-primary);
    font-weight:var(--font-weight-normal);
    font-size: var(--font-size-base);
    margin: 0;
    opacity: 0.6;
}
@media (max-width: 768px) {
    .com-title {
        font-size: var(--font-size-2xl);
    }
}

.content-wrapper {
    max-width: min(1326px, 90%);
    margin: var(--spacing-5) auto;
}

.com-header {
    margin-bottom: var(--spacing-4);
}

/* Use flex instead of width hacks */
.carousel-item .row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
}
.image-gallery-container:not( :has(.carousel-item + .carousel-item) ) .carousel-item .row {
    justify-content: flex-start;
}
.ratio-1x1 img {
    aspect-ratio: 1 / 1;
    object-fit: fill;
}

.ratio-4x3 img {
    aspect-ratio: 4 / 3;
    object-fit: fill;
}

.ratio-16x9 img {
    aspect-ratio: 16 / 9;
    object-fit: fill;
}

/* ============ Umbraco Block Grid Layout ============ */

.umb-block-grid__layout-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}
.umb-block-grid__layout-item {
    grid-column: span 12; /* default */
    min-width: 0;
}
    /* Use the data attribute directly */
    .umb-block-grid__layout-item[data-col-span="6"] {
        grid-column: span 6;
    }
    /* Add more as needed */
    .umb-block-grid__layout-item[data-col-span="4"] {
        grid-column: span 4;
    }

    .umb-block-grid__layout-item[data-col-span="8"] {
        grid-column: span 8;
    }

    .umb-block-grid__layout-item[data-col-span="3"] {
        grid-column: span 3;
    }

/* Responsive */
@media (max-width: 991px) {
    .umb-block-grid__layout-item[data-col-span="6"] {
        grid-column: span 12;
    }
}
@media (max-width: 767px) {
    .umb-block-grid__layout-item[data-col-span] {
        grid-column: span 12 !important;
    }
}