/* =========================================================================
   العميد في اللغة العربية - أ/ أحمد جاد
   Loaded after index-mk.css on the home, login, register, privacy and terms pages.
   Colours taken from the photos: the maroon-brown shirt, the parchment wall, the green rings, gold calligraphy.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&display=swap');

:root {
    --om-maroon: #6c2e24;      /* the shirt */
    --om-maroon-2: #4d2019;
    --om-night: #2a1610;
    --om-clay: #a0563f;
    --om-tan: #bb886f;
    --om-sand: #e5cdb4;        /* the wall */
    --om-parch: #f2e2ce;
    --om-paper: #f8efe2;
    --om-green: #2f6f45;       /* the rings */
    --om-green-2: #094621;
    --om-gold: #c8a46a;
    --om-ink: #2a1a14;
    --om-dim: #6f5d52;
    --om-line: rgba(108, 46, 36, .14);
    --om-shadow: 0 22px 50px rgba(77, 32, 25, .16);
    --om-ruqaa: 'Aref Ruqaa', CooperArabic, serif;
    --om-ease: cubic-bezier(.16, 1, .3, 1);

    /* the base design (index-mk.css) takes these: retuned to the photos */
    --og-wine: #6c2e24;
    --og-wine-2: #4d2019;
    --og-rose: #a0563f;
    --og-blush: #f3e4d6;
    --og-sand: #e5cdb4;
    --og-cream: #f8efe2;
    --og-ink: #2a1a14;
    --og-dim: #6f5d52;
    --og-line: rgba(108, 46, 36, .12);
    --og-t1: #6c2e24;
    --og-t2: #2f6f45;
    --og-t3: #c8a46a;
    --og-t4: #4d2019;
    --og-shadow: 0 18px 44px rgba(77, 32, 25, .12);
    --og-hatch: repeating-linear-gradient(-45deg, rgba(108, 46, 36, .16) 0 2px, transparent 2px 7px);
}

