:root {
    --primary-color: #1577b9;
    --secondary-color: #294156;
    --hover-color: #0d5a91;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #294156;
    --border-color: #e8eef3;
    --transition-speed: 0.4s;
    --ar-text-color: #6c757d;
    --gold-light: #e3f2fd;
    --blue-light: #f0f4f8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.page-background {
    width: 100%;
    max-width: 900px;
    /* Keep max width specifically for the form flow */
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    /* Stack header and form vertically */
    align-items: center;
    /* Center them */
    margin: 0 auto;
    /* Center page-background in body */
    gap: 30px;
    /* Space between header and card */
}

.form-header {
    text-align: center;
    margin-bottom: 0;
    /* Handled by gap in parent */
    width: 100%;
}

.form-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 5px;
    background: linear-gradient(135deg, #294156 0%, #152835 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-ar {
    font-size: 1.15rem;
    color: var(--ar-text-color);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    line-height: 1.6;
}

.card-container {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(41, 65, 86, 0.08);
    padding: 45px;
    min-height: 500px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 4px solid var(--primary-color);
    overflow: hidden;
}

.card-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(21, 119, 185, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* Steps Transition Logic */
.form-step {
    display: none;
    animation: fadeIn var(--transition-speed) ease-in-out;
    flex-grow: 1;
    /* Allow content to fill space */
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Labels */
.question-label {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 35px;
    text-align: center;
    line-height: 1.4;
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    position: relative;
    padding-bottom: 15px;
}

.question-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--hover-color));
    border-radius: 2px;
}

.label-ar {
    font-size: 1.05rem;
    color: var(--ar-text-color);
    font-weight: 500;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    margin-top: 5px;
    display: block;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.required {
    display: none !important;
    /* Hide all asterisks */
}

/* Radio Options Styling */
.options-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 650px;
    /* Increased to accommodate content */
    margin: 0 auto;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 2px solid var(--border-color);
    padding: 18px 22px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.radio-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(21, 119, 185, 0.15);
}

.radio-option:hover::before {
    transform: scaleY(1);
}

.radio-option input[type="radio"] {
    display: none;
}

/* Custom Radio Circle */
.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    margin-right: 15px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.radio-option input[type="radio"]:checked+.radio-custom {
    border-color: var(--primary-color);
    background: var(--gold-light);
}

.radio-option input[type="radio"]:checked+.radio-custom::after {
    opacity: 1;
    transform: scale(1);
}

.radio-option:has(input:checked) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.25);
}

.radio-option:has(input:checked)::before {
    transform: scaleY(1);
}

/* Option Content with Translation */
.option-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.option-text {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
    line-height: 1.4;
}

.option-ar {
    font-size: 0.95rem;
    color: var(--ar-text-color);
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    line-height: 1.5;
}

/* If Arabic is dominant/wanted right-aligned within the option */
/* 
.option-ar { text-align: right; width: 100%; }
But since the form is LTR primarily, keeping it left aligned usually looks cleaner unless we switch whole layout.
*/


.radio-option input[type="radio"]:checked~.option-content .option-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer & Navigation */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    padding-bottom: 5px;
    border-top: 2px solid var(--gold-light);
    position: relative;
    gap: 15px;
}

.form-actions::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* Progress Container - HIDDEN */
.progress-container {
    display: none !important;
}

.progress-dots {
    display: none !important;
}

.dot {
    display: none !important;
}

.progress-text {
    display: none !important;
}


.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
    min-width: 110px;
}

.btn-ar {
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.85;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '→';
    position: absolute;
    right: -20px;
    transition: right 0.3s ease;
    font-size: 1.2rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--hover-color) 0%, #084370 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 119, 185, 0.4);
}

.btn-primary:hover::after {
    right: 10px;
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--blue-light);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateX(-3px);
}

.btn-secondary::before {
    content: '←';
    position: absolute;
    left: -20px;
    transition: left 0.3s ease;
    font-size: 1.2rem;
}

.btn-secondary:hover:not(:disabled)::before {
    left: 10px;
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}

/* Input Grid Layout */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    /* Increased from 20px for better vertical separation */
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    /* Added spacing between field and next label */
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-control {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s;
    font-family: inherit;
    background-color: #fcfcfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(21, 119, 185, 0.15);
}

label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.4;
    display: flex;
    flex-direction: row;
    /* Horizontal alignment */
    justify-content: space-between;
    /* Space between English (left) and Arabic (right) */
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.ar-inline {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9em;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    border: none;
    margin-left: 15px;
    /* Minimum space between En and Ar */
    white-space: nowrap;
    /* Keep Arabic title together if possible */
}

/* Mobile Responsive: Stack them on small screens */
@media (max-width: 500px) {
    label {
        flex-direction: column;
        align-items: flex-start;
    }

    .ar-inline {
        margin-left: 0;
        margin-top: 2px;
        align-self: flex-end;
        white-space: normal;
    }
}

