html,
body {
    min-height: 100%;
}

body.content-layout {
    background: #f8fafc;
    color: #0f172a;
    font-family: "Tajawal", "Segoe UI", sans-serif;
}

body.lang-ar {
    font-family: "Tajawal", "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.content-main {
    min-height: 60vh;
}

.container {
    position: relative;
}

/* Header */
.content-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.content-navbar {
    position: relative;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo */
.content-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

html[dir="rtl"] .content-brand {
    margin-left: 0;
    justify-self: end;
}

html[dir="ltr"] .content-brand {
    margin-right: 0;
    justify-self: end;
}

.content-brand-logo {
    width: 180px !important;
    max-width: 180px;
    height: auto;
    display: block;
}

/* Desktop menu */
.content-nav-desktop {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    z-index: 1;
}

.content-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.content-nav-item {
    display: flex;
    flex: 0 0 auto;
}

.content-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.content-nav-link:hover {
    background: #eef2ff;
    color: #0f172a;
}

/* Hide language switch */
.content-lang-switch {
    display: none !important;
}

/* Mobile button */
.content-nav-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #eef2ff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    flex: 0 0 auto;
}

/* Mobile menu */
.offcanvas {
    z-index: 1095;
}

.content-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-mobile-nav-item + .content-mobile-nav-item {
    margin-top: 8px;
}

.content-mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
}

.content-mobile-nav-link:hover {
    background: #eef2ff;
    color: #0f172a;
}

/* Desktop */
@media (min-width: 992px) {
    .content-nav-toggle {
        display: none !important;
    }

    .content-nav-desktop {
        display: flex !important;
    }
}

html[dir="rtl"] .offcanvas-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: right;
}

html[dir="rtl"] .offcanvas-title {
    text-align: right;
    margin-left: auto;
}

html[dir="rtl"] .offcanvas-header .btn-close {
    margin-right: 0;
    margin-left: 0;
}

html[dir="ltr"] .offcanvas-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

/* Mobile */
@media (max-width: 991.98px) {
    .content-navbar {
        min-height: 82px;
    }

    .content-nav-desktop {
        display: none !important;
    }

    .content-brand-logo {
        width: 180px !important;
        max-width: 180px;
    }

    html[dir="rtl"] .content-navbar {
        flex-direction: row;
    }

    html[dir="ltr"] .content-navbar {
        flex-direction: row;
    }
}

/* Safety fix if menu gets too wide on smaller desktop */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .content-nav-link {
        padding: 0 10px;
        font-size: 0.95rem;
    }

    .content-nav-list {
        gap: 4px;
    }
}

/* Footer */
.content-footer {
    margin-top: 56px;
    padding: 48px 0 24px;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.82);
}

.content-footer-title {
    color: #fff;
    font-weight: 800;
    margin-bottom: 14px;
}

.content-footer-text {
    line-height: 1.9;
    margin-bottom: 0;
}

.content-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-footer-links li + li {
    margin-top: 10px;
}

.content-footer-links a {
    color: rgba(255, 255, 255, 0.82);
}

.content-footer-links a:hover {
    color: #fff;
}

.content-footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    gap: 10px;
}