/* parchment page with a faint eight-point star pattern (the tiles in the photo) */
.mk-home, body:not(.mk-home) {
    background-color: var(--om-paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%236c2e24' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- shared pieces ---------- */
.om-star { position: absolute; width: 34px; height: 34px; }
.om-star::before, .om-star::after {
    content: ""; position: absolute; inset: 0; background: var(--c, var(--om-gold)); opacity: .85;
}
.om-star::after { transform: rotate(45deg); }

.om-in { opacity: 0; animation: omUp .9s var(--om-ease) forwards; animation-delay: calc(.15s + var(--d, 0s)); }
@keyframes omUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes omFloat { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }
@keyframes omSpin { to { transform: rotate(360deg); } }

.om-btn {
    display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.6rem; border-radius: 14px;
    font-weight: 800; font-size: 1.02rem; text-decoration: none; transition: transform .35s var(--om-ease), box-shadow .35s ease, background .3s ease, color .3s ease;
}
.om-btn-primary { background: var(--om-maroon); color: #fff; box-shadow: 0 12px 26px rgba(108, 46, 36, .35), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.om-btn-primary:hover { background: var(--om-maroon-2); color: #fff; transform: translateY(-3px); box-shadow: 0 18px 34px rgba(108, 46, 36, .42); }
.om-btn-ghost { background: rgba(255, 255, 255, .55); color: var(--om-maroon); border: 2px solid var(--om-maroon); }
.om-btn-ghost:hover { background: var(--om-maroon); color: #fff; transform: translateY(-3px); }

/* ---------- Hero ---------- */
.om-hero {
    position: relative; overflow: hidden; overflow: clip; isolation: isolate;
    padding: 150px 0 5rem;
    background:
        radial-gradient(50% 70% at 100% 0%, rgba(229, 205, 180, .9) 0%, transparent 70%),
        radial-gradient(45% 60% at 0% 100%, rgba(187, 136, 111, .28) 0%, transparent 70%),
        linear-gradient(180deg, var(--om-parch) 0%, var(--om-paper) 100%);
}
.om-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.om-callig {
    position: absolute; font-family: var(--om-ruqaa); color: var(--om-maroon); opacity: .06; line-height: 1;
}
.om-callig-1 { font-size: 34rem; top: -6rem; left: -3rem; }
.om-callig-2 { font-size: 22rem; bottom: -6rem; right: 38%; transform: rotate(-12deg); }
.om-star-1 { top: 22%; right: 6%; --c: var(--om-gold); animation: omSpin 18s linear infinite; }
.om-star-2 { bottom: 16%; left: 44%; width: 22px; height: 22px; --c: var(--om-green); animation: omSpin 14s linear infinite reverse; }

.om-hero-in { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3rem; }

.om-badge {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45rem 1.05rem; border-radius: 999px;
    background: var(--om-maroon); color: #fff; font-weight: 800; font-size: .95rem;
    box-shadow: 0 8px 20px rgba(108, 46, 36, .28);
}
.om-badge span { color: var(--om-sand); font-weight: 600; }
.om-badge i { color: var(--om-gold); }

.om-title { margin: 1.1rem 0 .2rem; line-height: 1.25; padding-top: .2em; color: var(--om-ink); }
.om-title-prefix { display: block; font-family: CooperArabic, sans-serif; font-size: 1.35rem; color: var(--om-clay); margin-bottom: -.2rem; }
.om-title-first, .om-title-last {
    display: inline-block; font-family: var(--om-ruqaa); font-weight: 700; font-size: clamp(3.6rem, 8vw, 6rem);
    padding: .15em .05em .35em; margin: -.15em 0 -.35em;
}
.om-title-first { color: var(--om-maroon); }
.om-title-last { position: relative; color: var(--om-green); }
.om-title-last::after {   /* a gold brush stroke under the name */
    content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; bottom: .5em; height: .22em; border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--om-gold) 12%, var(--om-gold) 88%, transparent); opacity: .55; transform: rotate(-2deg);
}

.om-motto { font-family: var(--om-ruqaa); font-size: clamp(1.6rem, 3.4vw, 2.2rem); color: var(--om-maroon-2); margin: .6rem 0 .3rem; line-height: 1.6; }
.om-motto span { color: var(--om-green); }
.om-lead { font-size: 1.08rem; line-height: 2; color: var(--om-dim); max-width: 36rem; margin: .4rem 0 1.4rem; }
.om-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.om-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.om-points li {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 12px;
    background: rgba(255, 255, 255, .6); border: 1px solid var(--om-line); font-weight: 700; font-size: .92rem; color: var(--om-ink);
}
.om-points i { color: var(--om-green); }

/* the photo in an arched doorway, like the one behind him */
.om-stage { position: relative; padding: 1.2rem 1.5rem 0; }
.om-arch {
    position: relative; aspect-ratio: 960 / 768; border-radius: 40% 40% 22px 22px / 26% 26% 22px 22px; overflow: hidden;   /* the photo's own shape: nothing of it is cut */
    background: var(--om-sand);
    border: 10px solid var(--om-maroon);
    outline: 2px solid var(--om-gold); outline-offset: 6px;
    box-shadow: var(--om-shadow), inset 0 0 0 6px var(--om-parch);
}
.om-arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.om-arch::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 70%, rgba(77, 32, 25, .25) 100%);
}

.om-ring {
    position: absolute; border-radius: 50%; border: 14px solid var(--om-green);
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, .35), inset 0 -6px 10px rgba(0, 0, 0, .3), 0 14px 24px rgba(9, 70, 33, .3);
    animation: omFloat 6s ease-in-out infinite;
}
.om-ring::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .55); clip-path: inset(0 0 55% 0); }
.om-ring-1 { width: 86px; height: 86px; top: 4%; left: -6px; --r: -18deg; }
.om-ring-2 { width: 56px; height: 56px; bottom: 18%; right: -4px; border-width: 10px; --r: 24deg; animation-delay: -2s; }

