@font-face {
    font-family: 'A-Light';
    src: url('../fonts/A-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'A-Bold';
    src: url('../fonts/A-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Colors */
    --mz-primary: #00898a;
    --mz-primary-hover: #007677;
    --mz-primary-light: #e0f2f1;
    --mz-secondary: #E0E0E0;
    --mz-bg: #F5F5F5;
    --mz-surface: #FFFFFF;
    --mz-text-main: #444444;
    --mz-text-dark: #212121;
    --mz-text-light: #757575;
    --mz-text-muted: #999999;
    --mz-white: #FFFFFF;
    --mz-black: #1a1a1a;
    --mz-border: #eeeeee;
    --mz-border-light: #f5f5f5;
    --mz-border-color: var(--mz-border);
    --mz-bg-light: var(--mz-bg);
    
    /* Typography */
    --mz-font-main: 'A-Light', Tahoma, Arial, sans-serif;
    --mz-font-bold: 'A-Bold', Tahoma, Arial, sans-serif;
    --mz-fs-xs: 12px;
    --mz-fs-sm: 13px;
    --mz-fs-md: 14px;
    --mz-fs-lg: 16px;
    --mz-fs-xl: 18px;
    --mz-fs-h1: 26px;
    --mz-fs-h2: 22px;
    --mz-fs-h3: 19px;
    --mz-fs-h4: 17px;
    --mz-fs-h5: 15px;
    --mz-fs-h6: 14px;
    --mz-lh-base: 1.9;
    --mz-lh-tight: 1.4;

    /* Spacing */
    --mz-section-gap: 100px;
    --mz-section-gap-mobile: 60px;
    
    /* Effects */
    --mz-transition: all 0.3s ease;
    --mz-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --mz-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --mz-radius-sm: 8px;
    --mz-radius-md: 12px;
    --mz-radius-lg: 20px;

    /* Legacy compatibility (to be removed later) */
    --primary-color: var(--mz-primary);
    --primary-light: var(--mz-primary-light);
    --secondary-color: var(--mz-secondary);
    --background-color: var(--mz-bg);
    --surface-color: var(--mz-surface);
    --text-primary: var(--mz-text-dark);
    --text-secondary: var(--mz-text-light);
    --white: var(--mz-white);
    --transition: var(--mz-transition);
    --shadow: var(--mz-shadow-md);
    --font-main: var(--mz-font-main);
    --font-bold: var(--mz-font-bold);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--mz-font-main);
    background-color: var(--mz-bg);
    color: var(--mz-text-main);
    font-size: var(--mz-fs-md);
    line-height: var(--mz-lh-base);
    direction: rtl;
}

p, span, li, div, a {
    color: var(--mz-text-main);
    font-size: var(--mz-fs-md);
    line-height: var(--mz-lh-base);
}

/* -------------------------------------------
   Grid System & Layout (Global Polyfill)
   ------------------------------------------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-12, .col-md-3, .col-md-6, .col-md-9, .col-lg-9 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.d-flex { display: flex; }

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .d-md-block { display: block !important; }
    .d-md-none { display: none !important; }
}

@media (min-width: 992px) {
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
}

@media (max-width: 767.98px) {
    .d-none { display: none !important; }
    .d-md-block { display: none !important; }
    .d-md-none { display: block !important; }
}

/* Spacing Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.pt-4 { padding-top: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1.5rem; }
.me-2 { margin-left: 0.5rem; }
.me-3 { margin-left: 1rem; }
.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.h-100 { height: 100%; }
.fw-bold { font-weight: 700 !important; }
.text-center { text-align: center; }
.text-primary { color: var(--mz-primary) !important; }
.text-muted { color: var(--mz-text-muted) !important; }
.text-success { color: #2e7d32 !important; }
.bg-light { background-color: var(--mz-bg-light) !important; }
.rounded-3 { border-radius: 12px !important; }
.border-top { border-top: 1px solid var(--mz-border-color) !important; }
.border-start { border-right: 1px solid var(--mz-border-color) !important; } /* RTL Fix: start is right */

h1, h2, h3, h4, h5, h6, .mz-bold {
    font-family: var(--mz-font-bold);
    color: var(--mz-text-dark);
    font-weight: 800;
}

h1 { font-size: var(--mz-fs-h1); }
h2 { font-size: var(--mz-fs-h2); }
h3 { font-size: var(--mz-fs-h3); }
h4 { font-size: var(--mz-fs-h4); }
h5 { font-size: var(--mz-fs-h5); }
h6 { font-size: var(--mz-fs-h6); }

/* Global Container */
.mz-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------
   Global Page Components (Premium Design)
   ------------------------------------------- */

/* Page Hero/Header */
.mz-page-hero,
.mz-page-header {
    padding: 60px 0 80px;
    text-align: center;
    background: transparent;
    margin-bottom: -40px;
    position: relative;
    z-index: 1;
}

.mz-page-hero h1,
.mz-page-header h1 {
    font-size: 32px;
    color: var(--mz-text-dark);
    font-family: var(--mz-font-bold);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.mz-page-hero p,
.mz-page-header p {
    font-size: 16px;
    color: var(--mz-text-light);
    font-family: var(--mz-font-main);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .mz-page-hero,
    .mz-page-header { padding: 40px 0 60px; }
}

/* Content Box (White Card) */
.mz-content-box {
    background: var(--mz-white);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid var(--mz-border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .mz-content-box { padding: 25px; }
}

/* Sidebar Navigation */
.mz-sidebar-card {
    background: var(--mz-white);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--mz-border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    position: sticky;
    top: 20px;
    margin-bottom: 30px;
}

.mz-sidebar-title {
    font-family: var(--mz-font-bold);
    font-size: 18px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--mz-bg);
    display: flex;
    align-items: center;
    color: var(--mz-text-dark);
}

.mz-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mz-sidebar-nav li {
    margin-bottom: 10px;
}

.mz-sidebar-nav a {
    display: block;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--mz-text-main);
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mz-sidebar-nav a:hover,
.mz-sidebar-nav a.active {
    background: var(--mz-primary-light);
    color: var(--mz-primary);
    border-color: rgba(0,137,138,0.1);
    font-family: var(--mz-font-bold);
}

/* Alert/Info Boxes */
.mz-alert-box {
    display: flex;
    gap: 20px;
    background: #fff8e1;
    border-right: 5px solid #ffb300;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.mz-alert-icon {
    background: #ffb300;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mz-alert-icon svg {
    color: #fff !important;
}

.mz-alert-content h4 {
    margin-bottom: 8px;
    font-size: 18px;
    color: #856404;
}

.mz-alert-content p {
    margin-bottom: 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.7;
}

.mz-alert-info {
    background: var(--mz-primary-light);
    border-right-color: var(--mz-primary);
}

.mz-alert-info .mz-alert-icon {
    background: var(--mz-primary);
}

.mz-alert-info .mz-alert-content h4,
.mz-alert-info .mz-alert-content p {
    color: var(--mz-primary);
}

/* Mobile Nav Select */
.mz-mobile-nav-box {
    background: var(--mz-white);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--mz-border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.mz-mobile-select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--mz-border-color);
    font-family: var(--mz-font-main);
    background: var(--mz-bg);
}

/* Typography & Content Helpers */
.mz-text-content p {
    margin-bottom: 25px;
    line-height: 2;
    font-size: 15px;
    text-align: justify;
}

.mz-text-content h2, 
.mz-terms-content h2 {
    font-size: 22px;
    margin: 0px 0 15px;
    color: var(--mz-text-dark);
    display: flex;
    align-items: center;
}

.mz-text-content h2::before,
.mz-terms-content h2::before {
    content: '';
    width: 8px;
    height: 24px;
    background: var(--mz-primary);
    margin-left: 15px;
    border-radius: 4px;
}

/* Common Components */

/* 1. Buttons (Standardized) */
.mz-btn-group {
        margin-bottom: 15px;
    margin-top: 15px;
    display: flex;
    gap: 8px;
    background: #ededed;
    padding: 5px;
    border-radius: var(--mz-radius-md);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    width: fit-content;
    transition: var(--mz-transition);
    justify-content: space-between;
}

.mz-btn-group.full-width {
    width: 100%;
}

.mz-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--mz-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: var(--mz-font-bold);
    gap: 10px;
}

