/* ============================================================================
   IQuiz Installation & Download Guide Page
   Clean, responsive, bilingual (FR/AR with strict RTL/LTR) styling matching inkidia_challenge
   ========================================================================= */

#ikci-root {
    --ikc-navy-1: #051A3A;
    --ikc-navy-2: #0B3160;
    --ikc-navy-3: #174380;
    --ikc-ink: #1F2746;
    --ikc-heading: #0F2557;
    --ikc-muted: #5B6478;
    --ikc-blue: #1479DB;
    --ikc-blue-deep: #0E5ED8;
    --ikc-blue-brand: #1A4FD6;
    --ikc-blue-sky: #4EA3FF;
    --ikc-blue-pale: #9CC8FF;
    --ikc-green: #109379;
    --ikc-green-deep: #0A7C66;
    --ikc-green-light: #E6F8F3;
    --ikc-purple: #6D3BE0;
    --ikc-yellow: #FED325;
    --ikc-gold: #F5A623;
    --ikc-gold-light: #FFF8E6;
    --ikc-strip: #EDF4FC;
    --ikc-card-bg: #FFFFFF;
    --ikc-line: #DDE3EE;
    --ikc-footer: #192635;
    --ikc-footer-soft: #2E3947;
    --ikc-footer-text: #8C96A6;
    --ikc-font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --ikc-font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
#ikci-root, #ikci-root * { box-sizing: border-box; }

#ikci-root {
    font-family: var(--ikc-font-body);
    color: var(--ikc-ink);
    background: #F4F7FC;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#ikci-root .fa {
    font-family: FontAwesome !important;
    display: inline-block !important;
}

.ikci-hidden { display: none !important; }

.ikci-container {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* ── STRICT LTR / RTL DIRECTION & TEXT ALIGNMENT ── */
.ikci-lang[dir="ltr"],
.ikci-lang[data-lang="fr"] {
    direction: ltr !important;
    text-align: left !important;
    font-family: var(--ikc-font-body);
}

.ikci-lang[dir="rtl"],
.ikci-lang[data-lang="ar"] {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

.ikci-lang[dir="ltr"] h1,
.ikci-lang[dir="ltr"] h2,
.ikci-lang[dir="ltr"] h3,
.ikci-lang[dir="ltr"] h4,
.ikci-lang[dir="ltr"] p,
.ikci-lang[dir="ltr"] span,
.ikci-lang[dir="ltr"] .ikci-sec-content,
.ikci-lang[dir="ltr"] .ikci-step-card,
.ikci-lang[dir="ltr"] .ikci-step-header,
.ikci-lang[dir="ltr"] .ikci-step-title,
.ikci-lang[dir="ltr"] .ikci-step-desc,
.ikci-lang[dir="ltr"] .ikci-app-meta,
.ikci-lang[dir="ltr"] .ikci-app-details,
.ikci-lang[dir="ltr"] .ikci-brand-text {
    text-align: left !important;
}

.ikci-lang[dir="rtl"] h1,
.ikci-lang[dir="rtl"] h2,
.ikci-lang[dir="rtl"] h3,
.ikci-lang[dir="rtl"] h4,
.ikci-lang[dir="rtl"] p,
.ikci-lang[dir="rtl"] span,
.ikci-lang[dir="rtl"] .ikci-sec-content,
.ikci-lang[dir="rtl"] .ikci-step-card,
.ikci-lang[dir="rtl"] .ikci-step-header,
.ikci-lang[dir="rtl"] .ikci-step-title,
.ikci-lang[dir="rtl"] .ikci-step-desc,
.ikci-lang[dir="rtl"] .ikci-app-meta,
.ikci-lang[dir="rtl"] .ikci-app-details,
.ikci-lang[dir="rtl"] .ikci-brand-text {
    text-align: right !important;
}

/* Centered specific headers */
.ikci-hero-content,
.ikci-hero-title,
.ikci-hero-sub,
.ikci-sec-head,
.ikci-sec-head h2,
.ikci-sec-head p {
    text-align: center !important;
}

/* ── Top Navigation Bar ── */
.ikci-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ikc-line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ikci-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.ikci-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ikc-heading);
}

.ikci-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1479DB, #0E5ED8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(20, 121, 219, 0.25);
    flex-shrink: 0;
}

.ikci-brand-text {
    display: flex;
    flex-direction: column;
}

.ikci-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ikc-navy-1);
}