.om-tag {
    position: absolute; display: flex; flex-direction: column; align-items: center; gap: .1rem;
    padding: .55rem .95rem; border-radius: 14px; background: #fff; box-shadow: 0 14px 30px rgba(77, 32, 25, .18);
    border-bottom: 3px solid var(--om-maroon); animation: omFloat 7s ease-in-out infinite;
}
.om-tag b { font-family: var(--om-ruqaa); font-size: 1.35rem; color: var(--om-maroon); line-height: 1.3; }
.om-tag small { font-size: .78rem; font-weight: 700; color: var(--om-green); }
.om-tag-1 { top: 30%; right: -10px; --r: 3deg; }
.om-tag-2 { bottom: 10%; left: -14px; --r: -3deg; animation-delay: -3s; border-bottom-color: var(--om-green); }
.om-tag-3 { top: 3%; right: 22%; flex-direction: row; gap: .4rem; padding: .45rem .8rem; animation-delay: -1.5s; border-bottom-color: var(--om-gold); }
.om-tag-3 i { color: #c0392b; }

/* ---------- Sections ---------- */
.om-section { padding: 4.5rem 0; position: relative; }
.om-head { text-align: center; max-width: 44rem; margin: 0 auto 2.6rem; }
.om-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border-radius: 999px;
    background: rgba(108, 46, 36, .08); color: var(--om-maroon); font-weight: 800; font-size: .9rem;
}
.om-eyebrow i { color: var(--om-green); }
.om-h2 { font-family: CooperArabic, sans-serif; font-size: clamp(2.1rem, 5vw, 3rem); color: var(--om-ink); margin: .8rem 0 .3rem; line-height: 1.5; }
.om-h2 em { font-style: normal; font-family: var(--om-ruqaa); color: var(--om-maroon); padding: 0 .1em .15em; }
.om-head p { color: var(--om-dim); font-size: 1.05rem; margin: 0; }

