:root {
    --front-bg: #f6f7f9;
    --front-surface: #ffffff;
    --front-surface-soft: #edf1f6;
    --front-text: #181c24;
    --front-muted: #5f6b7a;
    --front-border: #d8e0ea;
    --front-primary: #155eef;
    --front-accent: #0f766e;
    --front-warm: #9a5b13;
    --front-shadow: 0 20px 58px rgba(24, 28, 36, 0.08);
    --front-shadow-soft: 0 8px 28px rgba(24, 28, 36, 0.06);
    --front-radius: 8px;
    --front-shell: 1180px;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    max-width: 100%;
    background:
        linear-gradient(180deg, #ffffff 0, var(--front-bg) 360px),
        var(--front-bg);
    color: var(--front-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
    text-size-adjust: 100%;
}

body.front-menu-open {
    overflow: hidden;
    touch-action: none;
}

[dir="rtl"] body {
    font-family: Tajawal, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-shell {
    width: min(100% - 32px, var(--front-shell));
    margin: 0 auto;
    min-width: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(217, 224, 234, 0.76);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    max-width: 100%;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    color: var(--front-text);
    font-weight: 800;
    letter-spacing: 0;
}

.brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 8px;
}

.brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.desktop-nav-links,
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.desktop-nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.desktop-nav-links a,
.lang-switch a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--front-muted);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-nav-links a:hover,
.lang-switch a:hover,
.lang-switch a.active {
    background: #101828;
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--front-border);
    border-radius: var(--front-radius);
    background: var(--front-surface);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--front-text);
}

.mobile-menu-panel {
    display: none;
    width: min(100% - 32px, var(--front-shell));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--front-border);
    border-radius: var(--front-radius);
    background: var(--front-surface);
    box-shadow: var(--front-shadow);
    max-height: min(72dvh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-menu-panel.is-visible {
    display: grid;
    gap: 8px;
}

.mobile-menu-link {
    padding: 10px 12px;
    border-radius: var(--front-radius);
    color: var(--front-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.mobile-menu-link:hover {
    background: var(--front-surface-soft);
}

.site-main {
    padding: 24px 0 0;
    min-width: 0;
    max-width: 100%;
}

.hero-section {
    min-height: min(560px, calc(100vh - 120px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: clamp(24px, 4vw, 52px);
    align-items: center;
    padding: clamp(44px, 6vw, 72px) 0 clamp(32px, 5vw, 54px);
    min-width: 0;
}

.hero-copy h1,
.section-heading h2,
.detail-view h1,
.cta-band h2 {
    margin: 0;
    color: var(--front-text);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.06;
}

.hero-copy h1 {
    max-width: 780px;
    font-size: clamp(2.65rem, 5.2vw, 4.7rem);
    overflow-wrap: anywhere;
}

.hero-copy p {
    max-width: 680px;
    margin: 20px 0 0;
    color: #536170;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--front-primary);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    padding: 0 18px;
    box-shadow: var(--front-shadow-soft);
}

.primary-link {
    background: var(--front-text);
    color: #fff;
}

.secondary-link {
    border: 1px solid var(--front-border);
    color: var(--front-text);
    background: var(--front-surface);
}

.hero-panel {
    border: 1px solid var(--front-border);
    border-radius: 22px;
    background: var(--front-surface);
    box-shadow: var(--front-shadow);
    padding: 20px;
    min-width: 0;
    max-width: 100%;
}

.panel-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}

.panel-bar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--front-border);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.panel-grid div,
.panel-list span {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid rgba(216, 224, 234, 0.85);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, var(--front-surface-soft));
    padding: 16px;
    overflow-wrap: anywhere;
}

.panel-grid strong {
    font-size: 1.85rem;
    line-height: 1;
}

.panel-grid span,
.panel-list span {
    color: var(--front-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.panel-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.content-section,
.content-layout,
.cta-band {
    margin-top: clamp(52px, 7vw, 84px);
    min-width: 0;
    max-width: 100%;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 24px;
}

.section-heading h2,
.cta-band h2 {
    font-size: clamp(1.85rem, 3vw, 2.45rem);
}

.align-start {
    text-align: start;
}

.feature-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    min-width: 0;
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.pricing-card,
.post-card,
.detail-view,
.widget,
.empty-card,
.cta-band {
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--front-border);
    border-radius: 18px;
    background: var(--front-surface);
    box-shadow: var(--front-shadow-soft);
}

.feature-card,
.pricing-card,
.post-card,
.detail-view,
.widget,
.empty-card {
    padding: clamp(20px, 2.4vw, 28px);
}

.feature-mark {
    display: block;
    width: 40px;
    height: 5px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--front-primary), var(--front-accent), var(--front-warm));
}

.feature-card h3,
.pricing-card h3,
.post-card h3,
.widget h2 {
    margin: 0;
    color: var(--front-text);
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.feature-card p,
.pricing-card p,
.post-card p,
.empty-card p,
.cta-band p,
.site-footer p {
    color: var(--front-muted);
    margin-bottom: 0;
}

.pricing-card {
    display: grid;
    gap: 14px;
    align-content: start;
}

.pricing-card strong {
    color: var(--front-primary);
    font-size: 2rem;
    overflow-wrap: anywhere;
}

.pricing-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--front-muted);
}

[dir="rtl"] .pricing-card ul {
    padding-left: 0;
    padding-right: 18px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
    gap: 26px;
    align-items: start;
    min-width: 0;
}

