/* Arabespañol – Formación · estilos del front-end (móvil primero, RTL) */
.arf, .arf *, .arf *::before, .arf *::after { box-sizing: border-box; }
.arf {
	--p: #5f0ff0; --p-dark: #3b0a9e; --y: #ffc400; --k: #0b0b0b;
	--blue: #2433ff; --red: #e5161c; --amber: #d99a00; --pu: #6a2bd1; --green: #19b36b;
	font-family: "Cairo", "Tajawal", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
	direction: rtl; text-align: center; line-height: 1.55; color: #141414;
	background: var(--y); padding: 12px; width: 100%; max-width: 1120px; margin: 0 auto; border-radius: 22px;
	-webkit-text-size-adjust: 100%;
}
.arf [hidden] { display: none !important; }
.arf button, .arf input, .arf a { font-family: inherit; }
.arf-panel {
	background-color: #fffef9;
	background-image: linear-gradient(rgba(20,20,60,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(20,20,60,.06) 1px, transparent 1px);
	background-size: 22px 22px; border-radius: 18px; padding: 18px 14px 24px; overflow: hidden;
	box-shadow: 0 6px 22px rgba(0,0,0,.12);
}

/* Cabecera */
.arf-logo {
	display: inline-flex; align-items: center; gap: 8px; background: var(--k); color: #fff;
	border-radius: 999px; padding: 12px 30px; box-shadow: 0 6px 16px rgba(0,0,0,.28), 0 0 0 3px #fff, 0 0 0 5px #222;
	max-width: 100%;
}
.arf-logo i { width: 13px; height: 13px; border-radius: 50%; display: inline-block; flex: none; }
.arf-logo .d1 { background: var(--red); } .arf-logo .d2 { background: var(--y); } .arf-logo .d3 { background: #3d5bff; }
.arf-logo span { font-size: clamp(1.5rem, 7vw, 2.1rem); font-weight: 800; letter-spacing: .01em; margin-inline-start: 6px; line-height: 1.1; }
.arf-logo-img { background: none; box-shadow: none; padding: 0; }
.arf-logo-img img { max-width: min(100%, 320px); height: auto; display: block; }
.arf-slogan { margin: 16px 0 2px; font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 800; }
.arf .c-blue { color: var(--blue); } .arf .c-yellow { color: var(--amber); } .arf .c-red { color: var(--red); }
.arf-sub { margin: 0 0 6px; font-size: clamp(1.25rem, 5vw, 1.7rem); font-weight: 800; color: var(--pu); }

/* Horas de formación */
.arf-hours {
	margin: 16px auto 4px; max-width: 640px; padding: 12px 16px;
	background: #fff; border: 2px dashed var(--p); border-radius: 16px;
}
.arf-hours-pre { display: block; font-size: .95rem; color: #555; font-weight: 600; }
.arf-hours-line { display: block; font-size: clamp(1.05rem, 4.4vw, 1.4rem); font-weight: 800; color: #111; }
.arf-hours-n { color: var(--p); font-size: 1.35em; font-variant-numeric: tabular-nums; padding: 0 .1em; }

/* Título principal y textos */
.arf-title-pill {
	display: block; margin: 22px auto 12px; max-width: 520px; background: var(--k); color: var(--y);
	border-radius: 999px; padding: 14px 22px; font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 800; line-height: 1.25;
	box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.arf-intro { margin: 8px 0 0; font-size: 1.05rem; font-weight: 700; color: #1b1b3a; }
.arf-intro2 { margin: 2px 0 18px; font-size: 1rem; color: #3b2a8a; font-weight: 700; }
.arf-prev-title { margin: 30px 0 14px; font-size: 1.35rem; font-weight: 800; color: var(--p-dark); display: flex; align-items: center; gap: 12px; }
.arf-prev-title::before, .arf-prev-title::after { content: ""; flex: 1; height: 2px; background: rgba(59,10,158,.25); }

/* Tarjetas de cursos */
.arf-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .arf { padding: 16px; } .arf-panel { padding: 26px 24px 32px; } .arf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .arf-grid { grid-template-columns: repeat(3, 1fr); } }

.arf-card {
	background: var(--p); color: #fff; border: 2px solid var(--p-dark); border-radius: 18px;
	padding: 14px 14px 16px; box-shadow: 0 8px 20px rgba(59,10,158,.32); text-align: center; min-width: 0;
}
.arf-card.is-fin { background: #4a1fc4; }
.arf-card-name {
	background: var(--y); color: #111; border: 2px solid var(--p-dark); border-radius: 9px;
	padding: 6px 10px; font-weight: 800; font-size: .98rem; line-height: 1.35;
}
.arf-card-level { margin: 14px 0 12px; color: #fff; font-size: 1.4rem; font-weight: 800; line-height: 1.3; }

/* Barra de progreso */
.arf-progress {
	position: relative; direction: ltr; height: 24px; background: #fff; border: 2px solid rgba(0,0,0,.18);
	border-radius: 999px; overflow: hidden;
}
.arf-progress-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffb300, var(--y)); border-radius: 999px; }
.arf-progress.is-fin .arf-progress-fill, .arf-card.is-fin .arf-progress-fill { background: linear-gradient(90deg, #12a35e, #35d58f); }
.arf-progress b { position: relative; display: block; text-align: center; font-size: .85rem; line-height: 20px; color: #111; }
.arf-card-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: .85rem; color: #e9e0ff; }
.arf-badge { border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: .8rem; color: #111; }
.arf-badge-run { background: var(--y); } .arf-badge-fin { background: #7df0b8; }
.arf-note { margin: 14px 0 12px; font-size: .98rem; line-height: 1.7; color: #fff; }

/* Formulario */
.arf-form { display: flex; gap: 8px; align-items: stretch; direction: ltr; }
.arf-field { position: relative; flex: 1; min-width: 0; display: block; }
.arf .arf-field input {
	width: 100%; min-height: 48px; padding: 10px 40px 10px 12px; font-size: 16px; color: #111; background: #fff;
	border: 2px solid var(--y); border-radius: 10px; outline: none; text-align: left; direction: ltr; box-shadow: none;
}
.arf .arf-field input::placeholder { color: #8a8a99; font-size: .9rem; }
.arf .arf-field input:focus { box-shadow: 0 0 0 3px rgba(255,196,0,.6); }
.arf .arf-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: 1.05rem; opacity: .6; padding: 0; }
.arf .arf-eye:hover, .arf .arf-eye:focus-visible { opacity: 1; }
.arf .arf-btn {
	display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
	min-height: 48px; padding: 10px 20px; background: var(--k); color: var(--y); border: 2px solid var(--y);
	border-radius: 10px; font-weight: 800; font-size: 1rem; line-height: 1.2; transition: background .15s, color .15s;
}
.arf .arf-btn:hover, .arf .arf-btn:focus-visible { background: var(--y); color: var(--k); outline: none; }
.arf .arf-btn:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--k); }
.arf .arf-btn[disabled] { opacity: .6; cursor: wait; }
.arf-err { margin-top: 10px; background: #fff; color: #b3001b; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: .95rem; }
.arf-authnote { margin: 8px 0 0; font-size: .85rem; color: #bff5da; font-weight: 700; }
.arf .arf-help { display: inline-block; margin-top: 12px; color: #fff; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.arf .arf-help:hover { color: var(--y); }

/* Espacio privado del curso */
.arf-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.arf .arf-link { background: none; border: 0; color: #5b3cc4; text-decoration: underline; cursor: pointer; font-weight: 700; font-size: .95rem; padding: 8px; }
.arf-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
@media (min-width: 720px) { .arf-info { grid-template-columns: repeat(4, 1fr); } }
.arf-info > div { background: #fff; border: 2px solid #e2d9ff; border-radius: 12px; padding: 8px 8px 10px; min-width: 0; }
.arf-info span { display: block; font-size: .8rem; color: #6a5c9a; font-weight: 700; }
.arf-info b { display: block; font-size: .98rem; color: var(--p-dark); overflow-wrap: anywhere; }
.arf-course .arf-progress { max-width: 560px; margin: 0 auto; }
.arf-summary { margin: 8px 0 14px; font-size: .92rem; color: #3a3a55; font-weight: 600; }
.arf-lastwrap { margin: 0 0 16px; }

.arf-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: start; }
.arf-s {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: #fff;
	border: 2px solid #e2d9ff; border-inline-start: 7px solid var(--p); border-radius: 14px; padding: 10px 12px; min-width: 0;
}
.arf-s-num { background: var(--p); color: #fff; border-radius: 10px; padding: 5px 12px; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.arf-s-body { flex: 1 1 140px; min-width: 0; }
.arf-s-title { font-weight: 800; color: #1b1340; overflow-wrap: anywhere; }
.arf-s-meta { font-size: .85rem; color: #5d5a73; }
.arf-s-meta .sep { margin: 0 .3em; }
.arf-s-act { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.arf-s-act .arf-btn { flex: 1 1 140px; min-height: 46px; }
@media (min-width: 720px) { .arf-s-act { flex: 0 0 auto; } .arf-s-act .arf-btn { flex: 0 0 auto; } }
.arf-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #f0ecfb; color: #5d5a73; font-weight: 700; font-size: .88rem; }
.arf-s-next, .arf-s-nr, .arf-s-pend { border-color: #e6e3ef; border-inline-start-color: #bdb6d6; background: #fbfaff; }
.arf-s-next .arf-s-num, .arf-s-nr .arf-s-num, .arf-s-pend .arf-s-num { background: #9a93b8; }
.arf-s-pend .arf-s-num { background: #d98a00; }

@media (prefers-reduced-motion: reduce) { .arf * { transition: none !important; } }