/* curriculum: manuscript pages with a big letter */
.om-curr { background: linear-gradient(180deg, transparent, rgba(229, 205, 180, .35) 30%, rgba(229, 205, 180, .35) 70%, transparent); }
.om-branches { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.om-branch {
    --c: var(--om-maroon);
    position: relative; overflow: hidden; padding: 1.6rem 1.5rem 1.4rem; border-radius: 6px 26px 6px 26px;
    background: linear-gradient(160deg, #fffaf2, var(--om-paper));
    border: 1px solid var(--om-line); box-shadow: 0 14px 34px rgba(77, 32, 25, .08);
    transition: transform .45s var(--om-ease), box-shadow .45s ease, border-color .45s ease;
}
.om-branch::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.om-branch::after {
    content: ""; position: absolute; inset: 10px; border: 1px dashed color-mix(in srgb, var(--c) 30%, transparent); border-radius: 4px 20px 4px 20px; pointer-events: none;
}
.om-branch:hover { transform: translateY(-8px) rotate(-.4deg); box-shadow: 0 26px 50px rgba(77, 32, 25, .16); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.om-branch-letter {
    position: absolute; top: -.6rem; left: .6rem; font-family: var(--om-ruqaa); font-weight: 700; font-size: 7.5rem; line-height: 1;
    color: var(--c); opacity: .12; transition: opacity .45s ease, transform .6s var(--om-ease);
}
.om-branch:hover .om-branch-letter { opacity: .22; transform: scale(1.08) rotate(-6deg); }
.om-branch-kicker { position: relative; display: inline-block; font-size: .8rem; font-weight: 800; color: #fff; background: var(--c); padding: .15rem .7rem; border-radius: 999px; }
.om-branch h3 { position: relative; font-family: var(--om-ruqaa); font-weight: 700; font-size: 2rem; color: var(--c); margin: .6rem 0 .3rem; line-height: 1.5; }
.om-branch p { position: relative; color: var(--om-dim); line-height: 1.9; margin: 0 0 .9rem; }
.om-branch ul { position: relative; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.om-branch ul li { padding: .25rem .7rem; border-radius: 8px; font-size: .85rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }

/* rules: wooden tablets */
.om-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.om-rules li {
    position: relative; padding: 1.5rem 1.4rem 1.3rem; border-radius: 18px; color: #fff;
    background: linear-gradient(160deg, var(--om-maroon) 0%, var(--om-maroon-2) 100%);
    box-shadow: 0 16px 34px rgba(77, 32, 25, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .45s var(--om-ease);
}
.om-rules li:nth-child(3n+2) { background: linear-gradient(160deg, var(--om-green) 0%, var(--om-green-2) 100%); box-shadow: 0 16px 34px rgba(9, 70, 33, .25); }
.om-rules li:hover { transform: translateY(-6px); }
.om-rules li::after {
    content: ""; position: absolute; top: 14px; left: 14px; width: 22px; height: 22px; opacity: .35;
    background: conic-gradient(from 22.5deg, var(--om-gold) 0 25%, transparent 0 50%, var(--om-gold) 0 75%, transparent 0);
    clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
}
.om-rule-tag { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--om-night); background: var(--om-gold); padding: .12rem .65rem; border-radius: 999px; }
.om-rules b { display: block; font-family: var(--om-ruqaa); font-size: 1.8rem; margin: .5rem 0 .2rem; line-height: 1.5; }
.om-rules p { margin: 0; line-height: 1.95; color: rgba(255, 255, 255, .86); }

/* steps */
.om-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: s; }
.om-steps li {
    overflow: visible !important; margin-top: 26px;
    position: relative; text-align: center; padding: 2.4rem 1.4rem 1.6rem; border-radius: 22px;
    background: #fffaf2; border: 1px solid var(--om-line); box-shadow: 0 12px 28px rgba(77, 32, 25, .07);
}
.om-step-num {
    z-index: 2;
    position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
    width: 54px; height: 54px; display: grid; place-items: center; font-family: var(--om-ruqaa); font-weight: 700; font-size: 1.7rem; color: #fff;
    background: var(--om-maroon); clip-path: polygon(50% 0, 64% 14%, 85% 15%, 86% 36%, 100% 50%, 86% 64%, 85% 85%, 64% 86%, 50% 100%, 36% 86%, 15% 85%, 14% 64%, 0 50%, 14% 36%, 15% 15%, 36% 14%);
}
.om-steps li:nth-child(2) .om-step-num { background: var(--om-green); }
.om-steps li:nth-child(3) .om-step-num { background: var(--om-clay); }
.om-steps h3 { font-family: CooperArabic, sans-serif; font-size: 1.3rem; color: var(--om-ink); margin: .4rem 0 .4rem; line-height: 1.6; }
.om-steps p { color: var(--om-dim); margin: 0; line-height: 1.9; }

/* the courses list below keeps its base design, retuned by the variables above */
.mk-home .courses-section .section-title, .mk-home .courses-section h2 { color: var(--om-ink); }

/* login / register / privacy / terms: solid bar over the light page */
body:not(.mk-home) .mk-nav { background: rgba(248, 239, 226, .92) !important; backdrop-filter: blur(8px); }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .om-hero { padding: 125px 0 3.5rem; }
    .om-hero-in { grid-template-columns: 1fr; gap: 2.4rem; text-align: center; }
    .om-hero-copy { order: 2; }
    .om-stage { order: 1; max-width: 560px; margin: 0 auto; width: 100%; }
    .om-lead { margin-left: auto; margin-right: auto; }
    .om-cta, .om-points { justify-content: center; }
    .om-branches, .om-rules, .om-steps { grid-template-columns: repeat(2, 1fr); }
    .om-steps { row-gap: 2.6rem; }
    .om-callig-1 { font-size: 22rem; }
}
@media (max-width: 575.98px) {
    .om-hero { padding: 105px 0 3rem; }
    .om-stage { padding: .6rem .8rem 0; }
    .om-tag-1 { right: -4px; }
    .om-tag-2 { left: -4px; }
    .om-ring-1 { width: 62px; height: 62px; border-width: 10px; }
    .om-branches, .om-rules, .om-steps { grid-template-columns: 1fr; }
    .om-section { padding: 3.4rem 0; }
    .om-btn { padding: .8rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .om-in { opacity: 1; animation: none; }
    .om-ring, .om-tag, .om-star-1, .om-star-2 { animation: none; }
}

/* the logo is nearly square, so a little taller in the bar */
.mk-nav .mk-logo { height: 60px; }
@media (max-width: 575.98px) { .mk-nav .mk-logo { height: 46px; } }

/* phones: the side tags would cover the slogan printed on the photo */
@media (max-width: 575.98px) { .om-tag-1, .om-tag-2 { display: none; } }