.mz-btn-main {
    background: var(--mz-white);
    color: var(--mz-text-dark);
    box-shadow: var(--mz-shadow-sm);
}

.mz-btn-main:hover {
    color: var(--mz-primary);
    transform: translateY(-1px);
    box-shadow: var(--mz-shadow-md);
}

/* Secondary variant for mz-btn-main - Now behaves like main btn */
.mz-btn-main.secondary {
    background: var(--mz-white);
    box-shadow: var(--mz-shadow-sm);
    color: var(--mz-text-dark);
    border: none;
}

.mz-btn-main.secondary:hover {
    color: var(--mz-primary);
    transform: translateY(-1px);
    box-shadow: var(--mz-shadow-md);
    background: var(--mz-white);
    border-color: transparent;
}

.mz-btn-primary {
    background: var(--mz-primary);
    color: var(--mz-white);
}

.mz-btn-primary:hover {
    background: var(--mz-primary-hover);
    color: var(--mz-white);
}

.mz-btn-icon-only {
    color: var(--mz-text-main);
    padding: 12px 15px;
    background: transparent;
}

.mz-btn-group:hover .mz-btn-icon-only {
    color: var(--mz-primary);
}

/* Button Alignment Logic for Content Sections */
.mz-reverse .mz-btn-group {
    margin-right: auto;
    margin-left: 0;
}

