/* ==========================================================================
   أجنحة الخيال — imaginationwings.com
   Brand layer on top of Bootstrap 5.3 (RTL build).
   ========================================================================== */

:root {
    --iw-navy: #0D2250;
    --iw-night: #0B1D45;
    --iw-ink: #13213F;
    --iw-muted: #3E4A66;
    --iw-sun-bg: #FFF4D1;
    --iw-sky-bg: #E2F3FF;
    --iw-mint-bg: #E3F8EA;
    --iw-peach-bg: #FFEBD9;
    --iw-error: #B42318;
    --iw-font-body: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --iw-font-display: 'Baloo Bhaijaan 2', 'Tajawal', sans-serif;

    --bs-body-font-family: var(--iw-font-body);
    --bs-body-color: var(--iw-ink);
    --bs-body-bg: var(--iw-sun-bg);
    --bs-body-line-height: 1.7;
    --bs-primary: #0D2250;
    --bs-primary-rgb: 13, 34, 80;
    --bs-link-color: #0D2250;
    --bs-link-hover-color: #163172;
}

html { scroll-behavior: smooth; }
body { background: var(--iw-sun-bg); }
.site { overflow-x: hidden; }

/* ---------- Colour themes (set --c / --ink / --soft / --dk) ---------- */
.c-yellow { --c: #FFC93C; --ink: #3A2A00; --soft: #FFF4D1; --dk: #C98F00; }
.c-pink   { --c: #FF6F9C; --ink: #3D0A1E; --soft: #FFE4EE; --dk: #D9467A; }
.c-sky    { --c: #4FB3E8; --ink: #0B2545; --soft: #E2F3FF; --dk: #2A82B4; }
.c-green  { --c: #5BC27A; --ink: #0B2E1A; --soft: #E3F8EA; --dk: #3A9A58; }
.c-purple { --c: #B08CFF; --ink: #1E0B4A; --soft: #EFE8FF; --dk: #7A55E0; }
.c-orange { --c: #FF9F43; --ink: #3A1A00; --soft: #FFEBD9; --dk: #D97A1C; }
.c-purple-strong { --c: #8E5CF0; --ink: #FFFFFF; --soft: #EFE8FF; --dk: #5E35B8; }

/* ---------- Type ---------- */
.font-display { font-family: var(--iw-font-display); }
/* Blazor's FocusOnNavigate focuses the page h1; don't draw the focus ring around it. */
h1:focus { outline: none; }
.hero-title { font-weight: 800; font-size: clamp(2.1rem, 5.6vw, 4.5rem); line-height: 1.25; }
.page-title { font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.3; }
.section-title { font-weight: 800; font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.3; color: var(--iw-navy); margin: 0; }
.display-title { font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.3; }
.card-title-lg { font-weight: 800; font-size: 1.55rem; color: var(--iw-navy); }
.lead-text { font-size: 1.2rem; }
.text-navy { color: var(--iw-navy) !important; }
.text-body-muted { color: var(--iw-muted) !important; }
.text-soft { color: #E4EAF8 !important; }
.text-sun { color: #FFC93C !important; }
.text-skyl { color: #7FD3FF !important; }
.text-rose { color: #FF9EC0 !important; }
.text-rose-dk { color: #D9467A !important; }
.text-sky-dk { color: #2A82B4 !important; }
.text-green-dk { color: #2E8A4C !important; }
.text-orange-dk { color: #C25E00 !important; }

/* ---------- Section backgrounds ---------- */
.bg-sun { background: var(--iw-sun-bg); }
.bg-skylight { background: var(--iw-sky-bg); }
.bg-mint { background: var(--iw-mint-bg); }
.bg-peach { background: var(--iw-peach-bg); }

.sky {
    background-color: var(--iw-night);
    background-image:
        radial-gradient(1.6px 1.6px at 6% 14%, rgba(255,255,255,.95) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 15% 62%, rgba(255,255,255,.8) 50%, transparent 52%),
        radial-gradient(2px 2px at 24% 30%, rgba(255,236,170,.95) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 33% 80%, rgba(255,255,255,.7) 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 41% 10%, rgba(255,255,255,.9) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 52% 48%, rgba(255,255,255,.75) 50%, transparent 52%),
        radial-gradient(2px 2px at 61% 22%, rgba(255,236,170,.9) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 69% 70%, rgba(255,255,255,.8) 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 78% 8%, rgba(255,255,255,.95) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 86% 40%, rgba(255,255,255,.75) 50%, transparent 52%),
        radial-gradient(2px 2px at 93% 76%, rgba(255,236,170,.85) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 97% 24%, rgba(255,255,255,.8) 50%, transparent 52%),
        linear-gradient(180deg, #0A1A40 0%, #132C66 60%, #16506B 100%);
}

.confetti {
    background-color: var(--iw-sun-bg);
    background-image:
        radial-gradient(#FF9EC0 2.5px, transparent 3px),
        radial-gradient(#7FD3FF 2.5px, transparent 3px),
        radial-gradient(#8FDCA6 2.5px, transparent 3px);
    background-size: 90px 90px, 110px 110px, 130px 130px;
    background-position: 0 0, 40px 55px, 70px 20px;
}

.section-pad { padding-top: 4rem; padding-bottom: 5.5rem; }
.hero-pad { padding-top: 3rem; padding-bottom: 2.5rem; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.25rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; }

.wave { display: block; width: 100%; height: 80px; }

/* Decorative stars, dots and clouds */
.deco { position: absolute; pointer-events: none; line-height: 0; z-index: 0; }
/* Keep page content above the decorations (an unpositioned container would paint beneath them). */
section > .container, .order-container { position: relative; z-index: 1; }
.deco-dot { border-radius: 50%; display: block; }

/* Playful tilts */
.tilt-l  { transform: rotate(-2deg); }
.tilt-l1 { transform: rotate(-1deg); }
.tilt-r1 { transform: rotate(1deg); }
.tilt-l2 { transform: rotate(-2deg); }
.tilt-r2 { transform: rotate(2deg); }
.tilt-l6 { transform: rotate(-6deg); }
.tilt-r6 { transform: rotate(6deg); }
.pop { transition: transform .2s ease; }
.pop:hover { transform: translateY(-6px) rotate(0deg) !important; }

/* ---------- Navigation ---------- */
.site-nav { padding-top: 1.1rem; padding-bottom: 1.1rem; position: relative; z-index: 5; }
.brand-logo { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 4px #FFC93C; }
.brand-name { font-weight: 800; font-size: 1.75rem; color: #fff; }
.brand-tag { font-size: .875rem; color: #FFE7A0; }
.site-nav .nav-link { color: #E4EAF8; font-weight: 700; border-radius: 999px; padding: .4rem .9rem !important; }
.site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { color: var(--iw-navy); background: #FFE7A0; }
.site-nav .navbar-toggler { border: 2px solid rgba(255,255,255,.5); border-radius: 14px; padding: .5rem .7rem; }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px #FF6F9C; }
.nav-back { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: #E4EAF8; font-weight: 700; text-decoration: none; }
.nav-back:hover { color: #fff; text-decoration: underline; }

@media (max-width: 991.98px) {
    .site-nav .navbar-collapse { background: rgba(10, 26, 64, .92); border-radius: 22px; margin-top: .75rem; padding: 0 1rem; }
}

/* ---------- Pills & chips ---------- */
.pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem 1.05rem; border-radius: 999px;
    background: var(--c, #FFC93C); color: var(--ink, #3A2A00);
    font-weight: 800; font-size: 1rem; line-height: 1.5; white-space: nowrap;
}
.pill-sm { font-size: .94rem; padding: .2rem .9rem; }
.pill-wrap { white-space: normal; }
.deco-static { line-height: 0; }
.pill-shadow { box-shadow: 0 4px 0 var(--dk, #C98F00); }

.note-chip {
    display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
    padding: .4rem .9rem; border-radius: 16px;
    background: var(--soft); border: 2px solid var(--c); color: var(--ink);
    font-weight: 700; font-size: .94rem; line-height: 1.5;
}

.chip-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
    min-height: 46px; padding: 0 1.1rem; border-radius: 999px;
    border: 2px solid var(--c); background: var(--soft); color: var(--iw-ink);
    font: inherit; font-weight: 700; font-size: 1rem;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: transform .15s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip:focus-visible { outline: 3px solid #1F6B52; outline-offset: 3px; }
.chip-on { background: var(--c); color: var(--ink); border-color: var(--dk); box-shadow: 0 4px 0 var(--dk); }
.chip-lg { min-height: 52px; min-width: 96px; justify-content: center; border-radius: 14px; font-size: 1.06rem; }
.chip-check { line-height: 0; }

/* ---------- Toy buttons ---------- */
.btn-toy {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 54px; padding: 0 1.75rem; border: 0; border-radius: 999px;
    background: var(--c, #FFC93C); color: var(--ink, #3A2A00);
    font-family: inherit; font-weight: 800; font-size: 1.1rem; text-decoration: none; text-align: center; max-width: 100%;
    box-shadow: 0 6px 0 var(--dk, #C98F00);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-toy:hover { color: var(--ink, #3A2A00); transform: translateY(-2px); }
.btn-toy:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--dk, #C98F00); }
.btn-toy:focus-visible { outline: 3px solid #FF6F9C; outline-offset: 3px; }
.btn-toy:disabled { opacity: .7; transform: none; }
.btn-toy-sm { min-height: 46px; padding: 0 1.3rem; font-size: 1rem; box-shadow: 0 5px 0 var(--dk, #C98F00); }
.btn-toy-lg { min-height: 60px; padding: 0 2rem; font-size: 1.2rem; box-shadow: 0 7px 0 var(--dk, #C98F00); }
.btn-toy-xl { min-height: 64px; font-size: 1.35rem; box-shadow: 0 7px 0 var(--dk, #C98F00); }
.btn-toy-outline { --c: transparent; --ink: var(--iw-navy); --dk: transparent; border: 2px solid var(--iw-navy); box-shadow: none; }

/* ---------- Cards ---------- */
.toy-card { background: #fff; border: 3px solid var(--c); border-radius: 28px; box-shadow: 0 8px 0 var(--dk); }
.toy-card.soft { background: var(--soft); }

.icon-badge {
    flex: none; display: grid; place-items: center;
    width: 60px; height: 60px; border-radius: 20px;
    background: var(--c); color: var(--ink);
}
.icon-badge-sm { width: 50px; height: 50px; border-radius: 16px; }

.feature-row {
    display: flex; align-items: center; gap: .9rem;
    background: #fff; border-radius: 20px; padding: .75rem .9rem;
    box-shadow: 0 5px 0 var(--soft);
}
.feature-row .icon-badge { background: var(--c); }

.step-num {
    flex: none; display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--c); color: var(--ink); font-weight: 800; font-size: 1.5rem;
}
.step-num-lg { width: 64px; height: 64px; font-size: 2rem; }

/* ---------- Hero ---------- */
.trust-line { display: flex; align-items: center; gap: .6rem; font-size: 1.06rem; font-weight: 700; color: #B8F0C8; }
.trust-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #5BC27A; color: #0B2E1A; display: grid; place-items: center; }

.hero-fan { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1 / .95; margin: 0 auto; }
.fan-card { position: absolute; margin: 0; top: 9%; width: 45%; }
.fan-card img {
    display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
    border: 6px solid #fff; border-radius: 22px;
    box-shadow: 0 0 0 6px var(--c), 0 24px 50px rgba(0,0,0,.4);
}
.fan-card figcaption { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: .94rem; }
.fan-right { right: 0; transform: rotate(8deg); }
.fan-left { left: 0; transform: rotate(-8deg); }
.fan-center { top: 0; left: 26%; width: 48%; z-index: 2; }

/* ---------- Intro ---------- */
.intro-cover { position: relative; }
.intro-cover img {
    width: 100%; aspect-ratio: 1600 / 1131; object-fit: cover;
    border: 10px solid #fff; border-radius: 30px;
    box-shadow: 0 0 0 6px #FFC93C, 14px 16px 0 6px #FF6F9C;
}
.intro-cover figcaption { position: absolute; bottom: -22px; right: 28px; }

/* ---------- Samples ---------- */
.sample-card { margin: 0; padding: 10px 10px 22px; display: flex; flex-direction: column; gap: .9rem; height: 100%; }
.sample-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; }
.sample-card figcaption { padding: 0 .6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }

.spread-panel {
    margin-top: 5rem; padding: 2rem; border-radius: 36px;
    background: #7A45E6; color: #fff; box-shadow: 0 10px 0 #5631B8;
}
.spread-text { color: #F1EBFF; font-size: 1.12rem; }
.spread-img { width: 100%; aspect-ratio: 1600 / 1131; object-fit: cover; border: 8px solid #fff; border-radius: 24px; transform: rotate(1.5deg); }

/* ---------- CTA ---------- */
.cta-wrap { max-width: 880px; }
.cta-logo { width: 190px; height: 190px; border-radius: 50%; box-shadow: 0 0 0 8px #FFC93C, 0 0 0 16px #FF6F9C, 0 0 0 24px #4FB3E8; }
.whatsapp-note {
    display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem;
    padding: .35rem 1rem; border-radius: 999px;
    background: rgba(91,194,122,.18); border: 1.5px solid #5BC27A; color: #B8F0C8; font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer { background: #071331; color: #C9D4EE; }
.rainbow-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 8px; }

/* ---------- Order page ---------- */
.order-hero { padding-bottom: 4.5rem; }
.order-main { padding-bottom: 6rem; }
.order-container { position: relative; margin-top: -2.5rem; }

.required-note {
    align-self: flex-start; padding: .35rem .9rem; border-radius: 12px;
    background: #fff; color: #4A5675; font-size: .94rem; box-shadow: 0 6px 20px rgba(13,34,80,.08);
}
.req { color: var(--iw-error); font-weight: 800; }
.optional { font-weight: 400; color: #4A5675; font-size: .94rem; }

.form-card { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; border-radius: 30px; }
.form-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.form-card-head h2 { margin: 0; font-weight: 800; font-size: 1.75rem; color: var(--iw-navy); }
.form-label { font-weight: 700; font-size: 1.06rem; margin-bottom: .5rem; }

.form-control.field {
    min-height: 52px; padding: .75rem 1rem;
    border: 2px solid #D9CFB8; border-radius: 14px;
    font-size: 1.06rem; color: var(--iw-ink); background: #fff;
}
.form-control.field::placeholder { color: #6B7280; }
.form-control.field:focus { border-color: var(--iw-navy); box-shadow: 0 0 0 4px rgba(13,34,80,.15); }
textarea.form-control.field { min-height: 110px; line-height: 1.7; resize: vertical; }
.form-control.field-dedication { min-height: 130px; background: #FFF7FA; border-color: #FFB3CB; font-size: 1.12rem; }

.validation-message { color: var(--iw-error); font-size: .94rem; margin-top: .4rem; }
.hint-warn { color: #8A5A00; font-size: .94rem; margin-top: .6rem; }

.drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    min-height: 190px; padding: 1.5rem; text-align: center; cursor: pointer;
    border: 2.5px dashed #B9C6E0; border-radius: 22px; background: #F6F9FF;
    transition: background .15s ease, border-color .15s ease;
}
.drop:hover { border-color: var(--iw-navy); background: #EEF3FC; }
.visually-hidden:focus-visible + .drop { outline: 3px solid #1F6B52; outline-offset: 3px; }
.drop-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--iw-navy); color: #FFD45C; display: grid; place-items: center; }
.drop-preview { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 10px 24px rgba(13,34,80,.18); }

.whatsapp-hint {
    display: flex; align-items: flex-start; gap: .6rem; margin: .6rem 0 0;
    padding: .75rem .9rem; border-radius: 16px;
    background: #E3F8EA; border: 2px solid #5BC27A; color: #0B2E1A; font-size: .94rem;
}

.consent { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem; padding-inline-start: 0; color: #3E4A66; }
.consent .form-check-input { float: none; margin: .3rem 0 0; width: 1.4rem; height: 1.4rem; flex: none; border: 2px solid #9AA4BC; }
.consent .form-check-input:checked { background-color: var(--iw-navy); border-color: var(--iw-navy); }
.consent .form-check-label { flex: 1 1 0; min-width: 0; }
.consent .validation-message { flex-basis: 100%; margin-top: 0; }

.review-note {
    display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
    border-radius: 22px; background: #fff; border: 3px solid var(--c); box-shadow: 0 6px 0 var(--dk);
    font-weight: 700; line-height: 1.6;
}

/* Story card (live summary) */
.story-card {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    padding: 1.75rem; border-radius: 28px; color: #fff;
    box-shadow: 0 0 0 5px #FFC93C, 0 0 0 10px #FF6F9C, 0 20px 50px rgba(13,34,80,.25);
}
.story-card-label { align-self: stretch; text-align: center; color: #FFD45C; font-weight: 800; font-size: .94rem; }
.story-card-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 5px solid #FFC93C; flex: none; }
.story-card-photo-empty { display: grid; place-items: center; border: 3px dashed rgba(255,255,255,.45); color: #C9D4EE; }
.story-card-title { margin: 0; text-align: center; font-weight: 800; font-size: 1.75rem; line-height: 1.3; color: #fff; }
.story-card-list { align-self: stretch; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.story-card-list > div { display: flex; justify-content: space-between; gap: .75rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.story-card-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.story-card-list > div.stacked { flex-direction: column; gap: .3rem; }
.story-card-list dt { color: #C9D4EE; font-weight: 500; }
.story-card-list dd { margin: 0; font-weight: 700; text-align: left; }
.story-card-list dd.dedication { text-align: right; font-weight: 500; font-style: italic; color: #FFE7A0; white-space: pre-line; overflow-wrap: anywhere; }

/* On desktop the story card follows the scroll and fits the window height */
@media (min-width: 992px) {
    .story-aside { position: sticky; top: 24px; height: calc(100vh - 48px); padding: 10px; }
    .story-aside .story-card { height: 100%; overflow-y: auto; justify-content: safe center; scrollbar-width: thin; }
}

.success-card {
    max-width: 760px; padding: 3rem 2rem; border-radius: 32px; background: #fff;
    box-shadow: 0 24px 60px rgba(13,34,80,.14);
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.success-title { margin: 0; font-weight: 800; font-size: 2.2rem; line-height: 1.3; color: var(--iw-navy); }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .section-pad { padding-top: 2.25rem; padding-bottom: 3.25rem; }
    .hero-pad { padding-top: 1.5rem; }
    .wave { height: 44px; }
    .lead-text { font-size: 1.08rem; }
    .fan-card figcaption { font-size: .75rem; padding: .2rem .6rem; bottom: -14px; }
    .spread-panel { padding: 1.25rem; border-radius: 26px; margin-top: 3.5rem; }
    .form-card { padding: 1.25rem; border-radius: 24px; }
    .form-card-head h2 { font-size: 1.45rem; }
    .chip { min-height: 44px; }
    .btn-toy-lg { padding: 0 1.4rem; font-size: 1.08rem; }
    .cta-logo { width: 150px; height: 150px; }
    .success-card { padding: 2rem 1.25rem; }
    .success-title { font-size: 1.7rem; }
    .deco { transform: scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .pop, .btn-toy, .chip { transition: none; }
}

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    background: #FFF4D1; color: var(--iw-ink); bottom: 0; box-shadow: 0 -1px 6px rgba(0,0,0,.2);
    display: none; left: 0; padding: .75rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; left: .75rem; top: .5rem; }
#blazor-error-ui .reload { margin-inline-start: .5rem; }