.content-primary {
    min-width: 0;
    max-width: 100%;
}

body.page-view .content-layout {
    grid-template-columns: minmax(0, 920px);
    justify-content: center;
}

body.page-view .sidebar {
    display: none;
}

.post-list {
    display: grid;
    gap: 20px;
}

.post-card h3 {
    margin-top: 8px;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.post-card a:hover,
.widget a:hover {
    color: var(--front-primary);
}

.detail-view {
    padding: clamp(24px, 3vw, 38px);
}

.detail-view h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    overflow-wrap: anywhere;
}

.lead-text {
    max-width: 760px;
    color: var(--front-muted);
    font-size: 1.12rem;
}

.content-body {
    color: var(--front-text);
    font-size: 1.04rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.content-body img,
.content-body table,
.content-body pre,
.content-body iframe {
    max-width: 100%;
}

.content-body img {
    border-radius: var(--front-radius);
}

.content-body table,
.content-body pre {
    display: block;
    overflow-x: auto;
}

.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.tag-row span,
.tag-cloud a {
    border: 1px solid var(--front-border);
    border-radius: var(--front-radius);
    color: var(--front-muted);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 10px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sidebar {
    display: grid;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.widget ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.widget li,
.widget a {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.widget h2 {
    margin-bottom: 14px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cms-section,
.cms-widget,
.cms-card {
    min-width: 0;
    max-width: 100%;
}

.cms-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.cms-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(37,99,235,0), rgba(37,99,235,0.22), rgba(16,24,40,0));
    opacity: 0;
    transition: opacity 180ms ease;
}

.cms-card:hover::after {
    opacity: 1;
}

.cms-card--service,
.cms-card--partner,
.cms-card--package,
.cms-card--post,
.cms-card--empty-state {
    contain: layout paint;
}

.cta-band {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(26px, 4vw, 40px);
    background: linear-gradient(135deg, #101828, #1d2939);
    min-width: 0;
}

.cta-band h2,
.cta-band p {
    color: #fff;
}

.cta-band p {
    max-width: 740px;
    margin: 12px 0 0;
    opacity: 0.82;
}

.site-footer {
    margin-top: 74px;
    padding: 42px 0 28px;
    border-top: 1px solid var(--front-border);
    background: #fff;
}

.footer-grid,
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}

.footer-grid {
    margin-bottom: 24px;
}

.footer-bottom {
    border-top: 1px solid var(--front-border);
    padding-top: 22px;
    color: var(--front-muted);
    font-size: 0.9rem;
}

.top-spacer {
    height: 44px;
}

@media (max-width: 980px) {
    .desktop-nav-links,
    .site-nav > .lang-switch {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .hero-section,
    .content-layout {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .pricing-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-menu-panel {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        z-index: 80;
        width: auto;
        margin: 0;
    }
}

@media (max-width: 700px) {
    .site-shell {
        width: min(100% - 24px, var(--front-shell));
    }

    .nav-inner {
        min-height: 64px;
        gap: 10px;
    }

    .brand {
        max-width: calc(100vw - 92px);
    }

    .brand span {
        max-width: 100%;
    }

    .mobile-menu-panel {
        left: 12px;
        right: 12px;
        top: 70px;
        max-height: calc(100dvh - 86px);
    }

    .hero-section {
        min-height: auto;
        padding: 34px 0 24px;
        gap: 24px;
    }

    .hero-copy h1,
    .detail-view h1 {
        font-size: 2.35rem;
    }

    .section-heading h2,
    .cta-band h2 {
        font-size: 1.75rem;
    }

    .feature-grid,
    .pricing-grid,
    .compact-grid,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .pricing-card,
    .post-card,
    .detail-view,
    .widget,
    .empty-card,
    .cta-band {
        padding: 18px;
    }

    .content-section,
    .content-layout,
    .cta-band {
        margin-top: 44px;
    }

    .panel-grid strong,
    .pricing-card strong {
        font-size: 1.55rem;
    }

    .footer-grid,
    .footer-bottom,
    .cta-band {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid > *,
    .footer-bottom > * {
        min-width: 0;
        max-width: 100%;
    }
}

.cms-rich-copy {
    color: var(--front-muted);
}

.cms-rich-copy > *:first-child {
    margin-top: 0;
}

.cms-rich-copy > *:last-child {
    margin-bottom: 0;
}

.hero-media {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.cms-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cms-gallery-grid figure {
    margin: 0;
    min-width: 0;
}

.cms-gallery-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.cms-gallery-grid figcaption {
    margin-top: 8px;
    color: var(--front-muted);
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 14px;
}

.footer-links a {
    color: var(--front-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--front-text);
}

@media (max-width: 700px) {
    .cms-gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .site-shell {
        width: min(100% - 20px, var(--front-shell));
    }

    .brand img {
        width: 30px;
        height: 30px;
    }

    .brand span {
        font-size: 0.94rem;
    }

    .mobile-menu-toggle {
        width: 38px;
        height: 38px;
    }

    .hero-copy h1,
    .detail-view h1 {
        font-size: 2rem;
    }

    .primary-link,
    .secondary-link {
        width: 100%;
        justify-content: center;
    }
}

.cms-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.cms-inline-list li {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--front-muted);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 8px 12px;
}

.cms-inline-list--cta li {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
}

.cms-partner-logo {
    display: block;
    width: auto;
    max-width: 140px;
    height: 42px;
    object-fit: contain;
    margin-bottom: 14px;
}