.ikci-brand-sub {
    font-size: 0.75rem;
    color: var(--ikc-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ikci-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.ikci-lang-switch {
    display: inline-flex;
    align-items: center;
    background: #EBF1FA;
    padding: 3px;
    border-radius: 999px;
}

.ikci-lang-btn {
    border: 0;
    background: transparent;
    color: var(--ikc-muted);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ikci-lang-btn.active {
    background: #FFF;
    color: var(--ikc-blue-deep);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ikci-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ikc-blue-brand);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(20, 121, 219, 0.08);
    transition: all 0.2s ease;
}

.ikci-btn-back:hover {
    background: rgba(20, 121, 219, 0.15);
    color: var(--ikc-blue-deep);
}

/* ── Hero Status Section ── */
.ikci-hero {
    background: linear-gradient(180deg, #051A3A 0%, #0B3160 100%);
    color: #FFF;
    padding: 3rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.ikci-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #F4F7FC;
    clip-path: ellipse(55% 100% at 50% 100%);
}

.ikci-hero-content {
    max-width: 780px;
    margin-inline: auto;
    text-align: center;
}

.ikci-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(16, 147, 121, 0.2);
    border: 1px solid rgba(16, 147, 121, 0.4);
    color: #48E5C2;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.ikci-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #48E5C2;
    box-shadow: 0 0 0 0 rgba(72, 229, 194, 0.7);
    animation: ikci-pulse 1.8s infinite;
}

@keyframes ikci-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(72, 229, 194, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(72, 229, 194, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(72, 229, 194, 0); }
}

.ikci-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: #FFF;
    margin-bottom: 0.85rem;
    line-height: 1.25;
}

.ikci-hero-sub {
    font-size: 1.05rem;
    color: #B4CCE8;
    margin-bottom: 2rem;
    max-width: 620px;
    margin-inline: auto;
}

/* ── App Info & Redownload Box ── */
.ikci-download-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.ikci-app-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ikci-app-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.ikci-app-details strong {
    display: block;
    font-size: 1.15rem;
    color: #FFF;
}

.ikci-app-tags {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9CC8FF;
    font-weight: 600;
    margin-top: 2px;
}

.ikci-btn-redownload {
    background: var(--ikc-yellow);
    color: var(--ikc-navy-1) !important;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(254, 211, 37, 0.4);
    transition: all 0.2s ease;
}

.ikci-btn-redownload:hover {
    background: #FFE259;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(254, 211, 37, 0.5);
    color: var(--ikc-navy-1) !important;
}

/* ── Security Trust Notice Banner ── */
.ikci-security-banner {
    background: #FFF;
    border: 1px solid #CDE2FD;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-top: -10px;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 20px rgba(14, 94, 216, 0.06);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.ikci-lang[dir="ltr"] .ikci-security-banner {
    border-left: 5px solid var(--ikc-blue) !important;
    border-right: 1px solid #CDE2FD !important;
    flex-direction: row !important;
}

.ikci-lang[dir="rtl"] .ikci-security-banner {
    border-right: 5px solid var(--ikc-blue) !important;
    border-left: 1px solid #CDE2FD !important;
    flex-direction: row !important;
}

.ikci-sec-icon {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--ikc-blue);
    flex-shrink: 0;
}

.ikci-sec-content {
    flex: 1;
}

.ikci-sec-content h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ikc-navy-1);
    margin-bottom: 0.35rem;
}

.ikci-sec-content p {
    font-size: 0.9rem;
    color: var(--ikc-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Step-by-Step Installation Visual Guide ── */
.ikci-guide-sec {
    padding-bottom: 3.5rem;
}

.ikci-sec-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.ikci-sec-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--ikc-navy-1);
    margin-bottom: 0.5rem;
}

.ikci-sec-head p {
    font-size: 1rem;
    color: var(--ikc-muted);
    max-width: 600px;
    margin-inline: auto;
}

.ikci-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.ikci-step-card {
    background: #FFF;
    border-radius: 20px;
    border: 1px solid var(--ikc-line);
    box-shadow: 0 8px 24px rgba(11, 49, 96, 0.06);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ikci-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(11, 49, 96, 0.12);
}

.ikci-lang[dir="ltr"] .ikci-step-badge {
    position: absolute;
    top: -14px;
    left: 1.5rem !important;
    right: auto !important;
    background: linear-gradient(135deg, var(--ikc-blue), var(--ikc-blue-deep));
    color: #FFF;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(14, 94, 216, 0.3);
}

.ikci-lang[dir="rtl"] .ikci-step-badge {
    position: absolute;
    top: -14px;
    right: 1.5rem !important;
    left: auto !important;
    background: linear-gradient(135deg, var(--ikc-blue), var(--ikc-blue-deep));
    color: #FFF;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(14, 94, 216, 0.3);
}

.ikci-step-header {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.ikci-step-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ikc-navy-1);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ikci-step-desc {
    font-size: 0.88rem;
    color: var(--ikc-muted);
    line-height: 1.5;
    margin: 0;
}

.ikci-step-desc strong {
    color: var(--ikc-blue-deep);
    background: #EBF4FE;
    padding: 1px 6px;
    border-radius: 4px;
}

.ikci-step-visual {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: center;
}

.ikci-phone-mockup {
    background: #11141A;
    border: 4px solid #2B3242;
    border-radius: 20px;
    padding: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 240px;
    width: 100%;
    overflow: hidden;
}

.ikci-phone-mockup img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
}

/* ── Footer ── */
.ikci-footer {
    background: var(--ikc-footer);
    color: var(--ikc-footer-text);
    padding: 1.75rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.ikci-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ikci-footer-links a {
    color: #B4CCE8;
    text-decoration: none;
    margin-inline-start: 1.25rem;
}

.ikci-footer-links a:hover {
    color: #FFF;
}

/* ── Responsive Mobile Styles ── */
@media (max-width: 900px) {
    .ikci-steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .ikci-step-card {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .ikci-phone-mockup {
        max-width: 280px;
    }

    .ikci-download-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .ikci-app-meta {
        justify-content: center;
    }

    .ikci-btn-redownload {
        justify-content: center;
    }

    .ikci-security-banner {
        flex-direction: column !important;
        text-align: start !important;
    }
    
    .ikci-footer-inner {
        flex-direction: column;
        justify-content: center;
    }
    
    .ikci-footer-links a {
        margin-inline: 0.5rem;
    }
}