/* Radio Inline Group (Gender) */
.radio-inline-group {
    display: flex;
    gap: 20px;
    align-items: center;
    height: 45px;
    /* Match text input height roughly */
    border: 1px solid transparent;
}

.radio-inline-group label {
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fbff;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.radio-inline-group label:hover {
    border-color: var(--primary-color);
}

.radio-inline-group input[type="radio"] {
    accent-color: var(--primary-color);
}

/* Declaration Box */
.declaration-box {
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.1);
}

.declaration-box label {
    display: flex;
    gap: 15px;
    cursor: pointer;
    line-height: 1.5;
    align-items: flex-start;
}

.declaration-box input[type="checkbox"] {
    margin-top: 5px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    accent-color: var(--primary-color);
}

input[type="checkbox"]:checked {
    filter: brightness(1.1);
}

.review-text {
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

textarea.form-control {
    resize: vertical;
}

/* Table Container Styling - ADDED NEW STYLES BELOW */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--primary-color);
}

td {
    color: #555;
    font-size: 0.95rem;
}

.exam-table tr:hover,
.qual-table tr:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    transition: all 0.2s ease;
}

.form-control.compact {
    padding: 8px;
    font-size: 0.9rem;
}

.info-note {
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    border: 2px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.1);
}

.info-note strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Landing Page Styles (Irtiqa Identity) --- */
:root {
    --irtiqa-dark-blue: #1c355e;
    --irtiqa-accent-gold: #c5a065;
    --irtiqa-text-light: #f8f9fa;
    --irtiqa-bg-light: #f4f7fa;
}

body {
    /* Ensure fonts are applied globally but prioritize Cairo for Arabic */
    font-family: 'Cairo', 'Inter', sans-serif;
    background-color: var(--irtiqa-bg-light);
}

/* Landing Page Wrapper */
.landing-background {
    width: 100%;
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    direction: rtl;
    /* Arabic Layout */
}

/* Header & Nav */
.main-header {
    background-color: #fff;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--irtiqa-dark-blue);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--irtiqa-dark-blue);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.contact-btn {
    border: 1px solid var(--irtiqa-dark-blue);
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--irtiqa-dark-blue);
    font-weight: 600;
    transition: all 0.3s;
}

.contact-btn:hover {
    background-color: var(--irtiqa-dark-blue);
    color: #fff;
}

/* Hero Section */
.hero-section {
    background-color: var(--irtiqa-dark-blue);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 5%;
}

.breadcrumb {
    color: #ccc;
    font-size: 0.9rem;
}

/* Content Sections */
.content-section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    color: var(--irtiqa-dark-blue);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.section-desc {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.secondary-section {
    background-color: #f9fbfd;
    max-width: 100%;
    /* Full width bg */
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-landing {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-landing:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-solid {
    background-color: #2e1a47;
    /* Deep purple/blue */
    color: #fff;
    border: none;
}

.btn-solid:hover {
    background-color: #3d225e;
}

/* --- Responsive Header Overrides (apply across pages) --- */
/* Target header used in multiple pages and override inline styles when needed */
.landing-background header,
header[style] {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
}

/* Inner container alignment (header > div) */
.landing-background header>div,
header>div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 55px;
    transition: height 0.18s ease;
}

#desktopNav {
    display: flex !important;
    gap: 30px;
    align-items: center;
}

#mobileMenuToggle {
    display: none !important;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 6px;
}

#mobileMenu {
    transition: right 0.28s ease;
    width: 320px;
    max-width: 85%;
    right: -100%;
}

#mobileMenuOverlay {
    display: none;
}

@media (max-width: 992px) {
    .main-header {
        padding: 12px 30px;
    }

    .logo img {
        height: 50px;
    }
}

@media (max-width: 768px) {

    /* Switch to mobile view */
    #desktopNav {
        display: none !important;
    }

    #mobileMenuToggle {
        display: block !important;
    }

    .logo img {
        height: 45px;
    }

    .landing-background header>div,
    header>div {
        padding: 0 14px;
    }

    /* Make mobile menu full-height side panel with smooth transition */
    #mobileMenu {
        width: 280px;
        max-width: 80%;
        right: -100% !important;
    }

    #mobileMenu.show {
        right: 0 !important;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    /* Slightly compact nav items */
    #desktopNav a {
        font-size: 0.95rem;
        padding: 6px 4px;
    }

    #startRegistrationBtn {
        padding: 10px 18px;
        font-size: 0.95rem;
        min-width: unset;
    }
}

.btn-outline {
    background-color: #2e1a47;
    color: #fff;
    border: none;
}

/* Footer */
.landing-footer {
    background: #111;
    color: #777;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .main-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* --- Upload Box Styles --- */
.upload-container {
    margin-bottom: 25px;
    width: 100%;
}

.upload-label-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #444;
}