@media (max-width: 768px) {
    .mz-btn-group {
        background: transparent;
        padding: 0;
        width: 100%;
        display: flex;
        flex-direction: row; /* Icon (1st child) on right, Text (2nd child) on left in RTL */
        justify-content: space-between;
        gap: 0;
        border: 1px solid var(--mz-border);
        border-radius: 10px;
        overflow: hidden;
        background: var(--mz-white);
    }

    .mz-btn-group .mz-btn {
        border-radius: 0;
        border: none;
        background: transparent;
        height: 50px;
        padding: 0 15px;
    }

    .mz-btn-group .mz-btn-main {
        flex: 1;
        justify-content: flex-end; /* Text on the far left in RTL */
        font-size: 14px;
        color: var(--mz-text-dark);
        padding-left: 20px;
        box-shadow: none;
    }

    .mz-btn-group .mz-btn-main.secondary {
        background: transparent;
        border: none;
    }

    .mz-btn-group .mz-btn-icon-only {
        display: flex;
        width: 50px;
        border-left: 1px solid var(--mz-border);
        justify-content: center;
        color: var(--mz-primary);
    }

    .mz-btn-group .mz-btn-primary {
        background: var(--mz-primary);
        color: var(--mz-white);
    }
    
    .mz-btn-group .mz-btn-primary + .mz-btn-icon-only {
        border-right-color: rgba(255,255,255,0.2);
        color: var(--mz-white);
    }
}

/* Icons */
svg {
    color: #444444 !important;
}

/* 2. Cards */
.mz-card {
    background: var(--mz-white);
    border-radius: var(--mz-radius-md);
    border: 1px solid var(--mz-border);
    padding: 20px;
    transition: var(--mz-transition);
}

.mz-card:hover {
    box-shadow: var(--mz-shadow-md);
}

img {
    transition: none !important;
    transform: none !important;
}

/* 3. Section Styling */
.mz-section {
    padding: var(--mz-section-gap) 0;
    background-color: var(--mz-bg);
}

.mz-section-title {
    text-align: center;
    font-size: var(--mz-fs-h1);
    margin-bottom: 40px;
    color: var(--mz-text-dark);
    line-height: var(--mz-lh-tight);
}

/* Utility Classes */
.mz-text-center { text-align: center; }
.mz-text-right { text-align: right; }
.mz-text-left { text-align: left; }
.mz-text-primary { color: var(--mz-primary); }
.mz-text-muted { color: var(--mz-text-muted); }
.mz-flex { display: flex; }
.mz-grid { display: grid; }
.mz-hidden { display: none; }

@media (max-width: 768px) {
    .mz-section {
        padding: var(--mz-section-gap-mobile) 0;
    }
    .mz-section-title {
        font-size: 1.4rem;
    }
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--mz-transition);
}

.icon {
    vertical-align: middle;
}

/* Ajax Page Loader - Top Progress Bar */
#mz-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background-color: transparent;
    overflow: hidden;
}

#mz-page-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 30%;
    background: var(--mz-primary);
    box-shadow: 0 0 10px var(--mz-primary);
    animation: mz-loader-anim 1s infinite ease-in-out;
}

@keyframes mz-loader-anim {
    0% { left: -30%; width: 30%; }
    50% { width: 60%; }
    100% { left: 100%; width: 30%; }
}