.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 35px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.upload-box:hover,
.upload-box.drag-over {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--gold-light) 0%, #e3f2fd 100%);
    box-shadow: 0 6px 20px rgba(21, 119, 185, 0.15);
}

.upload-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.3);
}

.upload-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-text-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.upload-text-sub {
    font-size: 0.9rem;
    color: #94a3b8;
}

.file-name-display {
    margin-top: 10px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--gold-light);
    padding: 8px 20px;
    border-radius: 25px;
    display: none;
    border: 2px solid var(--primary-color);
}

.file-name-display.active {
    display: inline-block;
}

/* Signature Pad Styles */
#signaturePad {
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background-color: #fafafa;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    max-width: 600px;
    height: 200px;
    box-shadow: 0 4px 15px rgba(21, 119, 185, 0.1);
}


/* Force hide inactive steps */
/* Visibility Fixes */
.form-step {
    display: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.form-step.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure options are visible */
.options-group,
.input-grid {
    display: block;
    width: 100%;
}

/* ============================================================
   UNIFIED SITE HEADER  (used across all pages)
   ============================================================ */

/* ============================================================
   FINAL FIXED HEADER & MOBILE MENU
   ============================================================ */

/* 1. Header Container */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    height: 90px;
    display: flex;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.site-header__container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 2. Logo */
.site-header__logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* 3. Desktop Navigation */
.site-header__nav {
    display: flex;
    align-items: center;
    gap: 40px;
    /* زيادة المسافة بين العناصر */
}

.site-header__link {
    text-decoration: none;
    color: #294156;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    /* منع التفاف النص */
}

.site-header__link:hover {
    color: #1577b9;
}

/* Dropdown Container */
.site-header__dropdown {
    position: relative;
    /* ضروري جداً لتموضع القائمة المنسدلة */
    display: flex;
    align-items: center;
    height: 100%;
}

.site-header__link--dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.site-header__link--dropdown i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.site-header__dropdown:hover .site-header__link--dropdown i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.site-header__dropdown-menu {
    position: absolute;
    top: 100%;
    right: 50%;
    /* توسيط القائمة */
    transform: translateX(50%) translateY(10px);
    background: #ffffff;
    min-width: 240px;
    /* عرض مناسب */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-top: 4px solid #1577b9;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1100;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.site-header__dropdown:hover .site-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

.site-header__dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.site-header__dropdown-item:last-child {
    border-bottom: none;
}

.site-header__dropdown-item i {
    color: #1577b9;
    width: 20px;
    text-align: center;
}

.site-header__dropdown-item:hover {
    background: #e3f2fd;
    color: #1577b9;
    padding-right: 25px;
    /* حركة بسيطة عند الهوفر */
}

.site-header__cta-btn {
    background: #1577b9;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(21, 119, 185, 0.3);
    transition: all 0.3s;
}

.site-header__cta-btn:hover {
    background: #0d5a91;
    transform: translateY(-2px);
}

/* 5. Hamburger Menu Button (Mobile Only) */
.site-header__hamburger {
    display: none;
    /* Hidden on desktop */
    background: transparent;
    border: 2px solid #1577b9;
    color: #294156;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.site-header__hamburger:hover {
    background: #e3f2fd;
}

/* ============================================================ 
   MOBILE MENU (FULLSCREEN OVERLAY)
   ============================================================ */
.site-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 99999;
    /* Highest priority */

    /* Default state: Hidden */
    display: none;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

/* Class added by JS to show menu */
.site-mobile-menu.is-open {
    display: flex !important;
}

/* Menu Close Button */
.site-mobile-menu__close {
    align-self: flex-end;
    /* Top Right/Left depending on RTL */
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-mobile-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-mobile-menu__link {
    display: block;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    text-decoration: none;
    color: #294156;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid transparent;
}

.site-mobile-menu__link:hover {
    background: #e3f2fd;
    border-color: #1577b9;
    color: #1577b9;
}

.site-mobile-menu__link i {
    margin-left: 10px;
    color: #1577b9;
}

/* ============================================================ 
   RESPONSIVE LOGIC
   ============================================================ */
@media (max-width: 900px) {

    /* Hide Desktop Nav */
    .site-header__nav {
        display: none;
    }

    /* Show Hamburger */
    .site-header__hamburger {
        display: flex;
    }

    /* Adjust Header Height */
    .site-header {
        height: 75px;
    }

    /* Adjust Logo Size */
    .site-header__logo img {
        height: 45px;
    }
}

@media (max-width: 400px) {
    .site-header__container {
        padding: 0 15px;
    }

    .site-header__logo img {
        height: 40px;
    }

    .site-header__hamburger {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ---- Mobile Overlay (Black Background) ---- */
.site-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    /* أغمق قليلاً */
    z-index: 99990 !important;
    /* أقل قليلاً من القائمة */
    display: none;
    backdrop-filter: blur(2px);
}

.site-mobile-overlay.is-visible {
    display: block !important;
}